v0.14.0
Loading...
Searching...
No Matches
DofsMultiIndices.hpp
Go to the documentation of this file.
1/** \file DofsMultiIndices.hpp
2 * \ingroup dof_multi_indices
3 * \brief Multi-Index contains, data structures for mofem dofs and other
4 * low-level functions
5 */
6
7#ifndef __DOFSMULTIINDICES_HPP__
8#define __DOFSMULTIINDICES_HPP__
9
10namespace MoFEM {
11
12/**
13 * \brief keeps information about DOF on the entity
14 * \ingroup dof_multi_indices
15 */
16struct DofEntity : public interface_FieldEntity<FieldEntity> {
17
18 virtual ~DofEntity() = default;
19
23
24 static inline ShortId
26 const boost::shared_ptr<FieldEntity> &ent_ptr) {
27 return static_cast<ShortId>(dof) |
28 (static_cast<ShortId>(ent_ptr->getBitNumber()) << 9);
29 }
30
31 DofEntity(const boost::shared_ptr<FieldEntity> &entity_ptr,
32 const ApproximationOrder dof_order,
33 const FieldCoefficientsNumber dof_rank, const DofIdx dof);
34
35 /// @return get dof index on entity
36 inline DofIdx getEntDofIdx() const { return std::abs(dof); }
37
38 /// @return get field data on dof
39 inline FieldData &getFieldData() const {
40 return const_cast<FieldData &>(
41 (*this->sPtr->getEntFieldDataPtr())[getEntDofIdx()]);
42 }
43
44 /// @return get entity unique dof id
45 inline const UId &getEntLocalUniqueId() const {
46 return this->sPtr->getLocalUniqueId();
47 }
48
49 /// @return get entity unique dof id
50 inline const UId getEntGlobalUniqueId() const {
51 return this->sPtr->getGlobalUniqueId();
52 }
53
54 static inline UId getUniqueIdCalculate(const DofIdx dof, UId ent_uid) {
55 return ent_uid | dof;
56 }
57
58 static inline UId
60 const boost::shared_ptr<FieldEntity> &ent_ptr) {
61 return getUniqueIdCalculate(dof, ent_ptr->getLocalUniqueId());
62 }
63
64 /// @return get unique dof id
65 inline UId getLocalUniqueId() const {
66 return getUniqueIdCalculate(std::abs(dof), this->sPtr->getLocalUniqueId());
67 }
68
74
80
81 /**
82 * \brief Calculate UId for DOF
83 *
84 * UId is constructed such that all DOFs are ordered by processor, entity,
85 * field and dof index on entity, On entity dofs index is constructed such
86 * that coefficient number and dofs increase with dofs index on entity.
87 *
88 * @param dof dof index on entity
89 * @param ent_ptr pointer to field entity
90 * @return UId
91 */
92 static inline UId
94 const boost::shared_ptr<FieldEntity> &ent_ptr) {
95 return getUniqueIdCalculate(dof, ent_ptr->getGlobalUniqueId());
96 }
97
98 /// @return get unique dof id
99 inline UId getGlobalUniqueId() const {
100 return getUniqueIdCalculate(std::abs(dof), this->sPtr->getGlobalUniqueId());
101 }
102
103 /** \brief get short uid it is unique in combination with entity handle
104 *
105 * EntityHandle are controlled by MOAB, which is unique in
106 * MOAB instance. However two MOAB instances, can have attached different
107 * EntityHandles to the same entity.
108 *
109 * Relation between MoAB EntityHandle can be handled by saving entity handle
110 * data into tag, see MB_TYPE_HANDLE. MOAB at time of file reading or
111 * creating new MOAB instance, substitute tag value by approbate entity
112 * handle.
113 *
114 * ShortId is created to handle problems related to saving data series, and
115 * reading those data using different MoAB instances.
116 *
117 */
121
122 /// @return get dof entity handle
123 inline EntityHandle getEnt() const { return this->sPtr->getEnt(); }
124
125 /// @return get dof approximation order
127 return getDofOrderMap()[getEntDofIdx()];
128 }
129
130 /// @return get dof coefficient index
132 return getEntDofIdx() % getNbOfCoeffs();
133 }
134
135 /// @return return true if dof us active
136 inline char getActive() const { return dof < 0 ? 0 : 1; }
137
138 friend std::ostream &operator<<(std::ostream &os, const DofEntity &e);
139
140private:
142
144};
145
146/**
147 * \brief Interface to DofEntity
148 *
149 * In MoFEM DOFs classes (and Ent and Finite Element classes) are derived by
150 * interface, i.e. not class is derived but interface to it.
151 *
152 * \ingroup dof_multi_indices
153 */
154template <typename T>
156
157 virtual ~interface_DofEntity() = default;
158
159 interface_DofEntity(const boost::shared_ptr<T> &sptr)
160 : interface_FieldEntity<T>(sptr) {}
161
162 /// @return return dof unique id
163 inline UId getGlobalUniqueId() const {
164 return this->sPtr->getGlobalUniqueId();
165 }
166
167 /// @return return entity unique id
168 inline const UId &getEntGlobalUniqueId() const {
169 return this->sPtr->getEntGlobalUniqueId();
170 }
171
172 /// @return return dof unique id
173 inline UId getLocalUniqueId() const { return this->sPtr->getLocalUniqueId(); }
174
175 /// @return return entity unique id
176 inline const UId &getEntLocalUniqueId() const {
177 return this->sPtr->getEntLocalUniqueId();
178 }
179
180 /// @return return short id (used by data recorder)
182 return this->sPtr->getNonNonuniqueShortId();
183 }
184
185 /// @return return index of dof on the entity
186 inline DofIdx getEntDofIdx() const { return this->sPtr->getEntDofIdx(); }
187
188 /// @return return data on dof
189 inline FieldData &getFieldData() const { return this->sPtr->getFieldData(); }
190
191 /// @return return entity handle
192 inline EntityHandle getEnt() const { return this->sPtr->getEnt(); }
193
194 /// @return get dof approximation order
196 return this->sPtr->getDofOrder();
197 }
198
199 /// @return get dof coefficient index
201 return this->sPtr->getDofCoeffIdx();
202 }
203
204 /// @return return true if dof is active
205 inline char getActive() const { return this->sPtr->getActive(); }
206
207 /// @return get pointer to dof data structure
208 inline boost::shared_ptr<DofEntity> &getDofEntityPtr() const {
209 return this->sPtr;
210 }
211
212 /// @return get pioneer do dof's entity data structure
213 inline boost::shared_ptr<FieldEntity> &getFieldEntityPtr() const {
214 return this->sPtr->getFieldEntityPtr();
215 }
216};
217
218/**
219 * \brief keeps information about indexed dofs for the problem
220 * \ingroup dof_multi_indices
221 *
222 * FIXME: Is too many iterator, this has to be manage more efficiently, some
223 * iterators could be moved to multi_indices views.
224 *
225 */
226struct NumeredDofEntity : public interface_DofEntity<DofEntity> {
227
228 virtual ~NumeredDofEntity() = default;
229
234
238 unsigned int pArt;
239
240 /// @return MoFEM DoF index
241 inline DofIdx getDofIdx() const { return dofIdx; }
242
243 /// @return PETSc global DoF index
245
246 /// @return PETSc local DoF index
247 inline DofIdx getPetscLocalDofIdx() const { return petscLocalDofIdx; }
248
249 /// @return Owning partition (i.e. process/processor)
250 inline unsigned int getPart() const { return pArt; }
251
252 /// @return True if local index is set
253 inline bool getHasLocalIndex() const {
254 return !std::signbit(petscLocalDofIdx);
255 }
256
257 NumeredDofEntity(const boost::shared_ptr<DofEntity> &dof_entity_ptr,
258 const int dof_idx = -1, const int petsc_gloabl_dof_idx = -1,
259 const int petsc_local_dof_idx = -1, const int part = -1);
260 friend std::ostream &operator<<(std::ostream &os, const NumeredDofEntity &e);
261};
262
263/**
264 * \brief keeps information about indexed dofs for the finite element
265 * \ingroup dof_multi_indices
266 */
267struct FEDofEntity : public DofEntity {
268
269 FEDofEntity() = delete;
270
271private:
273
274 // DO NOT MAKE ANY MAMBER DATA HARE !!!
275
276 friend std::ostream &operator<<(std::ostream &os, const FEDofEntity &e);
277};
278
279/**
280 * \brief keeps information about indexed dofs for the finite element
281 * \ingroup dof_multi_indices
282 */
284
286
287private:
289
290 // DO NOT MAKE ANY MAMBER DATA HARE !!!
291
292 friend std::ostream &operator<<(std::ostream &os,
293 const FENumeredDofEntity &e);
294};
295
296std::ostream &operator<<(std::ostream &os, const FENumeredDofEntity &e);
297
298/**
299 * @relates multi_index_container
300 * \brief MultiIndex container keeps DofEntity
301 * \ingroup dof_multi_indices
302 */
303typedef multi_index_container<
304 boost::shared_ptr<DofEntity>,
305 indexed_by<
306 // unique
307 ordered_unique<
308 tag<Unique_mi_tag>,
309 const_mem_fun<DofEntity, UId, &DofEntity::getLocalUniqueId>>,
310
311 // non_unique
312 ordered_non_unique<
313 tag<Ent_mi_tag>,
314 const_mem_fun<DofEntity, EntityHandle, &DofEntity::getEnt>>
315
316 >>
318
319using DofEntityByUId = DofEntity_multiIndex::index<Unique_mi_tag>::type;
320
321/** \brief Dof multi-index by entity
322 *
323 * \ingroup dof_multi_indices
324 */
325using DofEntityByEnt = DofEntity_multiIndex::index<Ent_mi_tag>::type;
326
327/** \brief multi-index view on DofEntity by uid
328 \ingroup dof_multi_indices
329*/
331 multi_index_container<boost::shared_ptr<DofEntity>,
332 indexed_by<
333
334 ordered_unique<const_mem_fun<
336
337 >>;
338
339/** \brief multi-index view on DofEntity by uid
340 \ingroup dof_multi_indices
341*/
342using DofEntity_multiIndex_global_uid_view = multi_index_container<
343 boost::shared_ptr<DofEntity>,
344 indexed_by<
345
346 ordered_unique<
347 const_mem_fun<DofEntity, UId, &DofEntity::getGlobalUniqueId>>
348
349 >>;
350
351/** \brief vector view on DofEntity by uid
352 \ingroup dof_multi_indices
353*/
354typedef std::vector<boost::weak_ptr<DofEntity>> DofEntity_vector_view;
355
356/** \brief multi-index view on DofEntity activity
357 \ingroup dof_multi_indices
358*/
359typedef multi_index_container<
360 boost::shared_ptr<DofEntity>,
361 indexed_by<
362
363 ordered_unique<
364 const_mem_fun<DofEntity, UId, &DofEntity::getLocalUniqueId>>,
365
366 ordered_non_unique<
367 const_mem_fun<DofEntity, char, &DofEntity::getActive>>
368
369 >>
371
372/**
373 * @relates multi_index_container
374 * \brief MultiIndex container keeps FEDofEntity
375 * \ingroup dof_multi_indices
376
377 */
378typedef multi_index_container<
379 boost::shared_ptr<FEDofEntity>,
380 indexed_by<
381
382 ordered_unique<tag<Unique_mi_tag>,
383 const_mem_fun<FEDofEntity::DofEntity, UId,
385
386 ordered_non_unique<tag<Ent_mi_tag>,
389
390 >>
392
393/** \brief Dof entity multi-index by UId and entity
394 *
395 * \ingroup dof_multi_indices
396 */
397using FEDofEntityByUId = FEDofEntity_multiIndex::index<Unique_mi_tag>::type;
398
399/**
400 * @relates multi_index_container
401 * \brief MultiIndex container keeps FENumeredDofEntity
402
403 * \ingroup dof_multi_indices
404 */
405typedef multi_index_container<
406 boost::shared_ptr<FENumeredDofEntity>,
407 indexed_by<ordered_unique<
408 tag<Unique_mi_tag>,
411 ordered_non_unique<
412 tag<Ent_mi_tag>,
415
416 >>
418
419/** \brief Dof entity multi-index by UId
420 *
421 * \ingroup dof_multi_indices
422 */
424 FENumeredDofEntity_multiIndex::index<Unique_mi_tag>::type;
425
426/** \brief Numbered DoF multi-index by entity
427 *
428 * \ingroup dof_multi_indices
429 */
431 FENumeredDofEntity_multiIndex::index<Ent_mi_tag>::type;
432
433/**
434 * @relates multi_index_container
435 * \brief MultiIndex container keeps NumeredDofEntity
436 * \ingroup dof_multi_indices
437 */
438typedef multi_index_container<
439 boost::shared_ptr<NumeredDofEntity>,
440
441 // unique
442 indexed_by<
443 ordered_unique<tag<Unique_mi_tag>,
446
447 // non unique
448 ordered_non_unique<
449 tag<Part_mi_tag>,
450 member<NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt>>,
451
452 ordered_non_unique<tag<Idx_mi_tag>, member<NumeredDofEntity, DofIdx,
454
455 ordered_non_unique<tag<PetscGlobalIdx_mi_tag>,
456 member<NumeredDofEntity, DofIdx,
458
459 ordered_non_unique<tag<PetscLocalIdx_mi_tag>,
460 member<NumeredDofEntity, DofIdx,
462
463 ordered_non_unique<
464 tag<Ent_mi_tag>,
467
468 >>
470
471/** \brief Numbered DoF multi-index by UId
472 *
473 * \ingroup dof_multi_indices
474 */
476 NumeredDofEntity_multiIndex::index<Unique_mi_tag>::type;
477
478/** \brief Numbered DoF multi-index by local index
479 *
480 * \ingroup dof_multi_indices
481 */
483 NumeredDofEntity_multiIndex::index<PetscLocalIdx_mi_tag>::type;
484
485/** \brief Numbered DoF multi-index by entity
486 *
487 * \ingroup dof_multi_indices
488 */
490 NumeredDofEntity_multiIndex::index<Ent_mi_tag>::type;
491
493 multi_index_container<boost::shared_ptr<NumeredDofEntity>,
494 indexed_by<
495
496 ordered_unique<const_mem_fun<
497
500
501 >>
502
503 >>;
504
506 boost::shared_ptr<NumeredDofEntity>,
507 indexed_by<hashed_unique<const_mem_fun<NumeredDofEntity, DofIdx,
509
511 multi_index_container<boost::shared_ptr<NumeredDofEntity>,
512 indexed_by<ordered_non_unique<const_mem_fun<
515
517 multi_index_container<
518 boost::shared_ptr<NumeredDofEntity>,
519 indexed_by<ordered_non_unique<const_mem_fun<
522
523/**
524 * Activate or deactivate dofs (multi-index modifier)
525 * \ingroup dof_multi_indices
526 */
528 bool aCtive;
529 DofEntity_active_change(bool active);
530 void operator()(boost::shared_ptr<DofEntity> &dof);
531};
532
533/**
534 * Change part and global pestc index (multi-index modifier)
535 * \ingroup dof_multi_indices
536 */
538 const unsigned int pArt;
541 const DofIdx petsc_gloabl_dof_idx)
542 : pArt(part), petscGloablDofIdx(petsc_gloabl_dof_idx){};
543 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
544 dof->pArt = pArt;
545 dof->petscGloablDofIdx = petscGloablDofIdx;
546 }
547};
548
550 const unsigned int pArt;
554 const unsigned int part, const DofIdx mofem_dof_idx,
555 const DofIdx petsc_gloabl_dof_idx)
556 : pArt(part), mofemDofIdx(mofem_dof_idx),
557 petscGloablDofIdx(petsc_gloabl_dof_idx){};
558 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
559 dof->pArt = pArt;
560 dof->petscGloablDofIdx = petscGloablDofIdx;
561 }
562};
563
565 const unsigned int pArt;
569 const DofIdx petsc_gloabl_dof_idx,
570 const DofIdx petsc_local_dof_idx)
571 : pArt(part), petscGloablDofIdx(petsc_gloabl_dof_idx),
572 petscLocalDofIdx(petsc_local_dof_idx){};
573 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
574 dof->pArt = pArt;
575 dof->petscGloablDofIdx = petscGloablDofIdx;
576 dof->petscLocalDofIdx = petscLocalDofIdx;
577 }
578};
579
580/**
581 * Change part and local pestc index (multi-index modifier)
582 * \ingroup dof_multi_indices
583 */
586 NumeredDofEntity_local_idx_change(const DofIdx petsc_local_dof_idx)
587 : petscLocalDofIdx(petsc_local_dof_idx){};
588 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
589 dof->petscLocalDofIdx = petscLocalDofIdx;
590 }
591};
592
593/**
594 * Change part and mofem index (multi-index modifier)
595 * \ingroup dof_multi_indices
596 */
600 : mofemIdx(mofem_idx){};
601 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
602 dof->dofIdx = mofemIdx;
603 }
604};
605
606/**
607 * Change part and mofem/pestc global and local index (multi-index modifier)
608 * \ingroup dof_multi_indices
609 */
611 const unsigned int pArt;
616 const unsigned int part, const DofIdx mofem_idx,
617 const DofIdx petsc_gloabl_dof_idx, const DofIdx petsc_local_dof_idx)
618 : pArt(part), mofemIdx(mofem_idx),
619 petscGloablDofIdx(petsc_gloabl_dof_idx),
620 petscLocalDofIdx(petsc_local_dof_idx){};
621 inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
622 dof->pArt = pArt;
623 dof->dofIdx = mofemIdx;
624 dof->petscGloablDofIdx = petscGloablDofIdx;
625 dof->petscLocalDofIdx = petscLocalDofIdx;
626 }
627};
628
629} // namespace MoFEM
630#endif // __DOFSMULTIINDICES_HPP__
631
632/**
633 * \defgroup dof_multi_indices Dofs structures and multi-indices
634 * \ingroup mofem
635 **/
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
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
DofEntity_multiIndex::index< Ent_mi_tag >::type DofEntityByEnt
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.
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.
FENumeredDofEntity_multiIndex::index< Unique_mi_tag >::type FENumeredDofEntityByUId
Dof entity multi-index by UId.
NumeredDofEntity_multiIndex::index< Ent_mi_tag >::type NumeredDofEntityByEnt
Numbered DoF multi-index by entity.
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.
NumeredDofEntity_multiIndex::index< PetscLocalIdx_mi_tag >::type NumeredDofEntityByLocalIdx
Numbered DoF multi-index by local index.
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
FEDofEntity_multiIndex::index< Unique_mi_tag >::type FEDofEntityByUId
Dof entity multi-index by UId and entity.
NumeredDofEntity_multiIndex::index< Unique_mi_tag >::type NumeredDofEntityByUId
Numbered DoF 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.
FENumeredDofEntity_multiIndex::index< Ent_mi_tag >::type FENumeredDofEntityByEnt
Numbered DoF multi-index by entity.
auto bit
set bit
int DofIdx
Index of DOF.
Definition Types.hpp:18
int ApproximationOrder
Approximation on the entity.
Definition Types.hpp:26
uint128_t UId
Unique Id.
Definition Types.hpp:31
int FieldCoefficientsNumber
Number of field coefficients.
Definition Types.hpp:27
char FieldBitNumber
Field bit number.
Definition Types.hpp:28
int ShortId
Unique Id in the field.
Definition Types.hpp:32
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
DofEntity_multiIndex::index< Unique_mi_tag >::type DofEntityByUId
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::interface_type_DofEntity, FieldCoefficientsNumber, &NumeredDofEntity::getDofCoeffIdx > > > > NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique
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_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, UId, &NumeredDofEntity::getLocalUniqueId > > > > NumeredDofEntity_multiIndex_uid_view_ordered
void operator()(boost::shared_ptr< DofEntity > &dof)
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
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)
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)
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
NumeredDofEntity_part_and_glob_idx_change(const unsigned int part, const DofIdx petsc_gloabl_dof_idx)
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
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
keeps information about indexed dofs for the problem
virtual ~NumeredDofEntity()=default
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
Interface to DofEntity.
const UId & getEntLocalUniqueId() const
FieldCoefficientsNumber getDofCoeffIdx() const
interface_DofEntity(const boost::shared_ptr< T > &sptr)
virtual ~interface_DofEntity()=default
boost::shared_ptr< FieldEntity > & getFieldEntityPtr() const
const UId & getEntGlobalUniqueId() const
boost::shared_ptr< DofEntity > & getDofEntityPtr() const
FieldData & getFieldData() const
ApproximationOrder getDofOrder() const
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