[petsc-users] solving stokes-like equation in 3D staggered grid in irregular domain with petscsection

Jed Brown jedbrown at mcs.anl.gov
Tue Dec 3 08:49:52 CST 2013


Bishesh Khanal <bisheshkh at gmail.com> writes:
> I tried to modify my existing code to incorporate c(x) instead of 0 as you
> suggested. When c(x) is zero everywhere, the solver converges and gives me
> the result I expect, as before. However, when c(x) is non-zero in domain B,
> the solver does not seem to converge. The ouput for both cases are given
> below. When c(x) was zero everywhere, I had set the constant pressure null
> space to the system matrix and the schur complement matrix since I am
> solving the system with pctype fieldsplit and schur.  However, when c(x) is
> non-zero in domain B (I put c(x) = 1 in B for test), we do not have the
> constant null space for pressure anymore; so for this case I do not set the
> constant null space. Can you comment on what could be possibly going wrong
> ?
> 1. Output for the test case: c(x) = 0 in A, c(x) = 1 in B; mu = 1
> everywhere.
> options given:
> -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_dm_splits 0
> -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3
> -fieldsplit_0_pc_type lu -fieldsplit_0_pc_factor_mat_solver_package
> superlu_dist -fieldsplit_0_ksp_monitor -fieldsplit_0_ksp_converged_reason
> -fieldsplit_0_ksp_max_it 100 -fieldsplit_1_ksp_monitor
> -fieldsplit_1_ksp_converged_reason -ksp_converged_reason
>
> output:
>
>     Residual norms for fieldsplit_0_ solve.
>     0 KSP Residual norm 2.321914527334e+01
>     1 KSP Residual norm 5.204444045635e-14
>   Linear solve converged due to CONVERGED_RTOL iterations 1
>     Residual norms for fieldsplit_1_ solve.
>     0 KSP Residual norm 2.890735677419e+14
>     Residual norms for fieldsplit_0_ solve.

-fieldsplit_1_ksp_converged_reason to see why that subsolve does not
 converge.  Also check ksp_monitor_true_residual to get some indication
 of whether the preconditioner is singular.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131203/44ad7018/attachment.pgp>


More information about the petsc-users mailing list