v0.13.1
Loading...
Searching...
No Matches
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
27namespace 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
78MoFEMErrorCode 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
131MoFEMErrorCode 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 ParallelComm *pcomm =
240 ParallelComm::get_pcomm(&get_moab(), basicEntityDataPtr->pcommID);
241
242 for (Range::const_pair_iterator p_eit = ents.pair_begin();
243 p_eit != ents.pair_end(); p_eit++) {
244
245 // First and last handle
246 const EntityHandle first = p_eit->first;
247 const EntityHandle second = p_eit->second;
248
249 // Get UId
250 UId first_uid =
251 FieldEntity::getLocalUniqueIdCalculate(field_bit_number, first);
252 UId second_uid =
253 FieldEntity::getLocalUniqueIdCalculate(field_bit_number, second);
254
255 // Find adjacencies
256 auto ait = entFEAdjacencies.get<Unique_mi_tag>().lower_bound(first_uid);
257 auto hi_ait = entFEAdjacencies.get<Unique_mi_tag>().upper_bound(second_uid);
258 entFEAdjacencies.get<Unique_mi_tag>().erase(ait, hi_ait);
259 }
261}
262
264 const BitRefLevel mask,
265 int verb) {
267 if (verb == -1)
268 verb = verbose;
269 Range ents;
270 CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
271 CHKERR clear_finite_elements(ents, verb);
273}
274
277 if (verb == -1)
278 verb = verbose;
279 CHKERR clear_adjacencies_finite_elements(ents, verb);
280 for (Range::const_pair_iterator p_eit = ents.pair_begin();
281 p_eit != ents.pair_end(); p_eit++) {
282 EntityHandle first = p_eit->first;
283 EntityHandle second = p_eit->second;
284 EntFiniteElement_multiIndex::index<Ent_mi_tag>::type::iterator fit, hi_fit;
285 fit = entsFiniteElements.get<Ent_mi_tag>().lower_bound(first);
286 hi_fit = entsFiniteElements.get<Ent_mi_tag>().upper_bound(second);
287 entsFiniteElements.get<Ent_mi_tag>().erase(fit, hi_fit);
288 }
290}
291
293 const Range ents, int verb) {
295 if (verb == -1)
296 verb = verbose;
297 CHKERR clear_adjacencies_finite_elements(name, ents, verb);
298 for (Range::const_pair_iterator p_eit = ents.pair_begin();
299 p_eit != ents.pair_end(); p_eit++) {
300 EntityHandle first = p_eit->first;
301 EntityHandle second = p_eit->second;
302 EntFiniteElement_multiIndex::index<
303 Composite_Name_And_Ent_mi_tag>::type::iterator fit,
304 hi_fit;
305 fit = entsFiniteElements.get<Composite_Name_And_Ent_mi_tag>().lower_bound(
306 boost::make_tuple(name, first));
307 hi_fit =
308 entsFiniteElements.get<Composite_Name_And_Ent_mi_tag>().upper_bound(
309 boost::make_tuple(name, second));
310 fit = entsFiniteElements.get<Composite_Name_And_Ent_mi_tag>().erase(fit,
311 hi_fit);
312 }
314}
315
317 const BitRefLevel mask,
318 int verb) {
320 Range ents;
321 CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
322 CHKERR clear_adjacencies_finite_elements(ents, verb);
324}
325
327 int verb) {
329 if (verb == -1)
330 verb = verbose;
331 for (Range::const_pair_iterator p_eit = ents.pair_begin();
332 p_eit != ents.pair_end(); p_eit++) {
333 EntityHandle first = p_eit->first;
334 EntityHandle second = p_eit->second;
335 FieldEntityEntFiniteElementAdjacencyMap_multiIndex::index<
336 FEEnt_mi_tag>::type::iterator ait,
337 hi_ait;
338 ait = entFEAdjacencies.get<FEEnt_mi_tag>().lower_bound(first);
339 hi_ait = entFEAdjacencies.get<FEEnt_mi_tag>().upper_bound(second);
340 entFEAdjacencies.get<FEEnt_mi_tag>().erase(ait, hi_ait);
341 }
343}
344
346 const Range ents,
347 int verb) {
349 if (verb == -1)
350 verb = verbose;
351
352 FiniteElement_multiIndex::index<FiniteElement_name_mi_tag>::type::iterator
353 it_fe = finiteElements.get<FiniteElement_name_mi_tag>().find(name);
354 if (it_fe != finiteElements.get<FiniteElement_name_mi_tag>().end()) {
355
356 const auto fe_uid = (*it_fe)->getFEUId();
357
358 for (Range::const_pair_iterator p_eit = ents.pair_begin();
359 p_eit != ents.pair_end(); p_eit++) {
360
361 // First and last handle
362 const EntityHandle first = p_eit->first;
363 const EntityHandle second = p_eit->second;
364
365 // Get UId
366 UId first_uid =
368 UId second_uid =
370
371 // Find and remove adjacencies
372 FieldEntityEntFiniteElementAdjacencyMap_multiIndex::index<
373 FE_Unique_mi_tag>::type::iterator ait,
374 hi_ait;
375 ait = entFEAdjacencies.get<FE_Unique_mi_tag>().lower_bound(first_uid);
376 hi_ait = entFEAdjacencies.get<FE_Unique_mi_tag>().upper_bound(second_uid);
377 entFEAdjacencies.get<FE_Unique_mi_tag>().erase(ait, hi_ait);
378 }
379 }
381}
382
384 const EntityHandle meshset,
385 const EntityType type,
386 int verb) {
388 if (verb == -1)
389 verb = verbose;
390 Range ents;
391 CHKERR get_moab().get_entities_by_type(meshset, type, ents, false);
392 CHKERR remove_ents_from_finite_element(name, ents, verb);
394}
395
397 const Range ents,
398 int verb) {
400 if (verb == -1)
401 verb = verbose;
402 CHKERR clear_finite_elements(name, ents, verb);
403 const EntityHandle idm = get_finite_element_meshset(name);
404 CHKERR get_moab().remove_entities(idm, ents);
406}
407
409 int verb) {
411 if (verb == -1)
412 verb = verbose;
413 CHKERR clear_finite_elements(ents, verb);
414 for (FiniteElement_multiIndex::iterator fe_it = finiteElements.begin();
415 fe_it != finiteElements.end(); fe_it++) {
416 EntityHandle meshset = fe_it->get()->getMeshset();
417 CHKERR get_moab().remove_entities(meshset, ents);
418 }
420}
421
423 const BitRefLevel bit, const BitRefLevel mask, int verb) {
425 if (verb == -1)
426 verb = verbose;
427 Range ents;
428 CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
429 CHKERR remove_ents_from_finite_element(ents, verb);
431}
432
435 if (verb == -1)
436 verb = verbose;
437 CHKERR remove_ents_from_finite_element(ents, verb);
438 CHKERR remove_ents_from_field(ents, verb);
439
440 for (Range::const_pair_iterator p_eit = ents.pair_begin();
441 p_eit != ents.pair_end(); ++p_eit) {
442
443 RefElement_multiIndex::index<Ent_mi_tag>::type::iterator frit, hi_frit;
444 frit = refinedFiniteElements.get<Ent_mi_tag>().lower_bound(p_eit->first);
445 hi_frit =
446 refinedFiniteElements.get<Ent_mi_tag>().upper_bound(p_eit->second);
447 refinedFiniteElements.get<Ent_mi_tag>().erase(frit, hi_frit);
448
449 RefEntity_multiIndex::index<Ent_mi_tag>::type::iterator rit, hi_rit;
450 rit = refinedEntities.get<Ent_mi_tag>().lower_bound(p_eit->first);
451 hi_rit = refinedEntities.get<Ent_mi_tag>().upper_bound(p_eit->second);
452 refinedEntities.get<Ent_mi_tag>().erase(rit, hi_rit);
453 }
454
456}
457
459 const BitRefLevel mask, int verb) {
461 if (verb == -1)
462 verb = verbose;
463 Range ents;
464 CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
465 CHKERR remove_ents(ents, verb);
467}
468
470 const BitRefLevel mask,
471 int verb) {
473 if (verb == -1)
474 verb = verbose;
475 Range ents;
476 CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
477 CHKERR remove_parents_by_ents(ents, verb);
479}
480
483
484 std::vector<EntityHandle> leftovers_ents;
485 leftovers_ents.reserve(ents.size());
486
487 for (auto pit = ents.pair_begin(); pit != ents.pair_end(); ++pit) {
488
489 EntityHandle f = pit->first;
490 const EntityHandle s = pit->second;
491 auto lo = refinedEntities.lower_bound(f);
492 for (; f <= s; ++f) {
493
494 auto check = [this](auto lo, auto f) {
495 if (lo == refinedEntities.end())
496 return false;
497 if ((*lo)->getEnt() == f)
498 return true;
499 return false;
500 };
501
502 if (check(lo, f)) {
503 bool success = refinedEntities.modify(lo, RefEntity_change_parent(0));
504 if (!success)
505 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
506 "Operation of removing parent unsuccessful");
507 ++lo;
508 } else
509 leftovers_ents.emplace_back(f);
510 }
511 }
512
513 if (!leftovers_ents.empty()) {
514 std::vector<EntityHandle> zero_parents(leftovers_ents.size());
515 CHKERR get_moab().tag_set_data(th_RefParentHandle, &leftovers_ents[0],
516 leftovers_ents.size(),
517 &*zero_parents.begin());
518 }
520}
521
524 for (Range::iterator eit = ents.begin(); eit != ents.end(); ++eit) {
525 RefEntity_multiIndex::index<Ent_Ent_mi_tag>::type::iterator it;
526 while ((it = refinedEntities.get<Ent_Ent_mi_tag>().find(*eit)) !=
527 refinedEntities.get<Ent_Ent_mi_tag>().end()) {
528 bool success = refinedEntities.get<Ent_Ent_mi_tag>().modify(
530 if (!success) {
531 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
532 "Operation of removing parent unsuccessful");
533 }
534 }
535 }
537}
538
540 const BitRefLevel mask,
541 const bool remove_parent, int verb,
542 MoFEMTypes mf) {
544 if (verb == -1)
545 verb = verbose;
546
547 Range ents;
548 CHKERR BitRefManager(*this).getEntitiesByRefLevel(bit, mask, ents, verb);
549 Range ents_meshsets = ents.subset_by_type(MBENTITYSET);
550 ents = subtract(ents, ents_meshsets);
551 if(ents.empty()) {
552 if (verb >= VERBOSE)
553 MOFEM_LOG("WORLD", Sev::verbose) << "Nb. of deleted entities 0";
555 }
556
557 if (verb >= VERBOSE)
558 MOFEM_LOG("WORLD", Sev::noisy) << "Deleted ents:\n" << ents;
559
560 CHKERR remove_ents(ents, verb);
561
562 // remove parent
563 if (remove_parent) {
564 CHKERR remove_parents_by_parents(ents);
565 }
566
567 Range meshsets;
568 CHKERR get_moab().get_entities_by_type(0, MBENTITYSET, meshsets, true);
569 for (auto m : meshsets) {
570 CHKERR get_moab().remove_entities(m, ents);
571
572 }
573
574 rval = get_moab().delete_entities(ents);
575 if (rval != MB_SUCCESS) {
577 if (verb == QUIET) {
578 MOFEM_LOG("SELF", Sev::noisy) << "Problem deleting:\n" << ents;
579 } else {
580 MOFEM_LOG("SELF", Sev::warning) << "Problem deleting:\n" << ents;
581 }
582 MOFEM_LOG_CHANNEL("WORLD");
583 MOFEM_LOG_TAG("WORLD", "DeleteCore");
584 if (!(mf & MF_NOT_THROW)) {
585 CHK_MOAB_THROW(rval, "Can not delete entities");
586 } else {
587 rval = MB_SUCCESS;
588 }
589 }
590
591 MOFEM_LOG_C("SELF", Sev::noisy, "Nb. of deleted entities %d", ents.size());
592
594}
595
596MoFEMErrorCode Core::delete_finite_element(const std::string name, int verb) {
598 auto &fe = finiteElements.get<FiniteElement_name_mi_tag>();
599 auto mit = fe.find(name);
600 if (mit == fe.end()) {
601 SETERRQ1(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
602 "Finite element <%s> not found", name.c_str());
603 }
604 EntityHandle meshset = mit->get()->getMeshset();
605 Range ents;
606 CHKERR get_moab().get_entities_by_handle(meshset, ents, false);
607 CHKERR remove_ents_from_finite_element(name, ents, verb);
608 fe.erase(mit);
609 CHKERR get_moab().delete_entities(&meshset, 1);
611}
612
613MoFEMErrorCode Core::delete_field(const std::string name, int verb) {
615 auto &f = fIelds.get<FieldName_mi_tag>();
616 auto mit = f.find(name);
617 if (mit == f.end()) {
618 SETERRQ1(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
619 "Finite element <%s> not found", name.c_str());
620 }
621 EntityHandle meshset = mit->get()->getMeshset();
622 Range ents;
623 CHKERR get_moab().get_entities_by_handle(meshset, ents, false);
624 CHKERR remove_ents_from_field(name, ents, verb);
625 CHKERR get_moab().tag_delete((*mit)->th_FieldDataVerts);
626 CHKERR get_moab().tag_delete((*mit)->th_FieldData);
627 CHKERR get_moab().tag_delete((*mit)->th_AppOrder);
628 f.erase(mit);
629 CHKERR get_moab().delete_entities(&meshset, 1);
631}
632} // namespace MoFEM
#define DeleteCoreFunctionBegin
Definition: DeleteCore.cpp:21
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:304
@ QUIET
Definition: definitions.h:208
@ VERBOSE
Definition: definitions.h:209
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:97
@ MF_NOT_THROW
Definition: definitions.h:101
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:576
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition: definitions.h:34
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
FTensor::Index< 'm', SPACE_DIM > m
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
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:301
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:332
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:277
#define MOFEM_LOG_ATTRIBUTES(channel, bit)
Add attributes to channel.
Definition: LogManager.hpp:289
auto bit
set bit
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
uint128_t UId
Unique Id.
Definition: Types.hpp:31
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: Common.hpp:10
Managing BitRefLevels.
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
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:383
MoFEMErrorCode clear_ents_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:99
MoFEMErrorCode remove_ents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
remove entities form mofem database
Definition: DeleteCore.cpp:458
MoFEMErrorCode clear_finite_elements_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:263
MoFEMErrorCode clear_dofs_fields(const Range ents, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:57
MoFEMErrorCode clear_dofs_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:45
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:422
MoFEMErrorCode remove_parents_by_ents(const Range &ents, int verb=DEFAULT_VERBOSITY)
Remove parents from entities.
Definition: DeleteCore.cpp:481
MoFEMErrorCode delete_finite_element(const std::string name, int verb=DEFAULT_VERBOSITY)
delete finite element from mofem database
Definition: DeleteCore.cpp:596
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
MoFEMErrorCode clear_inactive_dofs(int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:29
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:316
MoFEMErrorCode clear_finite_elements(const Range ents, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:275
MoFEMErrorCode delete_field(const std::string name, int verb=DEFAULT_VERBOSITY)
Delete field.
Definition: DeleteCore.cpp:613
MoFEMErrorCode remove_parents_by_parents(const Range &ents, int verb=DEFAULT_VERBOSITY)
Remove paremts from entities having parents in passed range.
Definition: DeleteCore.cpp:522
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:469
MoFEMErrorCode clear_ents_fields(const Range ents, int verb=DEFAULT_VERBOSITY)
Definition: DeleteCore.cpp:113
MoFEMErrorCode remove_ents(const Range ents, int verb=DEFAULT_VERBOSITY)
remove entities form mofem database
Definition: DeleteCore.cpp:433
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:539
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
static UId getLoFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
static UId getHiFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
UId getLocalUniqueIdCalculate() const
Generate UId for finite element entity.
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.
Provide data structure for (tensor) field approximation.
FieldBitNumber getBitNumber() const
Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for giv...
MultiIndex Tag for field name.