[dune-functions] Global Id of dune-function basis DOFs

Simon Praetorius simon.praetorius at tu-dresden.de
Sat Jun 8 16:45:18 CEST 2019


Hi,

on a distributed grid in order to create a Dune::ParallelIndexSet for
DOFs in a GlobalBasis one has to provide a global id for each DOF (and
maybe its local index - local to the processor). I was wondering,
whether there is a generic way for dune functions global bases to create
this global id.

Assuming, we have a global id for each DOF in each leaf basis node
separately, one could easily create a global basis global id, by adding
some shift, corresponding to the position in the basis tree, to each
node DOF global id. But, how to obtain the global id of the DOFs in a
basis node?

For a LagrangeDG basis, one could think of a global id easily, e.g. the
global element id + a local key of the local DOF. but for the continuous
Lagrange basis it is already "slightly" more complicated, since the
connectivity of multiple DOFs per entity can not easily be determined,
without the help of some non dune-core functionality, like the
TwistUtilities from dune-fem. Also, one can not distinguish the
LagrangeNode and the LagrangeDGNode, since they are just aliases. So, it
is difficult to specialize a user-defined function, based on the node
type (that i receive when walking through the basis tree using
forEachLeafNode, for example)

A first thought was, that maybe one should extend the GlobalBasis with
some kind of GlobalIdSet (similar to what is in the grid) that uniquely
identifies the DOFs in a distributed grid. If this is in the basis, one
does not need to walk through the nodes manually and write for each
possible basis a wrapper function, but the writer of a basis has to
think about a possible parallel global id for the DOFs.

See also

> https://gitlab.mn.tu-dresden.de/snippets/2

for a sketch of the implementation.

One probably should add a GlobalView next to LocalView or something
similar to the GlobalBasis to initialize the global ids only when
needed. (the names local and global have multiple meanings here, this
should be clarified)

Do you think this is a extension that could be implemented? Maybe it is
not possible for all types of dune-function bases.

Best wishes,
Simon







More information about the dune-functions mailing list