hermit.fenics.spaces
Space-descriptor plumbing – normalise / build dolfinx FunctionSpaces from
a compact (family, degree[, value_shape]) tuple, plus the single definition of the
RM-shell mixed state space.
Pure FEniCSx (DOLFINx 0.9 / 0.11), no CSDL. _ELEMENTS / state_space used to
live on ShellPDE directly; they are factored out here so ShellPDE and the new
ShellDomain both call the same code instead of each building the mixed element by
hand.
Functions
|
True for DG / DQ / Quadrature spaces -- the single definition, which |
|
Build the |
|
Normalise a space descriptor to |
|
The mixed (displacement, rotation) state space for the R-M shell -- e.g. CG2xCG1 |
Module Contents
- hermit.fenics.spaces.is_discontinuous(space) bool
True for DG / DQ / Quadrature spaces – the single definition, which
hermit.fenics.ops._space_is_dgdelegates to."Quadrature"counts: its dofs are per-quadrature-point values, with no continuity across cells.
- hermit.fenics.spaces.make_space(mesh, space)
Build the
dolfinxFunctionSpacefor a (possibly un-normalised) space descriptor.Ordinary families go through the plain
functionspaceelement tuple."Quadrature"must go throughbasix.ufl.quadrature_element– it is not a valid plain family string forfunctionspace. Note: any UFL measure that later touches a quadrature-space coefficient needs a matchingmetadata={"quadrature_degree": d}or dolfinx errors; that is the caller’s job, not this constructor’s.
- hermit.fenics.spaces.normalize_space(space)
Normalise a space descriptor to
(family: str, degree: int, value_shape: tuple).Accepted input:
("Lagrange", 1)/("CG", 2)/("DG", 0)/("DQ", 1)/("Quadrature", 2), each optionally with a third element giving the value shape, e.g.("DG", 0, (3, 3))/("Lagrange", 1, (3,)). A scalar space normalises tovalue_shape == ()."CG"normalises to"Lagrange"so("CG", 1)and("Lagrange", 1)are the same space – equal tuples, one cache entry.
- hermit.fenics.spaces.state_space(mesh, element='CG2CG1')
The mixed (displacement, rotation) state space for the R-M shell – e.g. CG2xCG1 for
element="CG2CG1". Ported verbatim fromShellPDE.__init__.