svMultiPhysics
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables

Core type aliases, enumerations, constants, geometric types, and compile-time traits. More...

Collaboration diagram for Types:

Classes

struct  svmp::FE::FieldValueEntry
 Field value at an evaluation point — scalar, vector, or tensor. More...
 
class  svmp::FE::StrongType< T, Tag >
 Strong type wrapper template for type-safe programming. More...
 
struct  svmp::FE::QuadraturePointTag
 Tag type for quadrature-point indices. More...
 
struct  svmp::FE::QuadratureWeightTag
 Tag type for quadrature weights. More...
 
struct  svmp::FE::BasisValueTag
 Tag type for basis-function values. More...
 
struct  svmp::FE::BasisGradientTag
 Tag type for basis-function gradients. More...
 
struct  svmp::FE::DofTag
 Tag type for global DOF indices. More...
 
class  svmp::FE::DofIndex
 DOF-specific index type. More...
 
struct  svmp::FE::is_index_type< T >
 Check if a type is a valid index type. More...
 
struct  svmp::FE::is_index_type< LocalIndex >
 
struct  svmp::FE::is_index_type< GlobalIndex >
 
struct  svmp::FE::is_index_type< DofIndex >
 
struct  svmp::FE::is_field_type< T >
 Check if a type represents a field type. More...
 
struct  svmp::FE::is_field_type< FieldType >
 

Typedefs

using svmp::FE::LocalIndex = std::uint32_t
 Local index type for element-level operations.
 
using svmp::FE::GlobalIndex = std::int64_t
 Global index type for distributed DOF numbering.
 
using svmp::FE::FieldId = std::uint16_t
 Field identifier type.
 
using svmp::FE::BlockId = std::uint16_t
 Block identifier for block-structured systems.
 
using svmp::FE::MeshIndex = std::int32_t
 Local mesh entity index, shared with the Mesh library.
 
using svmp::FE::MeshOffset = std::int64_t
 Offset type for mesh connectivity arrays.
 
using svmp::FE::MeshGlobalId = std::int64_t
 Global mesh entity identifier.
 
template<int Dim>
using svmp::FE::ReferencePoint = std::array< double, static_cast< std::size_t >(Dim)>
 Point in reference element coordinates.
 
using svmp::FE::PhysicalPoint = std::array< double, 3 >
 Point in physical coordinates.
 
template<int SpatialDim, int ReferenceDim = SpatialDim>
using svmp::FE::Jacobian = std::array< std::array< double, static_cast< std::size_t >(ReferenceDim)>, static_cast< std::size_t >(SpatialDim)>
 Jacobian matrix type.
 
using svmp::FE::QuadraturePointIndex = StrongType< LocalIndex, QuadraturePointTag >
 
using svmp::FE::QuadratureWeight = StrongType< double, QuadratureWeightTag >
 

Enumerations

enum class  svmp::CellFamily {
  Point ,
  Line ,
  Triangle ,
  Quad ,
  Tetra ,
  Hex ,
  Wedge ,
  Pyramid ,
  Polygon ,
  Polyhedron
}
 Minimal fallback for svmp::CellFamily when the Mesh library is unavailable. More...
 
enum class  svmp::FE::ElementType : std::uint8_t {
  ElementType::Line2 ,
  ElementType::Triangle3 ,
  ElementType::Quad4 ,
  ElementType::Tetra4 ,
  ElementType::Hex8 ,
  ElementType::Wedge6 ,
  ElementType::Pyramid5 ,
  ElementType::Line3 ,
  ElementType::Triangle6 ,
  ElementType::Quad9 ,
  ElementType::Quad8 ,
  ElementType::Tetra10 ,
  ElementType::Hex27 ,
  ElementType::Hex20 ,
  ElementType::Wedge15 ,
  ElementType::Wedge18 ,
  ElementType::Pyramid13 ,
  ElementType::Pyramid14 ,
  ElementType::Point1 ,
  ElementType::Unknown
}
 Reference element types supported by the FE library. More...
 
