Intrepid2
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Intrepid2::Orientation Class Reference

Orientation encoding and decoding. More...

#include <Intrepid2_Orientation.hpp>

Public Member Functions

KOKKOS_INLINE_FUNCTION Orientation ()
 
KOKKOS_DEFAULTED_FUNCTION Orientation (const Orientation &b)=default
 
KOKKOS_INLINE_FUNCTION bool isAlignedToReference () const
 
KOKKOS_INLINE_FUNCTION void setEdgeOrientation (const ordinal_type numEdge, const ordinal_type edgeOrt[])
 
KOKKOS_INLINE_FUNCTION void getEdgeOrientation (ordinal_type *edgeOrt, const ordinal_type numEdge) const
 
KOKKOS_INLINE_FUNCTION void setFaceOrientation (const ordinal_type numFace, const ordinal_type faceOrt[])
 
KOKKOS_INLINE_FUNCTION void getFaceOrientation (ordinal_type *faceOrt, const ordinal_type numFace) const
 
std::string to_string () const
 

Static Public Member Functions

template<typename cellVertViewType >
static Orientation getOrientation (const shards::CellTopology cellTopo, const cellVertViewType cellVerts, bool isSide=false)
 
static ordinal_type getEdgeOrdinalOfFace (const ordinal_type subsubcellOrd, const ordinal_type subcellOrd, const shards::CellTopology cellTopo)
 

Static Private Member Functions

template<typename cellVertViewType >
static void getCellVertexMap (typename cellVertViewType::non_const_value_type *subCellVerts, ordinal_type &numVerts, const shards::CellTopology cellTopo, const cellVertViewType cellVerts, const ordinal_type subCellDim, const ordinal_type subCellOrd)
 
template<typename subCellVertType >
static ordinal_type getOrientation (const subCellVertType subCellVerts[], const ordinal_type numVerts)
 

Private Attributes

ordinal_type _edgeOrt
 
ordinal_type _faceOrt
 

Detailed Description

Orientation encoding and decoding.

Use input and output as pointer arrays which assumes that input/output are located on the stack and contiguous.

Definition at line 32 of file Intrepid2_Orientation.hpp.

Constructor & Destructor Documentation

KOKKOS_INLINE_FUNCTION Intrepid2::Orientation::Orientation ( )

Constructor, initializing the orientation so that it's aligned to the reference cell

Definition at line 186 of file Intrepid2_OrientationDef.hpp.

KOKKOS_DEFAULTED_FUNCTION Intrepid2::Orientation::Orientation ( const Orientation b)
default

Copy constructor

Member Function Documentation

ordinal_type Intrepid2::Orientation::getEdgeOrdinalOfFace ( const ordinal_type  subsubcellOrd,
const ordinal_type  subcellOrd,
const shards::CellTopology  cellTopo 
)
inlinestatic

Returns the ordinal of an edge w.r.t. the parent face, given the ordinals of the edge and the face w.r.t. the parent 3D cell.

Parameters
subsubcellOrd[in] - ordinal of the edge w.r.t. the parent (3D) cell
subcellOrd[in] - ordinal of the face w.r.t. the parent (3D) cell
cellTopo[in] - Cell Topology

Definition at line 150 of file Intrepid2_OrientationDef.hpp.

KOKKOS_INLINE_FUNCTION void Intrepid2::Orientation::getEdgeOrientation ( ordinal_type *  edgeOrt,
const ordinal_type  numEdge 
) const

Get the orientation of the first numEdge edges of a cell

Parameters
edgeOrt[out] - integer array containing the orientations of each edge
numEdge[in] - number of edges

Definition at line 210 of file Intrepid2_OrientationDef.hpp.

KOKKOS_INLINE_FUNCTION void Intrepid2::Orientation::getFaceOrientation ( ordinal_type *  faceOrt,
const ordinal_type  numFace 
) const

Get the orientation of the first numFace faces of a cell

Parameters
faceOrt[out] - integer array containing the orientations of each face
numFace[in] - number of faces

Definition at line 237 of file Intrepid2_OrientationDef.hpp.

template<typename cellVertViewType >
Orientation Intrepid2::Orientation::getOrientation ( const shards::CellTopology  cellTopo,
const cellVertViewType  cellVerts,
bool  isSide = false 
)
inlinestatic

Computes and returns the Orientation of a cell, based on vertices' Ids. For a 3D cell, the orientation is computed only for cell faces and edges, not for the cell itself. For a 2D cell, the orientation of edges is always computed, and the orientation of the cell itself is computed only if the parameter isSide is true. For a 1D cell, the orientation of the cell is computed only when isSide is true.

Parameters
cellTopo[in] - Cell Topology
cellVerts[in] - rank-1 view with vertices' Ids
isSide[in] - boolean, whether the cell is a side (of a parent cell) for orientation purposes

Definition at line 107 of file Intrepid2_OrientationDef.hpp.

References setEdgeOrientation(), and setFaceOrientation().

KOKKOS_INLINE_FUNCTION bool Intrepid2::Orientation::isAlignedToReference ( ) const

Whether the cell is aligned to reference

Definition at line 191 of file Intrepid2_OrientationDef.hpp.

KOKKOS_INLINE_FUNCTION void Intrepid2::Orientation::setEdgeOrientation ( const ordinal_type  numEdge,
const ordinal_type  edgeOrt[] 
)

Set the orientation of all edges of a cell

Parameters
numEdge[in] - number of edges of the cell
edgeOrt[in] - integer array containing the orientations of each edge

Definition at line 197 of file Intrepid2_OrientationDef.hpp.

Referenced by getOrientation().

KOKKOS_INLINE_FUNCTION void Intrepid2::Orientation::setFaceOrientation ( const ordinal_type  numFace,
const ordinal_type  faceOrt[] 
)

Set the orientation of all faces of a cell

Parameters
numFace[in] - number of faces of the cell
faceOrt[in] - integer array containing the orientations of each face

Definition at line 222 of file Intrepid2_OrientationDef.hpp.

Referenced by getOrientation().

std::string Intrepid2::Orientation::to_string ( ) const
inline

Returns the orientation converted to a string

Definition at line 249 of file Intrepid2_OrientationDef.hpp.


The documentation for this class was generated from the following files: