This PR adds a mixed Poisson C++ demo. It is the first mixed method C++ demo added to DOLFINx.
Adding this demo exposed some bugs, incorrect docs and some clumsy code. Fixes include:
Removes inconsistency where a FunctionSpace and and FiniteElement both have a value shape, which is usually the same (redundant) and sometimes different (confusing). A FunctionSpace no longer stores a value size.
In FiniteElement, it was unclear how 'blocked' elements were handled and the docs were inconsistent. The is now made clear.
In numerous places, shared pointers were passed to functions that only required a reference. std::reference_wrapper is now used in containers in interfaces where appropriate in place of a shared pointer.
std::optional is now used in FiniteElement for value shape data. This removed confusion around is std::vector<std::size_t>{} unset or is it the value shape for a scalar?
This PR adds a mixed Poisson C++ demo. It is the first mixed method C++ demo added to DOLFINx.
Adding this demo exposed some bugs, incorrect docs and some clumsy code. Fixes include:
FunctionSpace
and andFiniteElement
both have a value shape, which is usually the same (redundant) and sometimes different (confusing). AFunctionSpace
no longer stores a value size.FiniteElement
, it was unclear how 'blocked' elements were handled and the docs were inconsistent. The is now made clear.std::reference_wrapper
is now used in containers in interfaces where appropriate in place of a shared pointer.std::optional
is now used inFiniteElement
for value shape data. This removed confusion around isstd::vector<std::size_t>{}
unset or is it the value shape for a scalar?There are no changes to the Python interface.