enum class  svmp::FE::BasisType : std::uint8_t {
  BasisType::Lagrange ,
  BasisType::NURBS ,
  BasisType::Serendipity ,
  BasisType::Custom
}
 Basis function families. More...
 
enum class  svmp::FE::FieldType : std::uint8_t {
  FieldType::Scalar ,
  FieldType::Vector = 0 ,
  FieldType::Tensor ,
  FieldType::SymmetricTensor ,
  FieldType::Mixed
}
 Field types for function spaces. More...
 
enum class  svmp::FE::Continuity : std::uint8_t {
  Continuity::C0 ,
  Continuity::C1 ,
  Continuity::L2 ,
  Continuity::H_div ,
  Continuity::H_curl ,
  Continuity::Custom
}
 Continuity requirements for function spaces. More...
 
enum class  svmp::FE::AssemblyStrategy : std::uint8_t {
  AssemblyStrategy::ElementByElement ,
  AssemblyStrategy::Vectorized ,
  AssemblyStrategy::MatrixFree ,
  AssemblyStrategy::Hybrid
}
 Assembly strategies. More...
 

Functions

constexpr svmp::CellFamily svmp::FE::to_mesh_family (ElementType elem) noexcept
 Convert FE ElementType to Mesh CellFamily.
 
constexpr int svmp::FE::element_dimension (ElementType elem) noexcept
 Get spatial dimension of element type.
 

Variables

constexpr LocalIndex svmp::FE::INVALID_LOCAL_INDEX = std::numeric_limits<LocalIndex>::max()
 
constexpr GlobalIndex svmp::FE::INVALID_GLOBAL_INDEX = -1
 
constexpr FieldId svmp::FE::INVALID_FIELD_ID = std::numeric_limits<FieldId>::max()
 
constexpr FieldId svmp::FE::GEOMETRY_FIELD_ID = std::numeric_limits<FieldId>::max() - 1
 
constexpr BlockId svmp::FE::INVALID_BLOCK_ID = std::numeric_limits<BlockId>::max()
 
constexpr FieldId svmp::FE::CURRENT_SOLUTION_FIELD_ID = std::numeric_limits<FieldId>::max()
 Sentinel FieldId representing "the current solution state" in tangent forms.
 
constexpr std::size_t svmp::FE::kFEPreferredAlignmentBytes = 64u
 
constexpr std::size_t svmp::FE::kFEFixedObjectAlignmentBytes = 32u
 
constexpr int svmp::FE::MAX_FIELD_VALUE_COMPONENTS = 9
 
template<typename T >
constexpr bool svmp::FE::is_index_type_v = is_index_type<T>::value
 
template<typename T >
constexpr bool svmp::FE::is_field_type_v = is_field_type<T>::value
 

Detailed Description

Core type aliases, enumerations, constants, geometric types, and compile-time traits.

This group documents the index and identifier types used for element-local and global numbering, the enumerations shared across modules, sentinel constants, reference- and physical-space geometric aliases, and the strong-type utilities that prevent accidental mixing of conceptually distinct values.

Typedef Documentation

◆ BlockId

using svmp::FE::BlockId = typedef std::uint16_t

Block identifier for block-structured systems.

◆ FieldId

using svmp::FE::FieldId = typedef std::uint16_t

Field identifier type.

Used to distinguish between different physical fields in multi-field problems.

◆ GlobalIndex

using svmp::FE::GlobalIndex = typedef std::int64_t

Global index type for distributed DOF numbering.

Signed 64-bit for compatibility with PETSc and Trilinos. Negative values can indicate special conditions or invalid indices.

Note
Kept as a plain integer alias rather than a StrongType wrapper: this is the raw interop type handed directly to PETSc/Trilinos, where a wrapper would force an unwrap at every call. Type safety for DOF indices is provided by DofIndex (below), the strong wrapper around a GlobalIndex.

◆ Jacobian

template<int SpatialDim, int ReferenceDim = SpatialDim>
using svmp::FE::Jacobian = typedef std::array<std::array<double, static_cast<std::size_t>(ReferenceDim)>, static_cast<std::size_t>(SpatialDim)>

