v0.9.1
ISManager.cpp
Go to the documentation of this file.
1 /** \file ISManager.cpp
2  * \brief IS creating
3  * \ingroup mofem_is_managers
4  */
5 
6 /* MoFEM is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
18  */
19 
20 namespace MoFEM {
21 
23  UnknownInterface **iface) const {
25  *iface = NULL;
26  if (uuid == IDD_MOFEMISManager) {
27  *iface = const_cast<ISManager *>(this);
29  }
30  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
32 }
33 
35  : cOre(const_cast<MoFEM::Core &>(core)), dEbug(false) {}
37 
38 MoFEMErrorCode ISManager::sectionCreate(const std::string &problem_name,
39  PetscSection *s,
40  const RowColData row_col) const {
41  const MoFEM::Interface &m_field = cOre;
42  const Problem *problem_ptr;
43  auto fields_ptr = m_field.get_fields();
44  auto fe_ptr = m_field.get_finite_elements();
46  CHKERR m_field.get_problem(problem_name, &problem_ptr);
47  boost::shared_ptr<NumeredDofEntity_multiIndex> dofs;
48  BitFieldId fields_ids;
49  switch (row_col) {
50  case ROW:
51  dofs = problem_ptr->numeredDofsRows;
52  for (FiniteElement_multiIndex::iterator fit = fe_ptr->begin();
53  fit != fe_ptr->end(); fit++) {
54  if ((fit->get()->getId() & problem_ptr->getBitFEId()).any()) {
55  fields_ids |= fit->get()->getBitFieldIdRow();
56  }
57  }
58  break;
59  case COL:
60  dofs = problem_ptr->numeredDofsCols;
61  for (FiniteElement_multiIndex::iterator fit = fe_ptr->begin();
62  fit != fe_ptr->end(); fit++) {
63  if ((fit->get()->getId() & problem_ptr->getBitFEId()).any()) {
64  fields_ids |= fit->get()->getBitFieldIdCol();
65  }
66  }
67  break;
68  default:
69  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
70  "Has to be ROW or COLUMN");
71  }
72  // get fields names on the problem
73  map<std::string, std::pair<int, int>> fields_map;
74  {
75  int field = 0;
76  for (Field_multiIndex::iterator fit = fields_ptr->begin();
77  fit != fields_ptr->end(); fit++) {
78  if ((fit->get()->getId() & fields_ids).any()) {
79  fields_map[fit->get()->getName()].first = field++;
80  fields_map[fit->get()->getName()].second = fit->get()->getNbOfCoeffs();
81  }
82  }
83  }
84  const int proc = m_field.get_comm_rank();
85  CHKERR PetscSectionCreate(PETSC_COMM_WORLD, s);
86  CHKERR PetscSectionSetNumFields(*s, fields_map.size());
87  for (map<std::string, std::pair<int, int>>::iterator mit = fields_map.begin();
88  mit != fields_map.end(); mit++) {
89  CHKERR PetscSectionSetFieldName(*s, mit->second.first, mit->first.c_str());
90  CHKERR PetscSectionSetFieldComponents(*s, mit->second.first,
91  mit->second.second);
92  }
93  // determine number of points
94  int nb_charts = 0;
95  {
96  NumeredDofEntity_multiIndex::iterator dit, hi_dit;
97  dit = dofs->begin();
98  hi_dit = dofs->end();
99  for (; dit != hi_dit;) {
100  EntityHandle ent = dit->get()->getEnt();
101  if (static_cast<int>(dit->get()->getPart()) == proc &&
102  dit->get()->getEntDofIdx() == 0) {
103  while (dit != hi_dit && ent == dit->get()->getEnt()) {
104  const int nb_of_dofs_on_ent = dit->get()->getNbDofsOnEnt();
105  for (int dd = 0; dd != nb_of_dofs_on_ent; dd++, dit++) {
106  }
107  }
108  ++nb_charts;
109  } else {
110  ++dit;
111  }
112  }
113  }
114  // get layout, i.e. chart
115  PetscLayout layout;
116  CHKERR PetscLayoutCreate(PETSC_COMM_WORLD, &layout);
117  CHKERR PetscLayoutSetBlockSize(layout, 1);
118  CHKERR PetscLayoutSetLocalSize(layout, nb_charts);
119  CHKERR PetscLayoutSetUp(layout);
120  int rstart, rend;
121  CHKERR PetscLayoutGetRange(layout, &rstart, &rend);
122  CHKERR PetscLayoutDestroy(&layout);
123  CHKERR PetscSectionSetChart(*s, rstart, rend);
124  // cerr << rstart << " " << rend << " " << proc << endl;
125  // loop of all dofs
126  {
127  NumeredDofEntity_multiIndex::iterator dit, hi_dit;
128  dit = dofs->begin();
129  hi_dit = dofs->end();
130  int point = rstart;
131  for (; dit != hi_dit;) {
132  EntityHandle ent = dit->get()->getEnt();
133  if (static_cast<int>(dit->get()->getPart()) == proc &&
134  dit->get()->getEntDofIdx() == 0) {
135  // exploit that does are continuously stored on entity
136  // that includes fields
137  while (dit != hi_dit && ent == dit->get()->getEnt()) {
138  const int nb_of_dofs_on_ent = dit->get()->getNbDofsOnEnt();
139  std::string field_name = dit->get()->getName();
140  if (fields_map.find(field_name) == fields_map.end()) {
141  PetscPrintf(PETSC_COMM_WORLD, "Warning: Field %s not found\n",
142  dit->get()->getName().c_str());
143  } else {
144  if (dit->get()->getEntDofIdx() != 0) {
145  cerr << **dit << endl;
146  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
147  "data inconsistency");
148  }
149  CHKERR PetscSectionAddDof(*s, point, nb_of_dofs_on_ent);
150  int field = fields_map.at(field_name).first;
151  CHKERR PetscSectionSetFieldDof(*s, point, field, nb_of_dofs_on_ent);
152  }
153  for (int dd = 0; dd != nb_of_dofs_on_ent; dd++, dit++) {
154  if (field_name != dit->get()->getName()) {
155  SETERRQ2(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
156  "field name inconsistency %s!=%s", field_name.c_str(),
157  dit->get()->getName().c_str());
158  }
159  }
160  // cerr << point << endl;
161  }
162  ++point;
163  } else {
164  ++dit;
165  }
166  }
167  }
168  // cerr << "done " << proc << endl;
169  CHKERR PetscSectionSetUp(*s);
170  // cerr << "end " << proc << endl;
172 }
173 
175  RowColData rc, int min_order,
176  int max_order, IS *is) const {
177  const MoFEM::Interface &m_field = cOre;
178  const Problem *problem_ptr;
180  CHKERR m_field.get_problem(problem, &problem_ptr);
181 
182  typedef multi_index_container<
183  boost::shared_ptr<NumeredDofEntity>,
184 
185  indexed_by<
186 
187  sequenced<>,
188 
189  ordered_non_unique<
190  tag<Order_mi_tag>,
193 
194  >>
195  NumeredDofEntity_order_view_multiIndex;
196 
197  const int rank = m_field.get_comm_rank();
198 
199  NumeredDofEntity_order_view_multiIndex dofs_part_view;
200  auto insert_part_range = [&dofs_part_view, rank](auto &dofs) {
201  dofs_part_view.insert(dofs_part_view.end(), dofs.lower_bound(rank),
202  dofs.upper_bound(rank));
203  };
204 
205  switch (rc) {
206  case ROW:
207  insert_part_range(problem_ptr->numeredDofsRows->get<Part_mi_tag>());
208  break;
209  case COL:
210  insert_part_range(problem_ptr->numeredDofsCols->get<Part_mi_tag>());
211  break;
212  default:
213  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
214  }
215 
216  auto lo = dofs_part_view.get<Order_mi_tag>().lower_bound(min_order);
217  auto hi = dofs_part_view.get<Order_mi_tag>().upper_bound(max_order);
218  const int size = std::distance(lo, hi);
219  int *id;
220  CHKERR PetscMalloc(size * sizeof(int), &id);
221  int *id_it = id;
222  for (; lo != hi; ++lo, ++id_it)
223  *id_it = (*lo)->getPetscGlobalDofIdx();
224  sort(id, &id[size]);
225 
226  CHKERR ISCreateGeneral(PETSC_COMM_WORLD, size, id, PETSC_OWN_POINTER, is);
227 
229 }
230 
232  const std::string &problem, RowColData rc, const std::string &field,
233  int min_coeff_idx, int max_coeff_idx, IS *is, Range *ents_ptr) const {
234  const MoFEM::Interface &m_field = cOre;
235  const Problem *problem_ptr;
237  CHKERR m_field.get_problem(problem, &problem_ptr);
238  typedef NumeredDofEntity_multiIndex::index<
239  Composite_Name_And_Part_mi_tag>::type DofsByNamePartAndCoeffIdx;
240  int rank = m_field.get_comm_rank();
241  DofsByNamePartAndCoeffIdx::iterator it, hi_it;
242  switch (rc) {
243  case ROW:
244  it = problem_ptr->numeredDofsRows->get<Composite_Name_And_Part_mi_tag>()
245  .lower_bound(boost::make_tuple(field, rank));
246  hi_it = problem_ptr->numeredDofsRows->get<Composite_Name_And_Part_mi_tag>()
247  .upper_bound(boost::make_tuple(field, rank));
248  break;
249  case COL:
250  it = problem_ptr->numeredDofsCols->get<Composite_Name_And_Part_mi_tag>()
251  .lower_bound(boost::make_tuple(field, rank));
252  hi_it = problem_ptr->numeredDofsCols->get<Composite_Name_And_Part_mi_tag>()
253  .upper_bound(boost::make_tuple(field, rank));
254  break;
255  default:
256  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
257  }
258 
260  dof_loc_idx_view;
261  {
262  // get min and max bound coefficient index
264  dofs_view_coeff_idx;
265  dofs_view_coeff_idx.insert(it, hi_it);
266  NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique::iterator vit,
267  hi_vit;
268  vit = dofs_view_coeff_idx.lower_bound(min_coeff_idx);
269  hi_vit = dofs_view_coeff_idx.upper_bound(max_coeff_idx);
270  // sort by local index
271  dof_loc_idx_view.insert(vit, hi_vit);
272  }
273 
274  auto true_if_dof_on_entity = [ents_ptr](auto &dof) {
275  if (ents_ptr) {
276  return ents_ptr->find(dof->get()->getEnt()) != ents_ptr->end();
277  } else {
278  return true;
279  }
280  };
281 
282  // create IS
283  NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique::iterator
284  vit,
285  hi_vit;
286  vit = dof_loc_idx_view.begin();
287  hi_vit = dof_loc_idx_view.end();
288  int size = std::distance(vit, hi_vit);
289  int *id;
290  CHKERR PetscMalloc(size * sizeof(int), &id);
291  int ii = 0;
292  for (; vit != hi_vit; vit++) {
293  if (true_if_dof_on_entity(vit)) {
294  id[ii++] = (*vit)->getPetscGlobalDofIdx();
295  }
296  }
297  CHKERR ISCreateGeneral(PETSC_COMM_WORLD, ii, id, PETSC_OWN_POINTER, is);
299 }
300 
302  const std::string &problem, RowColData rc, const std::string &field,
303  int min_coeff_idx, int max_coeff_idx, SmartPetscObj<IS> &smart_is,
304  Range *ents_ptr) const {
306  IS is;
307  CHKERR isCreateProblemFieldAndRank(problem, rc, field, min_coeff_idx,
308  max_coeff_idx, &is, ents_ptr);
309  smart_is = SmartPetscObj<IS>(is);
311 }
312 
314  const std::string &problem, RowColData rc, const std::string &field,
315  EntityType low_type, EntityType hi_type, int min_coeff_idx,
316  int max_coeff_idx, IS *is, Range *ents_ptr) const {
317  const MoFEM::Interface &m_field = cOre;
319  EntityHandle field_meshset = m_field.get_field_meshset(field);
320  Range ents;
321  for (; low_type <= hi_type; ++low_type)
322  CHKERR m_field.get_moab().get_entities_by_type(field_meshset, low_type,
323  ents, true);
324  if (ents_ptr)
325  ents = intersect(ents, *ents_ptr);
326  CHKERR isCreateProblemFieldAndRank(problem, rc, field, min_coeff_idx,
327  max_coeff_idx, is, &ents);
329 }
330 
332  const std::string &x_problem, const std::string &x_field_name,
333  RowColData x_rc, const std::string &y_problem,
334  const std::string &y_field_name, RowColData y_rc, std::vector<int> &idx,
335  std::vector<int> &idy) const {
336  const MoFEM::Interface &m_field = cOre;
337  const Problem *px_ptr;
338  const Problem *py_ptr;
340 
341  CHKERR m_field.get_problem(x_problem, &px_ptr);
342  CHKERR m_field.get_problem(y_problem, &py_ptr);
343 
344  typedef multi_index_container<
345  boost::shared_ptr<NumeredDofEntity>,
346 
347  indexed_by<
348 
349  sequenced<>,
350 
351  ordered_non_unique<
352  tag<Composite_Ent_And_EntDofIdx_mi_tag>,
353  composite_key<
359 
360  >>
361  NumeredDofEntity_view_multiIndex;
362 
363  NumeredDofEntity_view_multiIndex dofs_view;
364 
365  switch (x_rc) {
366  case ROW:
367  dofs_view.insert(
368  dofs_view.end(),
369  px_ptr->numeredDofsRows->get<FieldName_mi_tag>().lower_bound(
370  x_field_name),
371  px_ptr->numeredDofsRows->get<FieldName_mi_tag>().upper_bound(
372  x_field_name));
373  break;
374  case COL:
375  dofs_view.insert(
376  dofs_view.end(),
377  px_ptr->numeredDofsCols->get<FieldName_mi_tag>().lower_bound(
378  x_field_name),
379  px_ptr->numeredDofsCols->get<FieldName_mi_tag>().upper_bound(
380  x_field_name));
381  break;
382  default:
383  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
384  "only makes sense for ROWS and COLS");
385  }
386 
387  decltype(py_ptr->numeredDofsRows) dofs_ptr;
388  switch (y_rc) {
389  case ROW:
390  dofs_ptr = py_ptr->numeredDofsRows;
391  break;
392  case COL:
393  dofs_ptr = py_ptr->numeredDofsCols;
394  break;
395  default:
396  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
397  "only makes sense for ROWS and COLS");
398  }
399 
400  std::map<int, int> global_dofs_map;
401  for (auto r = dofs_ptr->get<Composite_Name_And_Part_mi_tag>().equal_range(
402  boost::make_tuple(y_field_name, m_field.get_comm_rank()));
403  r.first != r.second; ++r.first) {
404 
405  auto x_dit = dofs_view.get<Composite_Ent_And_EntDofIdx_mi_tag>().find(
406  boost::make_tuple((*r.first)->getEnt(), (*r.first)->getEntDofIdx()));
407  if (x_dit != dofs_view.get<Composite_Ent_And_EntDofIdx_mi_tag>().end()) {
408  global_dofs_map[(*x_dit)->getPetscGlobalDofIdx()] =
409  (*r.first)->getPetscGlobalDofIdx();
410  }
411  }
412 
413  idx.resize(global_dofs_map.size());
414  idy.resize(global_dofs_map.size());
415  {
416  auto ix = idx.begin();
417  auto iy = idy.begin();
418  for (auto mit = global_dofs_map.begin(); mit != global_dofs_map.end();
419  mit++, ix++, iy++) {
420  *ix = mit->first;
421  *iy = mit->second;
422  }
423  }
425 }
426 
428  const std::string &x_problem, const std::string &x_field_name,
429  RowColData x_rc, const std::string &y_problem,
430  const std::string &y_field_name, RowColData y_rc, IS *ix, IS *iy) const {
432  std::vector<int> idx(0), idy(0);
434  x_problem, x_field_name, x_rc, y_problem, y_field_name, y_rc, idx, idy);
435  if (ix != PETSC_NULL) {
436  CHKERR ISCreateGeneral(PETSC_COMM_WORLD, idx.size(), &idx[0],
437  PETSC_COPY_VALUES, ix);
438  }
439  CHKERR ISCreateGeneral(PETSC_COMM_WORLD, idy.size(), &idy[0],
440  PETSC_COPY_VALUES, iy);
441  if (dEbug) {
442  ISView(*ix, PETSC_VIEWER_STDOUT_WORLD);
443  ISView(*iy, PETSC_VIEWER_STDOUT_WORLD);
444  }
446 }
447 
449  const std::string &x_problem, RowColData x_rc, const std::string &y_problem,
450  RowColData y_rc, std::vector<int> &idx, std::vector<int> &idy) const {
451  const MoFEM::Interface &m_field = cOre;
452  const Problem *px_ptr;
453  const Problem *py_ptr;
455  CHKERR m_field.get_problem(x_problem, &px_ptr);
456  CHKERR m_field.get_problem(y_problem, &py_ptr);
457  NumeredDofEntityByLocalIdx::iterator y_dit, hi_y_dit;
458  switch (y_rc) {
459  case ROW:
460  y_dit = py_ptr->numeredDofsRows->get<PetscLocalIdx_mi_tag>().lower_bound(0);
461  hi_y_dit = py_ptr->numeredDofsRows->get<PetscLocalIdx_mi_tag>().lower_bound(
462  py_ptr->getNbLocalDofsRow()); // should be lower
463  break;
464  case COL:
465  y_dit = py_ptr->numeredDofsCols->get<PetscLocalIdx_mi_tag>().lower_bound(0);
466  hi_y_dit = py_ptr->numeredDofsCols->get<PetscLocalIdx_mi_tag>().lower_bound(
467  py_ptr->getNbLocalDofsCol()); // should be lower
468  break;
469  default:
470  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
471  }
472  const NumeredDofEntityByUId *x_numered_dofs_by_uid;
473  switch (x_rc) {
474  case ROW:
475  x_numered_dofs_by_uid = &(px_ptr->numeredDofsRows->get<Unique_mi_tag>());
476  break;
477  case COL:
478  x_numered_dofs_by_uid = &(px_ptr->numeredDofsCols->get<Unique_mi_tag>());
479  break;
480  default:
481  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
482  }
483  for (; y_dit != hi_y_dit; y_dit++) {
484  if ((*y_dit)->getPart() != (unsigned int)m_field.get_comm_rank()) {
485  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
486  }
487  NumeredDofEntityByUId::iterator x_dit;
488  x_dit = x_numered_dofs_by_uid->find((*y_dit)->getGlobalUniqueId());
489  if (x_dit == x_numered_dofs_by_uid->end())
490  continue;
491  idx.push_back((*x_dit)->getPetscGlobalDofIdx());
492  idy.push_back((*y_dit)->getPetscGlobalDofIdx());
493  }
495 }
496 
498  const std::string &x_problem, RowColData x_rc, const std::string &y_problem,
499  RowColData y_rc, IS *ix, IS *iy) const {
501  std::vector<int> idx(0), idy(0);
502  CHKERR isCreateFromProblemToOtherProblem(x_problem, x_rc, y_problem, y_rc,
503  idx, idy);
504  CHKERR ISCreateGeneral(PETSC_COMM_WORLD, idx.size(), &idx[0],
505  PETSC_COPY_VALUES, ix);
506  CHKERR ISCreateGeneral(PETSC_COMM_WORLD, idy.size(), &idy[0],
507  PETSC_COPY_VALUES, iy);
508  if (dEbug) {
509  ISView(*ix, PETSC_VIEWER_STDOUT_WORLD);
510  ISView(*iy, PETSC_VIEWER_STDOUT_WORLD);
511  }
513 }
514 } // namespace MoFEM
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 fieldNote that indices are ordered in ascending order of local in...
Definition: ISManager.cpp:331
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, UnknownInterface **iface) const
Definition: ISManager.cpp:22
Deprecated interface functions.
MoFEM interface unique ID.
BitFEId getBitFEId() const
virtual moab::Interface & get_moab()=0
MultiIndex Tag for field order.
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:37
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:507
virtual const Field_multiIndex * get_fields() const =0
Get the fields object.
MoFEMErrorCode sectionCreate(const std::string &problem_name, PetscSection *s, const RowColData row_col=COL) const
Create global selectionCreate section for given problem, such that points are sorted by UId,...
Definition: ISManager.cpp:38
base class for all interface classes
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:483
MoFEMErrorCode isCreateProblemFieldAndEntityType(const std::string &problem, 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)
Definition: ISManager.cpp:313
DofIdx getNbLocalDofsRow() const
MoFEMErrorCode isCreateProblemFieldAndRank(const std::string &problem, 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)
Definition: ISManager.cpp:231
Core (interface) class.
Definition: Core.hpp:50
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:514
keeps basic data about problemThis is low level structure with information about problem,...
RowColData
RowColData.
Definition: definitions.h:192
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getPetscLocalDofIdx > > > > NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique
virtual EntityHandle get_field_meshset(const std::string &name) const =0
get field meshset
virtual int get_comm_rank() const =0
ISManager(const MoFEM::Core &core)
Definition: ISManager.cpp:34
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)
Definition: ddTensor0.hpp:33
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
virtual const FiniteElement_multiIndex * get_finite_elements() const =0
Get the finite elements object.
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
~ISManager()
Destructor.
Definition: ISManager.cpp:36
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:52
#define CHKERR
Inline error check.
Definition: definitions.h:602
const MoFEM::Interface & cOre
Definition: ISManager.hpp:41
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.
Definition: ISManager.cpp:448
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, FieldCoefficientsNumber, &NumeredDofEntity::getDofCoeffIdx > > > > NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique
MultiIndex Tag for field name.
virtual const Problem * get_problem(const std::string &problem_name) const =0
Get the problem object.
keeps information about indexed dofs for the problemFIXME: Is too many iterator, this has to be manag...
interface_DofEntity< DofEntity > interface_type_DofEntity
int DofIdx
Index of DOF.
Definition: Types.hpp:29
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:413
static const MOFEMuuid IDD_MOFEMISManager
Definition: ISManager.hpp:26
MoFEMErrorCode isCreateProblemOrder(const std::string &problem, RowColData rc, int min_order, int max_order, IS *is) const
create IS for given order range (collective)
Definition: ISManager.cpp:174
DofIdx getNbLocalDofsCol() const
intrusive_ptr for managing petsc objects
Definition: AuxPETSc.hpp:128
NumeredDofEntity_multiIndex::index< Unique_mi_tag >::type NumeredDofEntityByUId
Numbered DoF multi-index by UId.
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem