[petsc-dev] attempt at understanding PetscFEM

Geoffrey Irving irving at naml.us
Mon Nov 18 18:29:49 CST 2013


On Mon, Nov 18, 2013 at 4:08 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Geoffrey Irving <irving at naml.us> writes:
>
>> Here's an attempt at the tensor definitions of all the functions in
>> PetscFEM.  Could you check if it looks correct, especially the
>> Jacobian section?
>
> Yes, this looks right.  I write it without the index notation in my
> paper (section 3.2 and 3.3).
<
> http://59A2.org/na/Brown-EfficientNonlinearSolversNodalHighOrder3D-2010.pdf

The seems to be a typo in the abstract:

    This effect typically limits order to at most *quadratic*, despite
the favorable accuracy and stability properties offered by *quadratic*
and higher order discretization

The index notation was the whole point, incidentally, since it
transparently defines the order of array dimensions in the code.

> FWIW, I do not agree with Matt's factoring into arrays of function
> pointers, especially since material models should be reused.  I think
> he's willing to add support for having one function pointer that fills
> up some tensors.

With the current setup I think they need to be arrays of function
pointers since different fields can live in different function spaces
and have different quadrature rules.  However, the g0,g1,g2,g3 could
be single arrays, and you could merge all f0,f1,g0,g1,g2,g3,g4 into a
single array of function pointers for simultaneous residual+Jacobian
evaluation.  Compacting it into a single function pointer always would
require forcing the use of a single global quadrature rule.  I don't
know if that would ever be a problem.

I may have more opinions about performance once I get simulations up
and running.

Geoffrey



More information about the petsc-dev mailing list