Jacobian matrix type.

Template Parameters
SpatialDimPhysical-space dimension (rows)
ReferenceDimReference-space dimension (columns)

◆ LocalIndex

using svmp::FE::LocalIndex = typedef std::uint32_t

Local index type for element-level operations.

Used for local node numbering within elements, local DOF indices, and other element-local indexing. Unsigned for safety.

◆ MeshGlobalId

using svmp::FE::MeshGlobalId = typedef std::int64_t

Global mesh entity identifier.

◆ MeshIndex

using svmp::FE::MeshIndex = typedef std::int32_t

Local mesh entity index, shared with the Mesh library.

◆ MeshOffset

using svmp::FE::MeshOffset = typedef std::int64_t

Offset type for mesh connectivity arrays.

◆ PhysicalPoint

using svmp::FE::PhysicalPoint = typedef std::array<double, 3>

Point in physical coordinates.

◆ QuadraturePointIndex

Type-safe index of a quadrature point within a rule.

◆ QuadratureWeight

Type-safe quadrature weight value.

◆ ReferencePoint

template<int Dim>
using svmp::FE::ReferencePoint = typedef std::array<double, static_cast<std::size_t>(Dim)>

Point in reference element coordinates.

Template Parameters
DimReference-space dimension

Enumeration Type Documentation

◆ AssemblyStrategy

enum class svmp::FE::AssemblyStrategy : std::uint8_t
strong

Assembly strategies.

Enumerator
ElementByElement 

Traditional element loop.

Vectorized 

SIMD vectorized assembly.

MatrixFree 

Matrix-free operators.

Hybrid 

Mixed strategy.

◆ BasisType

enum class svmp::FE::BasisType : std::uint8_t
strong

Basis function families.

Enumerator
Lagrange 

Standard nodal Lagrange basis.

NURBS 

Non-uniform rational B-splines (reserved; not yet implemented)

Serendipity 

Serendipity elements.

Custom 

User-defined basis.

◆ CellFamily

enum class svmp::CellFamily
strong

Minimal fallback for svmp::CellFamily when the Mesh library is unavailable.

Keeps FE compilation self-contained while preserving the same namespace and enumerator set as the Mesh library's cell-family classification.

◆ Continuity

enum class svmp::FE::Continuity : std::uint8_t
strong

Continuity requirements for function spaces.

Enumerator
C0 

Continuous (standard FEM)

C1 

C1 continuous (for plates/shells)

L2 

L2 (discontinuous)

H_div 

H(div) conforming.

H_curl 

H(curl) conforming.

Custom 

User-defined continuity requirement.

◆ ElementType

enum class svmp::FE::ElementType : std::uint8_t
strong

Reference element types supported by the FE library.

Maps to svmp::CellFamily from the Mesh library but provides FE-specific categorization including higher-order variants.

Note
The enum is consumed by name (the switches in to_mesh_family() and element_dimension() and the basis classifiers); nothing depends on the underlying numeric values, so they are left implicit. Entries are grouped by polynomial order (linear, quadratic) plus a special section.
Enumerator
Line2 

2-node line

Triangle3 

3-node triangle

Quad4 

4-node quadrilateral

Tetra4 

4-node tetrahedron

Hex8 

8-node hexahedron

Wedge6 

6-node wedge/prism

Pyramid5 

5-node pyramid

Line3 

3-node line

Triangle6 

6-node triangle

Quad9 

9-node quadrilateral (bi-quadratic)

Quad8 

8-node quadrilateral (serendipity)

Tetra10 

10-node tetrahedron

Hex27 

27-node hexahedron (tri-quadratic)

Hex20 

20-node hexahedron (serendipity)

Wedge15 

15-node wedge

Wedge18 

18-node wedge (complete quadratic)

Pyramid13 

13-node pyramid

Pyramid14 

14-node pyramid

Point1 

1-node point element

Unknown 

Unrecognized or uninitialized element type.

◆ FieldType

enum class svmp::FE::FieldType : std::uint8_t
strong

