41 #include "DTK_STKMeshHelpers.hpp" 43 #include "DTK_STKMeshEntityExtraData.hpp" 45 #include <stk_mesh/base/CoordinateSystems.hpp> 46 #include <stk_mesh/base/Field.hpp> 47 #include <stk_mesh/base/FieldBase.hpp> 48 #include <stk_mesh/base/MetaData.hpp> 49 #include <stk_topology/topology.hpp> 55 const stk::mesh::Entity &
69 stk::mesh::EntityRank stk_rank = stk::topology::INVALID_RANK;
77 stk_rank = stk::topology::NODE_RANK;
80 stk_rank = stk::topology::EDGE_RANK;
83 stk_rank = stk::topology::FACE_RANK;
86 stk_rank = stk::topology::ELEM_RANK;
89 DTK_CHECK( 0 == topo_dim || 1 == topo_dim || 2 == topo_dim ||
99 stk_rank = stk::topology::NODE_RANK;
102 stk_rank = stk::topology::EDGE_RANK;
105 stk_rank = stk::topology::ELEM_RANK;
108 DTK_CHECK( 0 == topo_dim || 1 == topo_dim || 2 == topo_dim );
114 stk_rank = stk::topology::NODE_RANK;
123 const stk::mesh::EntityRank stk_rank,
const int space_dim )
132 case stk::topology::NODE_RANK:
135 case stk::topology::EDGE_RANK:
138 case stk::topology::FACE_RANK:
141 case stk::topology::ELEM_RANK:
145 DTK_CHECK( stk::topology::NODE_RANK == stk_rank ||
146 stk::topology::EDGE_RANK == stk_rank ||
147 stk::topology::FACE_RANK == stk_rank ||
148 stk::topology::ELEM_RANK == stk_rank );
156 case stk::topology::NODE_RANK:
159 case stk::topology::EDGE_RANK:
162 case stk::topology::ELEM_RANK:
166 DTK_CHECK( stk::topology::NODE_RANK == stk_rank ||
167 stk::topology::EDGE_RANK == stk_rank ||
168 stk::topology::ELEM_RANK == stk_rank );
174 DTK_CHECK( 3 == space_dim || 2 == space_dim );
185 return stk::mesh::EntityKey(
195 const stk::mesh::BulkData &bulk_data )
197 return stk::mesh::get_cell_topology(
198 bulk_data.bucket( stk_entity ).topology() );
205 const Teuchos::Array<stk::mesh::Entity> &stk_entities,
206 const stk::mesh::BulkData &bulk_data )
208 int space_dim = bulk_data.mesh_meta_data().spatial_dimension();
212 return STKMeshHelpers::extractEntityNodeCoordinates<
213 stk::mesh::Cartesian3d>( stk_entities, bulk_data, space_dim );
216 return STKMeshHelpers::extractEntityNodeCoordinates<
217 stk::mesh::Cartesian2d>( stk_entities, bulk_data, space_dim );
220 DTK_CHECK( 2 == space_dim || 3 == space_dim );
223 return Intrepid::FieldContainer<double>();
static Intrepid::FieldContainer< double > getEntityNodeCoordinates(const Teuchos::Array< stk::mesh::Entity > &stk_entities, const stk::mesh::BulkData &bulk_data)
Given a STK entity, return the coordinates of its nodes in a field container ordered by canonical nod...
Geometric entity interface definition.
static const stk::mesh::Entity & extractEntity(const Entity dtk_entity)
Given a DTK entity, extract the STK entity.
static int getTopologicalDimensionFromRank(const stk::mesh::EntityRank stk_rank, const int space_dim)
Given a STK entity rank, get the topological dimension.
Assertions and Design-by-Contract for error handling.
Teuchos::RCP< EntityExtraData > extraData() const
Get the extra data on the entity. This is a convenient helper for implementing the other interfaces...
static stk::mesh::EntityKey getKeyFromEntity(const Entity dtk_entity)
Given a DTK entity, return the corresponding STK entity key.
static shards::CellTopology getShardsTopology(const stk::mesh::Entity stk_entity, const stk::mesh::BulkData &bulk_data)
Given a STK entity, return its shards topology.
int physicalDimension() const
Return the physical dimension of the entity.
int topologicalDimension() const
Return the topological dimension of the entity.
static stk::mesh::EntityRank getRankFromTopologicalDimension(const int topo_dim, const int space_dim)
Given a topological dimension, get the STK entity rank.
EntityId id() const
Client interface.