[petsc-users] GAMG

Matthew Knepley knepley at gmail.com
Fri Oct 28 08:30:45 CDT 2016


On Fri, Oct 28, 2016 at 8:24 AM, Jeremy Theler <jeremy at seamplex.com> wrote:

> Hi Mark.
>
> The matrix is solved well with lu/preonly.
>
> If I do not call PCSetCoordinates() the error goes away but convergence
> is slow.
>

Is it possible that your coordinates lie on a 2D surface? All this does is
make the 6 basis vectors
for translations and rotations. You can just make these yourself and call
MatSetNearNullSpace()
and see what you get.

  Thanks,

    Matt


> I call PCSetCoordinates() this way (1 processor):
>
>     PetscMalloc1(dimensions * mesh->n_nodes, &coords);
>     for (j = 0; j < mesh->n_nodes; j++) {
>       for (d = 0; d < dimensions; d++) {
>         coords[j*dimensions + d] = mesh->node[j].x[d];
>       }
>     }
>     PCSetCoordinates(pc, dimensions, dimensions * mesh->n_nodes,
> coords);
>     PetscFree(coords);
>
>
> Thanks
> --
> jeremy
>
>
>
> On Fri, 2016-10-28 at 09:16 -0400, Mark Adams wrote:
> > I think there is something wrong with your matrix. Use any solver and
> > verify that you like the solution first.
> >
> > On Fri, Oct 28, 2016 at 9:13 AM, Jeremy Theler <jeremy at seamplex.com>
> > wrote:
> >         Hi! I want to use PCGAMG as a preconditioner for a 3D linear
> >         elasticity
> >         problem (displacement-based FEM formulation) over an
> >         unstructured grid.
> >         I am not using DMPlex, I just build the stiffness matrix
> >         myself and pass
> >         it to PETSc.
> >
> >         I set MatSetBlockSize() to 3 and pass the node coordinates
> >         through
> >         PCSetCoordinates(). But using gamg and gmres I get:
> >
> >         PETSc error 77-0 'Eigen estimator failed: DIVERGED_NANORINF at
> >         iteration
> >         0'
> >         in /home/gtheler/libs/petsc-3.7.4/src/ksp/ksp/impls/cheby/
> cheby.c
> >         KSPSolve_Chebyshev:440
> >
> >         Any suggestion? Another PC/KSP combination to try?
> >
> >         Thanks
> >         --
> >         jeremy
> >
> >
> >
> >
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161028/f97cc259/attachment.html>


More information about the petsc-users mailing list