v0.8.15
Public Member Functions | Public Attributes | Private Attributes | List of all members
MoFEM::ProblemsManager Struct Reference

Problem manager is used to build and partition problems . More...

#include <src/interfaces/ProblemsManager.hpp>

Inheritance diagram for MoFEM::ProblemsManager:
[legend]
Collaboration diagram for MoFEM::ProblemsManager:
[legend]

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 ProblemsManager (const MoFEM::Core &core)
 
 ~ProblemsManager ()
 Destructor. More...
 
MoFEMErrorCode getOptions ()
 
MoFEMErrorCode partitionMesh (const Range &ents, const int dim, const int adj_dim, const int n_parts, Tag *th_vertex_weights=nullptr, Tag *th_edge_weights=nullptr, Tag *th_part_weights=nullptr, int verb=VERBOSE, const bool debug=false)
 Set partition tag to each finite element in the problemThis will use one of the mesh partitioning programs available from PETSc See http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPartitioningType.html More...
 
MoFEMErrorCode buildProblem (const std::string &name, const bool square_matrix, int verb=VERBOSE)
 build problem data structures More...
 
MoFEMErrorCode buildProblem (Problem *problem_ptr, const bool square_matrix, int verb=VERBOSE)
 build problem data structures More...
 
MoFEMErrorCode buildProblemOnDistributedMesh (const std::string &name, const bool square_matrix, int verb=VERBOSE)
 build problem data structures, assuming that mesh is distributed (collective)Mesh is distributed, that means that each processor keeps only own part of the mesh and shared entities. More...
 
MoFEMErrorCode buildProblemOnDistributedMesh (Problem *problem_ptr, const bool square_matrix=true, int verb=VERBOSE)
 build problem data structures, assuming that mesh is distributed (collective)Mesh is distributed, that means that each processor keeps only own part of the mesh and shared entities. More...
 
MoFEMErrorCode buildSubProblem (const std::string &out_name, const std::vector< std::string > &fields_row, const std::vector< std::string > &fields_col, const std::string &main_problem, const bool square_matrix=true, int verb=VERBOSE)
 build sub problem More...
 
MoFEMErrorCode buildCompsedProblem (const std::string &out_name, const std::vector< std::string > add_row_problems, const std::vector< std::string > add_col_problems, const bool square_matrix=true, int verb=1)
 build composite problem More...
 
MoFEMErrorCode inheritPartition (const std::string &name, const std::string &problem_for_rows, bool copy_rows, const std::string &problem_for_cols, bool copy_cols, int verb=VERBOSE)
 build indexing and partition problem inheriting indexing and partitioning from two other problems More...
 
MoFEMErrorCode partitionSimpleProblem (const std::string &name, int verb=VERBOSE)
 partition problem dofs More...
 
MoFEMErrorCode partitionProblem (const std::string &name, int verb=VERBOSE)
 partition problem dofs (collective) More...
 
MoFEMErrorCode printPartitionedProblem (const Problem *problem_ptr, int verb=VERBOSE)
 
MoFEMErrorCode debugPartitionedProblem (const Problem *problem_ptr, int verb=VERBOSE)
 
MoFEMErrorCode partitionFiniteElements (const std::string &name, bool part_from_moab=false, int low_proc=-1, int hi_proc=-1, int verb=VERBOSE)
 partition finite elementsFunction which partition finite elements based on dofs partitioning.
In addition it sets information about local row and cols dofs at given element on partition. More...
 
MoFEMErrorCode partitionGhostDofs (const std::string &name, int verb=VERBOSE)
 determine ghost nodes More...
 
MoFEMErrorCode partitionGhostDofsOnDistributedMesh (const std::string &name, int verb=VERBOSE)
 determine ghost nodes on distributed meshes More...
 
MoFEMErrorCode getFEMeshset (const std::string &prb_name, const std::string &fe_name, EntityHandle *meshset) const
 
MoFEMErrorCode getProblemElementsLayout (const std::string &name, const std::string &fe_name, PetscLayout *layout) const
 Get layout of elements in the problemIn layout is stored information how many elements is on each processor, for more information look int petsc documentation http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/PetscLayoutCreate.html#PetscLayoutCreate More...
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface refernce to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface. More...
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface. More...
 
virtual ~UnknownInterface ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

Public Attributes

MoFEM::CorecOre
 
PetscBool buildProblemFromFields
 
PetscBool synchroniseProblemEntities
 DOFs in fields, not from DOFs on elements. More...
 

Private Attributes

PetscLogEvent MOFEM_EVENT_ProblemsManager
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Problem manager is used to build and partition problems .

Examples:
forces_and_sources_testing_edge_element.cpp, and forces_and_sources_testing_users_base.cpp.

Definition at line 34 of file ProblemsManager.hpp.

Constructor & Destructor Documentation

◆ ProblemsManager()

MoFEM::ProblemsManager::ProblemsManager ( const MoFEM::Core core)

Definition at line 74 of file ProblemsManager.cpp.

75  : cOre(const_cast<MoFEM::Core &>(core)),
76  buildProblemFromFields(PETSC_FALSE),
77  synchroniseProblemEntities(PETSC_FALSE) {
78  PetscLogEventRegister("ProblemsManager", 0, &MOFEM_EVENT_ProblemsManager);
79 }
PetscLogEvent MOFEM_EVENT_ProblemsManager
PetscBool synchroniseProblemEntities
DOFs in fields, not from DOFs on elements.

◆ ~ProblemsManager()

MoFEM::ProblemsManager::~ProblemsManager ( )

Destructor.

Definition at line 80 of file ProblemsManager.cpp.

80 {}

Member Function Documentation

◆ buildCompsedProblem()

