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

Fixed implicit coupling in modal dynamic simulation. #99

Merged
merged 3 commits into from
Jul 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions dyna_precice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,14 +1430,13 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp
}
}
if (Precice_IsWriteCheckpointRequired()) {
printf("WARNING: implicit coupling with modal dynamic simulations is not working in the current version of the adapter.\n");
Precice_WriteIterationCheckpoint(&simulationData, vini);
// Otherwise, each iteration in implicit coupling would be written as a new step
iinc++;
jprint++;
Precice_FulfilledWriteCheckpoint();
}

iinc++;
jprint++;

if (dashpot)
RENEW(rpar, double, 4 + nev * (3 + nev));

Expand Down Expand Up @@ -2038,10 +2037,10 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp
Precice_Advance(&simulationData);
/* Adapter: If the coupling does not converge, read the checkpoint */
if (Precice_IsReadCheckpointRequired()) {
printf("WARNING: implicit coupling with modal dynamic simulations is not working in the current version of the adapter.\n");
if (*nmethod == 4) {
Precice_ReadIterationCheckpoint(&simulationData, vold);
icutb++;
memcpy(&bj[0], &cd[0], sizeof(double) * nev);
memcpy(&bjp[0], &cv[0], sizeof(double) * nev);
}
Precice_FulfilledReadCheckpoint();
}
Expand Down