Skip to content
Snippets Groups Projects
Commit 24dbe3e1 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Solve the state problem first

parent d31b3f65
No related branches found
No related tags found
No related merge requests found
...@@ -342,13 +342,12 @@ int main(int argc, char *argv[]) { ...@@ -342,13 +342,12 @@ int main(int argc, char *argv[]) {
_ell += gravityFunctional; _ell += gravityFunctional;
}; };
VectorType ud = ud_initial;
auto const state_fpi_max = auto const state_fpi_max =
parset.get<size_t>("solver.tnnmg.fixed_point_iterations"); parset.get<size_t>("solver.tnnmg.fixed_point_iterations");
for (size_t run = 1; run <= timesteps; ++run) { for (size_t run = 1; run <= timesteps; ++run) {
VectorType u; VectorType u;
VectorType ud;
SingletonVectorType alpha; SingletonVectorType alpha;
stateUpdater->extractState(alpha);
stateUpdater->nextTimeStep(); stateUpdater->nextTimeStep();
timeSteppingScheme->nextTimeStep(); timeSteppingScheme->nextTimeStep();
...@@ -394,15 +393,14 @@ int main(int argc, char *argv[]) { ...@@ -394,15 +393,14 @@ int main(int argc, char *argv[]) {
double const fixedPointTolerance = double const fixedPointTolerance =
parset.get<double>("solver.tnnmg.fixed_point_tolerance"); parset.get<double>("solver.tnnmg.fixed_point_tolerance");
for (size_t state_fpi = 1; state_fpi <= state_fpi_max; ++state_fpi) { for (size_t state_fpi = 1; state_fpi <= state_fpi_max; ++state_fpi) {
solveDisplacementProblem(problem_iterate, alpha); stateUpdater->solve(ud);
stateUpdater->extractState(alpha);
solveDisplacementProblem(problem_iterate, alpha);
timeSteppingScheme->postProcess(problem_iterate); timeSteppingScheme->postProcess(problem_iterate);
timeSteppingScheme->extractDisplacement(u); timeSteppingScheme->extractDisplacement(u);
timeSteppingScheme->extractVelocity(ud); timeSteppingScheme->extractVelocity(ud);
stateUpdater->solve(ud);
stateUpdater->extractState(alpha);
iteration_writer << iterationCounter << " "; iteration_writer << iterationCounter << " ";
if (parset.get<bool>("printProgress")) { if (parset.get<bool>("printProgress")) {
std::cerr << '.'; std::cerr << '.';
......
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