Skip to content

Commit

Permalink
Add warning message when max nonlinear iterations are reached (SimVas…
Browse files Browse the repository at this point in the history
…cular#271)

Co-authored-by: Chloe <[email protected]>
  • Loading branch information
chlookaburra and Chloe authored Sep 19, 2024
1 parent b2271ee commit 825872a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Code/Source/svFSI/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ void output_result(Simulation* simulation, std::array<double,3>& timeP, const i
} else {
logger << sOut << std::endl;
}

// if max number of iterations is reached, throw a warning
if (eq.itr == eq.maxItr) {
logger << "MAX NUMBER OF NONLINEAR ITERATIONS REACHED. CHECK CONVERGENCE." << std::endl;
}

}

void read_restart_header(ComMod& com_mod, std::array<int,7>& tStamp, double& timeP, std::ifstream& restart_file)
Expand Down

0 comments on commit 825872a

Please sign in to comment.