-
Notifications
You must be signed in to change notification settings - Fork 4
Implement backup and restore for fixed point iteration changes #65
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
base: main
Are you sure you want to change the base?
Implement backup and restore for fixed point iteration changes #65
Conversation
3dc23f7 to
971b985
Compare
…ot implemented yet
|
The Crank-Nicolson scheme is still failing due to problems backing up the old-old fields. I will try to fix it, but if no,t I will leave it for later PR with a temporary error message preventing back-up if Crank-Nicolson is used |
k-collie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial comments before rebase and looking at tests
test/OpenFOAM/foam_modules.mk
Outdated
| @$(MAKE) -j $(MOOSE_JOBS) test/OpenFOAM/modules/functionTestSolver/ 1>/dev/null | ||
| @$(MAKE) -j $(MOOSE_JOBS) test/OpenFOAM/modules/laplacianTestSolver/ 1>/dev/null | ||
| @$(MAKE) -j $(MOOSE_JOBS) test/OpenFOAM/modules/odeTestSolver/ 1>/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bin stdout here? Maybe make -s would do something satisfactory if there's too much output?
| _foam_mesh(read_polymesh(_foam_runtime.runTime())), | ||
| _patch_counts(), | ||
| _patch_offsets() | ||
| _foam_mesh(declareRecoverableData<Foam::fvMesh>("foam_mesh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed my mind, this should #include <Restartable.h> because declareRecoverableData comes from there.
include/mesh/FoamDataStore.h
Outdated
| writeBoundary(ostream & stream, const Foam::DimensionedField<Type, GeomMesh> & field) | ||
| { | ||
| (void)stream; | ||
| (void)field; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do the same with [[maybe_unused]] here
include/mesh/FoamDataStore.h
Outdated
| for (auto & field : mesh.curFields<T>()) | ||
| { | ||
| // Remove fields that haven't been stored. Important for subcycling to prevent the old | ||
| // fields being which haven't been stored being used on the first time step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra "being"
| inline void | ||
| storeFields(std::ostream & stream, const Foam::fvMesh & mesh, void * context) | ||
| { | ||
| const auto cur_fields{getFieldkeys<T, strict>(mesh)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We spoke about returning cur_fields from this function in order to track what we have and haven't backed up from mesh.toc().
…re not backed up. Also make changes based on code review
Summary
Implement backup and restore functionality for the data from OpenFOAM to allow fixed point iteration to be used with MOOSE. A potential advantage to be explored:
Maybe look to reproduce in the
laplacianTestSolverRelated Issue
Resolves #21
Checklist