shards  Version of the Day
 All Classes Functions Variables Typedefs Enumerations Enumerator Groups
shards::CellTopology Class Reference

Provide input checked access (in debug mode) to cell topology data and a procedure to create custom cell topologies. More...

#include <Shards_CellTopology.hpp>

Safe query methods

unsigned getDimension () const
 Dimension of this cell topology.
 
unsigned getKey () const
 Unique key for this cell topology; under certain subcell uniformity conditions. More...
 
unsigned getBaseKey () const
 Unique key for this cell's base topology; under certain subcell uniformity conditions. More...
 
const char * getName () const
 Unique name for this cell topology;. More...
 
const char * getBaseName () const
 Unique name for this cell's base topology. More...
 
unsigned getNodeCount () const
 Node count of this cell topology.
 
unsigned getVertexCount () const
 Vertex count of this cell topology.
 
unsigned getEdgeCount () const
 Edge boundary subcell count of this cell topology.
 
unsigned getFaceCount () const
 Face boundary subcell count of this cell topology.
 
unsigned getSideCount () const
 Side boundary subcell count of this cell topology.
 
bool isValid () const
 This cell's raw topology data.
 
const CellTopologyDatagetCellTopologyData () const
 This cell's raw topology data.
 
const CellTopologyDatagetBaseCellTopologyData () const
 This cell's base cell topology's raw topology data.
 
const CellTopologyDatagetCellTopologyData (const unsigned subcell_dim, const unsigned subcell_ord) const
 Raw cell topology data for a subcell of the given dimension and ordinal. More...
 
const CellTopologyDatagetBaseCellTopologyData (const unsigned subcell_dim, const unsigned subcell_ord) const
 Raw cell topology data for the base topology of a subcell of the given dimension and ordinal. More...
 
unsigned getKey (const unsigned subcell_dim, const unsigned subcell_ord) const
 Key of a subcell of the given dimension and ordinal. More...
 
const char * getName (const unsigned subcell_dim, const unsigned subcell_ord) const
 Name of a subcell of the given dimension and ordinal. More...
 
unsigned getNodeCount (const unsigned subcell_dim, const unsigned subcell_ord) const
 Node count of a subcell of the given dimension and ordinal. More...
 
unsigned getVertexCount (const unsigned subcell_dim, const unsigned subcell_ord) const
 Vertex count of a subcell of the given dimension and ordinal. More...
 
unsigned getEdgeCount (const unsigned subcell_dim, const unsigned subcell_ord) const
 Edge count of a subcell of the given dimension and ordinal. More...
 
unsigned getSideCount (const unsigned subcell_dim, const unsigned subcell_ord) const
 Side count of a subcell of the given dimension and ordinal. More...
 
unsigned getSubcellCount (const unsigned subcell_dim) const
 Subcell count of subcells of the given dimension. More...
 
bool getSubcellHomogeneity (const unsigned subcell_dim) const
 Query if all subcells of the given dimension have the same cell topology. More...
 
unsigned getNodeMap (const unsigned subcell_dim, const unsigned subcell_ord, const unsigned subcell_node_ord) const
 Mapping from a subcell's node ordinal to a node ordinal of this parent cell topology. More...
 
unsigned getNodePermutationCount () const
 Number of node permutations defined for this cell.
 
unsigned getNodePermutation (const unsigned permutation_ord, const unsigned node_ord) const
 Permutation of a cell's node ordinals. More...
 
unsigned getNodePermutationPolarity (const unsigned permutation_ord) const
 Permutation of a cell's node ordinals. More...
 
unsigned getNodePermutationInverse (const unsigned permutation_ord, const unsigned node_ord) const
 Inverse permutation of a cell's node ordinals. More...
 

Constructors and destructor

 CellTopology (const CellTopologyData *cell)
 Wrapper for safe access to a raw cell topology data. More...
 
 CellTopology (const std::string &name, const unsigned nodeCount)
 Constructs custom 1-cell (line) with base topology Line<>. Example use: the statement. More...
 
 CellTopology (const std::string &name, const unsigned vertex_count, const unsigned node_count, const std::vector< const CellTopologyData * > &edges, const std::vector< unsigned > &edge_node_map, const CellTopologyData *base=NULL)
 Construct custom 2-cell (polygon) from a list of edges. The default base topology is the specified custom cell topology. More...
 
 CellTopology (const std::string &name, const unsigned vertex_count, const unsigned node_count, const std::vector< const CellTopologyData * > &edges, const std::vector< unsigned > &edge_node_map, const std::vector< const CellTopologyData * > &faces, const std::vector< unsigned > &face_node_map, const CellTopologyData *base=NULL)
 Construct custom 3-cell (polyhedron) from a list of edges and sides. The default base topology is the specified custom cell topology. More...
 
CellTopologyoperator= (const CellTopology &right)
 Assignment operator *this = right.
 
 CellTopology (const CellTopology &right)
 Copy constructor.
 
 CellTopology ()
 Default constructor initializes to NULL.
 
 ~CellTopology ()
 Destructor.
 

Detailed Description

Provide input checked access (in debug mode) to cell topology data and a procedure to create custom cell topologies.

Input checking is compiled in when the HAVE_SHARDS_DEBUG macro is defined.

Author
Created by P. Bochev, H. C. Edwards and D. Ridzal.

Two kinds of CellTopology objects are used: (1) wrappers for the predefined basic cell topologies and (2) temporary custom cell topologies.

A temporary custom cell topology is created by a calling code, passed to a computational kernel such as those supplied by Intrepid, and then discarded. The use case is discretization function evaluations on a arbitrary polyhedon mesh does not have standard or consistent cell topologies.

Definition at line 131 of file Shards_CellTopology.hpp.

Constructor & Destructor Documentation