MoFEMErrorCode MoFEM::ProblemsManager::buildCompsedProblem ( const std::string &  out_name,
const std::vector< std::string >  add_row_problems,
const std::vector< std::string >  add_col_problems,
const bool  square_matrix = true,
int  verb = 1 
)

build composite problem

Parameters
out_namename of build problem
add_row_problemsvector of add row problems
add_col_problemsvector of add col problems
square_matrixtrue if structurally squared matrix
verbverbosity level
Returns
error code

Definition at line 1438 of file ProblemsManager.cpp.

1442  {
1444  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "fields not build");
1445  if (!(cOre.getBuildMoFEM() & Core::BUILD_FE))
1446  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "FEs not build");
1447  if (!(cOre.getBuildMoFEM() & Core::BUILD_ADJ))
1448  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "adjacencies not build");
1449  MoFEM::Interface &m_field = cOre;
1450  const Problem_multiIndex *problems_ptr;
1452 
1453  ierr = m_field.clear_problem(out_name);
1454  CHKERRG(ierr);
1455  ierr = m_field.get_problems(&problems_ptr);
1456  CHKERRG(ierr);
1457  // get reference to all problems
1458  typedef Problem_multiIndex::index<Problem_mi_tag>::type ProblemByName;
1459  ProblemByName &problems_by_name =
1460  const_cast<ProblemByName &>(problems_ptr->get<Problem_mi_tag>());
1461 
1462  // Get iterators to out problem, i.e. build problem
1463  ProblemByName::iterator out_problem_it = problems_by_name.find(out_name);
1464  if (out_problem_it == problems_by_name.end()) {
1465  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1466  "problem with name < %s > not defined (top tip check spelling)",
1467  out_name.c_str());
1468  }
1469  // Make data structure for composed-problem data
1470  out_problem_it->composedProblemsData =
1471  boost::make_shared<ComposedProblemsData>();
1472  boost::shared_ptr<ComposedProblemsData> cmp_prb_data =
1473  out_problem_it->getComposedProblemsData();
1474 
1475  const std::vector<std::string> *add_prb[] = {&add_row_problems,
1476  &add_col_problems};
1477  std::vector<const Problem *> *add_prb_ptr[] = {&cmp_prb_data->rowProblemsAdd,
1478  &cmp_prb_data->colProblemsAdd};
1479  std::vector<IS> *add_prb_is[] = {&cmp_prb_data->rowIs, &cmp_prb_data->colIs};
1480 
1481  // Get local indices counter
1482  int *nb_local_dofs[] = {&out_problem_it->nbLocDofsRow,
1483  &out_problem_it->nbLocDofsCol};
1484  // Get global indices counter
1485  int *nb_dofs[] = {&out_problem_it->nbDofsRow, &out_problem_it->nbDofsCol};
1486 
1487  // Set number of ghost nodes to zero
1488  {
1489  out_problem_it->nbDofsRow = 0;
1490  out_problem_it->nbDofsCol = 0;
1491  out_problem_it->nbLocDofsRow = 0;
1492  out_problem_it->nbLocDofsCol = 0;
1493  out_problem_it->nbGhostDofsRow = 0;
1494  out_problem_it->nbGhostDofsCol = 0;
1495  }
1496  int nb_dofs_reserve[] = {0, 0};
1497 
1498  // Loop over rows and columns in the main problem and sub-problems
1499  for (int ss = 0; ss != ((square_matrix) ? 1 : 2); ss++) {
1500  // cerr << "SS " << ss << endl;
1501  // cerr << add_prb[ss]->size() << endl;
1502  // cerr << add_prb_ptr[ss]->size() << endl;
1503  add_prb_ptr[ss]->reserve(add_prb[ss]->size());
1504  add_prb_is[ss]->reserve(add_prb[ss]->size());
1505  for (std::vector<std::string>::const_iterator vit = add_prb[ss]->begin();
1506  vit != add_prb[ss]->end(); vit++) {
1507  ProblemByName::iterator prb_it = problems_by_name.find(*vit);
1508  if (prb_it == problems_by_name.end()) {
1509  SETERRQ1(
1510  PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1511  "problem with name < %s > not defined (top tip check spelling)",
1512  vit->c_str());
1513  }
1514  add_prb_ptr[ss]->push_back(&*prb_it);
1515  // set number of dofs on rows and columns
1516  if (ss == 0) {
1517  // row
1518  *nb_dofs[ss] += add_prb_ptr[ss]->back()->getNbDofsRow();
1519  *nb_local_dofs[ss] += add_prb_ptr[ss]->back()->getNbLocalDofsRow();
1520  nb_dofs_reserve[ss] += add_prb_ptr[ss]->back()->numeredDofsRows->size();
1521  } else {
1522  // column
1523  *nb_dofs[ss] += add_prb_ptr[ss]->back()->getNbDofsCol();
1524  *nb_local_dofs[ss] += add_prb_ptr[ss]->back()->getNbLocalDofsCol();
1525  nb_dofs_reserve[ss] += add_prb_ptr[ss]->back()->numeredDofsCols->size();
1526  }
1527  }
1528  }
1529  // if squre problem, rows and columns are the same
1530  if (square_matrix) {
1531  add_prb_ptr[1]->reserve(add_prb_ptr[0]->size());
1532  add_prb_is[1]->reserve(add_prb_ptr[0]->size());
1533  out_problem_it->numeredDofsCols = out_problem_it->numeredDofsRows;
1534  *nb_dofs[1] = *nb_dofs[0];
1535  *nb_local_dofs[1] = *nb_local_dofs[0];
1536  }
1537 
1538  // reserve memory for dofs
1539  boost::shared_ptr<std::vector<NumeredDofEntity> > dofs_array[2];
1540  // Reserve memory
1541  for (int ss = 0; ss != ((square_matrix) ? 1 : 2); ss++) {
1542  dofs_array[ss] = boost::make_shared<std::vector<NumeredDofEntity> >();
1543  dofs_array[ss]->reserve(nb_dofs_reserve[ss]);
1544  if (ss == 0) {
1545  out_problem_it->getRowDofsSequence()->push_back(dofs_array[ss]);
1546  }
1547  if (ss == 1) {
1548  out_problem_it->getColDofsSequence()->push_back(dofs_array[ss]);
1549  }
1550  }
1551 
1552  // Push back DOFs
1553  for (int ss = 0; ss != ((square_matrix) ? 1 : 2); ss++) {
1554  NumeredDofEntity_multiIndex::index<PetscGlobalIdx_mi_tag>::type::iterator
1555  dit,
1556  hi_dit;
1557  int shift_glob = 0;
1558  int shift_loc = 0;
1559  for (unsigned int pp = 0; pp != add_prb_ptr[ss]->size(); pp++) {
1560  PetscInt *dofs_out_idx_ptr;
1561  int nb_local_dofs = (*add_prb_ptr[ss])[pp]->getNbLocalDofsRow();
1562  ierr = PetscMalloc(nb_local_dofs * sizeof(int), &dofs_out_idx_ptr);
1563  CHKERRG(ierr);
1564  if (ss == 0) {
1565  dit = (*add_prb_ptr[ss])[pp]
1566  ->numeredDofsRows->get<PetscGlobalIdx_mi_tag>()
1567  .begin();
1568  hi_dit = (*add_prb_ptr[ss])[pp]
1569  ->numeredDofsRows->get<PetscGlobalIdx_mi_tag>()
1570  .end();
1571  } else {
1572  dit = (*add_prb_ptr[ss])[pp]
1573  ->numeredDofsCols->get<PetscGlobalIdx_mi_tag>()
1574  .begin();
1575  hi_dit = (*add_prb_ptr[ss])[pp]
1576  ->numeredDofsCols->get<PetscGlobalIdx_mi_tag>()
1577  .end();
1578  }
1579  int is_nb = 0;
1580  for (; dit != hi_dit; dit++) {
1581  BitRefLevel prb_bit = out_problem_it->getBitRefLevel();
1582  BitRefLevel prb_mask = out_problem_it->getMaskBitRefLevel();
1583  BitRefLevel dof_bit = dit->get()->getBitRefLevel();
1584  if ((dof_bit & prb_bit).none() || ((dof_bit & prb_mask) != dof_bit))
1585  continue;
1586  const int rank = m_field.get_comm_rank();
1587  const int part = dit->get()->getPart();
1588  const int glob_idx = shift_glob + dit->get()->getPetscGlobalDofIdx();
1589  const int loc_idx =
1590  (part == rank) ? (shift_loc + dit->get()->getPetscLocalDofIdx())
1591  : -1;
1592  dofs_array[ss]->emplace_back(dit->get()->getDofEntityPtr(), glob_idx,
1593  glob_idx, loc_idx, part);
1594  if (part == rank) {
1595  dofs_out_idx_ptr[is_nb++] = glob_idx;
1596  }
1597  }
1598  if (is_nb > nb_local_dofs) {
1599  SETERRQ(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
1600  "Data inconsistency");
1601  }
1602  IS is;
1603  ierr = ISCreateGeneral(m_field.get_comm(), is_nb, dofs_out_idx_ptr,
1604  PETSC_OWN_POINTER, &is);
1605  CHKERRG(ierr);
1606  (*add_prb_is[ss]).push_back(is);
1607  if (ss == 0) {
1608  shift_glob += (*add_prb_ptr[ss])[pp]->getNbDofsRow();
1609  shift_loc += (*add_prb_ptr[ss])[pp]->getNbLocalDofsRow();
1610  } else {
1611  shift_glob += (*add_prb_ptr[ss])[pp]->getNbDofsCol();
1612  shift_loc += (*add_prb_ptr[ss])[pp]->getNbLocalDofsCol();
1613  }
1614  if (square_matrix) {
1615  (*add_prb_ptr[1]).push_back((*add_prb_ptr[0])[pp]);
1616  (*add_prb_is[1]).push_back(is);
1617  ierr = PetscObjectReference((PetscObject)is);
1618  CHKERRG(ierr);
1619  }
1620  }
1621  }
1622 
1623  if ((*add_prb_is[1]).size() != (*add_prb_is[0]).size()) {
1624  SETERRQ(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY, "Data inconsistency");
1625  }
1626 
1627  // Insert DOFs to problem multi-index
1628  for (int ss = 0; ss != ((square_matrix) ? 1 : 2); ss++) {
1629  auto hint = (ss == 0) ? out_problem_it->numeredDofsRows->end()
1630  : out_problem_it->numeredDofsCols->end();
1631  for (auto &v : *dofs_array[ss])
1632  hint = (ss == 0) ? out_problem_it->numeredDofsRows->emplace_hint(
1633  hint, dofs_array[ss], &v)
1634  : out_problem_it->numeredDofsCols->emplace_hint(
1635  hint, dofs_array[ss], &v);
1636  }
1637 
1638  // Compress DOFs
1639  *nb_dofs[0] = 0;
1640  *nb_dofs[1] = 0;
1641  *nb_local_dofs[0] = 0;
1642  *nb_local_dofs[1] = 0;
1643  for (int ss = 0; ss != ((square_matrix) ? 1 : 2); ss++) {
1644 
1645  boost::shared_ptr<NumeredDofEntity_multiIndex> dofs_ptr;
1646  if (ss == 0) {
1647  dofs_ptr = out_problem_it->numeredDofsRows;
1648  } else {
1649  dofs_ptr = out_problem_it->numeredDofsCols;
1650  }
1651  NumeredDofEntityByUId::iterator dit, hi_dit;
1652  dit = dofs_ptr->get<Unique_mi_tag>().begin();
1653  hi_dit = dofs_ptr->get<Unique_mi_tag>().end();
1654  std::vector<int> idx;
1655  idx.reserve(std::distance(dit, hi_dit));
1656  // set dofs in order entity and dof number on entity
1657  for (; dit != hi_dit; dit++) {
1658  if (dit->get()->getPart() == (unsigned int)m_field.get_comm_rank()) {
1659  bool success = dofs_ptr->get<Unique_mi_tag>().modify(
1660  dit, NumeredDofEntity_local_idx_change((*nb_local_dofs[ss])++));
1661  if (!success) {
1662  SETERRQ(m_field.get_comm(), MOFEM_OPERATION_UNSUCCESSFUL,
1663  "modification unsuccessful");
1664  }
1665  idx.push_back(dit->get()->getPetscGlobalDofIdx());
1666  } else {
1667  if (dit->get()->getPetscLocalDofIdx() != -1) {
1668  SETERRQ(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
1669  "local index should be negative");
1670  }
1671  }
1672  }
1673  if (square_matrix) {
1674  *nb_local_dofs[1] = *nb_local_dofs[0];
1675  }
1676 
1677  // set new dofs mapping
1678  IS is;
1679  ierr = ISCreateGeneral(m_field.get_comm(), idx.size(), &*idx.begin(),
1680  PETSC_USE_POINTER, &is);
1681  CHKERRG(ierr);
1682  ierr = ISGetSize(is, nb_dofs[ss]);
1683  CHKERRG(ierr);
1684  if (square_matrix) {
1685  *nb_dofs[1] = *nb_dofs[0];
1686  }
1687  // {
1688  // PetscSynchronizedPrintf(m_field.get_comm(),"nb dofs %d %d
1689  // %d\n",*nb_local_dofs[0],idx.size(),*nb_dofs[0]);
1690  // PetscSynchronizedFlush(m_field.get_comm(),PETSC_STDOUT);
1691  // }
1692  AO ao;
1693  ierr = AOCreateMappingIS(is, PETSC_NULL, &ao);
1694  CHKERRG(ierr);
1695  for (unsigned int pp = 0; pp != (*add_prb_is[ss]).size(); pp++) {
1696  ierr = AOApplicationToPetscIS(ao, (*add_prb_is[ss])[pp]);
1697  CHKERRG(ierr);
1698  }
1699 
1700  // Set DOFs numeration
1701  {
1702  std::vector<int> idx_new;
1703  idx_new.reserve(dofs_ptr->size());
1704  for (NumeredDofEntityByUId::iterator dit =
1705  dofs_ptr->get<Unique_mi_tag>().begin();
1706  dit != dofs_ptr->get<Unique_mi_tag>().end(); dit++) {
1707  idx_new.push_back(dit->get()->getPetscGlobalDofIdx());
1708  }
1709  // set new global dofs numeration
1710  IS is_new;
1711  ierr = ISCreateGeneral(m_field.get_comm(), idx_new.size(),
1712  &*idx_new.begin(), PETSC_USE_POINTER, &is_new);
1713  CHKERRG(ierr);
1714  ierr = AOApplicationToPetscIS(ao, is_new);
1715  CHKERRG(ierr);
1716  // set global indices to multi-index
1717  std::vector<int>::iterator vit = idx_new.begin();
1718  for (NumeredDofEntityByUId::iterator dit =
1719  dofs_ptr->get<Unique_mi_tag>().begin();
1720  dit != dofs_ptr->get<Unique_mi_tag>().end(); dit++) {
1721  bool success = dofs_ptr->modify(
1722  dit, NumeredDofEntity_part_change(dit->get()->getPart(), *(vit++)));
1723  if (!success) {
1724  SETERRQ(m_field.get_comm(), MOFEM_OPERATION_UNSUCCESSFUL,
1725  "modification unsuccessful");
1726  }
1727  }
1728  ierr = ISDestroy(&is_new);
1729  CHKERRG(ierr);
1730  }
1731  ierr = ISDestroy(&is);
1732  CHKERRG(ierr);
1733  ierr = AODestroy(&ao);
1734  CHKERRG(ierr);
1735  }
1736 
1737  ierr = printPartitionedProblem(&*out_problem_it, verb);
1738  CHKERRG(ierr);
1739  ierr = debugPartitionedProblem(&*out_problem_it, verb);
1740  CHKERRG(ierr);
1741 
1742  // Inidcate that porble has been build
1745 
1747 }
virtual MoFEMErrorCode clear_problem(const std::string &name, int verb=DEFAULT_VERBOSITY)=0
clear problem
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
int & getBuildMoFEM() const
Get flags/semaphores for different stages.
Definition: Core.hpp:179
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
MoFEMErrorCode debugPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
MoFEMErrorCode printPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Common.hpp:147
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
virtual int get_comm_rank() const =0
virtual MoFEMErrorCode get_problems(const Problem_multiIndex **problems_ptr) const =0
Get pointer to problems multi-index.
multi_index_container< Problem, indexed_by< ordered_unique< tag< Meshset_mi_tag >, member< Problem, EntityHandle, &Problem::meshset > >, hashed_unique< tag< BitProblemId_mi_tag >, const_mem_fun< Problem, BitProblemId, &Problem::getId >, HashBit< BitProblemId >, EqBit< BitProblemId > >, hashed_unique< tag< Problem_mi_tag >, const_mem_fun< Problem, std::string, &Problem::getName > > > > Problem_multiIndex
MultiIndex for entities for Problem.
virtual MPI_Comm & get_comm() const =0

