[petsc-users] Usage of AMG as preconditioner

Mark Adams mfadams at lbl.gov
Fri Sep 28 09:10:04 CDT 2018


>
>
> [0] PCSetCoordinates() line 1883 in
>
> /home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/pc/interface/precon.c
> [0] PCSetCoordinates_AGG() line 199 in
>
> /home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/pc/impls/gamg/agg.c
> [0] Petsc has generated inconsistent data
> [0] Don't know how to create null space for ndm=2, ndf=4.  Use
> MatSetNearNullSpace.
>
>
You have more important things to deal with but  PCSetCoordinates is just
for elasticity, where the null space can be constructed from the
coordinates. As the message says you need to use MatSetNearNullSpace, which
means that you need to create the null space manually.

You seem to have a 2D problem and 4 dof/cell. For pressure and density you
can use a vector of all 1.0. For the velocity you put the rotational mode,
the x translation, and the y translational mode. So 5 vectors total.

MatNullSpaceCreateRigidBody is a helper function that can create the three
rigid body modes for you (same process as PCSetCoordinates), then use that
with the two trivial 1 vectors to get a 5 field null space.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180928/e2a2cc81/attachment.html>


More information about the petsc-users mailing list