On Fri, 23 Sep 2016, Julian Andrej wrote:

> so a question came up for me when approaching multiple variables in a
> generic way. All examples use DenseSubMatrix, DenseSubVector, resize
> and then reposition as soon as you have more than one variable. I
> understand that repositionining is option because you know the dof
> indices anyways. I have looked into Moose and there are no calls to
> DenseSubMatrix etc. when handling multiple variables. Basically i want
> to avoid changing a lot of the code, when i'm in fact just adding
> another variable to the system. Is getting the dof_indices from the
> DofMap and then resizing the element Matrix/Vector enough for the
> specific variable enough? (That would allow pretty Moose like
> "Just-add-a-kernel-behavior" or am i missing something?)
>
> Do you have any hints on how to approach that?

I ended up encapsulating this behavior in the FEMContext - the context
object does all the repositioning work, and then each kernel just has
to remember its own variable numbers and can ignore the rest.
---
Roy

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

Reply via email to