|
| v0.14.0
|
Construct index sets for MoFEM problems.
More...
|
MoFEMErrorCode | MoFEM::ISManager::sectionCreate (const std::string problem_name, PetscSection *s, const RowColData row_col=COL) const |
| Create global selection. More...
|
|
SmartPetscObj< PetscSection > | MoFEM::ISManager::sectionCreate (const std::string problem_name, const RowColData row_col=COL) const |
| Create global selection. More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateProblemOrder (const std::string problem_name, RowColData rc, int min_order, int max_order, IS *is) const |
| create IS for given order range (collective) More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateProblemFieldAndRank (const std::string problem_name, RowColData rc, const std::string field, int min_coeff_idx, int max_coeff_idx, IS *is, Range *ents=nullptr) const |
| create IS for given problem, field and rank range (collective) More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateProblemFieldAndRank (const std::string problem_name, RowColData rc, const std::string field, int min_coeff_idx, int max_coeff_idx, SmartPetscObj< IS > &smart_is, Range *ents=nullptr) const |
| IS for given problem, field and rank range (collective) More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateProblemFieldAndRankLocal (const std::string problem_name, RowColData rc, const std::string field, int min_coeff_idx, int max_coeff_idx, IS *is, Range *ents=nullptr) const |
| create IS for given problem, field and rank range (collective) More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateProblemFieldAndRankLocal (const std::string problem_name, RowColData rc, const std::string field, int min_coeff_idx, int max_coeff_idx, SmartPetscObj< IS > &smart_is, Range *ents=nullptr) const |
| IS for given problem, field and rank range (collective) More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateProblemFieldAndEntityType (const std::string problem_name, RowColData rc, const std::string field, EntityType low_type, EntityType hi_type, int min_coeff_idx, int max_coeff_idx, IS *is, Range *ents=nullptr) const |
| create IS for given problem, field and type range (collective) More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateFromProblemFieldToOtherProblemField (const std::string x_problem, const std::string x_field_name, RowColData x_rc, const std::string y_problem, const std::string y_field_name, RowColData y_rc, std::vector< int > &idx, std::vector< int > &idy) const |
| create IS for give two problems and field More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateFromProblemFieldToOtherProblemField (const std::string x_problem, const std::string x_field_name, RowColData x_rc, const std::string y_problem, const std::string y_field_name, RowColData y_rc, IS *ix, IS *iy) const |
| create IS for give two problems and field More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateFromProblemToOtherProblem (const std::string x_problem, RowColData x_rc, const std::string y_problem, RowColData y_rc, std::vector< int > &idx, std::vector< int > &idy) const |
| Create is from one problem to other problem. More...
|
|
MoFEMErrorCode | MoFEM::ISManager::isCreateFromProblemToOtherProblem (const std::string x_problem, RowColData x_rc, const std::string y_problem, RowColData y_rc, IS *ix, IS *iy) const |
| Create is from one problem to other problem. More...
|
|
Construct index sets for MoFEM problems.
◆ isCreateFromProblemFieldToOtherProblemField() [1/2]
MoFEMErrorCode MoFEM::ISManager::isCreateFromProblemFieldToOtherProblemField |
( |
const std::string |
x_problem, |
|
|
const std::string |
x_field_name, |
|
|
RowColData |
x_rc, |
|
|
const std::string |
y_problem, |
|
|
const std::string |
y_field_name, |
|
|
RowColData |
y_rc, |
|
|
IS * |
ix, |
|
|
IS * |
iy |
|
) |
| const |
create IS for give two problems and field
Indices are sorted by global PETSc index in problem_x.
- Parameters
-
x_problem | name of problem |
x_field_name | name of field in problem_x |
x_rc | that is ROW or COL |
y_problem | name of problem |
y_field_name | name of field in problem_y |
y_rc | that is ROW or COL |
- Return values
-
ix | IS indexes in problem_x (can be PETSC_NULL) |
iy | IS indexes in problem_y |
Definition at line 570 of file ISManager.cpp.
576 std::vector<int> idx(0), idy(0);
578 x_problem, x_field_name, x_rc, y_problem, y_field_name, y_rc, idx, idy);
579 if (ix != PETSC_NULL) {
581 PETSC_COPY_VALUES, ix);
584 PETSC_COPY_VALUES, iy);
586 ISView(*ix, PETSC_VIEWER_STDOUT_WORLD);
587 ISView(*iy, PETSC_VIEWER_STDOUT_WORLD);
◆ isCreateFromProblemFieldToOtherProblemField() [2/2]
MoFEMErrorCode MoFEM::ISManager::isCreateFromProblemFieldToOtherProblemField |
( |
const std::string |
x_problem, |
|
|
const std::string |
x_field_name, |
|
|
RowColData |
x_rc, |
|
|
const std::string |
y_problem, |
|
|
const std::string |
y_field_name, |
|
|
RowColData |
y_rc, |
|
|
std::vector< int > & |
idx, |
|
|
std::vector< int > & |
idy |
|
) |
| const |
create IS for give two problems and field
Note that indices are ordered in ascending order of local indices in problem_y
- Parameters
-
x_problem | name of problem |
x_field_name | name of field in problem_x |
x_rc | that is ROW or COL |
y_problem | name of problem |
y_field_name | name of field in problem_y |
y_rc | that is ROW or COL |
- Return values
-
idx | indexes in problem_x |
idy | indexes in problem_y |
Definition at line 467 of file ISManager.cpp.
473 const Problem *px_ptr;
474 const Problem *py_ptr;
480 typedef multi_index_container<
481 boost::shared_ptr<NumeredDofEntity>,
488 tag<Composite_Ent_And_EntDofIdx_mi_tag>,
497 NumeredDofEntity_view_multiIndex;
499 NumeredDofEntity_view_multiIndex dofs_view;
507 px_ptr->numeredRowDofsPtr->get<Unique_mi_tag>().lower_bound(
509 px_ptr->numeredRowDofsPtr->get<Unique_mi_tag>().upper_bound(
515 px_ptr->numeredColDofsPtr->get<Unique_mi_tag>().lower_bound(
517 px_ptr->numeredColDofsPtr->get<Unique_mi_tag>().upper_bound(
522 "only makes sense for ROWS and COLS");
525 decltype(py_ptr->numeredRowDofsPtr) dofs_ptr;
528 dofs_ptr = py_ptr->numeredRowDofsPtr;
531 dofs_ptr = py_ptr->numeredColDofsPtr;
535 "only makes sense for ROWS and COLS");
538 std::map<int, int> global_dofs_map;
540 auto dit = dofs_ptr->get<Unique_mi_tag>().lower_bound(
542 auto hi_dit = dofs_ptr->get<Unique_mi_tag>().upper_bound(
545 for (; dit != hi_dit; ++dit) {
546 if ((*dit)->getPart() == rank) {
547 auto x_dit = dofs_view.get<Composite_Ent_And_EntDofIdx_mi_tag>().find(
548 boost::make_tuple((*dit)->getEnt(), (*dit)->getEntDofIdx()));
549 if (x_dit != dofs_view.get<Composite_Ent_And_EntDofIdx_mi_tag>().end()) {
550 global_dofs_map[(*x_dit)->getPetscGlobalDofIdx()] =
551 (*dit)->getPetscGlobalDofIdx();
556 idx.resize(global_dofs_map.size());
557 idy.resize(global_dofs_map.size());
559 auto ix = idx.begin();
560 auto iy = idy.begin();
561 for (
auto mit = global_dofs_map.begin(); mit != global_dofs_map.end();
◆ isCreateFromProblemToOtherProblem() [1/2]
MoFEMErrorCode MoFEM::ISManager::isCreateFromProblemToOtherProblem |
( |
const std::string |
x_problem, |
|
|
RowColData |
x_rc, |
|
|
const std::string |
y_problem, |
|
|
RowColData |
y_rc, |
|
|
IS * |
ix, |
|
|
IS * |
iy |
|
) |
| const |
Create is from one problem to other problem.
- Parameters
-
x_problem | |
x_rc | |
y_problem | |
y_rc | |
ix | |
iy | |
- Returns
- MoFEMErrorCode
Definition at line 645 of file ISManager.cpp.
650 std::vector<int> idx(0), idy(0);
654 PETSC_COPY_VALUES, ix);
656 PETSC_COPY_VALUES, iy);
658 ISView(*ix, PETSC_VIEWER_STDOUT_WORLD);
659 ISView(*iy, PETSC_VIEWER_STDOUT_WORLD);
◆ isCreateFromProblemToOtherProblem() [2/2]
MoFEMErrorCode MoFEM::ISManager::isCreateFromProblemToOtherProblem |
( |
const std::string |
x_problem, |
|
|
RowColData |
x_rc, |
|
|
const std::string |
y_problem, |
|
|
RowColData |
y_rc, |
|
|
std::vector< int > & |
idx, |
|
|
std::vector< int > & |
idy |
|
) |
| const |
Create is from one problem to other problem.
- Parameters
-
x_problem | |
x_rc | |
y_problem | |
y_rc | |
idx | |
idy | |
- Returns
- MoFEMErrorCode
Definition at line 592 of file ISManager.cpp.
596 const Problem *px_ptr;
597 const Problem *py_ptr;
601 NumeredDofEntityByLocalIdx::iterator y_dit, hi_y_dit;
605 py_ptr->numeredRowDofsPtr->get<PetscLocalIdx_mi_tag>().lower_bound(0);
607 py_ptr->numeredRowDofsPtr->get<PetscLocalIdx_mi_tag>().lower_bound(
608 py_ptr->getNbLocalDofsRow());
612 py_ptr->numeredColDofsPtr->get<PetscLocalIdx_mi_tag>().lower_bound(0);
614 py_ptr->numeredColDofsPtr->get<PetscLocalIdx_mi_tag>().lower_bound(
615 py_ptr->getNbLocalDofsCol());
623 x_numered_dofs_by_uid = &(px_ptr->numeredRowDofsPtr->get<Unique_mi_tag>());
626 x_numered_dofs_by_uid = &(px_ptr->numeredColDofsPtr->get<Unique_mi_tag>());
631 for (; y_dit != hi_y_dit; y_dit++) {
632 if ((*y_dit)->getPart() != (
unsigned int)m_field.
get_comm_rank()) {
635 NumeredDofEntityByUId::iterator x_dit;
636 x_dit = x_numered_dofs_by_uid->find((*y_dit)->getLocalUniqueId());
637 if (x_dit == x_numered_dofs_by_uid->end())
639 idx.push_back((*x_dit)->getPetscGlobalDofIdx());
640 idy.push_back((*y_dit)->getPetscGlobalDofIdx());
◆ isCreateProblemFieldAndEntityType()
MoFEMErrorCode MoFEM::ISManager::isCreateProblemFieldAndEntityType |
( |
const std::string |
problem_name, |
|
|
RowColData |
rc, |
|
|
const std::string |
field, |
|
|
EntityType |
low_type, |
|
|
EntityType |
hi_type, |
|
|
int |
min_coeff_idx, |
|
|
int |
max_coeff_idx, |
|
|
IS * |
is, |
|
|
Range * |
ents = nullptr |
|
) |
| const |
create IS for given problem, field and type range (collective)
- Parameters
-
problem | |
rc | |
field | |
low_type | |
hi_type | |
min_coeff_idx | |
max_coeff_idx | |
is | |
ents | |
- Returns
- MoFEMErrorCode
Definition at line 449 of file ISManager.cpp.
457 for (; low_type <= hi_type; ++low_type)
458 CHKERR m_field.
get_moab().get_entities_by_type(field_meshset, low_type,
461 ents = intersect(ents, *ents_ptr);
463 max_coeff_idx, is, &ents);
◆ isCreateProblemFieldAndRank() [1/2]
MoFEMErrorCode MoFEM::ISManager::isCreateProblemFieldAndRank |
( |
const std::string |
problem_name, |
|
|
RowColData |
rc, |
|
|
const std::string |
field, |
|
|
int |
min_coeff_idx, |
|
|
int |
max_coeff_idx, |
|
|
IS * |
is, |
|
|
Range * |
ents = nullptr |
|
) |
| const |
create IS for given problem, field and rank range (collective)
- Parameters
-
problem | name |
rc | ROW or COL |
field | name |
min_coeff_idx | |
max_coeff_idx | |
ents | if not null get dofs only on given entities |
- Return values
-
Definition at line 265 of file ISManager.cpp.
269 const Problem *problem_ptr;
275 DofsByUId::iterator it, hi_it;
279 nb_loc_dofs = problem_ptr->getNbLocalDofsRow();
280 it = problem_ptr->numeredRowDofsPtr->get<Unique_mi_tag>().lower_bound(
282 hi_it = problem_ptr->numeredRowDofsPtr->get<Unique_mi_tag>().upper_bound(
286 nb_loc_dofs = problem_ptr->getNbLocalDofsCol();
287 it = problem_ptr->numeredColDofsPtr->get<Unique_mi_tag>().lower_bound(
289 hi_it = problem_ptr->numeredColDofsPtr->get<Unique_mi_tag>().upper_bound(
296 std::vector<int> idx_vec;
297 idx_vec.reserve(std::distance(it, hi_it));
298 for (; it != hi_it; ++it) {
300 auto true_if_dof_on_entity = [&]() {
302 return ents_ptr->find((*it)->getEnt()) != ents_ptr->end();
309 const auto coeff_idx = (*it)->getDofCoeffIdx();
312 (*it)->getPetscLocalDofIdx() >= nb_loc_dofs ||
314 coeff_idx < min_coeff_idx || coeff_idx > max_coeff_idx
323 if (true_if_dof_on_entity()) {
324 idx_vec.emplace_back((*it)->getPetscGlobalDofIdx());
330 CHKERR PetscMalloc(idx_vec.size() *
sizeof(
int), &
id);
331 std::copy(idx_vec.begin(), idx_vec.end(),
id);
333 PETSC_OWN_POINTER, is);
◆ isCreateProblemFieldAndRank() [2/2]
MoFEMErrorCode MoFEM::ISManager::isCreateProblemFieldAndRank |
( |
const std::string |
problem_name, |
|
|
RowColData |
rc, |
|
|
const std::string |
field, |
|
|
int |
min_coeff_idx, |
|
|
int |
max_coeff_idx, |
|
|
SmartPetscObj< IS > & |
smart_is, |
|
|
Range * |
ents = nullptr |
|
) |
| const |
IS for given problem, field and rank range (collective)
- Parameters
-
problem | name |
rc | ROW or COL |
field | name |
min_coeff_idx | |
max_coeff_idx | |
ents | if not null get dofs only on given entities |
- Return values
-
Definition at line 338 of file ISManager.cpp.
345 max_coeff_idx, &is, ents_ptr);
346 smart_is = SmartPetscObj<IS>(is);
◆ isCreateProblemFieldAndRankLocal() [1/2]
MoFEMErrorCode MoFEM::ISManager::isCreateProblemFieldAndRankLocal |
( |
const std::string |
problem_name, |
|
|
RowColData |
rc, |
|
|
const std::string |
field, |
|
|
int |
min_coeff_idx, |
|
|
int |
max_coeff_idx, |
|
|
IS * |
is, |
|
|
Range * |
ents = nullptr |
|
) |
| const |
create IS for given problem, field and rank range (collective)
- Parameters
-
problem | name |
rc | ROW or COL |
field | name |
min_coeff_idx | |
max_coeff_idx | |
ents | if not null get dofs only on given entities |
- Return values
-
Definition at line 350 of file ISManager.cpp.
354 const Problem *problem_ptr;
359 auto get_low_hi_uid = [&]() {
364 auto get_low_hi_uid_by_entities = [&](
auto f,
auto s) {
369 auto get_low_hi = [&](
auto lo_uid,
auto hi_uid) {
371 DofsByUId::iterator it, hi_it;
374 it = problem_ptr->numeredRowDofsPtr->get<Unique_mi_tag>().lower_bound(
376 hi_it = problem_ptr->numeredRowDofsPtr->get<Unique_mi_tag>().upper_bound(
380 it = problem_ptr->numeredColDofsPtr->get<Unique_mi_tag>().lower_bound(
382 hi_it = problem_ptr->numeredColDofsPtr->get<Unique_mi_tag>().upper_bound(
388 return std::make_pair(it, hi_it);
391 auto check = [&](
auto it) {
392 const auto coeff_idx = (*it)->getDofCoeffIdx();
395 coeff_idx < min_coeff_idx || coeff_idx > max_coeff_idx
403 auto emplace_indices = [&](
auto it,
auto hi_it,
auto &idx_vec) {
404 for (; it != hi_it; ++it) {
406 idx_vec.emplace_back((*it)->getPetscLocalDofIdx());
410 auto [lo_uid, hi_uid] = get_low_hi_uid();
411 auto [lo, hi] = get_low_hi(lo_uid, hi_uid);
412 std::vector<int> idx_vec;
413 idx_vec.reserve(std::distance(lo, hi));
416 for (
auto pit = ents_ptr->const_pair_begin();
417 pit != ents_ptr->const_pair_end(); ++pit) {
418 auto [lo_uid, hi_uid] =
419 get_low_hi_uid_by_entities(pit->first, pit->second);
420 auto [lo, hi] = get_low_hi(lo_uid, hi_uid);
421 emplace_indices(lo, hi, idx_vec);
424 emplace_indices(lo, hi, idx_vec);
428 CHKERR PetscMalloc(idx_vec.size() *
sizeof(
int), &
id);
429 std::copy(idx_vec.begin(), idx_vec.end(),
id);
430 CHKERR ISCreateGeneral(PETSC_COMM_SELF, idx_vec.size(),
id, PETSC_OWN_POINTER,
◆ isCreateProblemFieldAndRankLocal() [2/2]
MoFEMErrorCode MoFEM::ISManager::isCreateProblemFieldAndRankLocal |
( |
const std::string |
problem_name, |
|
|
RowColData |
rc, |
|
|
const std::string |
field, |
|
|
int |
min_coeff_idx, |
|
|
int |
max_coeff_idx, |
|
|
SmartPetscObj< IS > & |
smart_is, |
|
|
Range * |
ents = nullptr |
|
) |
| const |
IS for given problem, field and rank range (collective)
- Parameters
-
problem | name |
rc | ROW or COL |
field | name |
min_coeff_idx | |
max_coeff_idx | |
ents | if not null get dofs only on given entities |
- Return values
-
Definition at line 436 of file ISManager.cpp.
443 min_coeff_idx, max_coeff_idx, &is,
445 smart_is = SmartPetscObj<IS>(is);
◆ isCreateProblemOrder()
MoFEMErrorCode MoFEM::ISManager::isCreateProblemOrder |
( |
const std::string |
problem_name, |
|
|
RowColData |
rc, |
|
|
int |
min_order, |
|
|
int |
max_order, |
|
|
IS * |
is |
|
) |
| const |
create IS for given order range (collective)
- Parameters
-
problem | name |
rc | ROW or COL |
min_order | |
max_order | |
- Return values
-
Definition at line 197 of file ISManager.cpp.
201 const Problem *problem_ptr;
205 typedef multi_index_container<
206 boost::shared_ptr<NumeredDofEntity>,
218 NumeredDofEntity_order_view_multiIndex;
222 NumeredDofEntity_order_view_multiIndex dofs_by_order;
223 auto insert_part_range = [&dofs_by_order, rank](
auto &dofs) {
224 dofs_by_order.insert(dofs_by_order.end(), dofs.lower_bound(rank),
225 dofs.upper_bound(rank));
230 insert_part_range(problem_ptr->numeredRowDofsPtr->get<Part_mi_tag>());
233 insert_part_range(problem_ptr->numeredColDofsPtr->get<Part_mi_tag>());
239 auto lo = dofs_by_order.get<Order_mi_tag>().lower_bound(min_order);
240 auto hi = dofs_by_order.get<Order_mi_tag>().upper_bound(max_order);
241 const int size = std::distance(lo, hi);
243 CHKERR PetscMalloc(size *
sizeof(
int), &
id);
245 for (; lo != hi; ++lo, ++id_it)
246 *id_it = (*lo)->getPetscGlobalDofIdx();
249 CHKERR ISCreateGeneral(PETSC_COMM_WORLD, size,
id, PETSC_OWN_POINTER, is);
◆ sectionCreate() [1/2]
SmartPetscObj< PetscSection > MoFEM::ISManager::sectionCreate |
( |
const std::string |
problem_name, |
|
|
const RowColData |
row_col = COL |
|
) |
| const |
Create global selection.
Create section for given problem, such that points are sorted by UId, and number of dofs on point is equal to number of dofs on entity
It takes all fields
- Parameters
-
problem_name | |
fields_list | |
s | |
row_col | ROE or COL, default is ROW |
- Returns
- error code
Definition at line 140 of file ISManager.cpp.
145 "Section not created");
146 return SmartPetscObj<PetscSection>(s,
false);
◆ sectionCreate() [2/2]
MoFEMErrorCode MoFEM::ISManager::sectionCreate |
( |
const std::string |
problem_name, |
|
|
PetscSection * |
s, |
|
|
const RowColData |
row_col = COL |
|
) |
| const |
Create global selection.
Create section for given problem, such that points are sorted by UId, and number of dofs on point is equal to number of dofs on entity
It takes all fields
- Parameters
-
problem_name | |
fields_list | |
s | |
row_col | ROE or COL, default is ROW |
- Returns
- error code
Definition at line 20 of file ISManager.cpp.
24 const Problem *problem_ptr = m_field.
get_problem(problem_name);
28 boost::shared_ptr<NumeredDofEntity_multiIndex> dofs;
32 dofs = problem_ptr->numeredRowDofsPtr;
33 for (
auto fit = fe_ptr->begin(); fit != fe_ptr->end(); fit++) {
34 if ((fit->get()->getId() & problem_ptr->getBitFEId()).any()) {
35 fields_ids |= fit->get()->getBitFieldIdRow();
40 dofs = problem_ptr->numeredColDofsPtr;
41 for (
auto fit = fe_ptr->begin(); fit != fe_ptr->end(); fit++) {
42 if ((fit->get()->getId() & problem_ptr->getBitFEId()).any()) {
43 fields_ids |= fit->get()->getBitFieldIdCol();
49 "Has to be ROW or COLUMN");
52 map<std::string, std::pair<int, int>> fields_map;
55 for (
auto fit = fields_ptr->begin(); fit != fields_ptr->end(); fit++) {
56 if ((fit->get()->getId() & fields_ids).any()) {
57 fields_map[fit->get()->getName()].first = field++;
58 fields_map[fit->get()->getName()].second = fit->get()->getNbOfCoeffs();
63 CHKERR PetscSectionCreate(PETSC_COMM_WORLD, s);
64 CHKERR PetscSectionSetNumFields(*s, fields_map.size());
65 for (
auto mit = fields_map.begin(); mit != fields_map.end(); mit++) {
66 CHKERR PetscSectionSetFieldName(*s, mit->second.first, mit->first.c_str());
67 CHKERR PetscSectionSetFieldComponents(*s, mit->second.first,
73 auto dit = dofs->begin();
74 auto hi_dit = dofs->end();
75 for (; dit != hi_dit;) {
76 if (
static_cast<int>(dit->get()->getPart()) == proc) {
77 const auto &ent_uid = dit->get()->getEntLocalUniqueId();
78 while (dit != hi_dit && dit->get()->getEntLocalUniqueId() == ent_uid) {
89 CHKERR PetscLayoutCreate(PETSC_COMM_WORLD, &layout);
90 CHKERR PetscLayoutSetBlockSize(layout, 1);
91 CHKERR PetscLayoutSetLocalSize(layout, nb_charts);
92 CHKERR PetscLayoutSetUp(layout);
94 CHKERR PetscLayoutGetRange(layout, &rstart, &rend);
95 CHKERR PetscLayoutDestroy(&layout);
96 CHKERR PetscSectionSetChart(*s, rstart, rend);
100 auto dit = dofs->begin();
101 auto hi_dit = dofs->end();
103 for (; dit != hi_dit;) {
104 if (
static_cast<int>(dit->get()->getPart()) == proc) {
106 const auto &
field_name = dit->get()->getName();
109 const auto &ent_uid = dit->get()->getEntLocalUniqueId();
110 while (dit != hi_dit && dit->get()->getEntLocalUniqueId() == ent_uid) {
111 const DofIdx loc_idx = dit->get()->getPetscLocalDofIdx();
117 if (fields_map.find(
field_name) == fields_map.end()) {
118 MOFEM_LOG_C(
"SELF", Sev::warning,
"Warning: Field %s not found",
119 dit->get()->getName().c_str());
121 CHKERR PetscSectionAddDof(*s, point,
dd);
123 CHKERR PetscSectionSetFieldDof(*s, point, field,
dd);
134 CHKERR PetscSectionSetUp(*s);
MoFEMErrorCode isCreateProblemFieldAndRank(const std::string problem_name, RowColData rc, const std::string field, int min_coeff_idx, int max_coeff_idx, IS *is, Range *ents=nullptr) const
create IS for given problem, field and rank range (collective)
virtual MPI_Comm & get_comm() const =0
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
MoFEMErrorCode isCreateFromProblemFieldToOtherProblemField(const std::string x_problem, const std::string x_field_name, RowColData x_rc, const std::string y_problem, const std::string y_field_name, RowColData y_rc, std::vector< int > &idx, std::vector< int > &idy) const
create IS for give two problems and field
virtual FieldBitNumber get_field_bit_number(const std::string name) const =0
get field bit number
interface_DofEntity< DofEntity > interface_type_DofEntity
virtual int get_comm_rank() const =0
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
virtual const Problem * get_problem(const std::string problem_name) const =0
Get the problem object.
virtual const FiniteElement_multiIndex * get_finite_elements() const =0
Get the finite elements object.
virtual EntityHandle get_field_meshset(const std::string name) const =0
get field meshset
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Deprecated interface functions.
NumeredDofEntity_multiIndex::index< Unique_mi_tag >::type NumeredDofEntityByUId
Numbered DoF multi-index by UId.
#define CHKERR
Inline error check.
virtual moab::Interface & get_moab()=0
const MoFEM::Interface & cOre
#define MOFEM_LOG_C(channel, severity, format,...)
static UId getLoBitNumberUId(const FieldBitNumber bit_number)
EntityHandle getEnt() const
MoFEMErrorCode isCreateProblemFieldAndRankLocal(const std::string problem_name, RowColData rc, const std::string field, int min_coeff_idx, int max_coeff_idx, IS *is, Range *ents=nullptr) const
create IS for given problem, field and rank range (collective)
static UId getLoFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
constexpr auto field_name
virtual const Field_multiIndex * get_fields() const =0
Get the fields object.
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
int ApproximationOrder
Approximation on the entity.
ApproximationOrder getDofOrder() const
static UId getHiFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
@ MOFEM_DATA_INCONSISTENCY
static UId getHiBitNumberUId(const FieldBitNumber bit_number)
MoFEMErrorCode isCreateFromProblemToOtherProblem(const std::string x_problem, RowColData x_rc, const std::string y_problem, RowColData y_rc, std::vector< int > &idx, std::vector< int > &idy) const
Create is from one problem to other problem.
MoFEMErrorCode sectionCreate(const std::string problem_name, PetscSection *s, const RowColData row_col=COL) const
Create global selection.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
DofIdx getEntDofIdx() const