[Dune-devel] [dune-functions] hierarchicVectorWrapper and hierarchicMatrixWrapper
Simon Praetorius
simon.praetorius at tu-dresden.de
Wed Feb 21 13:17:23 CET 2018
Hi folks,
during my development of a discretization module based directly on
dune-functions, I've implemented wrappers for hierarchically nested
vectors and matrices. The former was already available, but I don't see
how it can be extended from vectors to matrices. Thus, I've made a new
approach and came up with the idea of coupling the hierarchically nested
vector/matrix with the corresponding nesting structure. When declaring
the vector/matrix type this must already be known and is naturally
related to the index-merging strategy of the GlobalBasis.
This coupling of data-structure and nesting-structure works quite fine
and (nearly) all the former tests for hierarchicVectorWrapper can be
passed. Additionally, some more data-structures are supported, e.g. for
a taylor-hood basis
- TupleVector<std::array<std::vector<bool>,dim>, std::vector<bool>>
- TupleVector<BitFieldVector<dim>, std::vector<bool>>
usable as a bit-field in interpolation methods, for example.
With "nesting-structure" I mean a light-weight representation of the
index-merging strategies, e.g. for the examples above:
- Blocked<Blocked<Flat>, Flat>
- Blocked<LeafBlocked<dim>, Flat>
where `Blocked` is related to `BlockedLexicographic`, `Flat` is related
to (`FlatLexicographic`, `FlatInterleaved`) and `LeafBlocked<dim>` is
related to `LeafBlockedInterleaved`.
This development is now ported back from our discretization module to
dune-functions and is uploaded as an experimental branch, see MR !90.
Currently, a lot of utility code is necessary. But maybe this can be
eliminated or replaced with other code.
What do you think? Is this a way to go or should we look for a another
way to write wrappers purely on the data-structure without knowledge of
the nesting-structure?
Best wishes,
Simon
More information about the Dune-devel
mailing list