<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 28, 2016 at 8:24 AM, Jeremy Theler <span dir="ltr"><<a href="mailto:jeremy@seamplex.com" target="_blank">jeremy@seamplex.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mark.<br>
<br>
The matrix is solved well with lu/preonly.<br>
<br>
If I do not call PCSetCoordinates() the error goes away but convergence<br>
is slow.<br></blockquote><div><br></div><div>Is it possible that your coordinates lie on a 2D surface? All this does is make the 6 basis vectors</div><div>for translations and rotations. You can just make these yourself and call MatSetNearNullSpace()</div><div>and see what you get.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I call PCSetCoordinates() this way (1 processor):<br>
<br>
PetscMalloc1(dimensions * mesh->n_nodes, &coords);<br>
for (j = 0; j < mesh->n_nodes; j++) {<br>
for (d = 0; d < dimensions; d++) {<br>
coords[j*dimensions + d] = mesh->node[j].x[d];<br>
}<br>
}<br>
PCSetCoordinates(pc, dimensions, dimensions * mesh->n_nodes,<br>
coords);<br>
PetscFree(coords);<br>
<br>
<br>
Thanks<br>
--<br>
jeremy<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Fri, 2016-10-28 at 09:16 -0400, Mark Adams wrote:<br>
> I think there is something wrong with your matrix. Use any solver and<br>
> verify that you like the solution first.<br>
><br>
> On Fri, Oct 28, 2016 at 9:13 AM, Jeremy Theler <<a href="mailto:jeremy@seamplex.com">jeremy@seamplex.com</a>><br>
> wrote:<br>
> Hi! I want to use PCGAMG as a preconditioner for a 3D linear<br>
> elasticity<br>
> problem (displacement-based FEM formulation) over an<br>
> unstructured grid.<br>
> I am not using DMPlex, I just build the stiffness matrix<br>
> myself and pass<br>
> it to PETSc.<br>
><br>
> I set MatSetBlockSize() to 3 and pass the node coordinates<br>
> through<br>
> PCSetCoordinates(). But using gamg and gmres I get:<br>
><br>
> PETSc error 77-0 'Eigen estimator failed: DIVERGED_NANORINF at<br>
> iteration<br>
> 0'<br>
> in /home/gtheler/libs/petsc-3.7.<wbr>4/src/ksp/ksp/impls/cheby/<wbr>cheby.c<br>
> KSPSolve_Chebyshev:440<br>
><br>
> Any suggestion? Another PC/KSP combination to try?<br>
><br>
> Thanks<br>
> --<br>
> jeremy<br>
><br>
><br>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>