On Wed, Jun 9, 2021 at 9:11 PM edgar <edgar...@cryptolab.net> wrote:

> Hi,
>
> I am humbly sharing something which I think would improve the
> documentation and the logic of examples 3 and 4 a bit. I think that this
> would apply to other examples as well. (I was planning to keep learning
> from the examples, and have a more substantial contribution at the end,
> but it has been like a month since I last touched libMesh, and I it
> seems that I am going to be very busy in the next couple of months).
>
> Thanks.


Hi Edgar,

I agree with the updates to the code comments in both files, so thanks for
those. In the ex4 diff, it looks like you move the Ke, Fe declarations from
outside the for-loop over elements to inside? This is not likely to be an
optimization, though, since creating that storage once and "resizing" it
many times in the loop avoids dynamic memory allocations... the resizes are
no-ops if the same Elem type is used at each iteration of the for-loop. If
you have some performance profiling for this example that suggests
otherwise, I'd be happy to take a look.

-- 
John

_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to