22#if defined(SVMP_FE_WITH_MESH) && SVMP_FE_WITH_MESH
23# include "Mesh/Core/MeshTypes.h"
25# define SVMP_FE_HAS_MESH_TYPES 1
29# define SVMP_FE_HAS_MESH_TYPES 0
32#if !SVMP_FE_HAS_MESH_TYPES
34#ifndef SVMP_CELL_FAMILY_DEFINED
36#define SVMP_CELL_FAMILY_DEFINED 1
130#if SVMP_FE_HAS_MESH_TYPES
308template<
int SpatialDim,
int ReferenceDim = SpatialDim>
309using Jacobian = std::array<std::array<double, static_cast<std::size_t>(ReferenceDim)>,
static_cast<std::size_t
>(SpatialDim)>;
324template<
typename T,
typename Tag>
331 constexpr StrongType() noexcept(std::is_nothrow_default_constructible_v<T>)
338 constexpr explicit StrongType(T value)
noexcept(std::is_nothrow_move_constructible_v<T>)
339 : value_(std::move(value)) {}
345 constexpr T&
get() noexcept {
return value_; }
350 constexpr const T&
get() const noexcept {
return value_; }
356 constexpr explicit operator T() const noexcept {
return value_; }
364 return value_ == other.value_;
372 return value_ != other.value_;
380 return value_ < other.value_;
472 return svmp::CellFamily::Line;
476 return svmp::CellFamily::Triangle;
481 return svmp::CellFamily::Quad;
485 return svmp::CellFamily::Tetra;
490 return svmp::CellFamily::Hex;
495 return svmp::CellFamily::Wedge;
500 return svmp::CellFamily::Pyramid;
503 return svmp::CellFamily::Point;
506 return svmp::CellFamily::Point;
DOF-specific index type.
Definition Types.h:409
constexpr bool is_valid() const noexcept
Check whether this index refers to a valid DOF.
Definition Types.h:420
constexpr DofIndex() noexcept
Construct an invalid DOF index (the negative sentinel).
Definition Types.h:414
Strong type wrapper template for type-safe programming.
Definition Types.h:325
constexpr bool operator!=(const StrongType &other) const noexcept
Compare wrapped values for inequality.
Definition Types.h:371
constexpr bool operator<(const StrongType &other) const noexcept
Order by wrapped value.
Definition Types.h:379
constexpr T & get() noexcept
Access the wrapped value.
Definition Types.h:345
constexpr const T & get() const noexcept
Access the wrapped value.
Definition Types.h:350
constexpr StrongType() noexcept(std::is_nothrow_default_constructible_v< T >)
Value-initialize the wrapped value.
Definition Types.h:331
T ValueType
Underlying value type.
Definition Types.h:328
constexpr bool operator==(const StrongType &other) const noexcept
Compare wrapped values for equality.
Definition Types.h:363
constexpr StrongType(T value) noexcept(std::is_nothrow_move_constructible_v< T >)
Wrap an explicit value.
Definition Types.h:338
constexpr bool is_field_type_v
Definition Types.h:457
constexpr GlobalIndex INVALID_GLOBAL_INDEX
Definition Types.h:147
BasisType
Basis function families.
Definition Types.h:247
std::uint16_t FieldId
Field identifier type.
Definition Types.h:122
constexpr FieldId CURRENT_SOLUTION_FIELD_ID
Sentinel FieldId representing "the current solution state" in tangent forms.
Definition Types.h:172
FieldType
Field types for function spaces.
Definition Types.h:257
constexpr LocalIndex INVALID_LOCAL_INDEX
Definition Types.h:145
std::int64_t MeshGlobalId
Global mesh entity identifier.
Definition Types.h:137
std::array< double, 3 > PhysicalPoint
Point in physical coordinates.
Definition Types.h:301
Continuity
Continuity requirements for function spaces.
Definition Types.h:268
constexpr svmp::CellFamily to_mesh_family(ElementType elem) noexcept
Convert FE ElementType to Mesh CellFamily.
Definition Types.h:468
constexpr int element_dimension(ElementType elem) noexcept
Get spatial dimension of element type.
Definition Types.h:515
constexpr std::size_t kFEPreferredAlignmentBytes
Definition Types.h:175
std::uint16_t BlockId
Block identifier for block-structured systems.
Definition Types.h:127
constexpr bool is_index_type_v
Definition Types.h:444
AssemblyStrategy
Assembly strategies.
Definition Types.h:280
constexpr FieldId GEOMETRY_FIELD_ID
Definition Types.h:155
constexpr int MAX_FIELD_VALUE_COMPONENTS
Definition Types.h:185
ElementType
Reference element types supported by the FE library.
Definition Types.h:215
CellFamily
Minimal fallback for svmp::CellFamily when the Mesh library is unavailable.
Definition Types.h:44
constexpr BlockId INVALID_BLOCK_ID
Definition Types.h:157
std::int32_t MeshIndex
Local mesh entity index, shared with the Mesh library.
Definition Types.h:135
std::int64_t MeshOffset
Offset type for mesh connectivity arrays.
Definition Types.h:136
constexpr std::size_t kFEFixedObjectAlignmentBytes
Definition Types.h:178
std::array< std::array< double, static_cast< std::size_t >(ReferenceDim)>, static_cast< std::size_t >(SpatialDim)> Jacobian
Jacobian matrix type.
Definition Types.h:309
constexpr FieldId INVALID_FIELD_ID
Definition Types.h:149
std::array< double, static_cast< std::size_t >(Dim)> ReferencePoint
Point in reference element coordinates.
Definition Types.h:296
std::int64_t GlobalIndex
Global index type for distributed DOF numbering.
Definition Types.h:115
std::uint32_t LocalIndex
Local index type for element-level operations.
Definition Types.h:102
@ Lagrange
Standard nodal Lagrange basis.
@ Custom
User-defined basis.
@ Serendipity
Serendipity elements.
@ NURBS
Non-uniform rational B-splines (reserved; not yet implemented)
@ Vector
Vector field (velocity, displacement)
Definition Vector.cpp:68
@ Mixed
Mixed/composite field.
@ Tensor
Tensor field (stress, strain)
@ Scalar
Scalar field (temperature, pressure)
@ SymmetricTensor
Symmetric tensor field.
@ C1
C1 continuous (for plates/shells)
@ H_curl
H(curl) conforming.
@ C0
Continuous (standard FEM)
@ H_div
H(div) conforming.
@ Vectorized
SIMD vectorized assembly.
@ ElementByElement
Traditional element loop.
@ MatrixFree
Matrix-free operators.
@ Triangle3
3-node triangle
@ Quad9
9-node quadrilateral (bi-quadratic)
@ Pyramid14
14-node pyramid
@ Wedge6
6-node wedge/prism
@ Quad4
4-node quadrilateral
@ Quad8
8-node quadrilateral (serendipity)
@ Unknown
Unrecognized or uninitialized element type.
@ Wedge18
18-node wedge (complete quadratic)
@ Hex27
27-node hexahedron (tri-quadratic)
@ Point1
1-node point element
@ Triangle6
6-node triangle
@ Hex20
20-node hexahedron (serendipity)
@ Pyramid13
13-node pyramid
@ Tetra10
10-node tetrahedron
@ Tetra4
4-node tetrahedron
Tag type for basis-function gradients.
Definition Types.h:391
Tag type for basis-function values.
Definition Types.h:390
Tag type for global DOF indices.
Definition Types.h:392
Field value at an evaluation point — scalar, vector, or tensor.
Definition Types.h:194
double components[MAX_FIELD_VALUE_COMPONENTS]
Component values, row-major for tensors.
Definition Types.h:197
int n_components
Number of valid entries in components.
Definition Types.h:196
FieldId field
Field this value belongs to.
Definition Types.h:195
Tag type for quadrature-point indices.
Definition Types.h:388
Tag type for quadrature weights.
Definition Types.h:389
Check if a type represents a field type.
Definition Types.h:450
Check if a type is a valid index type.
Definition Types.h:431