Skip to content
Snippets Groups Projects
Commit 9d642684 authored by Timo Koch's avatar Timo Koch
Browse files

[test][2p][adaptive] Use new gridvars update function

parent ce4fa1f5
No related branches found
No related tags found
1 merge request!971Feature/update gridvariables aftergridadaption
...@@ -155,8 +155,8 @@ int main(int argc, char** argv) try ...@@ -155,8 +155,8 @@ int main(int argc, char** argv) try
// update grid data after adaption // update grid data after adaption
if (wasAdapted) if (wasAdapted)
{ {
xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one
gridVariables->init(x, xOld); //!< Initialize the secondary variables to the new (and "new old") solution gridVariables->updateAfterGridAdaption(x); //!< Initialize the secondary variables to the new (and "new old") solution
problem->computePointSourceMap(); //!< Update the point source map problem->computePointSourceMap(); //!< Update the point source map
} }
} }
...@@ -171,8 +171,8 @@ int main(int argc, char** argv) try ...@@ -171,8 +171,8 @@ int main(int argc, char** argv) try
// update grid data after adaption // update grid data after adaption
if (wasAdapted) if (wasAdapted)
{ {
xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one
gridVariables->init(x, xOld); //!< Initialize the secondary variables to the new (and "new old") solution gridVariables->updateAfterGridAdaption(x); //!< Initialize the secondary variables to the new (and "new old") solution
problem->computePointSourceMap(); //!< Update the point source map problem->computePointSourceMap(); //!< Update the point source map
} }
...@@ -226,10 +226,10 @@ int main(int argc, char** argv) try ...@@ -226,10 +226,10 @@ int main(int argc, char** argv) try
if (wasAdapted) if (wasAdapted)
{ {
// Note that if we were using point sources, we would have to update the map here as well // Note that if we were using point sources, we would have to update the map here as well
xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one
assembler->setJacobianPattern(); //!< Tell the assembler to resize the matrix and set pattern assembler->setJacobianPattern(); //!< Tell the assembler to resize the matrix and set pattern
assembler->setResidualSize(); //!< Tell the assembler to resize the residual assembler->setResidualSize(); //!< Tell the assembler to resize the residual
gridVariables->init(x, xOld); //!< Initialize the secondary variables to the new (and "new old") solution gridVariables->updateAfterGridAdaption(x); //!< Initialize the secondary variables to the new (and "new old") solution
problem->computePointSourceMap(); //!< Update the point source map problem->computePointSourceMap(); //!< Update the point source map
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment