Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time loop refactorings; Extract pre and post. #2667

Merged
merged 4 commits into from
Sep 19, 2019

Conversation

endJunction
Copy link
Member

Extract preTimestep and postTimestep calls into individual functions merging the monolithic and staggered implementations.

No behavioural change for the staggered scheme.
For the monolithic scheme the preTimestep calls are now executed separately in the beginning.

@endJunction endJunction force-pushed the TimeLoopRefactorings branch 2 times, most recently from 9f1cb57 to b0a585f Compare September 17, 2019 18:12
Unifies the monolithic and staggered cases.
Equal for both, the staggered and the monolithic
cases.
Avoids "good" state by chance.
Copy link
Member

@wenqing wenqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

NumLib::NonlinearSolverStatus nonlinear_solver_status;
preTimestepForAllProcesses(t, dt, _per_process_data, _process_solutions);

NumLib::NonlinearSolverStatus nonlinear_solver_status{false, -1};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a readable source code, suggest to define the two variables for the arguments of the ctor of NumLib::NonlinearSolverStatus. For example:

Suggested change
NumLib::NonlinearSolverStatus nonlinear_solver_status{false, -1};
const bool error_norms_met = false;
const int number_iterations = -1
NumLib::NonlinearSolverStatus nonlinear_solver_status{error_norms_met, number_iterations};


NumLib::NonlinearSolverStatus nonlinear_solver_status{true, 0};
NumLib::NonlinearSolverStatus nonlinear_solver_status{false, -1};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the same.

@endJunction endJunction merged commit 2bbd036 into ufz:master Sep 19, 2019
@endJunction endJunction deleted the TimeLoopRefactorings branch September 20, 2019 09:11
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants