41 #ifndef DTK_STKMESHFIELD_HPP 42 #define DTK_STKMESHFIELD_HPP 44 #include <unordered_map> 47 #include "DTK_Field.hpp" 48 #include "DTK_Types.hpp" 50 #include <Teuchos_ArrayView.hpp> 51 #include <Teuchos_Ptr.hpp> 52 #include <Teuchos_RCP.hpp> 54 #include <stk_mesh/base/BulkData.hpp> 55 #include <stk_mesh/base/Entity.hpp> 56 #include <stk_mesh/base/Selector.hpp> 57 #include <stk_topology/topology.hpp> 67 template <
class Scalar,
class FieldType>
74 STKMeshField(
const Teuchos::RCP<stk::mesh::BulkData> &bulk_data,
75 const Teuchos::Ptr<FieldType> &field,
const int field_dim );
92 const int dimension )
const override;
99 const double data )
override;
108 Teuchos::RCP<stk::mesh::BulkData> d_bulk_data;
111 Teuchos::Ptr<FieldType> d_field;
117 std::vector<stk::mesh::Entity> d_field_entities;
120 Teuchos::Array<SupportId> d_support_ids;
123 std::unordered_map<SupportId, int> d_id_map;
134 #include "DTK_STKMeshField_impl.hpp" 138 #endif // end DTK_STKMESHFIELD_HPP double readFieldData(const SupportId support_id, const int dimension) const override
Given a local support id and a dimension, read data from the application field.
Field data access for STK mesh.
STKMeshField(const Teuchos::RCP< stk::mesh::BulkData > &bulk_data, const Teuchos::Ptr< FieldType > &field, const int field_dim)
Constructor.
unsigned long int SupportId
Support id type.
void finalizeAfterWrite() override
Finalize a field after writing into it.
void writeFieldData(const SupportId support_id, const int dimension, const double data) override
Given a local support id, dimension, and field value, write data into the application field...
int dimension() const override
Get the dimension of the field.
Teuchos::ArrayView< const SupportId > getLocalSupportIds() const override
Get the locally-owned entity support location ids of the field.