◆ buildSubProblem()

MoFEMErrorCode MoFEM::ProblemsManager::buildSubProblem ( const std::string &  out_name,
const std::vector< std::string > &  fields_row,
const std::vector< std::string > &  fields_col,
const std::string &  main_problem,
const bool  square_matrix = true,
int  verb = VERBOSE 
)

build sub problem

Parameters
out_nameproblem
fields_rowvector of fields composing problem
fields_colvector of fields composing problem
main_problemmain problem
Returns
error code

Definition at line 1210 of file ProblemsManager.cpp.

1213  {
1214  MoFEM::Interface &m_field = cOre;
1215  const Problem_multiIndex *problems_ptr;
1217 
1218  CHKERR m_field.clear_problem(out_name);
1219  CHKERR m_field.get_problems(&problems_ptr);
1220 
1221  // get reference to all problems
1222  typedef Problem_multiIndex::index<Problem_mi_tag>::type ProblemByName;
1223  ProblemByName &problems_by_name =
1224  const_cast<ProblemByName &>(problems_ptr->get<Problem_mi_tag>());
1225 
1226  // get iterators to out problem, i.e. build problem
1227  ProblemByName::iterator out_problem_it = problems_by_name.find(out_name);
1228  if (out_problem_it == problems_by_name.end()) {
1229  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1230  "subproblem with name < %s > not defined (top tip check spelling)",
1231  out_name.c_str());
1232  }
1233  // get iterator to main problem, i.e. out problem is subproblem of main
1234  // problem
1235  ProblemByName::iterator main_problem_it = problems_by_name.find(main_problem);
1236  if (main_problem_it == problems_by_name.end()) {
1237  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1238  "problem of subproblem with name < %s > not defined (top tip "
1239  "check spelling)",
1240  main_problem.c_str());
1241  }
1242 
1243  // get dofs for row & columns for out problem,
1244  boost::shared_ptr<NumeredDofEntity_multiIndex> out_problem_dofs[] = {
1245  out_problem_it->numeredDofsRows, out_problem_it->numeredDofsCols};
1246  // get dofs for row & columns for main problem
1247  boost::shared_ptr<NumeredDofEntity_multiIndex> main_problem_dofs[] = {
1248  main_problem_it->numeredDofsRows, main_problem_it->numeredDofsCols};
1249  // get local indices counter
1250  int *nb_local_dofs[] = {&out_problem_it->nbLocDofsRow,
1251  &out_problem_it->nbLocDofsCol};
1252  // get global indices counter
1253  int *nb_dofs[] = {&out_problem_it->nbDofsRow, &out_problem_it->nbDofsCol};
1254 
1255  // set number of ghost nodes to zero
1256  {
1257  out_problem_it->nbGhostDofsRow = 0;
1258  out_problem_it->nbGhostDofsCol = 0;
1259  }
1260 
1261  // put rows & columns field names in array
1262  std::vector<std::string> fields[] = {fields_row, fields_col};
1263 
1264  // make data structure fos sub-problem data
1265  out_problem_it->subProblemData =
1266  boost::make_shared<Problem::SubProblemData>();
1267 
1268  // Loop over rows and columns
1269  for (int ss = 0; ss != (square_matrix ? 1 : 2); ++ss) {
1270 
1271  // reset dofs and columns counters
1272  (*nb_local_dofs[ss]) = 0;
1273  (*nb_dofs[ss]) = 0;
1274  // clear arrays
1275  out_problem_dofs[ss]->clear();
1276 
1277  // If DOFs are cleared clear finite elements too.
1278  out_problem_it->numeredFiniteElements.clear();
1279 
1280  // get dofs by field name and insert them in out problem multi-indices
1281  for (auto field : fields[ss]) {
1282  auto dit =
1283  main_problem_dofs[ss]->get<FieldName_mi_tag>().lower_bound(field);
1284  auto hi_dit =
1285  main_problem_dofs[ss]->get<FieldName_mi_tag>().upper_bound(field);
1286 
1287  // Following reserve memory in sequences, only two allocations are here,
1288  // once for array of objects, next for array of shared pointers
1289 
1290  // reserve memory for field dofs
1291  boost::shared_ptr<std::vector<NumeredDofEntity> > dofs_array =
1292  boost::shared_ptr<std::vector<NumeredDofEntity> >(
1293  new std::vector<NumeredDofEntity>());
1294 
1295  if (ss == 0) {
1296  out_problem_it->getRowDofsSequence()->push_back(dofs_array);
1297  } else {
1298  out_problem_it->getColDofsSequence()->push_back(dofs_array);
1299  }
1300  dofs_array->reserve(std::distance(dit, hi_dit));
1301 
1302  // create elements objects
1303  for (; dit != hi_dit; dit++)
1304  dofs_array->emplace_back(
1305  dit->get()->getDofEntityPtr(), dit->get()->getPetscGlobalDofIdx(),
1306  dit->get()->getPetscGlobalDofIdx(),
1307  dit->get()->getPetscLocalDofIdx(), dit->get()->getPart());
1308 
1309  // fill multi-index
1310  auto hint = out_problem_dofs[ss]->end();
1311  for (auto &v : *dofs_array)
1312  hint = out_problem_dofs[ss]->emplace_hint(hint, dofs_array, &v);
1313  }
1314  // Set local indexes
1315  {
1316  NumeredDofEntity_multiIndex::index<Idx_mi_tag>::type::iterator dit,
1317  hi_dit;
1318  dit = out_problem_dofs[ss]->get<Idx_mi_tag>().begin();
1319  hi_dit = out_problem_dofs[ss]->get<Idx_mi_tag>().end();
1320  for (; dit != hi_dit; dit++) {
1321  int idx = -1; // if dof is not part of partition, set local index to -1
1322  if (dit->get()->getPart() == (unsigned int)m_field.get_comm_rank()) {
1323  idx = (*nb_local_dofs[ss])++;
1324  }
1325  bool success = out_problem_dofs[ss]->modify(
1326  out_problem_dofs[ss]->project<0>(dit),
1327  NumeredDofEntity_local_idx_change(idx));
1328  if (!success) {
1329  SETERRQ(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
1330  "operation unsuccessful");
1331  }
1332  };
1333  }
1334  // Set global indexes, compress global indices
1335  {
1336  auto dit =
1337  out_problem_dofs[ss]->get<PetscLocalIdx_mi_tag>().lower_bound(0);
1338  auto hi_dit =
1339  out_problem_dofs[ss]->get<PetscLocalIdx_mi_tag>().upper_bound(
1340  out_problem_dofs[ss]->size());
1341  const int nb = std::distance(dit, hi_dit);
1342  // get main problem global indices
1343  std::vector<int> main_indices(nb);
1344  for (auto it = main_indices.begin(); dit != hi_dit; dit++, it++) {
1345  *it = dit->get()->getPetscGlobalDofIdx();
1346  }
1347  // create is with global dofs
1348  IS is;
1349  CHKERR ISCreateGeneral(m_field.get_comm(), nb, &*main_indices.begin(),
1350  PETSC_USE_POINTER, &is);
1351  // create map form main problem global indices to out problem global
1352  // indices
1353  AO ao;
1354  CHKERR AOCreateMappingIS(is, PETSC_NULL, &ao);
1355  if (ss == 0) {
1356  CHKERR ISDuplicate(is, &(out_problem_it->getSubData()->rowIs));
1357  // CHKERR ISSort(out_problem_it->getSubData()->rowIs);
1358  out_problem_it->getSubData()->rowMap = ao;
1359  CHKERR PetscObjectReference((PetscObject)ao);
1360  } else {
1361  CHKERR ISDuplicate(is, &(out_problem_it->getSubData()->colIs));
1362  // CHKERR ISSort(out_problem_it->getSubData()->colIs);
1363  out_problem_it->getSubData()->colMap = ao;
1364  CHKERR PetscObjectReference((PetscObject)ao);
1365  }
1366  CHKERR AOApplicationToPetscIS(ao, is);
1367  // set global number of DOFs
1368  CHKERR ISGetSize(is, nb_dofs[ss]);
1369  CHKERR ISDestroy(&is);
1370  // set out problem global indices after applying map
1371  dit = out_problem_dofs[ss]->get<PetscLocalIdx_mi_tag>().lower_bound(0);
1372  for (std::vector<int>::iterator it = main_indices.begin(); dit != hi_dit;
1373  dit++, it++) {
1374  bool success = out_problem_dofs[ss]->modify(
1375  out_problem_dofs[ss]->project<0>(dit),
1376  NumeredDofEntity_mofem_part_and_all_index_change(
1377  dit->get()->getPart(), *it, *it,
1378  dit->get()->getPetscLocalDofIdx()));
1379  if (!success) {
1380  SETERRQ(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
1381  "operation unsuccessful");
1382  }
1383  }
1384  // set global indices to nodes not on this part
1385  {
1386  NumeredDofEntityByLocalIdx::iterator dit =
1387  out_problem_dofs[ss]->get<PetscLocalIdx_mi_tag>().lower_bound(-1);
1388  NumeredDofEntityByLocalIdx::iterator hi_dit =
1389  out_problem_dofs[ss]->get<PetscLocalIdx_mi_tag>().upper_bound(-1);
1390  const int nb = std::distance(dit, hi_dit);
1391  std::vector<int> main_indices_non_local(nb);
1392  for (auto it = main_indices_non_local.begin(); dit != hi_dit;
1393  dit++, it++) {
1394  *it = dit->get()->getPetscGlobalDofIdx();
1395  }
1396  IS is;
1397  CHKERR ISCreateGeneral(m_field.get_comm(), nb,
1398  &*main_indices_non_local.begin(),
1399  PETSC_USE_POINTER, &is);
1400  CHKERR AOApplicationToPetscIS(ao, is);
1401  CHKERR ISDestroy(&is);
1402  dit = out_problem_dofs[ss]->get<PetscLocalIdx_mi_tag>().lower_bound(-1);
1403  for (auto it = main_indices_non_local.begin(); dit != hi_dit;
1404  dit++, it++) {
1405  bool success = out_problem_dofs[ss]->modify(
1406  out_problem_dofs[ss]->project<0>(dit),
1407  NumeredDofEntity_mofem_part_and_all_index_change(
1408  dit->get()->getPart(), dit->get()->getDofIdx(), *it,
1409  dit->get()->getPetscLocalDofIdx()));
1410  if (!success) {
1411  SETERRQ(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
1412  "operation unsuccessful");
1413  }
1414  }
1415  }
1416  CHKERR AODestroy(&ao);
1417  }
1418  }
1419 
1420  if (square_matrix) {
1421  out_problem_it->numeredDofsCols = out_problem_it->numeredDofsRows;
1422  out_problem_it->nbLocDofsCol = out_problem_it->nbLocDofsRow;
1423  out_problem_it->nbDofsCol = out_problem_it->nbDofsRow;
1424  out_problem_it->getSubData()->colIs = out_problem_it->getSubData()->rowIs;
1425  out_problem_it->getSubData()->colMap = out_problem_it->getSubData()->rowMap;
1426  CHKERR PetscObjectReference(
1427  (PetscObject)out_problem_it->getSubData()->rowIs);
1428  CHKERR PetscObjectReference(
1429  (PetscObject)out_problem_it->getSubData()->rowMap);
1430  }
1431 
1432  CHKERR printPartitionedProblem(&*out_problem_it, verb);
1433  CHKERR debugPartitionedProblem(&*out_problem_it, verb);
1434 
1436 }
virtual MoFEMErrorCode clear_problem(const std::string &name, int verb=DEFAULT_VERBOSITY)=0
clear problem
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
MoFEMErrorCode debugPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
MoFEMErrorCode printPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
virtual int get_comm_rank() const =0
virtual MoFEMErrorCode get_problems(const Problem_multiIndex **problems_ptr) const =0
Get pointer to problems multi-index.
multi_index_container< Problem, indexed_by< ordered_unique< tag< Meshset_mi_tag >, member< Problem, EntityHandle, &Problem::meshset > >, hashed_unique< tag< BitProblemId_mi_tag >, const_mem_fun< Problem, BitProblemId, &Problem::getId >, HashBit< BitProblemId >, EqBit< BitProblemId > >, hashed_unique< tag< Problem_mi_tag >, const_mem_fun< Problem, std::string, &Problem::getName > > > > Problem_multiIndex
MultiIndex for entities for Problem.
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403
virtual MPI_Comm & get_comm() const =0

◆ debugPartitionedProblem()

MoFEMErrorCode MoFEM::ProblemsManager::debugPartitionedProblem ( const Problem problem_ptr,
int  verb = VERBOSE 
)

Definition at line 2378 of file ProblemsManager.cpp.

2378  {
2379  MoFEM::Interface &m_field = cOre;
2381  if (debug > 0) {
2382 
2383  typedef NumeredDofEntity_multiIndex::index<Idx_mi_tag>::type
2384  NumeredDofEntitysByIdx;
2385  NumeredDofEntitysByIdx::iterator dit, hi_dit;
2386  const NumeredDofEntitysByIdx *numered_dofs_ptr[] = {
2387  &(problem_ptr->numeredDofsRows->get<Idx_mi_tag>()),
2388  &(problem_ptr->numeredDofsCols->get<Idx_mi_tag>())};
2389 
2390  int *nbdof_ptr[] = {&problem_ptr->nbDofsRow, &problem_ptr->nbDofsCol};
2391  int *local_nbdof_ptr[] = {&problem_ptr->nbLocDofsRow,
2392  &problem_ptr->nbLocDofsCol};
2393 
2394  for (int ss = 0; ss < 2; ss++) {
2395 
2396  dit = numered_dofs_ptr[ss]->begin();
2397  hi_dit = numered_dofs_ptr[ss]->end();
2398  for (; dit != hi_dit; dit++) {
2399  if ((*dit)->getPart() == (unsigned int)m_field.get_comm_rank()) {
2400  if ((*dit)->getPetscLocalDofIdx() < 0) {
2401  std::ostringstream zz;
2402  zz << "rank " << m_field.get_comm_rank() << " " << **dit;
2403  SETERRQ2(PETSC_COMM_SELF, MOFEM_IMPOSIBLE_CASE,
2404  "local dof index for %d (0-row, 1-col) not set, i.e. has "
2405  "negative value\n %s",
2406  ss, zz.str().c_str());
2407  }
2408  if ((*dit)->getPetscLocalDofIdx() >= *local_nbdof_ptr[ss]) {
2409  std::ostringstream zz;
2410  zz << "rank " << m_field.get_comm_rank() << " " << **dit;
2411  SETERRQ2(PETSC_COMM_SELF, MOFEM_IMPOSIBLE_CASE,
2412  "local dofs for %d (0-row, 1-col) out of range\n %s", ss,
2413  zz.str().c_str());
2414  }
2415  } else {
2416  if ((*dit)->getPetscGlobalDofIdx() < 0) {
2417  std::ostringstream zz;
2418  zz << "rank " << m_field.get_comm_rank() << " "
2419  << dit->get()->getBitRefLevel() << " " << **dit;
2420  SETERRQ2(PETSC_COMM_SELF, MOFEM_IMPOSIBLE_CASE,
2421  "global dof index for %d (0-row, 1-col) row not set, i.e. "
2422  "has negative value\n %s",
2423  ss, zz.str().c_str());
2424  }
2425  if ((*dit)->getPetscGlobalDofIdx() >= *nbdof_ptr[ss]) {
2426  std::ostringstream zz;
2427  zz << "rank " << m_field.get_comm_rank() << " nb_dofs "
2428  << *nbdof_ptr[ss] << " " << **dit;
2429  SETERRQ2(PETSC_COMM_SELF, MOFEM_IMPOSIBLE_CASE,
2430  "global dofs for %d (0-row, 1-col) out of range\n %s", ss,
2431  zz.str().c_str());
2432  }
2433  }
2434  }
2435  }
2436  }
2438 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
virtual int get_comm_rank() const =0
static const bool debug

◆ getFEMeshset()

MoFEMErrorCode MoFEM::ProblemsManager::getFEMeshset ( const std::string &  prb_name,
const std::string &  fe_name,
EntityHandle meshset 
) const

meshset problem finite elements

Definition at line 2910 of file ProblemsManager.cpp.

2912  {
2913  MoFEM::Interface &m_field = cOre;
2914  const Problem *problem_ptr;
2916  rval = m_field.get_moab().create_meshset(MESHSET_SET, *meshset);
2917  CHKERRQ_MOAB(rval);
2918  ierr = m_field.get_problem(prb_name, &problem_ptr);
2919  CHKERRG(ierr);
2920  NumeredEntFiniteElement_multiIndex::index<
2921  FiniteElement_name_mi_tag>::type::iterator fit,
2922  hi_fe_it;
2923  fit = problem_ptr->numeredFiniteElements.get<FiniteElement_name_mi_tag>()
2924  .lower_bound(fe_name);
2925  hi_fe_it = problem_ptr->numeredFiniteElements.get<FiniteElement_name_mi_tag>()
2926  .upper_bound(fe_name);
2927  std::vector<EntityHandle> fe_vec;
2928  fe_vec.reserve(std::distance(fit, hi_fe_it));
2929  for (; fit != hi_fe_it; fit++) {
2930  fe_vec.push_back(fit->get()->getEnt());
2931  }
2932  rval = m_field.get_moab().add_entities(*meshset, &*fe_vec.begin(),
2933  fe_vec.size());
2935 }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:497
virtual moab::Interface & get_moab()=0
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
virtual MoFEMErrorCode get_problem(const std::string &problem_name, const Problem **problem_ptr) const =0
Get problem database (data structure)

◆ getOptions()

MoFEMErrorCode MoFEM::ProblemsManager::getOptions ( )

Definition at line 82 of file ProblemsManager.cpp.

82  {
83  MoFEM::Interface &m_field = cOre;
85  ierr = PetscOptionsBegin(m_field.get_comm(), "", "Problem manager", "none");
86  CHKERRG(ierr);
87  {
88  ierr = PetscOptionsBool(
89  "-problem_build_from_fields",
90  "Add DOFs to problem directly from fields not through DOFs on elements",
92  CHKERRG(ierr);
93  }
94  ierr = PetscOptionsEnd();
95  CHKERRG(ierr);
97 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
virtual MPI_Comm & get_comm() const =0

◆ printPartitionedProblem()

MoFEMErrorCode MoFEM::ProblemsManager::printPartitionedProblem ( const Problem problem_ptr,
int  verb = VERBOSE 
)

Definition at line 2334 of file ProblemsManager.cpp.

2334  {
2335  MoFEM::Interface &m_field = cOre;
2337  if (verb > 0) {
2338  std::ostringstream ss;
2339  ss << "partition_problem: rank = " << m_field.get_comm_rank()
2340  << " FEs row ghost dofs " << *problem_ptr << " Nb. local dof "
2341  << problem_ptr->getNbLocalDofsRow() << " nb global row dofs "
2342  << problem_ptr->getNbDofsRow() << std::endl;
2343  ss << "partition_problem: rank = " << m_field.get_comm_rank()
2344  << " FEs col ghost dofs " << *problem_ptr << " Nb. local dof "
2345  << problem_ptr->getNbLocalDofsCol() << " nb global col dofs "
2346  << problem_ptr->getNbDofsCol() << std::endl;
2347  PetscSynchronizedPrintf(m_field.get_comm(), ss.str().c_str());
2348  PetscSynchronizedFlush(m_field.get_comm(), PETSC_STDOUT);
2349  }
2350  if (verb > 1) {
2351  // FIXME mess if printed on more than one processors
2352  // std::ostringstream ss;
2353  std::cout << "rank = " << m_field.get_comm_rank() << " FEs row dofs "
2354  << *problem_ptr << " Nb. row dof " << problem_ptr->getNbDofsRow()
2355  << " Nb. local dof " << problem_ptr->getNbLocalDofsRow()
2356  << std::endl;
2357  NumeredDofEntity_multiIndex::iterator miit_dd_row =
2358  problem_ptr->numeredDofsRows->begin();
2359  for (; miit_dd_row != problem_ptr->numeredDofsRows->end(); miit_dd_row++) {
2360  std::cout << **miit_dd_row << std::endl;
2361  }
2362  std::cout << "rank = " << m_field.get_comm_rank() << " FEs col dofs "
2363  << *problem_ptr << " Nb. col dof " << problem_ptr->getNbDofsCol()
2364  << " Nb. local dof " << problem_ptr->getNbLocalDofsCol()
2365  << std::endl;
2366  NumeredDofEntity_multiIndex::iterator miit_dd_col =
2367  problem_ptr->numeredDofsCols->begin();
2368  for (; miit_dd_col != problem_ptr->numeredDofsCols->end(); miit_dd_col++) {
2369  std::cout << **miit_dd_col << std::endl;
2370  }
2371  // PetscSynchronizedPrintf(comm,ss.str().c_str());
2372  // PetscSynchronizedFlush(comm,PETSC_STDOUT);
2373  }
2375 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
virtual int get_comm_rank() const =0
virtual MPI_Comm & get_comm() const =0

◆ query_interface()

MoFEMErrorCode MoFEM::ProblemsManager::query_interface ( const MOFEMuuid uuid,
UnknownInterface **  iface 
) const
virtual

Implements MoFEM::UnknownInterface.

Definition at line 62 of file ProblemsManager.cpp.

63  {
65  *iface = NULL;
66  if (uuid == IDD_MOFEMProblemsManager) {
67  *iface = const_cast<ProblemsManager *>(this);
69  }
70  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
72 }
static const MOFEMuuid IDD_MOFEMProblemsManager
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
ProblemsManager(const MoFEM::Core &core)

Member Data Documentation

◆ buildProblemFromFields

PetscBool MoFEM::ProblemsManager::buildProblemFromFields

If set to true, problem is build from

Definition at line 47 of file ProblemsManager.hpp.

◆ cOre

MoFEM::Core& MoFEM::ProblemsManager::cOre

Definition at line 39 of file ProblemsManager.hpp.

◆ MOFEM_EVENT_ProblemsManager

PetscLogEvent MoFEM::ProblemsManager::MOFEM_EVENT_ProblemsManager
private

Definition at line 289 of file ProblemsManager.hpp.

◆ synchroniseProblemEntities

PetscBool MoFEM::ProblemsManager::synchroniseProblemEntities

DOFs in fields, not from DOFs on elements.

Definition at line 50 of file ProblemsManager.hpp.


The documentation for this struct was generated from the following files: