14using FieldRequest = Projection::Request<Projection::FieldMap>;
15using FieldResult = Projection::Report<Projection::FieldReport>;
16using TagRequest = Projection::Request<Projection::TagMap>;
17using TagResult = Projection::Report<Projection::TagReport>;
26 std::array<EntityHandle, 4>
vertices;
27 for (
int v = 0;
v != dim + 1; ++
v) {
28 std::array<double, 3> x{
offset + shift, shift, dim == 3 ? shift : 0.};
39 for (
int d = 1;
d < dim; ++
d)
44double affine(
const double *x,
int component) {
45 return (component + 1) * (1. + .5 * x[0] - .7 * x[1] + .3 * x[2]);
56MoFEMErrorCode requireValue(
double value,
double expected,
const char *message) {
57 return require(std::isnan(expected) ? std::isnan(value)
58 :
std::abs(value - expected) < 1.e-9,
62Projection::IntegrationRule standardRule(
int order) {
63 Projection::IntegrationRule rule;
69template <
int D> Projection::IntegrationRule centroidRule() {
70 Projection::IntegrationRule rule;
74 for (
int d = 0;
d !=
D; ++
d)
86 const Projection::IntegrationRule &rule,
90 const std::string
name =
"TAG_CHECK";
107 CHKERR problems->partitionFiniteElements(
name,
true, 0,
112 for (
auto it = elements.begin();
it != elements.end();)
114 field.get_comm_rank())),
115 "Could not number tag check cells");
117 auto fe = boost::make_shared<Element>(
field);
118 if (rule.setRuleHook) {
124 auto op =
new UDO(
NOSPACE, UDO::OPSPACE);
126 return work(
static_cast<UDO *
>(
base));
141 DM projection_dm,
const std::string &element_name,
148 const auto project_tags = [&](TagRequest &request, TagResult &
report) {
149 request.dm = projection_dm;
150 request.elementName = element_name;
153 const auto nan = std::numeric_limits<double>::quiet_NaN();
154 auto make_tag = [&](
const std::string &
name, DataType
type,
155 const double *def =
nullptr) {
159 MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_VARLEN |
164 for (
const auto *
name :
165 {
"TAG_1",
"TAG_6",
"TAG_9",
"TAG_10",
"TAG_SAME",
"TAG_LOW"})
167 CHKERR make_tag(
"TAG_NAN", MB_TYPE_DOUBLE, &nan);
168 CHKERR make_tag(
"TAG_INT", MB_TYPE_INTEGER);
170 CHKERR mb.tag_get_handle(
"TAG_FIXED", 2, MB_TYPE_DOUBLE,
fixed,
171 MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_SPARSE);
172 const auto rule1 = standardRule(1), rule2 = standardRule(2),
173 rule3 = standardRule(3), rule4 = standardRule(4);
174 const auto centroid = centroidRule<D>();
177 const Projection::IntegrationRule &rule) {
183 const auto &coords = op->getCoordsAtGaussPts();
185 for (
size_t q = 0;
q != coords.size1(); ++
q)
188 const void *data[] = {
values.data()};
190 const auto ent = op->getFEEntityHandle();
205 const auto ent = op->getFEEntityHandle();
206 const double *data =
nullptr;
208 CHKERR mb.tag_get_by_ptr(
th, &ent, 1, (
const void **)&data, &
size);
209 const auto &coords = op->getCoordsAtGaussPts();
212 "Target tag length differs from the target rule");
213 for (
size_t q = 0;
q != coords.size1(); ++
q)
217 expect_nan ? std::numeric_limits<double>::quiet_NaN()
218 : affine(&coords(
q, 0),
c),
219 "Projected tag differs from analytical values");
224 {std::pair{
"TAG_1", 1}, std::pair{
"TAG_6", 6}, std::pair{
"TAG_9", 9},
225 std::pair{
"TAG_10", 10}, std::pair{
"TAG_SAME", 6}})
227 CHKERR fill(
"TAG_LOW", 1, rule1);
229 const auto fields_before =
field.get_fields()->size();
231 CHKERR mb.get_entities_by_handle(0, baseline);
232 auto require_no_leaks = [&]() {
234 CHKERR require(
field.get_fields()->size() == fields_before,
235 "Private tag fields leaked");
237 CHKERR mb.get_entities_by_handle(0, after);
238 CHKERR require(after == baseline,
"Private tag entities leaked");
246 request.source.bit = source_bit;
247 request.target.bit = target_bit | copy_bit;
248 request.options.quadratureOrder = 6;
249 request.options.sourceRule = rule4;
250 request.options.targetRule = rule3;
252 request.maps = {{{
"TAG_1",
"TAG_1_OUT"},
253 {
"TAG_6",
"TAG_6_OUT"},
254 {
"TAG_9",
"TAG_9_OUT"}},
260 "Unexpected tag projection report");
261 for (
const auto &item :
report.items) {
262 CHKERR require(item.relativeMassResidual < 2.e-10,
263 "Tag mass residual is too large");
264 CHKERR require(item.sourceRelativeMassResidual < 2.e-10,
265 "Tag reconstruction residual is too large");
266 CHKERR require(item.sourceElementsWithoutData == 0,
267 "Unexpected source elements without tag data");
269 CHKERR check(
"TAG_1_OUT", 1, checked, target_bit | copy_bit, rule3,
false);
270 CHKERR check(
"TAG_6_OUT", 6, checked, target_bit | copy_bit, rule3,
false);
271 CHKERR check(
"TAG_9_OUT", 9, checked, target_bit | copy_bit, rule3,
false);
272 if (!checked.empty()) {
280 MB_VARIABLE_DATA_LENGTH,
281 "Created target tag differs from its source tag");
283 CHKERR require_no_leaks();
286 request.options.targetRule = centroid;
287 request.maps = {{{
"TAG_6",
"TAG_6_CENTRE"}}, 1};
289 CHKERR check(
"TAG_6_CENTRE", 6, checked, target_bit | copy_bit, centroid,
294 std::vector<Tag> tags_before, tags_after;
295 CHKERR mb.tag_get_tags(tags_before);
296 TagRequest same = request;
297 same.target.bit = source_bit;
298 same.options.targetRule = rule2;
299 same.maps = {{{
"TAG_SAME",
"TAG_SAME"}}, 1};
301 CHKERR check(
"TAG_SAME", 6,
source, source_bit, rule2,
false);
303 CHKERR require(tags_before.size() == tags_after.size(),
304 "Tag projection leaked MOAB tags");
305 CHKERR require_no_leaks();
309 request.options.targetRule = rule3;
310 request.maps = {{{
"TAG_NAN",
"TAG_NAN_OUT"}}, 1};
313 CHKERR require(
report.items[0].sourceElementsWithoutData > 0,
314 "Missing source tag data was not reported");
315 CHKERR check(
"TAG_NAN_OUT", 1, checked, target_bit | copy_bit, rule3,
true);
317 auto reject = [&](TagRequest bad,
const char *absent_target) {
319 CHKERR PetscPushErrorHandler(PetscReturnErrorHandler,
nullptr);
320 const auto error = project_tags(bad,
report);
321 CHKERR PetscPopErrorHandler();
323 CHKERR require(error != 0,
"Invalid tag projection was accepted");
324 CHKERR require_no_leaks();
327 CHKERR require(
mb.tag_get_handle(absent_target,
th) != MB_SUCCESS,
328 "Failed tag projection left a created target tag");
333 bad.options.quadratureOrder = -1;
334 bad.maps = {{{
"TAG_1",
"TAG_NO_QUADRATURE"}}, 1};
335 CHKERR reject(bad,
"TAG_NO_QUADRATURE");
337 bad.options.sourceRule = rule1;
338 bad.maps = {{{
"TAG_6",
"TAG_BAD_LENGTH"}}, 1};
339 CHKERR reject(bad,
"TAG_BAD_LENGTH");
341 bad.maps = {{{
"TAG_1",
"TAG_FIXED"}}, 1};
342 CHKERR reject(bad,
nullptr);
344 bad.maps = {{{
"TAG_10",
"TAG_BAD_COMPONENTS"}}, 1};
345 CHKERR reject(bad,
"TAG_BAD_COMPONENTS");
347 bad.maps = {{{
"TAG_INT",
"TAG_BAD_TYPE"}}, 1};
348 CHKERR reject(bad,
"TAG_BAD_TYPE");
350 bad.options.targetRule = Projection::IntegrationRule();
351 bad.maps = {{{
"TAG_1",
"TAG_BAD_RULE"}}, 1};
352 CHKERR reject(bad,
"TAG_BAD_RULE");
354 bad.options.sourceRule = rule1;
355 bad.maps = {{{
"TAG_LOW",
"TAG_BAD_ORDER"}}, 1};
356 CHKERR reject(bad,
"TAG_BAD_ORDER");
362MoFEMErrorCode runCase(
bool empty_ranks,
bool shared_copies =
false,
363 bool ghost_source =
false) {
366 auto pc = std::make_unique<ParallelComm>(&
mb, PETSC_COMM_WORLD);
369 const bool active = !empty_ranks ||
field.get_comm_rank() == 0;
370 const double offset = (shared_copies || ghost_source)
372 : 3. *
field.get_comm_rank();
373 const double target_shift =
374 .1 + (ghost_source ? .01 *
field.get_comm_rank() : 0.);
380 CHKERR simplex(
mb,
D, offset,
D == 2 ? .1 : 10., .2, missing, missing_all);
381 CHKERR simplex(
mb,
D, offset, target_shift + .02, .05, copy, copy_all);
383 if (!empty_ranks && !shared_copies && !ghost_source) {
389 if constexpr (
D == 2) {
392 vertices.merge(target_all.subset_by_type(MBVERTEX));
393 vertices.merge(copy_all.subset_by_type(MBVERTEX));
394 vertices.merge(missing_all.subset_by_type(MBVERTEX));
398 x[2] = .4 * (x[0] -
offset) + .2 * x[1];
399 if (missing_all.find(
v) != missing_all.end())
404 if (shared_copies || ghost_source) {
406 Range all = source_all;
410 cells.merge(missing);
411 all.merge(target_all);
413 all.merge(missing_all);
415 const auto gid =
mb.globalId_tag();
417 const int id =
static_cast<int>(
mb.id_from_handle(e));
418 CHKERR mb.tag_set_data(gid, &e, 1, &
id);
421 CHKERR pc->create_part(part);
426 if (
field.get_comm_size() > 1)
427 for (
auto e :
cells) {
428 unsigned long long local_handle = e;
429 std::vector<unsigned long long> remote(
field.get_comm_size());
430 CHKERR MPI_Allgather(&local_handle, 1, MPI_UNSIGNED_LONG_LONG,
431 remote.data(), 1, MPI_UNSIGNED_LONG_LONG,
433 std::vector<int> procs;
434 std::vector<EntityHandle> handles;
435 for (
int r = 0;
r !=
field.get_comm_size(); ++
r)
436 if (r !=
field.get_comm_rank()) {
438 handles.push_back(remote[r]);
440 CHKERR pc->update_remote_data(e, procs, handles);
442 if (shared_copies && !
target.empty()) {
446 "Fixture cell copies did not resolve to rank zero");
448 if (ghost_source &&
field.get_comm_rank() && !
source.empty() &&
450 int source_owner, target_owner;
453 CHKERR require(source_owner == 0 &&
454 target_owner ==
field.get_comm_rank(),
455 "Fixture did not give a rank an owned target and ghost "
465 CHKERR bits->setBitRefLevel(target_all, target_bit,
false);
466 CHKERR bits->setBitRefLevel(missing_all, missing_bit,
false);
467 CHKERR bits->setBitRefLevel(copy_all, copy_bit,
false);
469 target_support.merge(missing);
470 target_support.merge(copy);
471 for (
int n : {1, 3, 5, 6}) {
472 const auto source_name =
"SOURCE_" + std::to_string(
n);
473 const auto target_name =
"TARGET_" + std::to_string(
n);
476 CHKERR field.set_field_order(source_all, source_name, 1);
478 CHKERR field.add_ents_to_field_by_dim(target_support,
D, target_name);
479 CHKERR field.set_field_order(target_support, target_name, 2);
480 CHKERR field.set_field_order(copy, target_name, 1);
484 memory_support.merge(target_support);
485 CHKERR field.add_ents_to_field_by_dim(memory_support,
D,
"MEMORY");
487 CHKERR field.set_field_order(target_support,
"MEMORY", 1);
489 for (
int n : {1, 3, 5, 6}) {
491 [&](boost::shared_ptr<FieldEntity> entity) {
493 if (entity->getEntType() == MBVERTEX) {
495 const auto e = entity->getEnt();
497 auto values = entity->getEntFieldData();
498 for (
int c = 0;
c !=
n; ++
c)
503 "SOURCE_" + std::to_string(
n));
505 -99.,
"TARGET_" + std::to_string(
n));
509 [&](boost::shared_ptr<FieldEntity> entity) {
510 auto values = entity->getEntFieldData();
511 for (
int c = 0;
c != 6; ++
c)
516 FieldRequest request;
517 request.source.bit = source_bit;
518 request.target.bit = target_bit | copy_bit;
519 request.options.quadratureOrder = 6;
520 for (
int n : {1, 3, 5, 6})
521 request.maps.push_back(
522 {
"SOURCE_" + std::to_string(
n),
"TARGET_" + std::to_string(
n)});
523 request.maps.push_back({
"MEMORY",
"MEMORY"});
525 const std::string app_name =
"APPLICATION";
527 std::set<std::string> projection_fields{
"MEMORY"};
528 for (
int n : {1, 3, 5, 6}) {
529 projection_fields.insert(
"SOURCE_" + std::to_string(
n));
530 projection_fields.insert(
"TARGET_" + std::to_string(
n));
532 for (
const auto &
name : projection_fields) {
538 all_cells.merge(target_support);
539 CHKERR field.add_ents_to_finite_element_by_dim(all_cells,
D, app_name);
545 source_bit | target_bit | missing_bit | copy_bit);
551 request.elementName = app_name;
557 CHKERR VecCopy(app_solution, app_before);
559 const auto fe_count =
field.get_finite_elements()->size();
560 const auto ent_fe_count =
field.get_ents_finite_elements()->size();
564 CHKERR mb.get_entities_by_handle(0, baseline);
566 for (
int repeat = 0; repeat != 3; ++repeat) {
568 CHKERR require(
report.missingPoints == 0,
"Unexpected missing points");
571 "Wrong local target count");
572 for (
const auto &r :
report.items)
573 CHKERR require(
r.relativeMassResidual < 2.e-10,
574 "Field mass residual is too large");
575 CHKERR require(
field.get_finite_elements()->size() == fe_count,
576 "Private FE definitions leaked");
577 CHKERR require(
field.get_ents_finite_elements()->size() == ent_fe_count,
578 "Private entity FE records leaked");
580 "Projection changed the database build state");
582 CHKERR mb.get_entities_by_handle(0, after);
583 CHKERR require(after == baseline,
"Private mesh entities leaked");
586 auto roundtrip = request;
587 roundtrip.source.bit = target_bit;
588 roundtrip.target.bit = copy_bit;
589 for (
auto &[source_name, target_name] : roundtrip.maps)
590 source_name = target_name;
593 FieldRequest identity;
594 identity.dm = app_dm;
595 identity.elementName = app_name;
596 identity.source.bit = source_bit;
597 identity.target.bit = source_bit;
598 identity.options.quadratureOrder = 6;
599 identity.maps = {{
"MEMORY",
"MEMORY"}};
603 using Expected = boost::function<
double(
const double *,
int,
bool)>;
607 const std::string
name =
"CHECK_PROJECTION";
610 for (
const auto &[source_name, target_name] : request.maps) {
627 for (
auto it = check_elements.begin();
it != check_elements.end();)
629 check_elements.modify(
631 "Could not number verification cells");
633 auto fe = boost::make_shared<Element>(
field);
635 auto add_check = [&]<
int N>(std::string target_name,
bool constant) {
636 auto values = boost::make_shared<MatrixDouble>();
639 auto check =
new UDO(
NOSPACE, UDO::OPSPACE);
640 check->doWorkRhsHook = [
values, constant, expected](
644 auto op =
static_cast<UDO *
>(
base);
645 const auto &coords = op->getCoordsAtGaussPts();
646 for (
size_t q = 0;
q != coords.size1(); ++
q)
647 for (
int c = 0;
c !=
N; ++
c)
649 expected(&coords(
q, 0),
c, constant),
650 "Projected field differs from analytical "
656 add_check.template operator()<1>(
"TARGET_1",
false);
657 add_check.template operator()<3>(
"TARGET_3",
false);
658 add_check.template operator()<5>(
"TARGET_5",
false);
659 add_check.template operator()<6>(
"TARGET_6",
false);
660 add_check.template operator()<6>(
"MEMORY",
true);
668 const Expected analytical = [](
const double *x,
int c,
bool constant) {
669 return constant ? 7. * (
c + 1) : affine(x,
c);
673 CHKERR check_fields(checked, target_bit | copy_bit, analytical);
674 auto reject = [&](FieldRequest bad) {
676 CHKERR PetscPushErrorHandler(PetscReturnErrorHandler,
nullptr);
678 CHKERR PetscPopErrorHandler();
679 CHKERR require(error != 0,
"Invalid projection request was accepted");
680 CHKERR require(
field.get_ents_finite_elements()->size() == ent_fe_count,
681 "Private entity FE records leaked");
683 CHKERR mb.get_entities_by_handle(0, after);
684 CHKERR require(after == baseline,
685 "Failed projection leaked private entities");
689 bad.options.quadratureOrder = -1;
692 bad.maps[0].first =
"DOES_NOT_EXIST";
695 bad.maps.push_back(bad.maps[0]);
698 bad.maps[0].second =
"SOURCE_1";
701 bad.source.bit.reset();
708 bad.maps[0].second =
"TARGET_3";
711 for (
int n : {1, 3, 5, 6})
713 [&](boost::shared_ptr<FieldEntity> entity) {
715 if (entity->getEntType() == MBVERTEX) {
717 const auto e = entity->getEnt();
719 const auto values = entity->getEntFieldData();
720 for (
int c = 0;
c !=
n; ++
c)
722 "Source coefficients changed");
726 "SOURCE_" + std::to_string(
n));
728 for (
const auto &[source_name, target_name] : request.maps)
732 for (
double value : entity->getEntFieldData())
733 CHKERR require(value == -99.,
734 "Failed projection modified target data");
737 target_name, &missing);
739 for (
double empty : {.25, std::numeric_limits<double>::quiet_NaN()}) {
740 auto partial = request;
741 partial.target.bit = target_bit | missing_bit;
742 partial.options.emptyValue =
empty;
747 "Uncovered points were not counted");
750 "Empty rank returned a nonlocal report");
752 CHKERR check_fields(missing, missing_bit,
753 [
empty](
const double *,
int,
bool) {
return empty; });
755 if (
field.get_comm_size() > 1) {
756 auto differing_options = request;
757 if (
field.get_comm_rank()) {
758 differing_options.options.quadratureOrder = 10;
759 differing_options.options.emptyValue = 1.;
766 PetscBool app_unchanged;
767 CHKERR VecEqual(app_solution, app_before, &app_unchanged);
768 CHKERR require(app_unchanged,
"Application vector changed during projection");
769 CHKERR require(
field.check_finite_element(app_name) &&
770 field.check_problem(app_name),
771 "Application FE/problem was removed");
773 app_solution.reset();
775 const std::string tag_element =
"TAG_PROJECTION";
777 CHKERR field.add_ents_to_finite_element_by_dim(all_cells,
D, tag_element);
782 source_bit | target_bit | missing_bit | copy_bit);
788 source_bit, target_bit, copy_bit);
792 auto source_only = request;
796 const auto edges = source_all.subset_by_dimension(1);
798 closure_only.insert(*edges.begin());
799 CHKERR bits->setBitRefLevel(closure_only, source_only.target.bit,
false);
803 "Empty target returned field results");
804 TagRequest source_only_tags;
805 source_only_tags.dm = app_dm;
806 source_only_tags.elementName = app_name;
807 source_only_tags.source.bit = source_bit;
808 source_only_tags.target.bit = source_only.target.bit;
809 source_only_tags.options.quadratureOrder = 6;
810 source_only_tags.options.sourceRule = standardRule(4);
811 source_only_tags.options.targetRule = standardRule(3);
812 source_only_tags.maps = {{{
"TAG_1",
"TAG_1_OUT"}}, 1};
813 TagResult source_only_report;
815 CHKERR require(source_only_report.targetElements == 0 &&
816 source_only_report.items.empty(),
817 "Empty target returned tag results");
818 auto no_source = request;
819 no_source.source.bit = source_only.target.bit;
820 no_source.options.emptyValue = .25;
825 "Empty source did not mark every target point missing");
827 [](
const double *,
int,
bool) {
return .25; });
832 <<
"DG projection interface " <<
D <<
"D, empty ranks=" << empty_ranks
833 <<
", shared copies=" << shared_copies
834 <<
", ghost source=" << ghost_source <<
": PASS";
839int main(
int argc,
char **argv) {
841 "DGProjectionInterface atom tests");
847 CHKERR runCase<2>(
false,
true);
848 CHKERR runCase<3>(
false,
true);
849 CHKERR runCase<2>(
false,
false,
true);
850 CHKERR runCase<3>(
false,
false,
true);
CGALInterfaceImpl & owner
std::vector< int > created
std::vector< int > source
std::vector< int > vertices
bool closure
The face (f0, f1, w) closes a corner at f0 or f1.
std::vector< Cell > cells
int components
Inferred from the source tag length.
std::vector< double > empty
One value per component.
SmartPetscObj< Vec > work
SmartPetscObj< Vec > values
boost::shared_ptr< ConstrainMatrixCtx > projection
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ L2
field with C-1 continuity
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_ATOM_TEST_INVALID
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PetscErrorCode DMMoFEMSetIsPartitioned(DM dm, PetscBool is_partitioned)
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
PetscErrorCode DMMoFEMCreateMoFEM(DM dm, MoFEM::Interface *m_field_ptr, const char problem_name[], const MoFEM::BitRefLevel bit_level, const MoFEM::BitRefLevel bit_mask=MoFEM::BitRefLevel().set())
Must be called by user to set MoFEM data structures.
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode, RowColData rc=RowColData::COL)
set local (or ghosted) vector values on mesh for partition only
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
auto createDMVector(DM dm, RowColData rc=RowColData::COL)
Get smart vector from DM.
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.
#define MOFEM_LOG(channel, severity)
Log.
MoFEMErrorCode buildProblem(const std::string name, const bool square_matrix, int verb=VERBOSE)
build problem data structures
const double c
speed of light (cm/ns)
const double v
phase velocity of light in medium (cm/ns)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
PetscErrorCode DMMoFEMSetDestroyProblem(DM dm, PetscBool destroy_problem)
SmartPetscObj< Vec > vectorDuplicate(Vec vec)
Create duplicate vector of smart vector.
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
int & getBuildMoFEM() const
Get flags/semaphores for different stages.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
base operator to do operations at Gauss Pt. level
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
MoFEMErrorCode fieldLambdaOnEntities(OneFieldFunctionOnEntities lambda, const std::string field_name, Range *ents_ptr=nullptr)
field lambda
Struct keeps handle to entity in the field.
structure to get information from mofem into EntitiesFieldData
MatrixDouble gaussPts
Matrix of integration points.
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
GaussHookFun setRuleHook
Set function to calculate integration rule.
RuleHookFun getRuleHook
Hook to get rule.
Change finite element part.
Specialization for MatrixDouble vector field values calculation.
Template struct for dimension-specific finite element types.
keeps basic data about problem
boost::shared_ptr< NumeredEntFiniteElement_multiIndex > numeredFiniteElementsPtr
store finite elements
Problem manager is used to build and partition problems.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Volume finite element base.