27 #ifndef __FIELDMULTIINDICES_HPP__
28 #define __FIELDMULTIINDICES_HPP__
32 template <
typename T>
struct interface_RefEntity;
72 const boost::shared_ptr<CoordSys> coord_sys_ptr);
78 boost::weak_ptr<std::vector<DofEntity>>,
80 indexed_by<sequenced<>>>;
82 typedef std::array<std::array<int, MAX_DOFS_ON_ENTITY>, MBMAXTYPE>
88 boost::shared_ptr<CoordSys>
124 const EntityType
type,
125 const int owner_proc) {
126 constexpr
int ent_shift = 8 *
sizeof(EntityHandle);
128 static_cast<UId>(bit_number) << 8 *
sizeof(EntityHandle) |
129 static_cast<UId>(owner_proc) << 5 + ent_shift)
134 const int owner_proc)
const {
139 const EntityType
type,
140 const int owner_proc) {
141 constexpr
int ent_shift = 8 *
sizeof(EntityHandle);
143 static_cast<UId>(bit_number) << ent_shift |
144 static_cast<UId>(owner_proc) << 5 + ent_shift)
149 const int owner_proc)
const {
308 "Too many fields allowed, can be more but ...");
355 inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
393 template <
typename FIELD,
typename REFENT>
399 const boost::shared_ptr<REFENT> &ref_ents_ptr)
404 template <
typename FIELD,
typename REFENT>
408 const boost::shared_ptr<REFENT> &ref_ents_ptr)
496 inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
509 template <
typename T>
600 inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
616 typedef multi_index_container<
617 boost::shared_ptr<Field>,
619 hashed_unique<tag<BitFieldId_mi_tag>,
620 const_mem_fun<Field, const BitFieldId &, &Field::getId>,
621 HashBit<BitFieldId>, EqBit<BitFieldId>>,
622 ordered_unique<tag<Meshset_mi_tag>,
623 member<Field, EntityHandle, &Field::meshSet>>,
625 tag<FieldName_mi_tag>,
626 const_mem_fun<Field, boost::string_ref, &Field::getNameRef>>,
627 ordered_non_unique<tag<BitFieldId_space_mi_tag>,
628 const_mem_fun<Field, FieldSpace, &Field::getSpace>>>>
631 typedef multi_index_container<
632 boost::shared_ptr<Field>,
634 ordered_unique<tag<BitFieldId_mi_tag>,
635 const_mem_fun<Field, const BitFieldId &, &Field::getId>,
multi_index_container< boost::shared_ptr< Field >, indexed_by< hashed_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, HashBit< BitFieldId >, EqBit< BitFieldId > >, ordered_unique< tag< Meshset_mi_tag >, member< Field, EntityHandle, &Field::meshSet > >, ordered_unique< tag< FieldName_mi_tag >, const_mem_fun< Field, boost::string_ref, &Field::getNameRef > >, ordered_non_unique< tag< BitFieldId_space_mi_tag >, const_mem_fun< Field, FieldSpace, &Field::getSpace > > > > Field_multiIndex
Field_multiIndex for Field.
FieldApproximationBase
approximation base
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FieldSpace
approximation spaces
#define BITFIELDID_SIZE
max number of fields
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FieldOrderFunct FieldOrderTable[MBMAXTYPE]
user adjacency function table
boost::function< int(const int order)> FieldOrderFunct
user adjacency function
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
int FieldCoefficientsNumber
Number of field coefficients.
char FieldBitNumber
Field bit number.
implementation of Data Operators for Forces and Sources
multi_index_container< boost::shared_ptr< Field >, indexed_by< ordered_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, LtBit< BitFieldId > > > > Field_multiIndex_view
DeprecatedCoreInterface Interface
Set field coordinate system.
boost::shared_ptr< CoordSys > csPtr
void operator()(boost::shared_ptr< Field > &e)
FieldChangeCoordinateSystem(const boost::shared_ptr< CoordSys > &cs_ptr)
Provide data structure for (tensor) field approximation.
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of field coefficients.
MoFEMErrorCode get_E_DualBase(const double m[]) const
Get reference dual base vectors.
const void * tagNamePrefixData
tag keeps name prefix of the field
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
FieldOrderTable forderTable
nb. DOFs table for entities
DofsOrderMap & getDofOrderMap() const
get hash-map relating dof index on entity with its order
const void * tagName
tag keeps name of the field
int tagNameSize
number of bits necessary to keep field name
std::string getName() const
Get field name.
const Field * getFieldRawPtr() const
std::string getCoordSysName() const
Get coordinate system name.
static UId generateGlobalUniqueIdForTypeHi(const char bit_number, const EntityType type, const int owner_proc)
FieldApproximationBase getApproxBase() const
Get approximation base.
const BitFieldId & getId() const
Get unique field id.
friend std::ostream & operator<<(std::ostream &os, const Field &e)
EntityHandle getMeshset() const
Get field meshset.
TagType th_FieldDataVertsType
EntityHandle meshSet
keeps entities for this meshset
std::array< std::array< int, MAX_DOFS_ON_ENTITY >, MBMAXTYPE > DofsOrderMap
static UId generateGlobalUniqueIdForTypeLo(const char bit_number, const EntityType type, const int owner_proc)
MoFEMErrorCode get_e_DualBase(const double m[]) const
Get current dual base vectors.
FieldSpace * tagSpaceData
tag keeps field space
MoFEMErrorCode rebuildDofsOrderMap() const
FieldBitNumber getBitNumberCalculate() const
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set f...
Field(const moab::Interface &moab, const EntityHandle meshset, const boost::shared_ptr< CoordSys > coord_sys_ptr)
constructor for moab field
UId generateGlobalUniqueIdForTypeLo(const EntityType type, const int owner_proc) const
static FieldBitNumber getBitNumberCalculate(const BitFieldId &id)
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set f...
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.
Tag th_FieldData
Tag storing field values on entity in the field.
FieldOrderTable & getFieldOrderTable()
Get the Field Order Table.
MoFEMErrorCode get_e_Base(const double m[]) const
Get current dual base vectors.
FieldCoefficientsNumber * tagNbCoeffData
BitFieldId * tagId
tag keeps field id
FieldSpace getSpace() const
Get field approximation space.
EntityHandle getCoordSysMeshSet() const
Returns meshset on which Tags defining coordinate system are stored.
Tag th_FieldDataVerts
Tag storing field values on vertices in the field.
SequenceDofContainer sequenceDofContainer
FieldApproximationBase * tagBaseData
tag keeps field base
SequenceDofContainer & getDofSequenceContainer() const
Get reference to sequence data container.
UId generateGlobalUniqueIdForTypeHi(const EntityType type, const int owner_proc) const
MoFEMErrorCode get_E_Base(const double m[]) const
Get reference base vectors.
multi_index_container< boost::weak_ptr< std::vector< DofEntity > >, indexed_by< sequenced<> >> SequenceDofContainer
boost::string_ref getCoordSysNameRef() const
Get coordinate system name.
Tag th_AppOrder
Tag storing approximation order on entity.
boost::string_ref getNameRef() const
Get string reference to field name.
FieldBitNumber getBitNumber() const
Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for giv...
int getCoordSysDim(const int d=0) const
Get dimension of general two-point tensor MoFEM::CoordSys::getDim.
EntityHandle getCoordSysMeshSet() const
int getCoordSysDim(const int d=0) const
MoFEMErrorCode get_e_Base(const double m[]) const
MoFEMErrorCode get_E_Base(const double m[]) const
MoFEMErrorCode get_e_DualBase(const double m[]) const
FieldBitNumber getBitNumber() const
interface_Field(const boost::shared_ptr< T > &ptr)
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
FieldApproximationBase getApproxBase() const
boost::string_ref getCoordSysNameRef() const
const Field * getFieldRawPtr() const
MoFEMErrorCode get_E_DualBase(const double m[]) const
FieldSpace getSpace() const
std::string getCoordSysName() const
EntityHandle getMeshset() const
const BitFieldId & getId() const
FieldCoefficientsNumber getNbOfCoeffs() const
std::string getName() const
boost::string_ref getNameRef() const
MoFEMErrorCode get_e_DualBase(const double m[]) const
FieldBitNumber getBitNumber() const
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
MoFEMErrorCode get_E_Base(const double m[]) const
FieldCoefficientsNumber getNbOfCoeffs() const
EntityHandle getCoordSysMeshSet() const
boost::string_ref getNameRef() const
FieldApproximationBase getApproxBase() const
std::string getName() const
const Field * getFieldRawPtr() const
EntityHandle getMeshset() const
const BitFieldId & getId() const
MoFEMErrorCode get_E_DualBase(const double m[]) const
FieldSpace getSpace() const
MoFEMErrorCode get_e_Base(const double m[]) const
interface_Field(const boost::shared_ptr< FIELD > &field_ptr, const boost::shared_ptr< REFENT > &ref_ents_ptr)
boost::shared_ptr< FIELD > sFieldPtr
std::string getCoordSysName() const
int getCoordSysDim(const int d=0) const
boost::string_ref getCoordSysNameRef() const
Pointer interface for MoFEM::Field.
interface_FieldImpl(const boost::shared_ptr< FIELD > &field_ptr, const boost::shared_ptr< REFENT > &ref_ents_ptr)
virtual ~interface_FieldImpl()=default
boost::shared_ptr< REFENT > & getRefEntityPtr() const