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