DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Geom::Elem Namespace Reference

Classes

struct  __TNBufferAtQuadrature
 
struct  Element
 
struct  ElementTraits
 
struct  ElementTraits< Hex27 >
 Element traits for 27-node triquadratic hexahedron (Hex27) More...
 
struct  ElementTraits< Hex8 >
 Element traits for 8-node trilinear hexahedron (Hex8) More...
 
struct  ElementTraits< Line2 >
 Element traits for 2-node linear line element (Line2) More...
 
struct  ElementTraits< Line3 >
 Element traits for 3-node quadratic line element (Line3) More...
 
struct  ElementTraits< Prism18 >
 Element traits for 18-node quadratic prism (Prism18) More...
 
struct  ElementTraits< Prism6 >
 Element traits for 6-node linear prism (Prism6) More...
 
struct  ElementTraits< Pyramid14 >
 Element traits for 14-node quadratic pyramid (Pyramid14) More...
 
struct  ElementTraits< Pyramid5 >
 Element traits for 5-node linear pyramid (Pyramid5) More...
 
struct  ElementTraits< Quad4 >
 Element traits for 4-node bilinear quadrilateral (Quad4) More...
 
struct  ElementTraits< Quad9 >
 Element traits for 9-node biquadratic quadrilateral (Quad9) More...
 
struct  ElementTraits< Tet10 >
 Element traits for 10-node quadratic tetrahedron (Tet10) More...
 
struct  ElementTraits< Tet4 >
 Element traits for 4-node linear tetrahedron (Tet4) More...
 
struct  ElementTraits< Tri3 >
 Element traits for 3-node linear triangle (Tri3) More...
 
struct  ElementTraits< Tri6 >
 Element traits for 6-node quadratic triangle (Tri6) More...
 
struct  Quadrature
 
struct  ShapeFuncImpl
 
struct  ShapeFuncImpl< Hex27 >
 
struct  ShapeFuncImpl< Hex8 >
 
struct  ShapeFuncImpl< Line2 >
 
struct  ShapeFuncImpl< Line3 >
 
struct  ShapeFuncImpl< Prism18 >
 
struct  ShapeFuncImpl< Prism6 >
 
struct  ShapeFuncImpl< Pyramid14 >
 
struct  ShapeFuncImpl< Pyramid5 >
 
struct  ShapeFuncImpl< Quad4 >
 
struct  ShapeFuncImpl< Quad9 >
 
struct  ShapeFuncImpl< Tet10 >
 
struct  ShapeFuncImpl< Tet4 >
 
struct  ShapeFuncImpl< Tri3 >
 
struct  ShapeFuncImpl< Tri6 >
 
class  SummationNoOp
 

Typedefs

using tNj = Eigen::RowVector< t_real, Eigen::Dynamic >
 
using tD1Nj = Eigen::Matrix< t_real, 3, Eigen::Dynamic >
 
using tD01Nj = Eigen::Matrix< t_real, 4, Eigen::Dynamic >
 
using tDiNj = Eigen::Matrix< t_real, Eigen::Dynamic, Eigen::Dynamic >
 
using tPy_ElemType = py::enum_< ElemType >
 
using tElevSpan = std::array< t_index, elevSpanMaxWidth >
 Elevation span type: array of parent node indices.
 
using tBisectSub = std::array< t_index, bisectSubMaxNodes >
 Bisection sub-element node array type.
 
using tVTKNodeOrder = std::array< int, vtkNodeOrderMax >
 VTK node ordering permutation array type.
 

Enumerations

enum  ElemType {
  UnknownElem = 0 , Line2 = 1 , Line3 = 8 , Tri3 = 2 ,
  Tri6 = 9 , Quad4 = 3 , Quad9 = 10 , Tet4 = 4 ,
  Tet10 = 11 , Hex8 = 5 , Hex27 = 12 , Prism6 = 6 ,
  Prism18 = 13 , Pyramid5 = 7 , Pyramid14 = 14 , ElemType_NUM = 15
}
 
enum  ParamSpace {
  UnknownPSpace = 0 , LineSpace = 1 , TriSpace = 2 , QuadSpace = 3 ,
  TetSpace = 4 , HexSpace = 5 , PrismSpace = 6 , PyramidSpace = 7 ,
  ParamSpace_NUM = 8
}
 

