<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 22, 2014 at 2:29 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 10:12 AM, Geoffrey Irving <<a href="mailto:irving@naml.us">irving@naml.us</a>> wrote:<br>

> PetscFEIntegrateResidual_Basic seems to have a redundant argument<br>
> list.  It takes a single PetscFE, an array of PetscFE's, and a field<br>
> index into the array.  The single PetscFE argument is ignored.  I<br>
> would imagine that either the field index or the single PetscFE should<br>
> be eliminated.<br>
><br>
> Also, PetscFEIntegrateResidual_Basic allocates the f0 array with size<br>
><br>
>     quad.numPoints * (spatial dimension of fe[0])<br>
><br>
> but accesses it as if it had size<br>
><br>
>     quad.numPoints * (number of components of fe[field])<br>
><br>
> Am I reading this right?<br>
<br>
</div></div>Correction: the single PetscFE is currently used to look up<br>
integration routines, so is far from unused.  However, it might be<br>
possible to look up these routines in the other PetscFE objects, and<br>
we might also want to verify that all PetscFE's have the same type to<br>
avoid corrupt behavior (not sure if that would be a problem or not).<br>
<br>
I still think we allocate f0 as the wrong size, though.</blockquote><div><br></div><div>This is correct. The origin of the bug is a little obscure. I wanted everything in this</div><div>interior function to be static (and I still think this would be nice). I had #defined</div>
<div>the dimension, so if I assumed the numComp <= dim, this could happen. I messed up</div><div>the conversion when I dropped the static allocation.</div><div><br></div><div>   Matt</div><div> </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>