21#ifndef __DOFSMULTIINDICES_HPP__
22#define __DOFSMULTIINDICES_HPP__
40 const boost::shared_ptr<FieldEntity> &ent_ptr) {
42 (
static_cast<ShortId>(ent_ptr->getBitNumber()) << 9);
45 DofEntity(
const boost::shared_ptr<FieldEntity> &entity_ptr,
60 return this->
sPtr->getLocalUniqueId();
65 return this->
sPtr->getGlobalUniqueId();
74 const boost::shared_ptr<FieldEntity> &ent_ptr) {
84 const EntityHandle ent) {
90 const EntityHandle ent) {
108 const boost::shared_ptr<FieldEntity> &ent_ptr) {
137 inline EntityHandle
getEnt()
const {
return this->
sPtr->getEnt(); }
178 return this->
sPtr->getGlobalUniqueId();
183 return this->
sPtr->getEntGlobalUniqueId();
191 return this->
sPtr->getEntLocalUniqueId();
196 return this->
sPtr->getNonNonuniqueShortId();
206 inline EntityHandle
getEnt()
const {
return this->
sPtr->getEnt(); }
210 return this->
sPtr->getDofOrder();
215 return this->
sPtr->getDofCoeffIdx();
228 return this->
sPtr->getFieldEntityPtr();
272 const int dof_idx = -1,
const int petsc_gloabl_dof_idx = -1,
273 const int petsc_local_dof_idx = -1,
const int part = -1);
306 friend std::ostream &
operator<<(std::ostream &os,
317typedef multi_index_container<
318 boost::shared_ptr<DofEntity>,
323 const_mem_fun<DofEntity, UId, &DofEntity::getLocalUniqueId>>,
328 const_mem_fun<DofEntity, EntityHandle, &DofEntity::getEnt>>
345 multi_index_container<boost::shared_ptr<DofEntity>,
348 ordered_unique<const_mem_fun<
357 boost::shared_ptr<DofEntity>,
361 const_mem_fun<DofEntity, UId, &DofEntity::getGlobalUniqueId>>
373typedef multi_index_container<
374 boost::shared_ptr<DofEntity>,
378 const_mem_fun<DofEntity, UId, &DofEntity::getLocalUniqueId>>,
381 const_mem_fun<DofEntity, char, &DofEntity::getActive>>
392typedef multi_index_container<
393 boost::shared_ptr<FEDofEntity>,
396 ordered_unique<tag<Unique_mi_tag>,
400 ordered_non_unique<tag<Ent_mi_tag>,
419typedef multi_index_container<
420 boost::shared_ptr<FENumeredDofEntity>,
421 indexed_by<ordered_unique<
452typedef multi_index_container<
453 boost::shared_ptr<NumeredDofEntity>,
457 ordered_unique<tag<Unique_mi_tag>,
464 member<NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt>>,
469 ordered_non_unique<tag<PetscGlobalIdx_mi_tag>,
473 ordered_non_unique<tag<PetscLocalIdx_mi_tag>,
507 multi_index_container<boost::shared_ptr<NumeredDofEntity>,
510 ordered_unique<const_mem_fun<
520 boost::shared_ptr<NumeredDofEntity>,
525 multi_index_container<boost::shared_ptr<NumeredDofEntity>,
526 indexed_by<ordered_non_unique<const_mem_fun<
531 multi_index_container<
532 boost::shared_ptr<NumeredDofEntity>,
533 indexed_by<ordered_non_unique<const_mem_fun<
544 void operator()(boost::shared_ptr<DofEntity> &dof);
555 const DofIdx petsc_gloabl_dof_idx)
557 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof)
const {
568 const unsigned int part,
const DofIdx mofem_dof_idx,
569 const DofIdx petsc_gloabl_dof_idx)
572 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof)
const {
583 const DofIdx petsc_gloabl_dof_idx,
584 const DofIdx petsc_local_dof_idx)
587 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof)
const {
602 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof)
const {
615 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof)
const {
630 const unsigned int part,
const DofIdx mofem_idx,
631 const DofIdx petsc_gloabl_dof_idx,
const DofIdx petsc_local_dof_idx)
635 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof)
const {
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > >, ordered_non_unique< const_mem_fun< DofEntity, char, &DofEntity::getActive > > > > DofEntity_multiIndex_active_view
multi-index view on DofEntity activity
FENumeredDofEntity_multiIndex::index< Ent_mi_tag >::type FENumeredDofEntityByEnt
Numbered DoF multi-index by entity.
multi_index_container< boost::shared_ptr< FENumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, UId, &FENumeredDofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, EntityHandle, &FENumeredDofEntity::getEnt > > > > FENumeredDofEntity_multiIndex
MultiIndex container keeps FENumeredDofEntity.
FEDofEntity_multiIndex::index< Unique_mi_tag >::type FEDofEntityByUId
Dof entity multi-index by UId and entity.
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > > > > DofEntity_multiIndex_uid_view
multi-index view on DofEntity by uid
NumeredDofEntity_multiIndex::index< Unique_mi_tag >::type NumeredDofEntityByUId
Numbered DoF multi-index by UId.
DofEntity_multiIndex::index< Ent_mi_tag >::type DofEntityByEnt
Dof multi-index by entity.
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, UId, &NumeredDofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Part_mi_tag >, member< NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt > >, ordered_non_unique< tag< Idx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::dofIdx > >, ordered_non_unique< tag< PetscGlobalIdx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::petscGloablDofIdx > >, ordered_non_unique< tag< PetscLocalIdx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::petscLocalDofIdx > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle, &NumeredDofEntity::getEnt > > > > NumeredDofEntity_multiIndex
MultiIndex container keeps NumeredDofEntity.
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getGlobalUniqueId > > > > DofEntity_multiIndex_global_uid_view
multi-index view on DofEntity by uid
std::vector< boost::weak_ptr< DofEntity > > DofEntity_vector_view
vector view on DofEntity by uid
multi_index_container< boost::shared_ptr< FEDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FEDofEntity::DofEntity, UId, &FEDofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FEDofEntity::DofEntity, EntityHandle, &FEDofEntity::getEnt > > > > FEDofEntity_multiIndex
MultiIndex container keeps FEDofEntity.
FENumeredDofEntity_multiIndex::index< Unique_mi_tag >::type FENumeredDofEntityByUId
Dof entity multi-index by UId.
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > > > > DofEntity_multiIndex
MultiIndex container keeps DofEntity.
NumeredDofEntity_multiIndex::index< Ent_mi_tag >::type NumeredDofEntityByEnt
Numbered DoF multi-index by entity.
NumeredDofEntity_multiIndex::index< PetscLocalIdx_mi_tag >::type NumeredDofEntityByLocalIdx
Numbered DoF multi-index by local index.
int ApproximationOrder
Approximation on the entity.
int FieldCoefficientsNumber
Number of field coefficients.
char FieldBitNumber
Field bit number.
int ShortId
Unique Id in the field.
implementation of Data Operators for Forces and Sources
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< hashed_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getDofIdx > > > > NumeredDofEntity_multiIndex_idx_view_hashed
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getPetscLocalDofIdx > > > > NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, FieldCoefficientsNumber, &NumeredDofEntity::getDofCoeffIdx > > > > NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique
DofEntity_multiIndex::index< Unique_mi_tag >::type DofEntityByUId
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, UId, &NumeredDofEntity::getLocalUniqueId > > > > NumeredDofEntity_multiIndex_uid_view_ordered
void operator()(boost::shared_ptr< DofEntity > &dof)
DofEntity_active_change(bool active)
keeps information about DOF on the entity
UId getLocalUniqueId() const
const UId getEntGlobalUniqueId() const
EntityHandle getEnt() const
DofIdx getEntDofIdx() const
static UId getLoFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
UId getGlobalUniqueId() const
static UId getHiFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
const UId & getEntLocalUniqueId() const
ApproximationOrder getDofOrder() const
FieldData & getFieldData() const
friend std::ostream & operator<<(std::ostream &os, const DofEntity &e)
ShortId getNonNonuniqueShortId() const
get short uid it is unique in combination with entity handle
static ShortId getNonNonuniqueShortId(const DofIdx dof, const boost::shared_ptr< FieldEntity > &ent_ptr)
DofEntity(const boost::shared_ptr< FieldEntity > &entity_ptr, const ApproximationOrder dof_order, const FieldCoefficientsNumber dof_rank, const DofIdx dof)
virtual ~DofEntity()=default
FieldCoefficientsNumber getDofCoeffIdx() const
static UId getUniqueIdCalculate(const DofIdx dof, UId ent_uid)
static UId getGlobalUniqueIdCalculate(const DofIdx dof, const boost::shared_ptr< FieldEntity > &ent_ptr)
Calculate UId for DOF.
static UId getLocalUniqueIdCalculate(const DofIdx dof, const boost::shared_ptr< FieldEntity > &ent_ptr)
keeps information about indexed dofs for the finite element
DofEntity(const boost::shared_ptr< FieldEntity > &entity_ptr, const ApproximationOrder dof_order, const FieldCoefficientsNumber dof_rank, const DofIdx dof)
friend std::ostream & operator<<(std::ostream &os, const FEDofEntity &e)
keeps information about indexed dofs for the finite element
FENumeredDofEntity()=delete
friend std::ostream & operator<<(std::ostream &os, const FENumeredDofEntity &e)
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.
static UId getHiFieldEntityUId(const UId &uid)
static UId getLoFieldEntityUId(const UId &uid)
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
NumeredDofEntity_local_idx_change(const DofIdx petsc_local_dof_idx)
const DofIdx petscLocalDofIdx
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
NumeredDofEntity_mofem_index_change(const DofIdx mofem_idx)
NumeredDofEntity_part_and_all_indices_change(const unsigned int part, const DofIdx mofem_idx, const DofIdx petsc_gloabl_dof_idx, const DofIdx petsc_local_dof_idx)
const DofIdx petscGloablDofIdx
const DofIdx petscLocalDofIdx
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
NumeredDofEntity_part_and_glob_idx_change(const unsigned int part, const DofIdx petsc_gloabl_dof_idx)
const DofIdx petscGloablDofIdx
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
const DofIdx petscLocalDofIdx
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
const DofIdx petscGloablDofIdx
NumeredDofEntity_part_and_indices_change(const unsigned int part, const DofIdx petsc_gloabl_dof_idx, const DofIdx petsc_local_dof_idx)
NumeredDofEntity_part_and_mofem_glob_idx_change(const unsigned int part, const DofIdx mofem_dof_idx, const DofIdx petsc_gloabl_dof_idx)
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
const DofIdx petscGloablDofIdx
keeps information about indexed dofs for the problem
virtual ~NumeredDofEntity()=default
DofIdx getPetscLocalDofIdx() const
NumeredDofEntity(const boost::shared_ptr< DofEntity > &dof_entity_ptr, const int dof_idx=-1, const int petsc_gloabl_dof_idx=-1, const int petsc_local_dof_idx=-1, const int part=-1)
DofIdx getPetscGlobalDofIdx() const
friend std::ostream & operator<<(std::ostream &os, const NumeredDofEntity &e)
unsigned int getPart() const
interface_DofEntity< DofEntity > interface_type_DofEntity
bool getHasLocalIndex() const
ShortId getNonNonuniqueShortId() const
UId getLocalUniqueId() const
const UId & getEntLocalUniqueId() const
FieldCoefficientsNumber getDofCoeffIdx() const
interface_DofEntity(const boost::shared_ptr< T > &sptr)
virtual ~interface_DofEntity()=default
DofIdx getEntDofIdx() const
boost::shared_ptr< FieldEntity > & getFieldEntityPtr() const
UId getGlobalUniqueId() const
EntityHandle getEnt() const
const UId & getEntGlobalUniqueId() const
boost::shared_ptr< DofEntity > & getDofEntityPtr() const
FieldData & getFieldData() const
ApproximationOrder getDofOrder() const
Interface to FieldEntity.
const std::array< int, MAX_DOFS_ON_ENTITY > & getDofOrderMap() const
get hash-map relating dof index on entity with its order
boost::shared_ptr< FieldEntity > & getFieldEntityPtr() const
FieldCoefficientsNumber getNbOfCoeffs() const
boost::shared_ptr< FieldEntity > sPtr