16 #ifndef GEOS_MESH_CELLBLOCK_HPP_
17 #define GEOS_MESH_CELLBLOCK_HPP_
20 #include "mesh/generators/CellBlockABC.hpp"
68 {
return m_elementType; }
71 {
return m_numNodesPerElement; }
74 {
return m_numEdgesPerElement; }
77 {
return m_numFacesPerElement; }
87 {
return m_maxNodesPerFace; }
111 {
return m_elementsToNodes; }
118 {
return m_elementsToNodes; }
121 {
return m_elementsToNodes; }
124 {
return m_elementsToEdges; }
127 {
return m_elementsToFaces; }
134 {
return m_elementsToFaces.toViewConst(); }
146 m_elementsToFaces( cellIndex, faceNum ) = faceIndex;
162 m_elementsToEdges( cellIndex, edgeNum ) = edgeIndex;
176 return m_elementsToEdges( cellIndex, edgeNum ) == edgeIndex;
187 {
return m_localToGlobalMap; }
190 {
return m_localToGlobalMap; }
197 {
return m_localToGlobalMap.toViewConst(); }
251 std::list< dataRepository::WrapperBase const * > getExternalProperties()
const override
253 std::list< dataRepository::WrapperBase const * > result;
254 for(
string const & externalPropertyName : m_externalPropertyNames )
256 result.push_back( &this->
getWrapperBase( externalPropertyName ) );
localIndex numNodesPerElement() const override
Get the number of nodes per element.
void setElementToFaces(localIndex const cellIndex, localIndex const faceNum, localIndex const faceIndex)
Sets an entry in the element to faces mapping.
void setElementType(ElementType elementType)
Defines the underlying element type (hex, tet...)
void resize(dataRepository::indexType const numElements) override final
Resize the cell block to hold numElements.
array2d< localIndex > getElemToFaces() const override
Get the element-to-faces map.
bool hasElementToEdges(localIndex const cellIndex, localIndex const edgeNum, localIndex const edgeIndex) const
Checks if edge edgeIndex of element cellIndex has been defined.
ElementType getElementType() const override
Get the type of element in this subregion.
localIndex numFacesPerElement() const override
Get the number of faces per element.
arrayView1d< globalIndex const > localToGlobalMapConstView() const
Get local to global map, const view version.
arrayView2d< localIndex const, cells::NODE_MAP_USD > getElemToNode() const
Get the element to nodes mapping, const version.
localIndex numElements() const override
Get the number of elements.
array1d< globalIndex > localToGlobalMap() const override
Get local to global map.
localIndex getFaceNodes(localIndex const cellIndex, localIndex const faceNum, Span< localIndex > nodesInFace) const
Puts the nodes of face faceNum of element cellIndex inside vector nodesInFaces.
CellBlock(string const &name, Group *const parent)
Constructor for this class.
arrayView2d< localIndex const > getElemToFacesConstView() const
Get the element-to-faces map.
arrayView1d< globalIndex > localToGlobalMap()
Get local to global map, non-const version.
arrayView2d< localIndex, cells::NODE_MAP_USD > getElemToNode()
Get the element to nodes mapping, non-const version.
void setElementToEdges(localIndex const cellIndex, localIndex const edgeNum, localIndex const edgeIndex)
Sets an entry in the element to edges mapping.
localIndex maxNodesPerFace() const
Get the maximum number of nodes comprising a face.
localIndex numEdgesPerElement() const override
Get the number of edges per element.
array2d< localIndex > getElemToEdges() const override
Get the element-to-edges map.
void resizeNumNodes(dataRepository::indexType const numNodes)
Resize the cell block to hold numnodes.
array2d< localIndex, cells::NODE_MAP_PERMUTATION > getElemToNodes() const override
Get the element-to-nodes map.
Lightweight non-owning wrapper over a contiguous range of elements.
WrapperBase const & getWrapperBase(KEY const &key) const
Return a reference to a WrapperBase stored in this group.
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
localIndex indexType
The default index type for entries the hierarchy.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
array1d< string > string_array
A 1-dimensional array of geos::string types.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
ElementType
Denotes type of cell/element shape.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Array< T, 1 > array1d
Alias for 1D array.