I am now working on Navier-Stokes equations with PETSc. I am trying to solve the equations in a 125*100*100 domain, and build this cube domain mesh by Gmsh. However, when I try to solve it with a higher resolution (finer mesh), the simulation will return to a Nan error. The solver I used is:
set(NS, sparams = “-pc_type lu”);
I want to know why this error occurs and if there is any way to solve it.
Thanks in advance!
Hi,
Thank you. I added -ksp_view_converged_reason as an additional parameter, but there seem no differences in error in the output. The error is mainly this for every core:
Exec error : In Optimized version
– number :1
err code 8
-nan != -nan diff -nan => Sorry error in Optimization (q) add: int2d(Th,optimize=0)(…)
remark if you add (… , optimize=2) then you remove this check (be carefull);
OK, this is not related to PETSc, but rather FreeFEM itself. I’m sorry, the flag is -ksp_converged_reason, there is not view_, could you please try again?
I also met the same error. Are there any suggestions to debug? Thanks. -nan != -nan diff -nan => Sorry error in Optimization add: (p) int2d(Th,optimize=0)(...) remark if you add (.. , optimize=2) then you remove this check (be careful);