On Tue, Jan 21, 2014 at 9:52 PM, Jed Brown <[email protected]> wrote: > Lisandro Dalcin <[email protected]> writes: >> I thought to do that in PetIGA, but then realized that a reducer+eval >> at quadrature points+MPI_MAX sounds weird (though I can imagine some >> use cases). A reduce with MPI_MAX is a lucky consequence of computing >> integrals through quadrature. > > Suppose we want to know the max stress in a structure to determine > whether it will be damaged by a given loading scenario? The quadrature > points are not sufficient to determine a max stress for the discrete > solution, but it is a convergent method for determining the max stress > of the continuum structure.
So I wrote PetscFEIntegrateScalars, but then realized that I have no idea how to organize the DM level. Residuals and jacobians can be only be "turned on" via DMSNESSetFunctionLocal, and then accessed via the SNES. This would work in the specific case of an objective, but not for the general case where we're integrating some arbitrary number of PetscScalars. Where should the outer "integrate a bunch of scalars over a DM with a bunch of PetscFE" objects go, and what should it be called? The naming conventions at this level are rather obscure. Relatedly, is it going to be a problem if I want to use PetscFE routines outside an SNES, such as inside a TAO optimization problem? Should I make a dummy SNES and then point TAO to SNESComputeObjective and such, or is there a cleaner way? Geoffrey
