Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
panzer::orientation_helpers Namespace Reference

Functions

void computePatternEdgeIndices (const FieldPattern &pattern, std::vector< std::pair< int, int > > &edgeIndices)
 
void computePatternFaceIndices (const FieldPattern &pattern, std::vector< std::vector< int > > &faceIndices)
 
template<typename GlobalOrdinalT >
void computeCellEdgeOrientations (const std::vector< std::pair< int, int > > &topEdgeIndices, const std::vector< GlobalOrdinalT > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
 
template<typename GlobalOrdinalT >
void computeCellFaceOrientations (const std::vector< std::pair< int, int > > &topEdgeIndices, const std::vector< GlobalOrdinalT > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
 
template<typename GlobalOrdinalT >
void computeCellFaceOrientations (const std::vector< std::vector< int > > &topFaceIndices, const std::vector< GlobalOrdinalT > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
 

Function Documentation

void panzer::orientation_helpers::computePatternEdgeIndices ( const FieldPattern &  pattern,
std::vector< std::pair< int, int > > &  edgeIndices 
)

For a given field pattern compute the offsets that give the beginning and end dimension-0-subcell index for each edge.

Parameters
[in]patternPattern specifying the layout of IDs. Note that this pattern must have dimension-0-subcell indices.
[in,out]edgeIndicesEmpty vector that on exit will have a pair containing start and end indices for each edge in a cell.

Definition at line 52 of file Panzer_UniqueGlobalIndexer_Utilities.cpp.

void panzer::orientation_helpers::computePatternFaceIndices ( const FieldPattern &  pattern,
std::vector< std::vector< int > > &  faceIndices 
)

For a given field pattern compute the offsets that give the dimension-0-subcell indices for each face. Note that the assumption is made that the node ordering returned by Shards for each face is counter-clockwise. This is how the determination of inward or outward facing normals is made.

Parameters
[in]patternPattern specifying the layout of IDs. Note that this pattern must have dimension-0-subcell indices.
[in,out]faceIndicesEmpty vector that on exit will have a vector containing start and end indices for each face in a cell.
Note
In 2D a "Face" is defined to be the element (not the edge).

Definition at line 73 of file Panzer_UniqueGlobalIndexer_Utilities.cpp.

template<typename GlobalOrdinalT >
void panzer::orientation_helpers::computeCellEdgeOrientations ( const std::vector< std::pair< int, int > > &  topEdgeIndices,
const std::vector< GlobalOrdinalT > &  topology,
const FieldPattern &  fieldPattern,
std::vector< signed char > &  orientation 
)

This function computes the edge orientation for a cell given its global topology. It is most often called in conjunction with computePatternEdgeIndices. The general model is to call computePatternEdgeIndices once for a given topology field pattern. These edge indices are used with the topology vector of GIDs (which is laid out using the topology field pattern) for particular to define the orientation for that element. The layout of the orientation vector is defined to satisfy yet another field pattern whose structure defines the global unknowns for that element. This function can then be called repeatedly for each element that satisfies the topology used in the computePatternEdgeIndices call.

Parameters
[in]topEdgeIndicesComputed by computePatternEdgeIndices
[in]topologyGlobal topology of this element satisfying field pattern used to construct the edgeIndices vector.
[in]fieldPatternField pattern used to define the orientation layout
[in,out]orientationOrientation vector satisfying the field pattern layout

Definition at line 389 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

template<typename GlobalOrdinalT >
void panzer::orientation_helpers::computeCellFaceOrientations ( const std::vector< std::pair< int, int > > &  topEdgeIndices,
const std::vector< GlobalOrdinalT > &  topology,
const FieldPattern &  fieldPattern,
std::vector< signed char > &  orientation 
)

This function computes the face orientation for a cell given its global topology. It is most often called in conjunction with computePatternFaceIndices. The general model is to call computePatternFaceIndices once for a given topology field pattern. These face indices are used with the topology vector of GIDs (which is laid out using the topology field pattern) to define the orientation for that element. The layout of the orientation vector is defined to satisfy yet another field pattern whose structure defines the global unknowns for that element. This function can then be called repeatedly for each element that satisfies the topology used in the computePatternFaceIndices call.

Parameters
[in]topFaceIndicesComputed by computePatternFaceIndices
[in]topologyGlobal topology of this element satisfying field pattern used to construct the edgeIndices vector.
[in]fieldPatternField pattern used to define the orientation layout
[in,out]orientationOrientation vector satisfying the field pattern layout
template<typename GlobalOrdinalT >
void panzer::orientation_helpers::computeCellFaceOrientations ( const std::vector< std::vector< int > > &  topFaceIndices,
const std::vector< GlobalOrdinalT > &  topology,
const FieldPattern &  fieldPattern,
std::vector< signed char > &  orientation 
)