From 363192c928e1ee9ff2ec3a66301ff6c47247e60a Mon Sep 17 00:00:00 2001 From: Chloe Date: Tue, 10 Sep 2024 16:53:26 -0700 Subject: [PATCH] From DoD meeting: add a warning message to the log when max nonlinear iterations are reached --- Code/Source/svFSI/output.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Code/Source/svFSI/output.cpp b/Code/Source/svFSI/output.cpp index 8de22fbd..88cb49c6 100644 --- a/Code/Source/svFSI/output.cpp +++ b/Code/Source/svFSI/output.cpp @@ -165,6 +165,12 @@ void output_result(Simulation* simulation, std::array& 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& tStamp, double& timeP, std::ifstream& restart_file)