-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
save state after every coupling iteration in explicit coupling #23
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1114,10 +1114,10 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l | |
|
||
memcpy(&vini[0],&vold[0],sizeof(double)*mt**nk); | ||
|
||
if( Precice_IsWriteCheckpointRequired() ) | ||
if( Precice_IsWriteCheckpointRequired() || simulationData.coupling_explicit) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would then almost always be true, right? I understnad that you always want checkpoints to be stored (to trigger some internal update). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For explicit coupling, yes. |
||
{ | ||
Precice_WriteIterationCheckpoint( &simulationData, vini ); | ||
Precice_FulfilledWriteCheckpoint(); | ||
if( Precice_IsWriteCheckpointRequired() ) Precice_FulfilledWriteCheckpoint(); | ||
} | ||
|
||
for(k=0;k<*nboun;++k){xbounini[k]=xbounact[k];} | ||
|
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.
If you need such a boolean, it would be better to make is
coupling_implicit
. Usually we assume that implicit coupling is the special case that requires special treatment. You could then still writeif (!coupling_implicit)
.But I think you don't need this check in the first place, it should be enough to call what you want always.
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.
sure,
!coupling_implicit
orcoupling_explicit
is no problem. But a check is needed. Because the call I want to happen always is only in the case of explicit coupling. For implicit coupling it should followPrecice_IsWriteCheckpointRequired()
(only at the ends of coupling iterations).