v0.14.0
DeleteCore.cpp
Go to the documentation of this file.
1 /** \file DeleteCore.cpp
2  * \brief Core interface methods for managing deletions and insertion dofs
3  *
4  * \note If entity/dof/finite element is cleared it mean that is erased from
5  * multi-index database
6  *
7  * \note If entity/dof/finite element is removed is is clearded and
8  * removed from filed or finite element meshset
9  *
10  * \note If entity if deleted is cleated, removed and deleted from MoAB
11  * database.
12  *
13  * \todo Implement tag_field_delete, tag_field_delete_by_bit_ref to remove field
14  * tags from entities. This is for entities which are as well removed, thus
15  * cleared as well.
16  */
17 
18 
19 #include <MoFEM.hpp>
20 
21 #define DeleteCoreFunctionBegin \
22  MoFEMFunctionBegin; \
23  MOFEM_LOG_CHANNEL("WORLD"); \
24  MOFEM_LOG_FUNCTION(); \
25  MOFEM_LOG_TAG("WORLD", "DeleteCore");
26 
27 namespace MoFEM {
28 
31  if (verb == -1)
32  verb = verbose;
33  Range ents;
34  for (DofEntity_multiIndex::iterator dit = dofsField.begin();
35  dit != dofsField.end();) {
36  if (!dit->get()->getActive()) {
37  dit = dofsField.erase(dit);
38  } else {
39  ++dit;
40  }
41  }
43 }
44 
46  const BitRefLevel mask,
47  int verb) {
49  if (verb == -1)
50  verb = verbose;
51  Range ents;
52  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
53  CHKERR clear_dofs_fields(ents, verb);
55 }
56 
59  if (verb == -1)
60  verb = verbose;
61 
62  for (Range::const_pair_iterator p_eit = ents.pair_begin();
63  p_eit != ents.pair_end(); p_eit++) {
64  EntityHandle first = p_eit->first;
65  EntityHandle second = p_eit->second;
66  // get dofs range
67  DofEntityByEnt::iterator dit, hi_dit;
68  dit = dofsField.get<Ent_mi_tag>().lower_bound(first);
69  if (dit == dofsField.get<Ent_mi_tag>().end())
70  continue;
71  hi_dit = dofsField.get<Ent_mi_tag>().upper_bound(second);
72  // finally clear dofs
73  dofsField.get<Ent_mi_tag>().erase(dit, hi_dit);
74  }
76 }
77 
78 MoFEMErrorCode Core::clear_dofs_fields(const std::string name, const Range ents,
79  int verb) {
81  if (verb == -1)
82  verb = verbose;
83 
84  const auto bit_number = get_field_bit_number(name);
85 
86  for (Range::const_pair_iterator p_eit = ents.pair_begin();
87  p_eit != ents.pair_end(); p_eit++) {
88  const auto first = p_eit->first;
89  const auto second = p_eit->second;
90  const auto lo_uid = DofEntity::getLoFieldEntityUId(bit_number, first);
91  const auto hi_uid = DofEntity::getHiFieldEntityUId(bit_number, second);
92  auto dit = dofsField.get<Unique_mi_tag>().lower_bound(lo_uid);
93  auto hi_dit = dofsField.get<Unique_mi_tag>().upper_bound(hi_uid);
94  dofsField.get<Unique_mi_tag>().erase(dit, hi_dit);
95  }
97 }
98 
100  const BitRefLevel mask,
101  int verb) {
103  if (verb == -1)
104  verb = verbose;
105  Range ents;
106  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
107  CHKERR clear_dofs_fields(ents, verb);
108  CHKERR clear_adjacencies_entities(ents, verb);
109  CHKERR clear_ents_fields(ents, verb);
111 }
112 
115  if (verb == -1)
116  verb = verbose;
117  CHKERR clear_dofs_fields(ents, verb);
118  CHKERR clear_adjacencies_entities(ents, verb);
119  for (Range::const_pair_iterator p_eit = ents.pair_begin();
120  p_eit != ents.pair_end(); p_eit++) {
121  EntityHandle first = p_eit->first;
122  EntityHandle second = p_eit->second;
123  FieldEntity_multiIndex::index<Ent_mi_tag>::type::iterator dit, hi_dit;
124  dit = entsFields.get<Ent_mi_tag>().lower_bound(first);
125  hi_dit = entsFields.get<Ent_mi_tag>().upper_bound(second);
126  entsFields.get<Ent_mi_tag>().erase(dit, hi_dit);
127  }
129 }
130 
131 MoFEMErrorCode Core::clear_ents_fields(const std::string name, const Range ents,
132  int verb) {
134  if (verb == -1)
135  verb = verbose;
136  const auto bit_number = get_field_bit_number(name);
137  CHKERR clear_dofs_fields(name, ents, verb);
138  CHKERR clear_adjacencies_entities(name, ents, verb);
139  for (Range::const_pair_iterator p_eit = ents.pair_begin();
140  p_eit != ents.pair_end(); p_eit++) {
141  const auto first = p_eit->first;
142  const auto second = p_eit->second;
143  auto dit = entsFields.get<Unique_mi_tag>().lower_bound(
144  FieldEntity::getLocalUniqueIdCalculate(bit_number, first));
145  auto hi_dit = entsFields.get<Unique_mi_tag>().upper_bound(
146  FieldEntity::getLocalUniqueIdCalculate(bit_number, second));
147  entsFields.get<Unique_mi_tag>().erase(dit, hi_dit);
148  }
150 }
151 
153  const EntityHandle meshset,
154  const EntityType type, int verb) {
156  if (verb == -1)
157  verb = verbose;
158  Range ents;
159  CHKERR get_moab().get_entities_by_type(meshset, type, ents);
160  CHKERR remove_ents_from_field(name, ents, verb);
162 }
163 
165  const Range ents, int verb) {
167  if (verb == -1)
168  verb = verbose;
169  EntityHandle meshset;
170  meshset = get_field_meshset(name);
171  CHKERR clear_ents_fields(name, ents, verb);
172  CHKERR get_moab().remove_entities(meshset, ents);
174 }
175 
178  if (verb == -1)
179  verb = verbose;
180  CHKERR clear_ents_fields(ents, verb);
181  for (Field_multiIndex::iterator fit = fIelds.begin(); fit != fIelds.end();
182  fit++) {
183  EntityHandle meshset = fit->get()->getMeshset();
184  CHKERR get_moab().remove_entities(meshset, ents);
185  }
187 }
188 
190  const BitRefLevel mask,
191  int verb) {
193  if (verb == -1)
194  verb = verbose;
195  Range ents;
196  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
197  CHKERR remove_ents_from_field(ents, verb);
199 }
200 
202  const BitRefLevel mask,
203  int verb) {
205  if (verb == -1)
206  verb = verbose;
207  Range ents;
208  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
209  CHKERR clear_adjacencies_entities(ents, verb);
211 }
212 
215  if (verb == -1)
216  verb = verbose;
217  for (Range::const_pair_iterator p_eit = ents.pair_begin();
218  p_eit != ents.pair_end(); ++p_eit) {
219  const EntityHandle first = p_eit->first;
220  const EntityHandle second = p_eit->second;
221  FieldEntityEntFiniteElementAdjacencyMap_multiIndex::index<
222  Ent_mi_tag>::type::iterator ait,
223  hi_ait;
224  ait = entFEAdjacencies.get<Ent_mi_tag>().lower_bound(first);
225  hi_ait = entFEAdjacencies.get<Ent_mi_tag>().upper_bound(second);
226  entFEAdjacencies.get<Ent_mi_tag>().erase(ait, hi_ait);
227  }
229 }
230 
232  const Range ents, int verb) {
234  if (verb == -1)
235  verb = verbose;
236 
237  const Field *field_ptr = get_field_structure(name);
238  int field_bit_number = field_ptr->getBitNumber();
239 
240  for (Range::const_pair_iterator p_eit = ents.pair_begin();
241  p_eit != ents.pair_end(); p_eit++) {
242 
243  // First and last handle
244  const EntityHandle first = p_eit->first;
245  const EntityHandle second = p_eit->second;
246 
247  // Get UId
248  UId first_uid =
249  FieldEntity::getLocalUniqueIdCalculate(field_bit_number, first);
250  UId second_uid =
251  FieldEntity::getLocalUniqueIdCalculate(field_bit_number, second);
252 
253  // Find adjacencies
254  auto ait = entFEAdjacencies.get<Unique_mi_tag>().lower_bound(first_uid);
255  auto hi_ait = entFEAdjacencies.get<Unique_mi_tag>().upper_bound(second_uid);
256  entFEAdjacencies.get<Unique_mi_tag>().erase(ait, hi_ait);
257  }
259 }
260 
262  const BitRefLevel mask,
263  int verb) {
265  if (verb == -1)
266  verb = verbose;
267  Range ents;
268  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
269  CHKERR clear_finite_elements(ents, verb);
271 }
272 
275  if (verb == -1)
276  verb = verbose;
277  CHKERR clear_adjacencies_finite_elements(ents, verb);
278  for (Range::const_pair_iterator p_eit = ents.pair_begin();
279  p_eit != ents.pair_end(); p_eit++) {
280  EntityHandle first = p_eit->first;
281  EntityHandle second = p_eit->second;
282  EntFiniteElement_multiIndex::index<Ent_mi_tag>::type::iterator fit, hi_fit;
283  fit = entsFiniteElements.get<Ent_mi_tag>().lower_bound(first);
284  hi_fit = entsFiniteElements.get<Ent_mi_tag>().upper_bound(second);
285  entsFiniteElements.get<Ent_mi_tag>().erase(fit, hi_fit);
286  }
288 }
289 
290 MoFEMErrorCode Core::clear_finite_elements(const std::string &fe_name,
291  const Range &ents, int verb) {
293  if (verb == -1)
294  verb = verbose;
295  CHKERR clear_adjacencies_finite_elements(fe_name, ents, verb);
296  auto fe_miit = finiteElements.get<FiniteElement_name_mi_tag>().find(fe_name);
297  if (fe_miit == finiteElements.get<FiniteElement_name_mi_tag>().end()) {
298  for (Range::const_pair_iterator p_eit = ents.pair_begin();
299  p_eit != ents.pair_end(); p_eit++) {
300  auto fit = entsFiniteElements.get<Unique_mi_tag>().lower_bound(
302  (*fe_miit)->getFEUId()));
303  auto hi_fit = entsFiniteElements.get<Unique_mi_tag>().upper_bound(
305  (*fe_miit)->getFEUId()));
306  fit = entsFiniteElements.get<Unique_mi_tag>().erase(fit, hi_fit);
307  }
308  }
310 }
311 
313  const BitRefLevel mask,
314  int verb) {
316  Range ents;
317  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
318  CHKERR clear_adjacencies_finite_elements(ents, verb);
320 }
321 
323  int verb) {
325  if (verb == -1)
326  verb = verbose;
327  for (Range::const_pair_iterator p_eit = ents.pair_begin();
328  p_eit != ents.pair_end(); p_eit++) {
329  EntityHandle first = p_eit->first;
330  EntityHandle second = p_eit->second;
331  FieldEntityEntFiniteElementAdjacencyMap_multiIndex::index<
332  FEEnt_mi_tag>::type::iterator ait,
333  hi_ait;
334  ait = entFEAdjacencies.get<FEEnt_mi_tag>().lower_bound(first);
335  hi_ait = entFEAdjacencies.get<FEEnt_mi_tag>().upper_bound(second);
336  entFEAdjacencies.get<FEEnt_mi_tag>().erase(ait, hi_ait);
337  }
339 }
340 
342  const Range ents,
343  int verb) {
345  if (verb == -1)
346  verb = verbose;
347 
348  FiniteElement_multiIndex::index<FiniteElement_name_mi_tag>::type::iterator
349  it_fe = finiteElements.get<FiniteElement_name_mi_tag>().find(name);
350  if (it_fe != finiteElements.get<FiniteElement_name_mi_tag>().end()) {
351 
352  const auto fe_uid = (*it_fe)->getFEUId();
353 
354  for (Range::const_pair_iterator p_eit = ents.pair_begin();
355  p_eit != ents.pair_end(); p_eit++) {
356 
357  // First and last handle
358  const EntityHandle first = p_eit->first;
359  const EntityHandle second = p_eit->second;
360 
361  // Get UId
362  UId first_uid =
364  UId second_uid =
366 
367  // Find and remove adjacencies
368  FieldEntityEntFiniteElementAdjacencyMap_multiIndex::index<
369  FE_Unique_mi_tag>::type::iterator ait,
370  hi_ait;
371  ait = entFEAdjacencies.get<FE_Unique_mi_tag>().lower_bound(first_uid);
372  hi_ait = entFEAdjacencies.get<FE_Unique_mi_tag>().upper_bound(second_uid);
373  entFEAdjacencies.get<FE_Unique_mi_tag>().erase(ait, hi_ait);
374  }
375  }
377 }
378 
380  const EntityHandle meshset,
381  const EntityType type,
382  int verb) {
384  if (verb == -1)
385  verb = verbose;
386  Range ents;
387  CHKERR get_moab().get_entities_by_type(meshset, type, ents, false);
388  CHKERR remove_ents_from_finite_element(name, ents, verb);
390 }
391 
393  const Range ents,
394  int verb) {
396  if (verb == -1)
397  verb = verbose;
398  CHKERR clear_finite_elements(name, ents, verb);
399  const EntityHandle idm = get_finite_element_meshset(name);
400  CHKERR get_moab().remove_entities(idm, ents);
402 }
403 
405  int verb) {
407  if (verb == -1)
408  verb = verbose;
409  CHKERR clear_finite_elements(ents, verb);
410  for (FiniteElement_multiIndex::iterator fe_it = finiteElements.begin();
411  fe_it != finiteElements.end(); fe_it++) {
412  EntityHandle meshset = fe_it->get()->getMeshset();
413  CHKERR get_moab().remove_entities(meshset, ents);
414  }
416 }
417 
419  const BitRefLevel bit, const BitRefLevel mask, int verb) {
421  if (verb == -1)
422  verb = verbose;
423  Range ents;
424  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
425  CHKERR remove_ents_from_finite_element(ents, verb);
427 }
428 
429 MoFEMErrorCode Core::remove_ents(const Range ents, int verb) {
431  if (verb == -1)
432  verb = verbose;
433  CHKERR remove_ents_from_finite_element(ents, verb);
434  CHKERR remove_ents_from_field(ents, verb);
435 
436  for (Range::const_pair_iterator p_eit = ents.pair_begin();
437  p_eit != ents.pair_end(); ++p_eit) {
438 
439  RefElement_multiIndex::index<Ent_mi_tag>::type::iterator frit, hi_frit;
440  frit = refinedFiniteElements.get<Ent_mi_tag>().lower_bound(p_eit->first);
441  hi_frit =
442  refinedFiniteElements.get<Ent_mi_tag>().upper_bound(p_eit->second);
443  refinedFiniteElements.get<Ent_mi_tag>().erase(frit, hi_frit);
444 
445  RefEntity_multiIndex::index<Ent_mi_tag>::type::iterator rit, hi_rit;
446  rit = refinedEntities.get<Ent_mi_tag>().lower_bound(p_eit->first);
447  hi_rit = refinedEntities.get<Ent_mi_tag>().upper_bound(p_eit->second);
448  refinedEntities.get<Ent_mi_tag>().erase(rit, hi_rit);
449  }
450 
452 }
453 
455  const BitRefLevel mask, int verb) {
457  if (verb == -1)
458  verb = verbose;
459  Range ents;
460  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
461  CHKERR remove_ents(ents, verb);
463 }
464 
466  const BitRefLevel mask,
467  int verb) {
469  if (verb == -1)
470  verb = verbose;
471  Range ents;
472  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
473  CHKERR remove_parents_by_ents(ents, verb);
475 }
476 
479 
480  std::vector<EntityHandle> leftovers_ents;
481  leftovers_ents.reserve(ents.size());
482 
483  for (auto pit = ents.pair_begin(); pit != ents.pair_end(); ++pit) {
484 
485  EntityHandle f = pit->first;
486  const EntityHandle s = pit->second;
487  auto lo = refinedEntities.lower_bound(f);
488  for (; f <= s; ++f) {
489 
490  auto check = [this](auto lo, auto f) {
491  if (lo == refinedEntities.end())
492  return false;
493  if ((*lo)->getEnt() == f)
494  return true;
495  return false;
496  };
497 
498  if (check(lo, f)) {
499  bool success = refinedEntities.modify(lo, RefEntity_change_parent(0));
500  if (!success)
501  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
502  "Operation of removing parent unsuccessful");
503  ++lo;
504  } else
505  leftovers_ents.emplace_back(f);
506  }
507  }
508 
509  if (!leftovers_ents.empty()) {
510  std::vector<EntityHandle> zero_parents(leftovers_ents.size());
511  CHKERR get_moab().tag_set_data(th_RefParentHandle, &leftovers_ents[0],
512  leftovers_ents.size(),
513  &*zero_parents.begin());
514  }
516 }
517 
520  for (Range::iterator eit = ents.begin(); eit != ents.end(); ++eit) {
521  RefEntity_multiIndex::index<Ent_Ent_mi_tag>::type::iterator it;
522  while ((it = refinedEntities.get<Ent_Ent_mi_tag>().find(*eit)) !=
523  refinedEntities.get<Ent_Ent_mi_tag>().end()) {
524  bool success = refinedEntities.get<Ent_Ent_mi_tag>().modify(
525  it, RefEntity_change_parent(0));
526  if (!success) {
527  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
528  "Operation of removing parent unsuccessful");
529  }
530  }
531  }
533 }
534 
536  const BitRefLevel mask,
537  const bool remove_parent, int verb,
538  MoFEMTypes mf) {
540  if (verb == -1)
541  verb = verbose;
542 
543  Range ents;
544  CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
545  Range ents_meshsets = ents.subset_by_type(MBENTITYSET);
546  ents = subtract(ents, ents_meshsets);
547  if(ents.empty()) {
548  if (verb >= VERBOSE)
549  MOFEM_LOG("WORLD", Sev::verbose) << "Nb. of deleted entities 0";
551  }
552 
553  if (verb >= VERBOSE)
554  MOFEM_LOG("WORLD", Sev::noisy) << "Deleted ents:\n" << ents;
555 
556  CHKERR remove_ents(ents, verb);
557 
558  // remove parent
559  if (remove_parent) {
560  CHKERR remove_parents_by_parents(ents);
561  }
562 
563  Range meshsets;
564  CHKERR get_moab().get_entities_by_type(0, MBENTITYSET, meshsets, true);
565  for (auto m : meshsets) {
566  CHKERR get_moab().remove_entities(m, ents);
567 
568  }
569 
570  rval = get_moab().delete_entities(ents);
571  if (rval != MB_SUCCESS) {
573  if (verb == QUIET) {
574  MOFEM_LOG("SELF", Sev::noisy) << "Problem deleting:\n" << ents;
575  } else {
576  MOFEM_LOG("SELF", Sev::warning) << "Problem deleting:\n" << ents;
577  }
578  MOFEM_LOG_CHANNEL("WORLD");
579  MOFEM_LOG_TAG("WORLD", "DeleteCore");
580  if (!(mf & MF_NOT_THROW)) {
581  CHK_MOAB_THROW(rval, "Can not delete entities");
582  } else {
583  rval = MB_SUCCESS;
584  }
585  }
586 
587  MOFEM_LOG_C("SELF", Sev::noisy, "Nb. of deleted entities %d", ents.size());
588 
590 }
591 
592 MoFEMErrorCode Core::delete_finite_element(const std::string name, int verb) {
594  auto &fe = finiteElements.get<FiniteElement_name_mi_tag>();
595  auto mit = fe.find(name);
596  if (mit == fe.end()) {
597  SETERRQ1(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
598  "Finite element <%s> not found", name.c_str());
599  }
600  EntityHandle meshset = mit->get()->getMeshset();
601  Range ents;
602  CHKERR get_moab().get_entities_by_handle(meshset, ents, false);
603  CHKERR remove_ents_from_finite_element(name, ents, verb);
604  fe.erase(mit);
605  CHKERR get_moab().delete_entities(&meshset, 1);
607 }
608 
609 MoFEMErrorCode Core::delete_field(const std::string name, int verb) {
611  auto &f = fIelds.get<FieldName_mi_tag>();
612  auto mit = f.find(name);
613  if (mit == f.end()) {
614  SETERRQ1(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
615  "Finite element <%s> not found", name.c_str());
616  }
617  EntityHandle meshset = mit->get()->getMeshset();
618  Range ents;
619  CHKERR get_moab().get_entities_by_handle(meshset, ents, false);
620  CHKERR remove_ents_from_field(name, ents, verb);
621  CHKERR get_moab().tag_delete((*mit)->th_FieldDataVerts);
622  CHKERR get_moab().tag_delete((*mit)->th_FieldData);
623  CHKERR get_moab().tag_delete((*mit)->th_AppOrder);
624  f.erase(mit);
625  CHKERR get_moab().delete_entities(&meshset, 1);
627 }
628 } // namespace MoFEM
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
CHK_MOAB_THROW
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:589
MoFEM::CoreTmp< 0 >::delete_field
MoFEMErrorCode delete_field(const std::string name, int verb=DEFAULT_VERBOSITY)
Delete field.
Definition: DeleteCore.cpp:609
MoFEM::Ent_mi_tag
Definition: TagMultiIndices.hpp:21
MoFEM::CoreTmp< 0 >::delete_ents_by_bit_ref
MoFEMErrorCode delete_ents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, const bool remove_parent=false, int verb=DEFAULT_VERBOSITY, MoFEMTypes mf=MF_ZERO)
delete entities form mofem and moab database
Definition: DeleteCore.cpp:535
MoFEM::CoreTmp< 0 >::remove_ents_from_finite_element_by_bit_ref
MoFEMErrorCode remove_ents_from_finite_element_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
remove elements from given refinement level to finite element database
Definition: DeleteCore.cpp:418
MoFEM::BitRefManager::getEntitiesByRefLevel
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
Definition: BitRefManager.cpp:845
MOFEM_LOG_CHANNEL
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
EntityHandle
MoFEM::CoreTmp< 0 >::remove_parents_by_parents
MoFEMErrorCode remove_parents_by_parents(const Range &ents, int verb=DEFAULT_VERBOSITY)
Remove paremts from entities having parents in passed range.
Definition: DeleteCore.cpp:518
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::CoreTmp< 0 >::remove_ents_from_field_by_bit_ref
MoFEMErrorCode remove_ents_from_field_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
remove entities from field
Definition: DeleteCore.cpp:189
MOFEM_LOG_ATTRIBUTES
#define MOFEM_LOG_ATTRIBUTES(channel, bit)
Add attributes to channel.
Definition: LogManager.hpp:296
MoFEM::CoreTmp< 0 >::remove_parents_by_ents
MoFEMErrorCode remove_parents_by_ents(const Range &ents, int verb=DEFAULT_VERBOSITY)
Remove parents from entities.
Definition: DeleteCore.cpp:477
MoFEM::FieldName_mi_tag
MultiIndex Tag for field name.
Definition: TagMultiIndices.hpp:67
MoFEM::CoreTmp< 0 >::clear_finite_elements
MoFEMErrorCode clear_finite_elements(const Range &ents, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:273
MoFEM.hpp
DeleteCoreFunctionBegin
#define DeleteCoreFunctionBegin
Definition: DeleteCore.cpp:21
MoFEM::Ent_Ent_mi_tag
Definition: TagMultiIndices.hpp:55
MoFEM::CoreTmp< 0 >::delete_finite_element
MoFEMErrorCode delete_finite_element(const std::string name, int verb=DEFAULT_VERBOSITY)
delete finite element from mofem database
Definition: DeleteCore.cpp:592
MoFEM::Field
Provide data structure for (tensor) field approximation.
Definition: FieldMultiIndices.hpp:51
MoFEM::CoreTmp< 0 >::clear_ents_fields
MoFEMErrorCode clear_ents_fields(const Range ents, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:113
MoFEM::CoreTmp< 0 >::clear_adjacencies_entities
MoFEMErrorCode clear_adjacencies_entities(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
clear adjacency map for entities on given bit level
Definition: DeleteCore.cpp:201
MoFEM::CoreTmp< 0 >::clear_ents_fields_by_bit_ref
MoFEMErrorCode clear_ents_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:99
MoFEM::LogManager::BitScope
@ BitScope
Definition: LogManager.hpp:49
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
VERBOSE
@ VERBOSE
Definition: definitions.h:222
MoFEM::CoreTmp< 0 >::clear_finite_elements_by_bit_ref
MoFEMErrorCode clear_finite_elements_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:261
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:311
MoFEM::Types::UId
uint128_t UId
Unique Id.
Definition: Types.hpp:31
bit
auto bit
set bit
Definition: hanging_node_approx.cpp:75
convert.type
type
Definition: convert.py:64
MoFEM::FieldEntity::getLocalUniqueIdCalculate
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.
Definition: FieldEntsMultiIndices.hpp:136
MoFEM::EntFiniteElement::getLocalUniqueIdCalculate
UId getLocalUniqueIdCalculate() const
Generate UId for finite element entity.
Definition: FEMultiIndices.hpp:528
MoFEM::FEEnt_mi_tag
Definition: TagMultiIndices.hpp:22
MoFEM::CoreTmp< 0 >::clear_adjacencies_finite_elements
MoFEMErrorCode clear_adjacencies_finite_elements(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
clear adjacency map for finite elements on given bit level
Definition: DeleteCore.cpp:312
MoFEM::CoreTmp< 0 >::remove_parents_by_bit_ref
MoFEMErrorCode remove_parents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Remove parent from entities on bit level.
Definition: DeleteCore.cpp:465
MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition: definitions.h:34
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::DofEntity::getLoFieldEntityUId
static UId getLoFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
Definition: DofsMultiIndices.hpp:69
Range
MoFEM::CoreTmp< 0 >::clear_inactive_dofs
MoFEMErrorCode clear_inactive_dofs(int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:29
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
MoFEM::CoreTmp< 0 >::clear_dofs_fields_by_bit_ref
MoFEMErrorCode clear_dofs_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:45
MoFEM::Field::getBitNumber
FieldBitNumber getBitNumber() const
Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for giv...
Definition: FieldMultiIndices.hpp:211
MoFEM::DofEntity::getHiFieldEntityUId
static UId getHiFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
Definition: DofsMultiIndices.hpp:75
HenckyOps::f
auto f
Definition: HenckyOps.hpp:15
MoFEM::FiniteElement_name_mi_tag
Definition: TagMultiIndices.hpp:26
MoFEM::RefEntity_change_parent
change parent
Definition: RefEntsMultiIndices.hpp:812
MoFEM::CoreTmp< 0 >::remove_ents_from_finite_element
MoFEMErrorCode remove_ents_from_finite_element(const std::string name, const EntityHandle meshset, const EntityType type, int verb=DEFAULT_VERBOSITY)
remove entities from given refinement level to finite element database
Definition: DeleteCore.cpp:379
MoFEM::FE_Unique_mi_tag
Definition: TagMultiIndices.hpp:20
MoFEMTypes
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:110
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MoFEM::BitRefManager
Managing BitRefLevels.
Definition: BitRefManager.hpp:21
MoFEM::CoreTmp< 0 >::clear_dofs_fields
MoFEMErrorCode clear_dofs_fields(const Range ents, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:57
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
QUIET
@ QUIET
Definition: definitions.h:221
MoFEM::Unique_mi_tag
Definition: TagMultiIndices.hpp:18
MF_NOT_THROW
@ MF_NOT_THROW
Definition: definitions.h:114
MoFEM::CoreTmp< 0 >::remove_ents_by_bit_ref
MoFEMErrorCode remove_ents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
remove entities form mofem database
Definition: DeleteCore.cpp:454
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEM::CoreTmp< 0 >::remove_ents
MoFEMErrorCode remove_ents(const Range ents, int verb=DEFAULT_VERBOSITY)
remove entities form mofem database
Definition: DeleteCore.cpp:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MoFEM::CoreTmp< 0 >::remove_ents_from_field
MoFEMErrorCode remove_ents_from_field(const std::string name, const EntityHandle meshset, const EntityType type, int verb=DEFAULT_VERBOSITY)
remove entities from field
Definition: DeleteCore.cpp:152