10#ifndef __FIELDMULTIINDICES_HPP__
11#define __FIELDMULTIINDICES_HPP__
15template <
typename T>
struct interface_RefEntity;
50 boost::weak_ptr<std::vector<DofEntity>>,
51 indexed_by<sequenced<>>>;
55 std::array<std::array<int, MAX_DOFS_ON_ENTITY>, MBMAXTYPE>;
197 "Too many fields allowed, can be more but ...");
230 inline const std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
286template <
typename FIELD,
typename REFENT>
297 const boost::shared_ptr<REFENT> &ref_ents_ptr)
309template <
typename FIELD,
typename REFENT>
318 const boost::shared_ptr<REFENT> &ref_ents_ptr)
382 inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
480 inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
503typedef multi_index_container<
504 boost::shared_ptr<Field>,
506 hashed_unique<tag<BitFieldId_mi_tag>,
507 const_mem_fun<Field, const BitFieldId &, &Field::getId>,
508 HashBit<BitFieldId>, EqBit<BitFieldId>>,
509 ordered_unique<tag<Meshset_mi_tag>,
510 member<Field, EntityHandle, &Field::meshSet>>,
512 tag<FieldName_mi_tag>,
513 const_mem_fun<Field, boost::string_ref, &Field::getNameRef>>,
514 ordered_non_unique<tag<BitFieldId_space_mi_tag>,
515 const_mem_fun<Field, FieldSpace, &Field::getSpace>>>>
524typedef multi_index_container<
525 boost::shared_ptr<Field>,
527 ordered_unique<tag<BitFieldId_mi_tag>,
528 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
Multi-index container for field storage and retrieval.
FieldApproximationBase
approximation base
static const char *const FieldContinuityNames[]
FieldSpace
approximation spaces
FieldContinuity
Field continuity.
static const char *const FieldSpaceNames[]
#define BITFIELDID_SIZE
max number of fields
static const char *const ApproximationBaseNames[]
FieldOrderFunct FieldOrderTable[MBMAXTYPE]
Array of functions defining DOF count for each entity type.
boost::function< int(const int order)> FieldOrderFunct
Function returning number of DOFs for given approximation order.
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
Simplified field container with ID-based ordering.
Field data structure for finite element approximation.
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of field coefficients per DOF.
const void * tagNamePrefixData
Field name prefix.
FieldOrderTable forderTable
DOF count functions for each entity type.
const void * tagName
Field name.
int tagNameSize
Field name size in bytes.
std::string getName() const
Get field name as string.
auto getSpaceName() const
Get field approximation space name.
int tagNamePrefixSize
Field name prefix size in bytes.
FieldApproximationBase getApproxBase() const
Get approximation basis type.
friend std::ostream & operator<<(std::ostream &os, const Field &e)
Output stream operator for field information.
unsigned int bitNumber
Bit number corresponding to this field's unique ID.
FieldContinuity getContinuity() const
Get field continuity type.
EntityHandle getMeshset() const
Get field meshset handle.
std::map< int, BaseFunction::DofsSideMap > & getDofSideMap() const
Get DOF side mapping for broken spaces.
EntityHandle meshSet
Meshset containing field entities.
FieldSpace * tagSpaceData
Field approximation space.
FieldBitNumber getBitNumberCalculate() const
Calculate bit number for this field's ID.
auto getApproxBaseName() const
Get approximation basis name.
const std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
Get DOF order mapping for specific entity type.
static FieldBitNumber getBitNumberCalculate(const BitFieldId &id)
Calculate bit number from field ID bitset.
Tag th_FieldData
Tag for field values on entities.
const DofsOrderMap & getDofOrderMap() const
Get complete DOF order mapping for all entity types.
FieldOrderTable & getFieldOrderTable()
Get field order table.
MoFEMErrorCode rebuildDofsOrderMap()
Rebuild DOF order mapping arrays.
FieldContinuity * tagFieldContinuityData
Field continuity type.
FieldCoefficientsNumber * tagNbCoeffData
Field rank (e.g. Temperature=1, displacement in 3D=3)
BitFieldId * tagId
Field unique identifier.
FieldSpace getSpace() const
Get field approximation space.
static constexpr int maxBrokenDofsOrder
Maximum order for broken space DOFs.
Tag th_FieldDataVerts
Tag for field values on vertices.
SequenceDofContainer sequenceDofContainer
FieldApproximationBase * tagBaseData
Field basis functions.
SequenceDofContainer & getDofSequenceContainer() const
Get sequence container for bulk DOF allocation.
std::map< int, BaseFunction::DofsSideMap > dofSideMap
auto getContinuityName() const
Get field continuity name.
const Field * getFieldRawPtr() const
Get raw pointer to this field.
std::array< std::array< int, MAX_DOFS_ON_ENTITY >, MBMAXTYPE > DofsOrderMap
Array mapping entity types to DOF order arrays.
TagType tagFieldDataVertsType
Tag type for vertex data storage.
multi_index_container< boost::weak_ptr< std::vector< DofEntity > >, indexed_by< sequenced<> > > SequenceDofContainer
Container for bulk DOF allocation.
Tag th_FieldRank
Tag for field rank (vector dimension)
Tag th_AppOrder
Tag for approximation order on entities.
moab::Interface & moab
MOAB interface reference.
boost::string_ref getNameRef() const
Get field name as string reference.
virtual ~Field()=default
Virtual destructor.
FieldBitNumber getBitNumber() const
Get bit number for this field's ID.
const BitFieldId & getId() const
Get unique field identifier.
Base template interface for field pointer management.
interface_FieldImpl(const boost::shared_ptr< FIELD > &field_ptr, const boost::shared_ptr< REFENT > &ref_ents_ptr)
Constructor with field and reference entity pointers.
virtual ~interface_FieldImpl()=default
Virtual destructor.
const BitFieldId & getId() const
Get field ID.
FieldBitNumber getBitNumber() const
Get bit number for field ID.
interface_Field(const boost::shared_ptr< T > &ptr)
Constructor.
auto getApproxBaseName() const
Get approximation basis name.
FieldApproximationBase getApproxBase() const
Get approximation basis.
FieldSpace getSpace() const
Get approximation space.
EntityHandle getMeshset() const
Get field meshset handle.
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of coefficients per DOF.
const Field * getFieldRawPtr() const
Get raw field pointer.
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
Get DOF order mapping for entity type.
auto getSpaceName() const
Get approximation space name.
std::string getName() const
Get field name.
boost::string_ref getNameRef() const
Get field name reference.
Field interface with separate field and reference entity types.
FieldBitNumber getBitNumber() const
Get bit number for field ID.
FieldContinuity getContinuity() const
Get space continuity.
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of coefficients per DOF.
auto getContinuityName() const
Get space continuity name.
boost::string_ref getNameRef() const
Get field name reference.
FieldApproximationBase getApproxBase() const
Get approximation basis.
std::string getName() const
Get field name.
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
Get DOF order mapping for entity type.
EntityHandle getMeshset() const
Get field meshset handle.
const Field * getFieldRawPtr() const
Get raw field pointer.
auto & getDofSideMap()
Get DOF side mapping for broken spaces.
FieldSpace getSpace() const
Get approximation space.
const BitFieldId & getId() const
Get field ID.
interface_Field(const boost::shared_ptr< FIELD > &field_ptr, const boost::shared_ptr< REFENT > &ref_ents_ptr)
Constructor.
FieldOrderTable & getFieldOrderTable()
Get field order table.
boost::shared_ptr< FIELD > sFieldPtr
int getCoordSysDim(const int d=0) const
Get coordinate system dimension.
boost::shared_ptr< REFENT > & getRefEntityPtr() const