Functions

Eigen::Matrix< t_real, 3, Eigen::Dynamic > GetStandardCoord (ElemType t)
 
DNDS_DEVICE_CALLABLE constexpr ParamSpace ElemType_to_ParamSpace (const ElemType t)
 
DNDS_DEVICE_CALLABLE constexpr ElemType GetFaceType (ElemType t_v, t_index iFace)
 
DNDS_DEVICE_CALLABLE constexpr t_real ParamSpaceVol (ParamSpace ps)
 
DNDS_DEVICE_CALLABLE constexpr int GetElemElevation_O1O2_NumNode (ElemType t)
 
DNDS_DEVICE_CALLABLE constexpr ElemType GetElemElevation_O1O2_ElevatedType (ElemType t)
 
DNDS_DEVICE_CALLABLE constexpr ElemType GetElemElevation_O1O2_NodeSpanType (ElemType t, t_index ine)
 
DNDS_DEVICE_CALLABLE constexpr ElemType GetElemO1 (ParamSpace ps)
 
DNDS_DEVICE_CALLABLE constexpr t_index GetO2ElemBisectNum (ElemType t)
 
DNDS_DEVICE_CALLABLE constexpr ElemType GetO2ElemBisectElem (ElemType t, t_index i)
 
template<int diffOrder, class TPoint , class TArray >
DNDS_DEVICE_CALLABLE void ShapeFunc_DiNj (ElemType t, const TPoint &p, TArray &&v)
 Dispatch to per-element shape function code via ShapeFuncImpl<T>.
 
bool cellsAreFaceConnected (const std::vector< DNDS::index > &nodes_A, const std::vector< DNDS::index > &nodes_B, Element eA, Element eB)
 
bool cellsAreFaceConnected (const std::vector< DNDS::index > &verts_A, const std::vector< DNDS::index > &nodes_B)
 
template<class tCoordsIn >
tJacobi ShapeJacobianCoordD01Nj (const tCoordsIn &cs, Eigen::Ref< const tD01Nj > DiNj)
 
template<class tCoordsIn >
tPoint PPhysicsCoordD01Nj (const tCoordsIn &cs, Eigen::Ref< const tD01Nj > DiNj)
 
template<int dim>
real JacobiDetFace (Eigen::Ref< const tJacobi > J)
 
tPoint GetElemNodeMajorSpan (const tSmallCoords &coords)
 
t_index GetO2ElemBisectVariant (Element e, const tSmallCoords &coords)
 
template<class TIn >
std::pair< int, std::vector< index > > ToVTKVertsAndData (Element e, const TIn &vin)
 
void pybind11_ElemType_define (py::module_ &m)
 
DNDS_DEVICE_CALLABLE constexpr t_real ParamSpaceVolume (ParamSpace ps)
 Get the volume of a parametric space.
 
DNDS_DEVICE_CALLABLE constexpr ElemType ParamSpaceO1Elem (ParamSpace ps)
 Get the order-1 (linear) element type for a parametric space.
 