shards::CellTopology::CellTopology ( const CellTopologyData cell)
inline

Wrapper for safe access to a raw cell topology data.

Parameters
cell[in] - pointer to raw cell topology Example use: the statements
CellTopology myTri_3 ( getCellTopologyData< Triangle<3> >() )
CellTopology myTet_10( getCellTopologyData< Tetrahedron<10>() );
wraps Triangle<3> and Tetrahedron<10> (defined in Shards_BasicTopologies)

Definition at line 484 of file Shards_CellTopology.hpp.

shards::CellTopology::CellTopology ( const std::string &  name,
const unsigned  nodeCount 
)

Constructs custom 1-cell (line) with base topology Line<>. Example use: the statement.

CellTopology customLine("customLine", 4);

defines custom line with 4 nodes.

shards::CellTopology::CellTopology ( const std::string &  name,
const unsigned  vertex_count,
const unsigned  node_count,
const std::vector< const CellTopologyData * > &  edges,
const std::vector< unsigned > &  edge_node_map,
const CellTopologyData base = NULL 
)

Construct custom 2-cell (polygon) from a list of edges. The default base topology is the specified custom cell topology.

Parameters
name[in] - descriptive name of the custom 2-cell
vertex_count[in] - number of vertices in the custom 2-cell
node_count[in] - number of nodes in the custom 2-cell
edges[in] - raw CellTopologyData for each edge (can be different!)
edge_node_map[in] - flat array with node maps for each edge
base[in] - CellTopologyData of the base topology
shards::CellTopology::CellTopology ( const std::string &  name,
const unsigned  vertex_count,
const unsigned  node_count,
const std::vector< const CellTopologyData * > &  edges,
const std::vector< unsigned > &  edge_node_map,
const std::vector< const CellTopologyData * > &  faces,
const std::vector< unsigned > &  face_node_map,
const CellTopologyData base = NULL 
)

Construct custom 3-cell (polyhedron) from a list of edges and sides. The default base topology is the specified custom cell topology.

Parameters
name[in] - descriptive name of the custom 3-cell
vertex_count[in] - number of vertices in the custom 3-cell
node_count[in] - number of nodes in the custom 3-cell
edges[in] - raw CellTopologyData for each edge (can be different!)
edge_node_map[in] - flat array with node maps for each edge
faces[in] - raw CellTopologyData for each face (can be different!)
face_node_map[in] - flat array with node maps for each face
base[in] - CellTopologyData of the base topology

Member Function Documentation

unsigned shards::CellTopology::getKey ( ) const
inline

Unique key for this cell topology; under certain subcell uniformity conditions.

The key is only guaranteed to be unique for predefined cell topologies.

Definition at line 192 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getBaseKey ( ) const
inline

Unique key for this cell's base topology; under certain subcell uniformity conditions.

The key is only guaranteed to be unique for predefined cell topologies.

Definition at line 204 of file Shards_CellTopology.hpp.

const char* shards::CellTopology::getName ( ) const
inline

Unique name for this cell topology;.

The name is only guaranteed to be unique for predefined cell topologies. A calling code may construct custom cell topologies with arbitrary names.

Definition at line 217 of file Shards_CellTopology.hpp.

const char* shards::CellTopology::getBaseName ( ) const
inline

Unique name for this cell's base topology.

Definition at line 227 of file Shards_CellTopology.hpp.

const CellTopologyData* shards::CellTopology::getCellTopologyData ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Raw cell topology data for a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 296 of file Shards_CellTopology.hpp.

const CellTopologyData* shards::CellTopology::getBaseCellTopologyData ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Raw cell topology data for the base topology of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 311 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getKey ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Key of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 322 of file Shards_CellTopology.hpp.

const char* shards::CellTopology::getName ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Name of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 334 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getNodeCount ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Node count of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 345 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getVertexCount ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Vertex count of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 356 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getEdgeCount ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Edge count of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 367 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getSideCount ( const unsigned  subcell_dim,
const unsigned  subcell_ord 
) const
inline

Side count of a subcell of the given dimension and ordinal.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal

Definition at line 378 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getSubcellCount ( const unsigned  subcell_dim) const
inline

Subcell count of subcells of the given dimension.

Parameters
subcell_dim[in] - spatial dimension of the subcell

Definition at line 388 of file Shards_CellTopology.hpp.

bool shards::CellTopology::getSubcellHomogeneity ( const unsigned  subcell_dim) const
inline

Query if all subcells of the given dimension have the same cell topology.

Parameters
subcell_dim[in] - spatial dimension of the subcell

Definition at line 400 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getNodeMap ( const unsigned  subcell_dim,
const unsigned  subcell_ord,
const unsigned  subcell_node_ord 
) const
inline

Mapping from a subcell's node ordinal to a node ordinal of this parent cell topology.

Parameters
subcell_dim[in] - spatial dimension of the subcell
subcell_ord[in] - subcell ordinal
subcell_node_ord[in] - node ordinal relative to subcell

Definition at line 414 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getNodePermutation ( const unsigned  permutation_ord,
const unsigned  node_ord 
) const
inline

Permutation of a cell's node ordinals.

Parameters
permutation_ordinal[in]
node_ordinal[in]

Definition at line 437 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getNodePermutationPolarity ( const unsigned  permutation_ord) const
inline

Permutation of a cell's node ordinals.

Parameters
permutation_ordinal[in]
node_ordinal[in]

Definition at line 449 of file Shards_CellTopology.hpp.

unsigned shards::CellTopology::getNodePermutationInverse ( const unsigned  permutation_ord,
const unsigned  node_ord 
) const
inline

Inverse permutation of a cell's node ordinals.

Parameters
permutation_ordinal[in]
node_ordinal[in]

Definition at line 460 of file Shards_CellTopology.hpp.


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