[petsc-dev] loop structure in PetscFEIntegrateJacobian_Basic
Matthew Knepley
knepley at gmail.com
Thu Jan 30 23:10:23 CST 2014
On Tue, Jan 28, 2014 at 3:45 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Tue, Jan 28, 2014 at 3:31 PM, Geoffrey Irving <irving at naml.us> wrote:
>
>> PetscFEIntegrateJacobian_Basic has four layers of loops:
>>
>> e - element
>> f - component of field being differentiated
>> g - component of field we're differentiating against
>> q - quadrature point
>>
>> It looks like g3_func and friends are being called once for each
>> combination of (e,f,g,q), even though the calls to g3_func are
>> independent of (f,g). If g3_func is expensive, this duplication seems
>> a bit slow.
>>
>> It seems like the loops should be flipped to be (e,q,f,g) major order,
>> with the user functions hoisted up to the (e,q) level. Is there a
>> reason not to do this?
>
>
> Yes, it is stupid. I will fix it.
>
I did not forget. Pushed today and verified with the SNES ex62 tests.
Matt
> Matt
>
>
>>
>> Geoffrey
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140130/4af48c42/attachment.html>
More information about the petsc-dev
mailing list