Skip to content

MLMG: Iteration interrupted with resid/bnorm = 0? #3834

Answered by WeiqunZhang
solarmaterial asked this question in Q&A
Discussion options

You must be logged in to vote

You need to give the solver an initial guess.

diff --git a/HeatEquation_EX3_C/Source/advance.cpp b/HeatEquation_EX3_C/Source/advance.cpp
index 19c4d81..23ae9bc 100644
--- a/HeatEquation_EX3_C/Source/advance.cpp
+++ b/HeatEquation_EX3_C/Source/advance.cpp
@@ -213,6 +213,8 @@ void advance (MultiFab& phi_old,
     const Real tol_rel = 1.e-10;
     const Real tol_abs = 0.0;
 
+    phi_iter_solve.setVal(0.0);
+
     // Solve linear system
     mlmg.solve({&phi_iter_solve}, {&phi_old}, tol_rel, tol_abs);//phi_old remain unchanged during the non-linear iteration
 

https://amrex-codes.github.io/amrex/docs_html/LinearSolvers.html?highlight=guess

to solve the problem given an initial guess and a …

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
7 replies
@WeiqunZhang
Comment options

@solarmaterial
Comment options

@solarmaterial
Comment options

@WeiqunZhang
Comment options

@solarmaterial
Comment options

Comment options

You must be logged in to vote
1 reply
@solarmaterial
Comment options

Comment options

You must be logged in to vote
4 replies
@WeiqunZhang
Comment options

@solarmaterial
Comment options

@WeiqunZhang
Comment options

Answer selected by solarmaterial
@solarmaterial
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants