41 #include "DTK_STKMeshNodalShapeFunction.hpp" 43 #include "DTK_STKMeshHelpers.hpp" 45 #include <Shards_CellTopology.hpp> 52 const Teuchos::RCP<stk::mesh::BulkData> &bulk_data )
53 : d_bulk_data( bulk_data )
61 const Entity &entity, Teuchos::Array<SupportId> &support_ids )
const 64 const stk::mesh::Entity &stk_entity =
66 const stk::mesh::EntityRank entity_rank =
67 d_bulk_data->entity_rank( stk_entity );
70 if ( stk::topology::NODE_RANK == entity_rank )
72 support_ids.assign( 1, d_bulk_data->identifier( stk_entity ) );
78 const stk::mesh::Entity *begin = d_bulk_data->begin_nodes( stk_entity );
79 const stk::mesh::Entity *end = d_bulk_data->end_nodes( stk_entity );
82 int num_nodes = std::distance( begin, end );
83 support_ids.resize( num_nodes );
84 for (
int n = 0; n < num_nodes; ++n )
86 support_ids[n] = d_bulk_data->identifier( begin[n] );
96 const Teuchos::ArrayView<const double> &reference_point,
97 Teuchos::Array<double> &values )
const 99 const stk::mesh::Entity &stk_entity =
102 shards::CellTopology entity_topo = stk::mesh::get_cell_topology(
103 d_bulk_data->bucket( stk_entity ).topology() );
105 d_intrepid_shape.
evaluateValue( entity_topo, reference_point, values );
113 const Teuchos::ArrayView<const double> &reference_point,
114 Teuchos::Array<Teuchos::Array<double>> &gradients )
const 116 const stk::mesh::Entity &stk_entity =
119 shards::CellTopology entity_topo = stk::mesh::get_cell_topology(
120 d_bulk_data->bucket( stk_entity ).topology() );
Geometric entity interface definition.
void evaluateGradient(const Entity &entity, const Teuchos::ArrayView< const double > &reference_point, Teuchos::Array< Teuchos::Array< double >> &gradients) const override
Given an entity and a reference point, evaluate the gradient of the shape function of the entity at t...
void evaluateValue(const Entity &entity, const Teuchos::ArrayView< const double > &reference_point, Teuchos::Array< double > &values) const override
Given an entity and a reference point, evaluate the shape function of the entity at that point...
static const stk::mesh::Entity & extractEntity(const Entity dtk_entity)
Given a DTK entity, extract the STK entity.
Assertions and Design-by-Contract for error handling.
STKMeshNodalShapeFunction(const Teuchos::RCP< stk::mesh::BulkData > &bulk_data)
Constructor.
void entitySupportIds(const Entity &entity, Teuchos::Array< SupportId > &support_ids) const override
Given an entity, get the ids of the support locations.
void evaluateGradient(const shards::CellTopology &topology, const Teuchos::ArrayView< const double > &reference_point, Teuchos::Array< Teuchos::Array< double >> &gradients) const
Given an topology and a reference point, evaluate the gradient of the shape function of the topology ...
void evaluateValue(const shards::CellTopology &topology, const Teuchos::ArrayView< const double > &reference_point, Teuchos::Array< double > &values) const
Given an topology and a reference point, evaluate the shape function of the topology at that point...