Field types for function spaces.

Enumerator
Scalar 

Scalar field (temperature, pressure)

Vector 

Vector field (velocity, displacement)

Tensor 

Tensor field (stress, strain)

SymmetricTensor 

Symmetric tensor field.

Mixed 

Mixed/composite field.

Function Documentation

◆ element_dimension()

constexpr int svmp::FE::element_dimension ( ElementType  elem)
constexprnoexcept

Get spatial dimension of element type.

Parameters
elemElement type to query.
Returns
Reference dimension from 0 (point) to 3 (volume); -1 for unknown types.

◆ to_mesh_family()

constexpr svmp::CellFamily svmp::FE::to_mesh_family ( ElementType  elem)
constexprnoexcept

Convert FE ElementType to Mesh CellFamily.

Parameters
elemElement type to classify.
Returns
Cell family of the element's linear topology; Point for unknown types.

Variable Documentation

◆ CURRENT_SOLUTION_FIELD_ID

constexpr FieldId svmp::FE::CURRENT_SOLUTION_FIELD_ID = std::numeric_limits<FieldId>::max()
constexpr

Sentinel FieldId representing "the current solution state" in tangent forms.

When differentiating a residual form to obtain the tangent (Jacobian), undifferentiated TrialFunction occurrences are rewritten to StateField nodes. Those that represent the block's own primary unknown (rather than a named external field) use this sentinel FieldId. The assembler maps it to the current solution coefficients at each quadrature point, regardless of which physics or field variables are involved.

This is distinct from INVALID_FIELD_ID, which means "uninitialized / no field." CURRENT_SOLUTION_FIELD_ID uses the same numeric value for backward compatibility with existing KernelIR encodings, but carries explicit semantic intent.

◆ GEOMETRY_FIELD_ID

constexpr FieldId svmp::FE::GEOMETRY_FIELD_ID = std::numeric_limits<FieldId>::max() - 1
constexpr

Sentinel FieldId for geometry-only quantities (no DOF dependence). Uses first registered field's space for quadrature, but logically decoupled from any specific field's DOFs.

◆ INVALID_BLOCK_ID

constexpr BlockId svmp::FE::INVALID_BLOCK_ID = std::numeric_limits<BlockId>::max()
constexpr

Sentinel for an unset or out-of-range block identifier.

◆ INVALID_FIELD_ID

constexpr FieldId svmp::FE::INVALID_FIELD_ID = std::numeric_limits<FieldId>::max()
constexpr

Sentinel FieldId meaning "uninitialized / no field".

◆ INVALID_GLOBAL_INDEX

constexpr GlobalIndex svmp::FE::INVALID_GLOBAL_INDEX = -1
constexpr

Sentinel for an unset or out-of-range global index.

◆ INVALID_LOCAL_INDEX

constexpr LocalIndex svmp::FE::INVALID_LOCAL_INDEX = std::numeric_limits<LocalIndex>::max()
constexpr

Sentinel for an unset or out-of-range local index.

◆ is_field_type_v

template<typename T >
constexpr bool svmp::FE::is_field_type_v = is_field_type<T>::value
inlineconstexpr

Convenience variable template for is_field_type.

◆ is_index_type_v

template<typename T >
constexpr bool svmp::FE::is_index_type_v = is_index_type<T>::value
inlineconstexpr

Convenience variable template for is_index_type.

◆ kFEFixedObjectAlignmentBytes

constexpr std::size_t svmp::FE::kFEFixedObjectAlignmentBytes = 32u
inlineconstexpr

Alignment for small fixed-size math objects that are commonly passed by value.

◆ kFEPreferredAlignmentBytes

constexpr std::size_t svmp::FE::kFEPreferredAlignmentBytes = 64u
inlineconstexpr

Preferred cache-line/SIMD alignment for performance-critical arrays.

◆ MAX_FIELD_VALUE_COMPONENTS

constexpr int svmp::FE::MAX_FIELD_VALUE_COMPONENTS = 9
constexpr

Maximum number of components in a FieldValueEntry (3x3 tensor).