v0.13.1
BitRefManager.hpp
Go to the documentation of this file.
1/** \file BitRefManager.hpp
2 * \brief Interface managing BitRefLevels
3 * \ingroup mofem_bit_ref
4 *
5 * Managing BitRef levels
6 *
7 */
8
9#ifndef __BITREFMANAGER_HPP__
10#define __BITREFMANAGER_HPP__
11
12#include "UnknownInterface.hpp"
13
14namespace MoFEM {
15
16/**
17 * \brief Managing BitRefLevels
18 * \ingroup mofem_bit_ref
19 * \nosubgrouping
20 */
22
23 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
24 UnknownInterface **iface) const;
25
27 bool dEbug;
28
29 BitRefManager(const MoFEM::Core &core);
30
31 /**
32 * \brief Destructor
33 */
34 virtual ~BitRefManager() = default;
35
36 /** \name Setting and shifting bits */
37
38 /**@{*/
39
40 /**
41 * \brief add entities to database and set bit ref level
42 * \ingroup mofem_bit_ref
43 *
44 * This function set bit ref level, add entries to core database and
45 * create ref finite elements. Finite elements are create of entities in
46 function
47 * argument, whereas all lower dimension entities are added as a field
48 entities
49 *
50 *
51
52 Example:\code
53 EntityHandle meshset1; //contains ent1,ent2,ent3
54 BitRefLevel myLevel0;
55 myLevel0.set(0);
56 m_field.getInterface<BitRefManager>()->setBitRefLevelByDim(meshset1,3,myLevel0);
57 //refine meshset1 into meshset2 and get new ents which are ent4, ent5
58 EntityHandle meshset2; //contains ent1,ent2,ent3,ent4,ent5
59 BitRefLevel myLevel1;
60 myLevel1.set(1);
61 m_field.getInterface<BitRefManager>()->setBitRefLevelByDim(meshset2,3,myLevel1);
62 \endcode
63
64 * So entities 1,2,3 would be assigned to bit level 0 and 1 <br>
65 * ent1[1,1,0,0,0,0,0], ent2[1,1,0,0,0,0,0], ent3[1,1,0,0,0,0,0], <br>
66 * and entities 4 and 5 are assigned to bit level 1 only <br>
67 * ent4[0,1,0,0,0,0,0], ent5[0,1,0,0,0,0,0] <br>
68
69
70 * @param ents entities to set
71 * @param bit bit refinement level
72 * @param only_tets only add entities on tetrahedral (obsolete need to be
73 fixed)
74 * @param verb verbosity level
75 * @param adj_ents_ptr if pointer is given, it is used to get adj entities by
76 dimension/type
77 * @return error code
78 */
80 const bool only_tets = true, int verb = 0,
81 Range *adj_ents_ptr = nullptr) const;
82
83 /**
84 * @brief add entities to database and set bit ref level
85 * \ingroup mofem_bit_ref
86 *
87 * \note In THIS variant only entities in range are added and ref finite
88 * elements reated.
89 *
90 * @param ents
91 * @param bit
92 * @param only_tets
93 * @param verb
94 * @return MoFEMErrorCode setBitRefLevel
95 */
97 const BitRefLevel bit = BitRefLevel(),
98 int verb = QUIET) const;
99
100 /**
101 * @brief add entities to database and set bit ref level
102 * \ingroup mofem_bit_ref
103 *
104 * \note In THIS variant only entities in range are added. And DO NOT create
105 * elements.
106 *
107 * @param ents
108 * @param bit
109 * @param only_tets
110 * @param verb
111 * @return MoFEMErrorCode setBitRefLevel
112 */
114 const BitRefLevel bit = BitRefLevel(),
115 int verb = QUIET) const;
116
117 /**
118 * @brief Set the bit ref level to entities in the field meshset
119 *
120 * @param field_name
121 * @param bit
122 * @param verb
123 * @return MoFEMErrorCode
124 */
126 setFieldEntitiesBitRefLevel(const std::string field_name,
127 const BitRefLevel bit = BitRefLevel(),
128 int verb = QUIET) const;
129
130 /**
131 * @brief Set the Bit Ref Level By Dim object
132 *
133 * \note In THIS variant only entities in range are added. And DO NOT create
134 * elements.
135 *
136 * @param meshset
137 * @param dim
138 * @param bit
139 * @param verb
140 * @return MoFEMErrorCode
141 */
142 MoFEMErrorCode setBitRefLevelByDim(const EntityHandle meshset, const int dim,
143 const BitRefLevel bit,
144 int verb = QUIET) const;
145
146 /**
147 * @brief Set the Bit Ref Level By Type object
148 *
149 * \note In THIS variant only entities in range are added. And DO NOT create
150 * elements.
151 *
152 * @param meshset
153 * @param type
154 * @param bit
155 * @param verb
156 * @return MoFEMErrorCode
157 */
158 MoFEMErrorCode setBitRefLevelByType(const EntityHandle meshset,
159 const EntityType type,
160 const BitRefLevel bit,
161 int verb = QUIET) const;
162
163 /** brief add meshset and set bit ref level
164 * \ingroup mofem_bit_ref
165 *
166 * \param EntityHandle MeshSet
167 * \param BitRefLevel bitLevel
168 */
169 MoFEMErrorCode setBitLevelToMeshset(const EntityHandle meshset,
170 const BitRefLevel bit,
171 int verb = 0) const;
172
173 /**
174 * @brief Add entities which exist in MoAB database, and have set appropiate
175 * BitRef level tag, to multi-indices in MoFEM.
176 *
177 * \note Every entity, used for create DoFS, or elements has to have set
178 * BitRefLevel and be added to MoFEM database.
179 *
180 * \note This functions add lower dimension entities by calling
181 * setEntitiesBitRefLevel
182 *
183 * @param type of entity
184 * @param bit bit ref level
185 * @param mask
186 * @param verb verbosity level
187 * @return MoFEMErrorCode
188 */
191 const BitRefLevel mask = BitRefLevel().set(),
192 int verb = QUIET) const;
193
194 /**
195 * @brief Add entities which exist in MoAB database, and have set appropiate
196 * BitRef level tag, to multi-indices in MoFEM.
197 *
198 * \note Every entity, used for create DoFS, or elements has to have set
199 * BitRefLevel and be added to MoFEM database.
200 *
201 * \note This functions add lower dimension entities by calling
202 * setEntitiesBitRefLevel
203 *
204 * @param dim dimension of entity
205 * @param bit bit ref level
206 * @param verb verbosity level
207 * @return MoFEMErrorCode
208 */
211 const BitRefLevel mask = BitRefLevel().set(),
212 int verb = QUIET) const;
213
214 /**
215 * \brief add bit ref level to ref entity
216 * \ingroup mofem_bit_ref
217 * @param ents range of entities
218 * @param bit bit ref level
219 * @param verb verbosity level
220 * @return error code
221 */
223 int verb = QUIET) const;
224
225 /**
226 * @brief add bit ref level by dimension
227 *
228 * @param meshset
229 * @param dim dimension of entities
230 * @param bit added bit
231 * @param verb verbosity level
232 * @return MoFEMErrorCode
233 */
234 MoFEMErrorCode addBitRefLevelByDim(const EntityHandle meshset, const int dim,
235 const BitRefLevel bit,
236 int verb = QUIET) const;
237
238 /**
239 * \brief Set nth bit ref level
240 *
241 * \note This function modify bits only on entities in RefEntity_multiindex
242 *
243 * @param ents entities to set bit ref level
244 * @param n nth bit
245 * @param b value to set
246 * @return error code
247 */
248 MoFEMErrorCode setNthBitRefLevel(const Range &ents, const int n, const bool b,
249 int verb = QUIET) const;
250
251 /**
252 * \brief Set nth bit ref level to all entities in databse
253 * \ingroup mofem_bit_ref
254 * @param n nth bit
255 * @param b value to set
256 * @return error code
257 */
258 MoFEMErrorCode setNthBitRefLevel(const int n, const bool b,
259 int verb = QUIET) const;
260
261 /** \brief left shift bit ref level
262 * \ingroup mofem_bit_ref
263 * this results of deletion of entities on far left side
264 *
265 * \note Not implemented
266 */
267 MoFEMErrorCode shiftLeftBitRef(const int shift,
268 const BitRefLevel mask = BitRefLevel().set(),
269 int verb = DEFAULT_VERBOSITY) const;
270
271 /** \brief right shift bit ref level
272 * \ingroup mofem_bit_ref
273 */
274 MoFEMErrorCode shiftRightBitRef(const int shift,
275 const BitRefLevel mask = BitRefLevel().set(),
276 int verb = DEFAULT_VERBOSITY,
277 MoFEMTypes mf = MF_ZERO) const;
278
279 /**@}*/
280
281 /** \name Entity handlers by bit ref level */
282
283 /**@{*/
284
285 /**
286 * @brief filter entities by bit ref level
287 *
288 * @param bit
289 * @param mask
290 * @param ents
291 * @param QUIET
292 * @return MoFEMErrorCode
293 */
295 const BitRefLevel mask, Range &ents,
296 int verb = QUIET) const;
297
298 /**\brief add all ents from ref level given by bit to meshset
299 * \ingroup mofem_bit_ref
300 *
301 * \note Entities NOT have to be added to MoFEM database
302 *
303 * \param BitRefLevel bitLevel
304 * \param BitRefLevel mask
305 * \param EntityType type of entities
306 * \retval EntityHandle meshset
307 *
308 */
310 const BitRefLevel mask,
311 const EntityType type,
312 const EntityHandle meshset,
313 int verb = 0) const;
314
315 /**\brief add all ents from ref level given by bit to meshset
316 * \ingroup mofem_bit_ref
317 *
318 * \note Entities NOT have to be added to MoFEM database
319 *
320 * \param BitRefLevel bitLevel
321 * \param BitRefLevel mask
322 * \param EntityType type of entities
323 * \retval ents
324 *
325 */
327 const BitRefLevel mask,
328 const EntityType type,
329 Range &ents, int verb = 0) const;
330
331 /**\brief add all ents from ref level given by bit to meshset
332 * \ingroup mofem_bit_ref
333 *
334 * \note Entities NOT have to be added to MoFEM database
335 *
336 * \param BitRefLevel bitLevel
337 * \param BitRefLevel mask
338 * \param EntityType dimension of entities
339 * \retval ents
340 *
341 */
343 const BitRefLevel mask,
344 const int dim,
345 const EntityHandle meshset,
346 int verb = 0) const;
347
348 /**\brief add all ents from ref level given by bit to meshset
349 * \ingroup mofem_bit_ref
350 *
351 * \note Entities NOT have to be added to MoFEM database
352 *
353 * \param BitRefLevel bitLevel
354 * \param BitRefLevel mask
355 * \param EntityType dimension of entities
356 * \retval ents
357 *
358 */
360 const BitRefLevel mask,
361 const int dim, Range &ents,
362 int verb = 0) const;
363
364 /**\brief add all ents from ref level given by bit to meshset
365 * \ingroup mofem_bit_ref
366 *
367 * \note Entities NOT have to be added to MoFEM database
368 *
369 * \param BitRefLevel bitLevel
370 * \param BitRefLevel mask
371 * \param EntityHandle meshset
372 *
373 */
375 const BitRefLevel mask,
376 const EntityHandle meshset,
377 const int verb = QUIET) const;
378
379 /**\brief add all ents from ref level given by bit to meshset
380 * \ingroup mofem_bit_ref
381 *
382 * \note Entities NOT have to be added to MoFEM database
383 *
384 * \param BitRefLevel bitLevel
385 * \param BitRefLevel mask
386 * \retval ents
387 */
389 const BitRefLevel mask, Range &ents,
390 const int verb = QUIET) const;
391
392 /**
393 * \brief get entities by bit ref level and type of parent
394 *
395 * \note Entities have to be added to MoFEM database
396 *
397 * \param BitRefLevel bitLevel
398 * \param BitRefLevel mask
399 * @param type of parent
400 * @param ents returned ents
401 * @return error code
402 */
404 const BitRefLevel mask,
405 const EntityType type, Range &ents,
406 const int verb = QUIET) const;
407
408 /**
409 * @brief Get all entities not in database
410 *
411 * @param ents
412 * @return MoFEMErrorCode
413 */
415
416 /**
417 * @brief \brief Get entities not in database
418 *
419 * @param ents
420 * @return MoFEMErrorCode
421 */
423
424 /**@}*/
425
426 /** \name Get adjacencies bit ref level */
427
428 /**@{*/
429
430 /** \brief Get the adjacencies associated with a entity to entities of a
431 * specified dimension.
432 * \ingroup mofem_bit_ref
433 *
434 * bit ref level of adjacent entities is equal to bit ref level of adjacent
435 * entities
436 */
437 virtual MoFEMErrorCode getAdjacenciesEquality(const EntityHandle from_entity,
438 const int to_dimension,
439 Range &adj_entities) const;
440
441 /** \brief Get the adjacencies associated with a entity to entities of a
442 * specified dimension.
443 * \ingroup mofem_bit_ref
444 *
445 * bit ref level of adjacent entities is any of bit ref level of adjacent
446 * entities
447 */
448 virtual MoFEMErrorCode getAdjacenciesAny(const EntityHandle from_entity,
449 const int to_dimension,
450 Range &adj_entities) const;
451
452 /** \brief Get the adjacencies associated with a entity to entities of a
453 * specified dimension.
454 * \ingroup mofem_bit_ref
455 *
456 * bit ref level of adjacent entities is equal to bit ref level of adjacent
457 * entities
458 */
459 virtual MoFEMErrorCode
460 getAdjacencies(const Problem *problem_ptr, const EntityHandle *from_entities,
461 const int num_entities, const int to_dimension,
462 Range &adj_entities,
463 const int operation_type = moab::Interface::INTERSECT,
464 const int verb = 0) const;
465
466 /** \brief Get the adjacencies associated with a entity to entities of a
467 * specified dimension.
468 * \ingroup mofem_bit_ref
469 *
470 * bit ref level of adjacent entities is equal to bit ref level of adjacent
471 * entities
472 */
473 virtual MoFEMErrorCode
474 getAdjacencies(const BitRefLevel bit, const EntityHandle *from_entities,
475 const int num_entities, const int to_dimension,
476 Range &adj_entities,
477 const int operation_type = moab::Interface::INTERSECT,
478 const int verb = 0) const;
479
480 /**@}*/
481
482 /** \name Update meshsets and ranges by children */
483
484 /**@{*/
485
486 /** \brief Get child entities form meshset containing parent entities
487 * \ingroup mofem_bit_ref
488 *
489 * Search for refined entities of given type whose parent are entities in
490 *the
491 * parent meshset. It can be used for example to transfer information about
492 * boundary conditions to refined mesh or split mesh by interface
493 * elements. It is used by function refineMeshset, to update MESHSET
494 *finite elements.
495 *
496 * \param parent meshset
497 * \param parent_bit refinement level
498 * \param mask of parent bit ref level
499 * \param child_bit refinement level
500 * \param mask of child bit ref level
501 * \param child meshset where child entities are stored (if the child
502 *meshset is set to be the parent meshset, the parent would be updated with
503 *the refined entities)
504 * \param child_type meshset is update only by entities of specified type. if
505 *type is set to MBMAXTYPE all types are updated.
506 * \param recursive if true parent meshset is searched recursively
507 *
508 **/
510 const EntityHandle parent, const BitRefLevel &parent_bit,
511 const BitRefLevel &parent_mask, const BitRefLevel &child_bit,
512 const BitRefLevel &child_mask, const EntityHandle child,
513 EntityType child_type, const bool recursive = false, int verb = 0);
514
515 /** \copydoc updateMeshsetByEntitiesChildren
516 **/
517 MoFEMErrorCode updateMeshsetByEntitiesChildren(const EntityHandle parent,
518 const BitRefLevel &child_bit,
519 const EntityHandle child,
520 EntityType child_type,
521 const bool recursive = false,
522 int verb = 0);
523
524 /** \brief update fields meshesets by child entities
525 * \ingroup mofem_update_meshsets_and_ranges
526 *
527 * \note This calls updateMeshsetByEntitiesChildren for all entity types.
528 *
529 */
532 int verb = 0);
533
534 /** \brief update field meshset by child entities
535 * \ingroup mofem_update_meshsets_and_ranges
536 */
538 const std::string name, const BitRefLevel &child_bit, int verb = 0);
539
540 /** \brief update finite element meshset by child entities
541 * \ingroup mofem_update_meshsets_and_ranges
542 */
544 const std::string name, const BitRefLevel &child_bit,
545 const EntityType fe_ent_type, int verb = 0);
546
547 /**
548 * \brief Update range by childresn
549 *
550 * FIXME: NOT TESTED
551 *
552 * @param parent parent range
553 * @param child children range
554 * @return error code
555 */
556 MoFEMErrorCode updateRangeByChildren(const Range &parent, Range &child,
557 MoFEMTypes bh = MF_ZERO);
558
559 /**
560 * \brief Update range by prents
561 *
562 * FIXME: NOT TESTED
563 *
564 * @param child parent range
565 * @param parent children range
566 * @return error code
567 */
568 MoFEMErrorCode updateRangeByParent(const Range &parent, Range &child,
569 MoFEMTypes bh = MF_ZERO);
570
571 /**
572 * @deprecated use updateRangeByChildren
573 */
575 updateRange(const Range &parent, Range &child, MoFEMTypes bh = MF_ZERO) {
576 return updateRangeByChildren(parent, child, bh);
577 }
578
579 /**@}*/
580
581 /** \name Writting files */
582
583 /**@{*/
584
585 /**
586 * \brief Write bit ref level to file
587 * @param bit bit ref level
588 * @param mask mask of bit ref level
589 * @param dim dimension
590 * @param file_name file name (see moab documentation)
591 * @param file_type file type (see moab documentation)
592 * @param options file options (see moab documentation)
593 * @return error code
594 */
596 const char *file_name, const char *file_type,
597 const char *options,
598 const bool check_for_empty = true) const;
599
600 /**
601 * \brief Write bit ref level to file
602 * @param bit bit ref level
603 * @param mask mask of bit ref level
604 * @param dim dimension
605 * @param file_name file name (see moab documentation)
606 * @param file_type file type (see moab documentation)
607 * @param options file options (see moab documentation)
608 * @return error code
609 */
611 const BitRefLevel mask, const int dim,
612 const char *file_name,
613 const char *file_type, const char *options,
614 const bool check_for_empty = true) const;
615
616 /**
617 * \brief Write bit ref level to file
618 * @param bit bit ref level
619 * @param mask mask of bit ref level
620 * @param type type of entity
621 * @param file_name file name (see moab documentation)
622 * @param file_type file type (see moab documentation)
623 * @param options file options (see moab documentation)
624 * @return error code
625 */
627 const BitRefLevel mask,
628 const EntityType type,
629 const char *file_name,
630 const char *file_type, const char *options,
631 const bool check_for_empty = true) const;
632
633 /**
634 * @brief Write ents not in database
635 *
636 * @param file_name
637 * @param file_type for example "VTK"
638 * @param options
639 * @param check_for_empty
640 * @return MoFEMErrorCode
641 */
643 writeEntitiesNotInDatabase(const char *file_name, const char *file_type,
644 const char *options,
645 const bool check_for_empty = true) const;
646
647 /**
648 * @brief Write all entities by bit levels and type
649 *
650 * @param mask
651 * @param type
652 * @param file_name
653 * @param file_type
654 * @param options
655 * @return MoFEMErrorCode
656 */
658 const EntityType type,
659 const char *file_name,
660 const char *file_type,
661 const char *options);
662
663 /**@}*/
664
665
666 /** \name Get tag handles to data on the mesh */
667
668 /**@{*/
669
670 inline Tag get_th_RefParentHandle() const {
672 }
673 inline Tag get_th_RefBitLevel() const { return cOre.get_th_RefBitLevel(); }
674
675 /**@}*/
676
677};
678} // namespace MoFEM
679
680#endif //__BITREFMANAGER_HPP__
681
682/**
683 * \defgroup mofem_bit_ref BitRefManager
684 * \brief Managing BitRefLevels
685 *
686 * \ingroup mofem
687 */
MoFEM interface.
@ QUIET
Definition: definitions.h:208
@ DEFAULT_VERBOSITY
Definition: definitions.h:207
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:97
@ MF_ZERO
Definition: definitions.h:98
#define DEPRECATED
Definition: definitions.h:17
const int dim
FTensor::Index< 'n', SPACE_DIM > n
virtual MoFEMErrorCode getAdjacenciesAny(const EntityHandle from_entity, const int to_dimension, Range &adj_entities) const
Get the adjacencies associated with a entity to entities of a specified dimension.
MoFEMErrorCode updateMeshsetByEntitiesChildren(const EntityHandle parent, const BitRefLevel &parent_bit, const BitRefLevel &parent_mask, const BitRefLevel &child_bit, const BitRefLevel &child_mask, const EntityHandle child, EntityType child_type, const bool recursive=false, int verb=0)
Get child entities form meshset containing parent entities.
MoFEMErrorCode shiftLeftBitRef(const int shift, const BitRefLevel mask=BitRefLevel().set(), int verb=DEFAULT_VERBOSITY) const
left shift bit ref levelthis results of deletion of entities on far left side
MoFEMErrorCode setElementsBitRefLevel(const Range &ents, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const
add entities to database and set bit ref level
MoFEMErrorCode shiftRightBitRef(const int shift, const BitRefLevel mask=BitRefLevel().set(), int verb=DEFAULT_VERBOSITY, MoFEMTypes mf=MF_ZERO) const
right shift bit ref level
MoFEMErrorCode setEntitiesBitRefLevel(const Range &ents, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const
add entities to database and set bit ref level
MoFEMErrorCode getEntitiesByDimAndRefLevel(const BitRefLevel bit, const BitRefLevel mask, const int dim, const EntityHandle meshset, int verb=0) const
add all ents from ref level given by bit to meshset
MoFEMErrorCode setBitRefLevel(const Range &ents, const BitRefLevel bit, const bool only_tets=true, int verb=0, Range *adj_ents_ptr=nullptr) const
add entities to database and set bit ref level
MoFEMErrorCode setBitRefLevelByType(const EntityHandle meshset, const EntityType type, const BitRefLevel bit, int verb=QUIET) const
Set the Bit Ref Level By Type object.
MoFEMErrorCode addBitRefLevelByDim(const EntityHandle meshset, const int dim, const BitRefLevel bit, int verb=QUIET) const
add bit ref level by dimension
MoFEMErrorCode setBitLevelToMeshset(const EntityHandle meshset, const BitRefLevel bit, int verb=0) const
MoFEMErrorCode setNthBitRefLevel(const Range &ents, const int n, const bool b, int verb=QUIET) const
Set nth bit ref level.
MoFEMErrorCode addToDatabaseBitRefLevelByType(const EntityType type, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), int verb=QUIET) const
Add entities which exist in MoAB database, and have set appropiate BitRef level tag,...
MoFEMErrorCode updateFiniteElementMeshsetByEntitiesChildren(const std::string name, const BitRefLevel &child_bit, const EntityType fe_ent_type, int verb=0)
update finite element meshset by child entities
MoFEMErrorCode addToDatabaseBitRefLevelByDim(const int dim, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), int verb=QUIET) const
Add entities which exist in MoAB database, and have set appropiate BitRef level tag,...
virtual MoFEMErrorCode getAdjacencies(const Problem *problem_ptr, const EntityHandle *from_entities, const int num_entities, const int to_dimension, Range &adj_entities, const int operation_type=moab::Interface::INTERSECT, const int verb=0) const
Get the adjacencies associated with a entity to entities of a specified dimension.
MoFEMErrorCode setFieldEntitiesBitRefLevel(const std::string field_name, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const
Set the bit ref level to entities in the field meshset.
DEPRECATED MoFEMErrorCode updateRange(const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO)
MoFEMErrorCode getEntitiesByTypeAndRefLevel(const BitRefLevel bit, const BitRefLevel mask, const EntityType type, const EntityHandle meshset, int verb=0) const
add all ents from ref level given by bit to meshset
MoFEMErrorCode addBitRefLevel(const Range &ents, const BitRefLevel bit, int verb=QUIET) const
add bit ref level to ref entity
MoFEMErrorCode getEntitiesByRefLevel(const BitRefLevel bit, const BitRefLevel mask, const EntityHandle meshset, const int verb=QUIET) const
add all ents from ref level given by bit to meshset
MoFEMErrorCode updateFieldMeshsetByEntitiesChildren(const BitRefLevel &child_bit, int verb=0)
update fields meshesets by child entities
virtual MoFEMErrorCode getAdjacenciesEquality(const EntityHandle from_entity, const int to_dimension, Range &adj_entities) const
Get the adjacencies associated with a entity to entities of a specified dimension.
MoFEMErrorCode updateRangeByParent(const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO)
Update range by prents.
MoFEMErrorCode setBitRefLevelByDim(const EntityHandle meshset, const int dim, const BitRefLevel bit, int verb=QUIET) const
Set the Bit Ref Level By Dim object.
MoFEMErrorCode updateRangeByChildren(const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO)
Update range by childresn.
auto bit
set bit
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
implementation of Data Operators for Forces and Sources
Definition: MoFEM.hpp:24
constexpr auto field_name
Managing BitRefLevels.
MoFEMErrorCode getAllEntitiesNotInDatabase(Range &ents) const
Get all entities not in database.
MoFEMErrorCode writeBitLevelByDim(const BitRefLevel bit, const BitRefLevel mask, const int dim, const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const
Write bit ref level to file.
virtual ~BitRefManager()=default
Destructor.
MoFEMErrorCode writeBitLevelByType(const BitRefLevel bit, const BitRefLevel mask, const EntityType type, const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const
Write bit ref level to file.
Tag get_th_RefParentHandle() const
MoFEMErrorCode getEntitiesByParentType(const BitRefLevel bit, const BitRefLevel mask, const EntityType type, Range &ents, const int verb=QUIET) const
get entities by bit ref level and type of parent
MoFEMErrorCode filterEntitiesByRefLevel(const BitRefLevel bit, const BitRefLevel mask, Range &ents, int verb=QUIET) const
filter entities by bit ref level
BitRefManager(const MoFEM::Core &core)
MoFEMErrorCode filterEntitiesNotInDatabase(Range &ents) const
Get entities not in database.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode writeEntitiesAllBitLevelsByType(const BitRefLevel mask, const EntityType type, const char *file_name, const char *file_type, const char *options)
Write all entities by bit levels and type.
MoFEMErrorCode writeBitLevel(const BitRefLevel bit, const BitRefLevel mask, const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const
Write bit ref level to file.
Tag get_th_RefBitLevel() const
MoFEMErrorCode writeEntitiesNotInDatabase(const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const
Write ents not in database.
Core (interface) class.
Definition: Core.hpp:82
Tag get_th_RefBitLevel() const
Definition: Core.hpp:198
Tag get_th_RefParentHandle() const
Definition: Core.hpp:197
keeps basic data about problem
base class for all interface classes