what is the proper way to solve it efficiently?
What are you using currently? And why is not giving you appropriate performance?
will PETSc reuse the inversion of the matrix?
Yes.
what is the proper way to solve it efficiently?
What are you using currently? And why is not giving you appropriate performance?
will PETSc reuse the inversion of the matrix?
Yes.
Unfortunately, I got a blow up for my new code, every variable looks weird even in the first time step.
I am afraid that my boundary condition is imposed in a wrong way. It seems that constructing rhs by
varf rhs(u,v)=int2d(Th)(uold*v)+on(1,u=0); real[int] b=rhs(0,Vh,tgv=-1);
is wrong. Maybe a mass matrix multiply uold
M*uold[]
is correct, I just thought they were the same thing.
Actually I am not sure with the time derivative term discretized by finite element.
Anyway, I will figure out what’s going wrong as soon as possible.
Hello, I am working on pressure Poisson equation, and your tutorial (Section 8, example 5, Poisson equation without Dirichlet BC) has been very helpful. In the process, I came across a couple of questions:
The augmented system [[ A, b ], [ b', 0 ]]
introduces one additional degree of freedom. Why is this extra DoF assigned to process 0?
How should I set up an appropriate solver? I tried gamg+gmres
, but the performance is poor — it’s very slow and even diverges when the mesh size reaches n=200. I think this is due to the zero entry on the diagonal.
PCFIELDSPLIT
and it will converge in a single iteration).Hi, @prj
Thanks for your reply. I’ve tried what you suggested, and the following sparams
gives a converge result, but I’m not sure if it is actually the correct or recommended configuration:
set(N ,sparams = "-ksp_type fgmres -pc_type fieldsplit "
+ "-pc_fieldsplit_schur_precondition self -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type full -pc_fieldsplit_detect_saddle_point "
+ "-fieldsplit_0_pc_type gamg -fieldsplit_0_ksp_type preonly ");
Could you please take a quick look at my solver settings?
If they give you satisfactory results, then good. It’s not what I recommended just prior, but that is fine.