template<typename Func >
DNDS_DEVICE_CALLABLE constexpr decltype(autoDispatchElementType (ElemType t, Func &&func)
 Static dispatch over element types at compile time.
 
auto GetQuadPatches (Quadrature &q)
 
template<int dim>
real CellJacobianDet (const Geom::tSmallCoords &coordsCell, const Geom::Elem::tD01Nj &DiNj)
 
real CellJacobianDet (int dim, const Geom::tSmallCoords &coordsCell, const Geom::Elem::tD01Nj &DiNj)
 
template<int dim>
real FaceJacobianDet (const Geom::tSmallCoords &coords, const Geom::Elem::tD01Nj &DiNj)
 
real FaceJacobianDet (int dim, const Geom::tSmallCoords &coords, const Geom::Elem::tD01Nj &DiNj)
 
constexpr t_index GetQuadratureScheme (ParamSpace ps, int int_order)
 
template<class TPoint >
void GetQuadraturePoint (ParamSpace ps, t_index scheme, int iG, TPoint &pParam, t_real &w)
 

Typedef Documentation

◆ tBisectSub

using DNDS::Geom::Elem::tBisectSub = typedef std::array<t_index, bisectSubMaxNodes>

Bisection sub-element node array type.

Maps local node indices of a sub-element to parent element nodes. Used in adaptive mesh refinement to define child element connectivity.

Definition at line 85 of file ElementTraitsBase.hpp.

◆ tD01Nj

using DNDS::Geom::Elem::tD01Nj = typedef Eigen::Matrix<t_real, 4, Eigen::Dynamic>

Definition at line 183 of file Elements.hpp.

◆ tD1Nj

using DNDS::Geom::Elem::tD1Nj = typedef Eigen::Matrix<t_real, 3, Eigen::Dynamic>

Definition at line 182 of file Elements.hpp.

◆ tDiNj

using DNDS::Geom::Elem::tDiNj = typedef Eigen::Matrix<t_real, Eigen::Dynamic, Eigen::Dynamic>

Definition at line 184 of file Elements.hpp.

◆ tElevSpan

using DNDS::Geom::Elem::tElevSpan = typedef std::array<t_index, elevSpanMaxWidth>

Elevation span type: array of parent node indices.

Used to define which existing nodes define the position of a new node created during element order elevation.

Definition at line 69 of file ElementTraitsBase.hpp.

◆ tNj

using DNDS::Geom::Elem::tNj = typedef Eigen::RowVector<t_real, Eigen::Dynamic>

Definition at line 181 of file Elements.hpp.

◆ tPy_ElemType

using DNDS::Geom::Elem::tPy_ElemType = typedef py::enum_<ElemType>

Definition at line 10 of file Elements_bind.hpp.

◆ tVTKNodeOrder

using DNDS::Geom::Elem::tVTKNodeOrder = typedef std::array<int, vtkNodeOrderMax>

VTK node ordering permutation array type.

Maps DNDS node indices to VTK node indices: vtkNodeOrder[i] = VTK index of DNDS node i

Only first numNodes entries are valid; rest are padding.

Definition at line 103 of file ElementTraitsBase.hpp.

Enumeration Type Documentation

◆ ElemType

Enumerator
UnknownElem 
Line2 
Line3 
Tri3 
Tri6 
Quad4 
Quad9 
Tet4 
Tet10 
Hex8 
Hex27 
Prism6 
Prism18 
Pyramid5 
Pyramid14 
ElemType_NUM 

Definition at line 18 of file ElemEnum.hpp.

◆ ParamSpace

Enumerator
UnknownPSpace 
LineSpace 
TriSpace 
QuadSpace 
TetSpace 
HexSpace 
PrismSpace 
PyramidSpace 
ParamSpace_NUM 

Definition at line 41 of file ElemEnum.hpp.

Function Documentation

◆ CellJacobianDet() [1/2]

template<int dim>
real DNDS::Geom::Elem::CellJacobianDet ( const Geom::tSmallCoords coordsCell,
const Geom::Elem::tD01Nj DiNj 
)

Definition at line 479 of file Quadrature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CellJacobianDet() [2/2]

real DNDS::Geom::Elem::CellJacobianDet ( int  dim,
const Geom::tSmallCoords coordsCell,
const Geom::Elem::tD01Nj DiNj 
)
inline

Definition at line 491 of file Quadrature.hpp.

Here is the call graph for this function:

◆ cellsAreFaceConnected() [1/2]

bool DNDS::Geom::Elem::cellsAreFaceConnected ( const std::vector< DNDS::index > &  nodes_A,
const std::vector< DNDS::index > &  nodes_B,
Element  eA,
Element  eB 
)
inline

Definition at line 458 of file Elements.hpp.

Here is the call graph for this function:

◆ cellsAreFaceConnected() [2/2]

bool DNDS::Geom::Elem::cellsAreFaceConnected ( const std::vector< DNDS::index > &  verts_A,
const std::vector< DNDS::index > &  nodes_B 
)
inline

Definition at line 482 of file Elements.hpp.

◆ DispatchElementType()

template<typename Func >
DNDS_DEVICE_CALLABLE constexpr decltype(auto) DNDS::Geom::Elem::DispatchElementType ( ElemType  t,
Func &&  func 
)
constexpr

Static dispatch over element types at compile time.

Template Parameters
FuncCallable type
Parameters
tElement type enum
funcCallable to invoke with ElementTraits<t>
Returns
Return value of func(ElementTraits<t>{})

Usage: auto numNodes = DispatchElementType(elemType, [](auto traits) { return traits.numNodes; });

Definition at line 121 of file ElementTraits.hpp.

Here is the caller graph for this function:

◆ ElemType_to_ParamSpace()

DNDS_DEVICE_CALLABLE constexpr ParamSpace DNDS::Geom::Elem::ElemType_to_ParamSpace ( const ElemType  t)
inlineconstexpr

Definition at line 65 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FaceJacobianDet() [1/2]

template<int dim>
real DNDS::Geom::Elem::FaceJacobianDet ( const Geom::tSmallCoords coords,
const Geom::Elem::tD01Nj DiNj 
)

Definition at line 500 of file Quadrature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FaceJacobianDet() [2/2]

real DNDS::Geom::Elem::FaceJacobianDet ( int  dim,
const Geom::tSmallCoords coords,
const Geom::Elem::tD01Nj DiNj 
)
inline

Definition at line 512 of file Quadrature.hpp.

Here is the call graph for this function:

◆ GetElemElevation_O1O2_ElevatedType()

DNDS_DEVICE_CALLABLE constexpr ElemType DNDS::Geom::Elem::GetElemElevation_O1O2_ElevatedType ( ElemType  t)
inlineconstexpr

Definition at line 88 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElemElevation_O1O2_NodeSpanType()

DNDS_DEVICE_CALLABLE constexpr ElemType DNDS::Geom::Elem::GetElemElevation_O1O2_NodeSpanType ( ElemType  t,
t_index  ine 
)
inlineconstexpr

Definition at line 94 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElemElevation_O1O2_NumNode()

DNDS_DEVICE_CALLABLE constexpr int DNDS::Geom::Elem::GetElemElevation_O1O2_NumNode ( ElemType  t)
inlineconstexpr

Definition at line 82 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElemNodeMajorSpan()

tPoint DNDS::Geom::Elem::GetElemNodeMajorSpan ( const tSmallCoords coords)
inline

Definition at line 513 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElemO1()

DNDS_DEVICE_CALLABLE constexpr ElemType DNDS::Geom::Elem::GetElemO1 ( ParamSpace  ps)
inlineconstexpr

Definition at line 106 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFaceType()

DNDS_DEVICE_CALLABLE constexpr ElemType DNDS::Geom::Elem::GetFaceType ( ElemType  t_v,
t_index  iFace 
)
inlineconstexpr

Definition at line 71 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetO2ElemBisectElem()

DNDS_DEVICE_CALLABLE constexpr ElemType DNDS::Geom::Elem::GetO2ElemBisectElem ( ElemType  t,
t_index  i 
)
inlineconstexpr

Definition at line 123 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetO2ElemBisectNum()

DNDS_DEVICE_CALLABLE constexpr t_index DNDS::Geom::Elem::GetO2ElemBisectNum ( ElemType  t)
inlineconstexpr

Definition at line 111 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetO2ElemBisectVariant()

t_index DNDS::Geom::Elem::GetO2ElemBisectVariant ( Element  e,
const tSmallCoords coords 
)
inline

if serendipity ?

Definition at line 529 of file Elements.hpp.

Here is the call graph for this function:

◆ GetQuadPatches()

auto DNDS::Geom::Elem::GetQuadPatches ( Quadrature q)
inline

Definition at line 185 of file Quadrature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetQuadraturePoint()

template<class TPoint >
void DNDS::Geom::Elem::GetQuadraturePoint ( ParamSpace  ps,
t_index  scheme,
int  iG,
TPoint &  pParam,
t_real w 
)
inline

Definition at line 186 of file QuadratureHub.hpp.

Here is the caller graph for this function:

◆ GetQuadratureScheme()

constexpr t_index DNDS::Geom::Elem::GetQuadratureScheme ( ParamSpace  ps,
int  int_order 
)
inlineconstexpr

Definition at line 37 of file QuadratureHub.hpp.

Here is the caller graph for this function:

◆ GetStandardCoord()

Eigen::Matrix< t_real, 3, Eigen::Dynamic > DNDS::Geom::Elem::GetStandardCoord ( ElemType  t)

Definition at line 6 of file Elements.cpp.

Here is the call graph for this function:

◆ JacobiDetFace()

template<int dim>
real DNDS::Geom::Elem::JacobiDetFace ( Eigen::Ref< const tJacobi J)

Definition at line 503 of file Elements.hpp.

◆ ParamSpaceO1Elem()

DNDS_DEVICE_CALLABLE constexpr ElemType DNDS::Geom::Elem::ParamSpaceO1Elem ( ParamSpace  ps)
constexpr

Get the order-1 (linear) element type for a parametric space.

Parameters
psParametric space type
Returns
Element type enum (Line2, Tri3, Quad4, etc.)

Maps each parametric space to its corresponding linear element:

  • LineSpace -> Line2
  • TriSpace -> Tri3
  • QuadSpace -> Quad4
  • TetSpace -> Tet4
  • HexSpace -> Hex8
  • PrismSpace -> Prism6
  • PyramidSpace -> Pyramid5

Definition at line 89 of file ElementTraits.hpp.

Here is the caller graph for this function:

◆ ParamSpaceVol()

DNDS_DEVICE_CALLABLE constexpr t_real DNDS::Geom::Elem::ParamSpaceVol ( ParamSpace  ps)
inlineconstexpr

Definition at line 77 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParamSpaceVolume()

DNDS_DEVICE_CALLABLE constexpr t_real DNDS::Geom::Elem::ParamSpaceVolume ( ParamSpace  ps)
constexpr

Get the volume of a parametric space.

Parameters
psParametric space type
Returns
Volume (length for 1D, area for 2D, volume for 3D)

Returns the "size" of the reference element in parametric coordinates:

  • LineSpace: 2.0 (length from -1 to +1)
  • TriSpace: 0.5 (area of reference triangle)
  • QuadSpace: 4.0 (area of [-1,1] x [-1,1])
  • TetSpace: 1/6 (volume of reference tet)
  • HexSpace: 8.0 (volume of [-1,1]^3)
  • PrismSpace: 1.0 (volume of reference prism)
  • PyramidSpace: 4/3 (volume of reference pyramid)

Definition at line 60 of file ElementTraits.hpp.

Here is the caller graph for this function:

◆ PPhysicsCoordD01Nj()

template<class tCoordsIn >
tPoint DNDS::Geom::Elem::PPhysicsCoordD01Nj ( const tCoordsIn &  cs,
Eigen::Ref< const tD01Nj DiNj 
)

Definition at line 497 of file Elements.hpp.

Here is the caller graph for this function:

◆ pybind11_ElemType_define()

void DNDS::Geom::Elem::pybind11_ElemType_define ( py::module_ &  m)
inline

Definition at line 12 of file Elements_bind.hpp.

◆ ShapeFunc_DiNj()

template<int diffOrder, class TPoint , class TArray >
DNDS_DEVICE_CALLABLE void DNDS::Geom::Elem::ShapeFunc_DiNj ( ElemType  t,
const TPoint &  p,
TArray &&  v 
)

Dispatch to per-element shape function code via ShapeFuncImpl<T>.

Each ShapeFuncImpl specialization provides static Diff0..Diff3 methods. DispatchElementType (from ElementTraits.hpp) resolves the runtime ElemType to the correct compile-time specialization.

Definition at line 163 of file Elements.hpp.

Here is the call graph for this function:

◆ ShapeJacobianCoordD01Nj()

template<class tCoordsIn >
tJacobi DNDS::Geom::Elem::ShapeJacobianCoordD01Nj ( const tCoordsIn &  cs,
Eigen::Ref< const tD01Nj DiNj 
)

Definition at line 491 of file Elements.hpp.

Here is the caller graph for this function:

◆ ToVTKVertsAndData()

template<class TIn >
std::pair< int, std::vector< index > > DNDS::Geom::Elem::ToVTKVertsAndData ( Element  e,
const TIn &  vin 
)

Definition at line 566 of file Elements.hpp.

Here is the call graph for this function:
Here is the caller graph for this function: