[petsc-dev] questions about PetscFEIntegrateResidual_Basic

Geoffrey Irving irving at naml.us
Wed Jan 22 14:29:17 CST 2014


On Tue, Jan 21, 2014 at 10:12 AM, Geoffrey Irving <irving at naml.us> wrote:
> PetscFEIntegrateResidual_Basic seems to have a redundant argument
> list.  It takes a single PetscFE, an array of PetscFE's, and a field
> index into the array.  The single PetscFE argument is ignored.  I
> would imagine that either the field index or the single PetscFE should
> be eliminated.
>
> Also, PetscFEIntegrateResidual_Basic allocates the f0 array with size
>
>     quad.numPoints * (spatial dimension of fe[0])
>
> but accesses it as if it had size
>
>     quad.numPoints * (number of components of fe[field])
>
> Am I reading this right?

Correction: the single PetscFE is currently used to look up
integration routines, so is far from unused.  However, it might be
possible to look up these routines in the other PetscFE objects, and
we might also want to verify that all PetscFE's have the same type to
avoid corrupt behavior (not sure if that would be a problem or not).

I still think we allocate f0 as the wrong size, though.

Geoffrey



More information about the petsc-dev mailing list