[petsc-users] GAMG

Jeremy Theler jeremy at seamplex.com
Mon Oct 31 05:54:11 CDT 2016


Hi again

I have been wokring on these issues. Long story short: it is about the
ordering of the unknown fields in the vector.

Long story:
The physics is linear elastic problem, you can see it does work with LU
over a simple cube (warp the displacements to see it does represent an
elastic problem, E=200e3, nu=0.3):

https://caeplex.com/demo/results.php?id=5817146bdb561


Say my three displacements (unknowns) are u,v,w. I can define the
unknown vector as (is this called node-based ordering?)

[u1 v1 w1 u2 v2 w2 ... un vn wn]^T

Another option is (is this called unknown-based ordering?)

[u1 u2 ... un v1 v2 ... vn w1 w2 ... wn]^T


With lu/preonly the results are the same, although the stiffnes matrixes
for each case are attached as PNGs. And of course, the near-nullspace
vectors are different. So PCSetCoordinates() should work with one
ordering and not with another one, an issue I did not take into
consideration.

After understanding Matt's point about the near nullspace (and reading
some interesting comments from Jed on scicomp stackexchange) I did built
my own vectors (I had to take a look at MatNullSpaceCreateRigidBody()
because I found out by running the code the nullspace should be an
orthonormal basis, it should say so in the docs).

Now, there are some results I do not understand. I tried these six
combinations:

order      near-nullspace       iterations    norm
-----      --------------       ----------    ----
unknown    explicit             10            1.6e-6
unknown    PCSetCoordinates     15            1.7e-7
unknown    none                 15            2.4e-7
node       explicit             fails with error -11
node       PCSetCoordinates     fails with error -11
node       none                 13            3.8e-7


Error -11 is 
PETSc's linear solver did not converge with reason
'DIVERGED_PCSETUP_FAILED' (-11)


Any explanation (for dumbs)?
Another thing to take into account: I am setting the dirichlet BCs with
MatZeroRows(), but I am not updating the columns to keep symmetry. Can
this pose a problem for GAMG?

I can post the two stiffnes matrices and the RHS vectors as binary
files. 


Thank you!
--
jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node_based.png
Type: image/png
Size: 33919 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161031/af9567d3/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unknown_based.png
Type: image/png
Size: 76356 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161031/af9567d3/attachment-0003.png>


More information about the petsc-users mailing list