[petsc-users] GAMG
Jeremy Theler
jeremy at seamplex.com
Fri Oct 28 08:24:32 CDT 2016
Hi Mark.
The matrix is solved well with lu/preonly.
If I do not call PCSetCoordinates() the error goes away but convergence
is slow.
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
>
>
>
>
More information about the petsc-users
mailing list