svMultiPhysics
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
Types.h File Reference

Fundamental type definitions for the finite element library. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <string>
#include <type_traits>
#include <limits>
Include dependency graph for Types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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 >
 

Macros

#define SVMP_FE_HAS_MESH_TYPES   0
 
#define SVMP_CELL_FAMILY_DEFINED   1
 

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

Fundamental type definitions for the finite element library.

This header provides core type aliases, enumerations, and strong type definitions used throughout the FE library. It establishes a consistent type system that integrates with the Mesh library while maintaining independence from backend-specific types.

Macro Definition Documentation

◆ SVMP_CELL_FAMILY_DEFINED

#define SVMP_CELL_FAMILY_DEFINED   1

Guard marking that svmp::CellFamily has been defined.

◆ SVMP_FE_HAS_MESH_TYPES

#define SVMP_FE_HAS_MESH_TYPES   0

Nonzero when FE shares scalar/index types with the Mesh library.