<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 22, 2014 at 4:16 PM, Geoffrey Irving <span dir="ltr"><<a href="mailto:irving@naml.us" target="_blank">irving@naml.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jan 21, 2014 at 9:52 PM, Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br>

> Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>> writes:<br>
>> I thought to do that in PetIGA, but then realized that a reducer+eval<br>
>> at quadrature points+MPI_MAX sounds weird (though I can imagine some<br>
>> use cases). A reduce with MPI_MAX is a lucky consequence of computing<br>
>> integrals through quadrature.<br>
><br>
> Suppose we want to know the max stress in a structure to determine<br>
> whether it will be damaged by a given loading scenario?  The quadrature<br>
> points are not sufficient to determine a max stress for the discrete<br>
> solution, but it is a convergent method for determining the max stress<br>
> of the continuum structure.<br>
<br>
</div></div>So I wrote PetscFEIntegrateScalars, but then realized that I have no<br>
idea how to organize the DM level.  Residuals and jacobians can be<br>
only be "turned on" via DMSNESSetFunctionLocal, and then accessed via<br>
the SNES.  This would work in the specific case of an objective, but<br>
not for the general case where we're integrating some arbitrary number<br>
of PetscScalars.<br>
<br>
Where should the outer "integrate a bunch of scalars over a DM with a<br>
bunch of PetscFE" objects go, and what should it be called?  The<br>
naming conventions at this level are rather obscure.<br>
<br>
Relatedly, is it going to be a problem if I want to use PetscFE<br>
routines outside an SNES, such as inside a TAO optimization problem?<br>
Should I make a dummy SNES and then point TAO to SNESComputeObjective<br>
and such, or is there a cleaner way?</blockquote><div><br></div><div>1) I have been putting functions like this (DMPlexComputeL2Diff) in DM because there</div><div>seemed to be no other place.</div><div><br></div><div>2) Nope you can use them anywhere</div>
<div><br></div><div>  Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
Geoffrey<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>