v0.6.10
Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
MoFEM::Problem Struct Reference

keeps basic data about problemThis is low level structure with information about problem, what elements compose problem and what DOFs are on rows and columns. More...

#include <src/multi_indices/ProblemsMultiIndices.hpp>

Collaboration diagram for MoFEM::Problem:
[legend]

Classes

struct  SubProblemData
 Subproblem problem data. More...
 

Public Types

typedef multi_index_container< boost::weak_ptr< std::vector< NumeredDofEntity > >, indexed_by< sequenced<> > > SequenceDofContainer
 

Public Member Functions

const boost::shared_ptr< NumeredDofEntity_multiIndex > & getNumeredDofsRows () const
 get access to numeredDofsRows storing DOFs on rows More...
 
const boost::shared_ptr< NumeredDofEntity_multiIndex > & getNumeredDofsCols () const
 get access to numeredDofsCols storing DOFs on cols More...
 
const NumeredEntFiniteElement_multiIndexgetNumeredFiniteElements () const
 get access to reference for multi-index storing finite elements More...
 
boost::shared_ptr< SubProblemDatagetSubData () const
 Get main problem of sub-problem is. More...
 
boost::shared_ptr< ComposedProblemsDatagetComposedProblemsData () const
 Het composed problems data structure. More...
 
MoFEMErrorCode getDofByNameEntAndEntDofIdx (const string name, const EntityHandle ent, const int ent_dof_idx, const RowColData row_or_col, boost::shared_ptr< NumeredDofEntity > &dof_ptr) const
 get DOFs from problem More...
 
NumeredEntFiniteElementbyName::iterator getNumeredFEsBegin (std::string fe_name) const
 
NumeredEntFiniteElementbyName::iterator getNumeredFEsEnd (std::string fe_name) const
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsRowsBegin () const
 get begin iterator for numeredDofsRows (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsRowsEnd () const
 get end iterator for numeredDofsRows (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsColsBegin () const
 get begin iterator for numeredDofsCols (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsColsEnd () const
 get end iterator for numeredDofsCols (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByLocalIdx::iterator getNumeredDofsRowsByLocIdxBegin (const DofIdx locidx) const
 get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByLocalIdx::iterator getNumeredDofsRowsByLocIdxEnd (const DofIdx locidx) const
 get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByLocalIdx::iterator getNumeredDofsColsByLocIdxBegin (const DofIdx locidx) const
 get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByLocalIdx::iterator getNumeredDofsColsByLocIdxEnd (const DofIdx locidx) const
 get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByEnt::iterator getNumeredDofsRowsByEntBegin (const EntityHandle ent) const
 get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_ENT_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByEnt::iterator getNumeredDofsRowsByEntEnd (const EntityHandle ent) const
 get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_ENT_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByEnt::iterator getNumeredDofsColsByEntBegin (const EntityHandle ent) const
 get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_ENT_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByEnt::iterator getNumeredDofsColsByEntEnd (const EntityHandle ent) const
 get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_ENT_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByFieldName::iterator getNumeredDofsRowsBegin (const std::string &name) const
 get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByFieldName::iterator getNumeredDofsRowsEnd (const std::string &name) const
 get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByFieldName::iterator getNumeredDofsColsBegin (const std::string &name) const
 get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByFieldName::iterator getNumeredDofsColsEnd (const std::string &name) const
 get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByNameEntAndPart::iterator getNumeredDofsRowsBegin (const std::string &name, const EntityHandle ent, const int part) const
 get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_ENT_PART_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByNameEntAndPart::iterator getNumeredDofsRowsEnd (const std::string &name, const EntityHandle ent, const int part) const
 get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_ENT_PART_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByNameEntAndPart::iterator getNumeredDofsColsBegin (const std::string &name, const EntityHandle ent, const int part) const
 get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_ENT_PART_FOR_LOOP_ for loops) More...
 
NumeredDofEntityByNameEntAndPart::iterator getNumeredDofsColsEnd (const std::string &name, const EntityHandle ent, const int part) const
 get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_ENT_PART_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsRowsBegin (const int part) const
 get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_OWNPROC_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsRowsEnd (const int part) const
 get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_OWNPROC_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsColsBegin (const int part) const
 get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_COL_BY_PART_FOR_LOOP_ for loops) More...
 
NumeredDofEntity_multiIndex::iterator getNumeredDofsColsEnd (const int part) const
 get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_COL_BY_PART_FOR_LOOP_ for loops) More...
 
 Problem (Interface &moab, const EntityHandle meshset)
 
virtual ~Problem ()
 
BitProblemId getId () const
 
std::string getName () const
 
DofIdx getNbDofsRow () const
 
DofIdx getNbDofsCol () const
 
DofIdx getNbLocalDofsRow () const
 
DofIdx getNbLocalDofsCol () const
 
DofIdx getNbGhostDofsRow () const
 
DofIdx getNbGhostDofsCol () const
 
BitRefLevel getBitRefLevel () const
 
BitRefLevel getMaskBitRefLevel () const
 
MoFEMErrorCode getRowDofsByPetscGlobalDofIdx (DofIdx idx, const NumeredDofEntity **dof_ptr) const
 
MoFEMErrorCode getColDofsByPetscGlobalDofIdx (DofIdx idx, const NumeredDofEntity **dof_ptr) const
 
BitFEId getBitFEId () const
 
MoFEMErrorCode getNumberOfElementsByNameAndPart (MPI_Comm comm, const std::string name, PetscLayout *layout) const
 Get number of finite elements by name on processors. More...
 
MoFEMErrorCode getNumberOfElementsByPart (MPI_Comm comm, PetscLayout *layout) const
 Get number of finite elements on processors. More...
 
boost::shared_ptr< SequenceDofContainergetRowDofsSequence () const
 Get reference to sequence data numbered dof container. More...
 
boost::shared_ptr< SequenceDofContainergetColDofsSequence () const
 Get reference to sequence data numbered dof container. More...
 

Public Attributes

EntityHandle meshset
 Problem meshset (on tag of this meshset all data related to problem are stored) More...
 
BitProblemIdtagId
 Unique problem ID. More...
 
const char * tagName
 Problem name. More...
 
int tagNameSize
 Size of problem name. More...
 
BitFEIdtagBitFEId
 IDs of finite elements in problem. More...
 
BitRefLeveltagBitRefLevel
 BitRef level of finite elements in problem. More...
 
BitRefLeveltagMaskBitRefLevel
 BItRefMask of elements in problem. More...
 
DofIdx nbDofsRow
 Global number of DOFs in row. More...
 
DofIdx nbDofsCol
 Global number of DOFs in col. More...
 
DofIdx nbLocDofsRow
 Local number of DOFs in row. More...
 
DofIdx nbLocDofsCol
 Local number of DOFs in colIs. More...
 
DofIdx nbGhostDofsRow
 Number of ghost DOFs in row. More...
 
DofIdx nbGhostDofsCol
 Number of ghost DOFs in col. More...
 
boost::shared_ptr< NumeredDofEntity_multiIndexnumeredDofsRows
 store DOFs on rows for this problem More...
 
boost::shared_ptr< NumeredDofEntity_multiIndexnumeredDofsCols
 store DOFs on columns for this problem More...
 
NumeredEntFiniteElement_multiIndex numeredFiniteElements
 store finite elements More...
 
boost::shared_ptr< SubProblemDatasubProblemData
 
boost::shared_ptr< ComposedProblemsDatacomposedProblemsData
 

Private Attributes

boost::shared_ptr< SequenceDofContainersequenceRowDofContainer
 
boost::shared_ptr< SequenceDofContainersequenceColDofContainer
 

Friends

std::ostream & operator<< (std::ostream &os, const Problem &e)
 

Detailed Description

keeps basic data about problem

This is low level structure with information about problem, what elements compose problem and what DOFs are on rows and columns.

Todo:
fix names following name convention
Examples:
cell_forces.cpp, and MagneticElement.hpp.

Definition at line 84 of file ProblemsMultiIndices.hpp.

Member Typedef Documentation

◆ SequenceDofContainer

typedef multi_index_container< boost::weak_ptr<std::vector<NumeredDofEntity> >, indexed_by< sequenced<> > > MoFEM::Problem::SequenceDofContainer

Definition at line 641 of file ProblemsMultiIndices.hpp.

Constructor & Destructor Documentation

◆ Problem()

MoFEM::Problem::Problem ( Interface moab,
const EntityHandle  meshset 
)

Definition at line 39 of file ProblemsMultiIndices.cpp.

39  :
40  meshset(meshset),
41  numeredDofsRows(boost::shared_ptr<NumeredDofEntity_multiIndex>(new NumeredDofEntity_multiIndex())),
42  numeredDofsCols(boost::shared_ptr<NumeredDofEntity_multiIndex>(new NumeredDofEntity_multiIndex())),
43  sequenceRowDofContainer(boost::make_shared<SequenceDofContainer>()),
44  sequenceColDofContainer(boost::make_shared<SequenceDofContainer>()) {
45  ErrorCode rval;
46  Tag th_ProblemId;
47  rval = moab.tag_get_handle("_ProblemId",th_ProblemId); MOAB_THROW(rval);
48  rval = moab.tag_get_by_ptr(th_ProblemId,&meshset,1,(const void **)&tagId); MOAB_THROW(rval);
49  Tag th_ProblemName;
50  rval = moab.tag_get_handle("_ProblemName",th_ProblemName); MOAB_THROW(rval);
51  rval = moab.tag_get_by_ptr(th_ProblemName,&meshset,1,(const void **)&tagName,&tagNameSize); MOAB_THROW(rval);
52  Tag th_ProblemFEId;
53  rval = moab.tag_get_handle("_ProblemFEId",th_ProblemFEId); MOAB_THROW(rval);
54  rval = moab.tag_get_by_ptr(th_ProblemFEId,&meshset,1,(const void **)&tagBitFEId); MOAB_THROW(rval);
55  Tag th_RefBitLevel;
56  rval = moab.tag_get_handle("_RefBitLevel",th_RefBitLevel); MOAB_THROW(rval);
57  rval = moab.tag_get_by_ptr(th_RefBitLevel,&meshset,1,(const void **)&tagBitRefLevel); MOAB_THROW(rval);
58  Tag th_RefBitLevel_Mask;
59  rval = moab.tag_get_handle("_RefBitLevelMask",th_RefBitLevel_Mask); MOAB_THROW(rval);
60  rval = moab.tag_get_by_ptr(th_RefBitLevel_Mask,&meshset,1,(const void **)&tagMaskBitRefLevel); MOAB_THROW(rval);
61 }
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, const UId,&NumeredDofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Composite_Name_And_Ent_And_EntDofIdx_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle,&NumeredDofEntity::getEnt >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, DofIdx,&NumeredDofEntity::getEntDofIdx > > >, ordered_non_unique< tag< Idx_mi_tag >, member< NumeredDofEntity, DofIdx,&NumeredDofEntity::dofIdx > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef > >, ordered_non_unique< tag< PetscGlobalIdx_mi_tag >, member< NumeredDofEntity, DofIdx,&NumeredDofEntity::petscGloablDofIdx > >, ordered_non_unique< tag< PetscLocalIdx_mi_tag >, member< NumeredDofEntity, DofIdx,&NumeredDofEntity::petscLocalDofIdx > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle,&NumeredDofEntity::getEnt > >, ordered_non_unique< tag< Order_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, ApproximationOrder,&NumeredDofEntity::getDofOrder > >, ordered_non_unique< tag< Composite_Part_And_Order_mi_tag >, composite_key< NumeredDofEntity, member< NumeredDofEntity, unsigned int,&NumeredDofEntity::pArt >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, ApproximationOrder,&NumeredDofEntity::getDofOrder > > >, ordered_non_unique< tag< Composite_Name_And_Part_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef >, member< NumeredDofEntity, unsigned int,&NumeredDofEntity::pArt > > >, ordered_non_unique< tag< Composite_Name_Ent_And_Part_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle,&NumeredDofEntity::getEnt >, member< NumeredDofEntity, unsigned int,&NumeredDofEntity::pArt > > > >> NumeredDofEntity_multiIndex
MultiIndex container keeps NumeredDofEntity.
int tagNameSize
Size of problem name.
EntityHandle meshset
Problem meshset (on tag of this meshset all data related to problem are stored)
BitProblemId * tagId
Unique problem ID.
const char * tagName
Problem name.
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:569
BitFEId * tagBitFEId
IDs of finite elements in problem.
BitRefLevel * tagMaskBitRefLevel
BItRefMask of elements in problem.
BitRefLevel * tagBitRefLevel
BitRef level of finite elements in problem.
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
boost::shared_ptr< SequenceDofContainer > sequenceColDofContainer
boost::shared_ptr< SequenceDofContainer > sequenceRowDofContainer
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ ~Problem()

MoFEM::Problem::~Problem ( )
virtual

Definition at line 63 of file ProblemsMultiIndices.cpp.

63  {
64 }

Member Function Documentation

◆ getBitFEId()

BitFEId MoFEM::Problem::getBitFEId ( ) const

Definition at line 73 of file ProblemsMultiIndices.cpp.

73  {
74  return *tagBitFEId;
75 }
BitFEId * tagBitFEId
IDs of finite elements in problem.

◆ getBitRefLevel()

BitRefLevel MoFEM::Problem::getBitRefLevel ( ) const

Definition at line 579 of file ProblemsMultiIndices.hpp.

579 { return *tagBitRefLevel; }
BitRefLevel * tagBitRefLevel
BitRef level of finite elements in problem.

◆ getColDofsByPetscGlobalDofIdx()

MoFEMErrorCode MoFEM::Problem::getColDofsByPetscGlobalDofIdx ( DofIdx  idx,
const NumeredDofEntity **  dof_ptr 
) const

Definition at line 88 of file ProblemsMultiIndices.cpp.

88  {
90  NumeredDofEntity_multiIndex::index<PetscGlobalIdx_mi_tag>::type::iterator dit;
91  dit = numeredDofsCols->get<PetscGlobalIdx_mi_tag>().find(idx);
92  if(dit==numeredDofsCols->get<PetscGlobalIdx_mi_tag>().end()) {
93  SETERRQ1(PETSC_COMM_SELF,MOFEM_NOT_FOUND,"row dof <%d> not found",idx);
94  }
95  *dof_ptr = &*(*dit);
97 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:468
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:474
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getColDofsSequence()

boost::shared_ptr<SequenceDofContainer> MoFEM::Problem::getColDofsSequence ( ) const

Get reference to sequence data numbered dof container.

In sequence data container data are physically stored. The purpose of this is to allocate NumeredDofEntity data in bulk, having only one allocation instead each time entity is inserted. That makes code efficient.

The vector in sequence is destroyed if last entity inside that vector is destroyed. All MoFEM::NumeredDofEntity have aliased shared_ptr which points to the vector.

Returns
MoFEM::Problem::SequenceDofContainer

Definition at line 671 of file ProblemsMultiIndices.hpp.

671  {
673  }
boost::shared_ptr< SequenceDofContainer > sequenceColDofContainer

◆ getComposedProblemsData()

boost::shared_ptr<ComposedProblemsData> MoFEM::Problem::getComposedProblemsData ( ) const

Het composed problems data structure.

Definition at line 223 of file ProblemsMultiIndices.hpp.

223  {
224  return composedProblemsData;
225  }
boost::shared_ptr< ComposedProblemsData > composedProblemsData

◆ getDofByNameEntAndEntDofIdx()

MoFEMErrorCode MoFEM::Problem::getDofByNameEntAndEntDofIdx ( const string  name,
const EntityHandle  ent,
const int  ent_dof_idx,
const RowColData  row_or_col,
boost::shared_ptr< NumeredDofEntity > &  dof_ptr 
) const

get DOFs from problem

Note that ent_dof_idx is not coefficient number, is local number of DOFs on the entity. The coefficient number and local index of DOFs or entity are the same on vertices and H1 approximation.

Parameters
namefield name
ententity handle
ent_dof_idxindex of DOFs on entity
row_or_colROW or COL
dof_ptrshared pointer to DOFs if found
Returns
error code
Examples:
cell_forces.cpp.

Definition at line 130 of file ProblemsMultiIndices.cpp.

136  {
138  typedef NumeredDofEntity_multiIndex::index<
139  Composite_Name_And_Ent_And_EntDofIdx_mi_tag
140  >::type NumberdDofByNameEntAndEndDofIdx;
141  NumberdDofByNameEntAndEndDofIdx::iterator it;
142  // not use shared pointer is local here, direct pointer is more efficient
143  NumeredDofEntity_multiIndex *numered_dofs;
144  switch (row_or_col) {
145  case ROW:
146  if(!numeredDofsRows) {
147  SETERRQ(PETSC_COMM_SELF,MOFEM_INVALID_DATA,"Row numbered index in problem not allocated");
148  }
149  numered_dofs = numeredDofsRows.get();
150  break;
151  case COL:
152  if(!numeredDofsRows) {
153  SETERRQ(PETSC_COMM_SELF,MOFEM_INVALID_DATA,"Col numbered index in problem not allocated");
154  }
155  numered_dofs = numeredDofsCols.get();
156  break;
157  default:
158  SETERRQ(
159  PETSC_COMM_SELF,MOFEM_INVALID_DATA,"Only ROW and COL is possible for 3rd argument"
160  );
161  }
162  it = numered_dofs->get<Composite_Name_And_Ent_And_EntDofIdx_mi_tag>().find(
163  boost::make_tuple(name,ent,ent_dof_idx)
164  );
165  if(it!=numered_dofs->get<Composite_Name_And_Ent_And_EntDofIdx_mi_tag>().end()) {
166  dof_ptr = *it;
167  } else {
168  dof_ptr = boost::shared_ptr<NumeredDofEntity>();
169  }
171 }
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, const UId,&NumeredDofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Composite_Name_And_Ent_And_EntDofIdx_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle,&NumeredDofEntity::getEnt >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, DofIdx,&NumeredDofEntity::getEntDofIdx > > >, ordered_non_unique< tag< Idx_mi_tag >, member< NumeredDofEntity, DofIdx,&NumeredDofEntity::dofIdx > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef > >, ordered_non_unique< tag< PetscGlobalIdx_mi_tag >, member< NumeredDofEntity, DofIdx,&NumeredDofEntity::petscGloablDofIdx > >, ordered_non_unique< tag< PetscLocalIdx_mi_tag >, member< NumeredDofEntity, DofIdx,&NumeredDofEntity::petscLocalDofIdx > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle,&NumeredDofEntity::getEnt > >, ordered_non_unique< tag< Order_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, ApproximationOrder,&NumeredDofEntity::getDofOrder > >, ordered_non_unique< tag< Composite_Part_And_Order_mi_tag >, composite_key< NumeredDofEntity, member< NumeredDofEntity, unsigned int,&NumeredDofEntity::pArt >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, ApproximationOrder,&NumeredDofEntity::getDofOrder > > >, ordered_non_unique< tag< Composite_Name_And_Part_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef >, member< NumeredDofEntity, unsigned int,&NumeredDofEntity::pArt > > >, ordered_non_unique< tag< Composite_Name_Ent_And_Part_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref,&NumeredDofEntity::getNameRef >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle,&NumeredDofEntity::getEnt >, member< NumeredDofEntity, unsigned int,&NumeredDofEntity::pArt > > > >> NumeredDofEntity_multiIndex
MultiIndex container keeps NumeredDofEntity.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:468
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:474
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getId()

BitProblemId MoFEM::Problem::getId ( ) const

Definition at line 568 of file ProblemsMultiIndices.hpp.

568 { return *((BitProblemId*)tagId); }
std::bitset< BITPROBLEMID_SIZE > BitProblemId
Definition: Common.hpp:151
BitProblemId * tagId
Unique problem ID.

◆ getMaskBitRefLevel()

BitRefLevel MoFEM::Problem::getMaskBitRefLevel ( ) const

Definition at line 580 of file ProblemsMultiIndices.hpp.

580 { return *tagMaskBitRefLevel; }
BitRefLevel * tagMaskBitRefLevel
BItRefMask of elements in problem.

◆ getName()

std::string MoFEM::Problem::getName ( ) const

Definition at line 570 of file ProblemsMultiIndices.hpp.

570 { return std::string((char *)tagName,tagNameSize); }
int tagNameSize
Size of problem name.
const char * tagName
Problem name.

◆ getNbDofsCol()

DofIdx MoFEM::Problem::getNbDofsCol ( ) const

Definition at line 573 of file ProblemsMultiIndices.hpp.

573 { return nbDofsCol; }
DofIdx nbDofsCol
Global number of DOFs in col.

◆ getNbDofsRow()

DofIdx MoFEM::Problem::getNbDofsRow ( ) const

Definition at line 572 of file ProblemsMultiIndices.hpp.

572 { return nbDofsRow; }
DofIdx nbDofsRow
Global number of DOFs in row.

◆ getNbGhostDofsCol()

DofIdx MoFEM::Problem::getNbGhostDofsCol ( ) const

Definition at line 577 of file ProblemsMultiIndices.hpp.

577 { return nbGhostDofsCol; }
DofIdx nbGhostDofsCol
Number of ghost DOFs in col.

◆ getNbGhostDofsRow()

DofIdx MoFEM::Problem::getNbGhostDofsRow ( ) const

Definition at line 576 of file ProblemsMultiIndices.hpp.

576 { return nbGhostDofsRow; }
DofIdx nbGhostDofsRow
Number of ghost DOFs in row.

◆ getNbLocalDofsCol()

DofIdx MoFEM::Problem::getNbLocalDofsCol ( ) const

Definition at line 575 of file ProblemsMultiIndices.hpp.

575 { return nbLocDofsCol; }
DofIdx nbLocDofsCol
Local number of DOFs in colIs.

◆ getNbLocalDofsRow()

DofIdx MoFEM::Problem::getNbLocalDofsRow ( ) const

Definition at line 574 of file ProblemsMultiIndices.hpp.

574 { return nbLocDofsRow; }
DofIdx nbLocDofsRow
Local number of DOFs in row.

◆ getNumberOfElementsByNameAndPart()

MoFEMErrorCode MoFEM::Problem::getNumberOfElementsByNameAndPart ( MPI_Comm  comm,
const std::string  name,
PetscLayout *  layout 
) const

Get number of finite elements by name on processors.

Size retuned IS is equal to size of processors.

What PetscLayout see, http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/index.html

Example of usage for layout

PetscInt rstart, rend;
ierr = PetscLayoutGetRange(layout, &rstart, &rend); CHKERRG(ierr);
int global_size;
ierr = PetscLayoutGetSize(layout,&global_size); CHKERRG(ierr);
Parameters
commCommunicator
nameFinite element name
layoutGet number of elements on each processor
Returns
error code

Definition at line 99 of file ProblemsMultiIndices.cpp.

99  {
101  int size, rank;
102  MPI_Comm_size(comm,&size);
103  MPI_Comm_rank(comm,&rank);
104  ierr = PetscLayoutCreate(comm,layout); CHKERRG(ierr);
105  ierr = PetscLayoutSetBlockSize(*layout,1); CHKERRG(ierr);
106  const NumeredEntFiniteElementbyNameAndPart &fe_by_name_and_part = numeredFiniteElements.get<Composite_Name_And_Part_mi_tag>();
107  int nb_elems;
108  nb_elems = fe_by_name_and_part.count(boost::make_tuple(name,rank));
109  ierr = PetscLayoutSetLocalSize(*layout,nb_elems); CHKERRG(ierr);
110  ierr = PetscLayoutSetUp(*layout); CHKERRG(ierr);
112 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:468
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:511
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:474
NumeredEntFiniteElement_multiIndex numeredFiniteElements
store finite elements
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
NumeredEntFiniteElement_multiIndex::index< Composite_Name_And_Part_mi_tag >::type NumeredEntFiniteElementbyNameAndPart
Entity finite element multi-index by finite element name and partition.

◆ getNumberOfElementsByPart()

MoFEMErrorCode MoFEM::Problem::getNumberOfElementsByPart ( MPI_Comm  comm,
PetscLayout *  layout 
) const

Get number of finite elements on processors.

Size retuned IS is equal to size of processors.

What PetscLayout see, http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/index.html

Example of usage for layout

PetscInt rstart, rend;
ierr = PetscLayoutGetRange(layout, &rstart, &rend); CHKERRG(ierr);
int global_size;
ierr = PetscLayoutGetSize(layout,&global_size); CHKERRG(ierr);
Parameters
commCommunicator
layoutGet number of elements on each processor
Returns
error code

Definition at line 114 of file ProblemsMultiIndices.cpp.

114  {
116  int size, rank;
117  MPI_Comm_size(comm,&size);
118  MPI_Comm_rank(comm,&rank);
119  ierr = PetscLayoutCreate(comm,layout); CHKERRG(ierr);
120  ierr = PetscLayoutSetBlockSize(*layout,1); CHKERRG(ierr);
121  typedef NumeredEntFiniteElement_multiIndex::index<Part_mi_tag>::type FeByPart;
122  const FeByPart &fe_by_part = numeredFiniteElements.get<Part_mi_tag>();
123  int nb_elems;
124  nb_elems = fe_by_part.count(rank);
125  ierr = PetscLayoutSetLocalSize(*layout,nb_elems); CHKERRG(ierr);
126  ierr = PetscLayoutSetUp(*layout); CHKERRG(ierr);
128 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:468
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:511
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:474
NumeredEntFiniteElement_multiIndex numeredFiniteElements
store finite elements
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80

◆ getNumeredDofsCols()

const boost::shared_ptr<NumeredDofEntity_multiIndex>& MoFEM::Problem::getNumeredDofsCols ( ) const

get access to numeredDofsCols storing DOFs on cols

Definition at line 115 of file ProblemsMultiIndices.hpp.

115  {
116  return numeredDofsCols;
117  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsBegin() [1/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsColsBegin ( ) const

get begin iterator for numeredDofsCols (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_ for loops)

Definition at line 307 of file ProblemsMultiIndices.hpp.

307 { return numeredDofsCols->begin(); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsBegin() [2/4]

NumeredDofEntityByFieldName::iterator MoFEM::Problem::getNumeredDofsColsBegin ( const std::string &  name) const

get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_FOR_LOOP_ for loops)

Definition at line 442 of file ProblemsMultiIndices.hpp.

443  { return numeredDofsCols->get<FieldName_mi_tag>().lower_bound(name); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsBegin() [3/4]

NumeredDofEntityByNameEntAndPart::iterator MoFEM::Problem::getNumeredDofsColsBegin ( const std::string &  name,
const EntityHandle  ent,
const int  part 
) const

get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_ENT_PART_FOR_LOOP_ for loops)

Definition at line 490 of file ProblemsMultiIndices.hpp.

490  {
491  return numeredDofsCols->get<Composite_Name_Ent_And_Part_mi_tag>().lower_bound(boost::make_tuple(name,ent,part));
492  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsBegin() [4/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsColsBegin ( const int  part) const

get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_COL_BY_PART_FOR_LOOP_ for loops)

Definition at line 551 of file ProblemsMultiIndices.hpp.

551  {
552  return numeredDofsRows->get<Unique_mi_tag>().lower_bound(
554  );
555  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
static UId getGlobalUniqueIdCalculate_Low_Proc(const int owner_proc)

◆ getNumeredDofsColsByEntBegin()

NumeredDofEntityByEnt::iterator MoFEM::Problem::getNumeredDofsColsByEntBegin ( const EntityHandle  ent) const

get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_ENT_FOR_LOOP_ for loops)

Definition at line 396 of file ProblemsMultiIndices.hpp.

397  { return numeredDofsCols->get<Ent_mi_tag>().lower_bound(ent); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsByEntEnd()

NumeredDofEntityByEnt::iterator MoFEM::Problem::getNumeredDofsColsByEntEnd ( const EntityHandle  ent) const

get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_ENT_FOR_LOOP_ for loops)

Definition at line 400 of file ProblemsMultiIndices.hpp.

401  { return numeredDofsCols->get<Ent_mi_tag>().upper_bound(ent); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsByLocIdxBegin()

NumeredDofEntityByLocalIdx::iterator MoFEM::Problem::getNumeredDofsColsByLocIdxBegin ( const DofIdx  locidx) const

get begin iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_FOR_LOOP_ for loops)

Definition at line 350 of file ProblemsMultiIndices.hpp.

351  { return numeredDofsCols->get<PetscLocalIdx_mi_tag>().lower_bound(locidx); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsByLocIdxEnd()

NumeredDofEntityByLocalIdx::iterator MoFEM::Problem::getNumeredDofsColsByLocIdxEnd ( const DofIdx  locidx) const

get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_FOR_LOOP_ for loops)

Definition at line 354 of file ProblemsMultiIndices.hpp.

355  { return numeredDofsCols->get<PetscLocalIdx_mi_tag>().upper_bound(locidx); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsEnd() [1/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsColsEnd ( ) const

get end iterator for numeredDofsCols (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_ for loops)

Definition at line 310 of file ProblemsMultiIndices.hpp.

310 { return numeredDofsCols->end(); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsEnd() [2/4]

NumeredDofEntityByFieldName::iterator MoFEM::Problem::getNumeredDofsColsEnd ( const std::string &  name) const

get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_FOR_LOOP_ for loops)

Definition at line 446 of file ProblemsMultiIndices.hpp.

447  { return numeredDofsCols->get<FieldName_mi_tag>().upper_bound(name); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsEnd() [3/4]

NumeredDofEntityByNameEntAndPart::iterator MoFEM::Problem::getNumeredDofsColsEnd ( const std::string &  name,
const EntityHandle  ent,
const int  part 
) const

get end iterator for numeredDofsCols (insted you can use _IT_NUMEREDDOF_COL_BY_NAME_ENT_PART_FOR_LOOP_ for loops)

Definition at line 495 of file ProblemsMultiIndices.hpp.

495  {
496  return numeredDofsCols->get<Composite_Name_Ent_And_Part_mi_tag>().upper_bound(boost::make_tuple(name,ent,part));
497  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getNumeredDofsColsEnd() [4/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsColsEnd ( const int  part) const

get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_COL_BY_PART_FOR_LOOP_ for loops)

Definition at line 558 of file ProblemsMultiIndices.hpp.

558  {
559  return numeredDofsRows->get<Unique_mi_tag>().upper_bound(
561  );
562  }
static UId getGlobalUniqueIdCalculate_Hi_Proc(const int owner_proc)
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRows()

const boost::shared_ptr<NumeredDofEntity_multiIndex>& MoFEM::Problem::getNumeredDofsRows ( ) const

get access to numeredDofsRows storing DOFs on rows

Definition at line 108 of file ProblemsMultiIndices.hpp.

108  {
109  return numeredDofsRows;
110  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsBegin() [1/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsRowsBegin ( ) const

get begin iterator for numeredDofsRows (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_ for loops)

Definition at line 301 of file ProblemsMultiIndices.hpp.

301 { return numeredDofsRows->begin(); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsBegin() [2/4]

NumeredDofEntityByFieldName::iterator MoFEM::Problem::getNumeredDofsRowsBegin ( const std::string &  name) const

get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_FOR_LOOP_ for loops)

Definition at line 434 of file ProblemsMultiIndices.hpp.

435  { return numeredDofsRows->get<FieldName_mi_tag>().lower_bound(name); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsBegin() [3/4]

NumeredDofEntityByNameEntAndPart::iterator MoFEM::Problem::getNumeredDofsRowsBegin ( const std::string &  name,
const EntityHandle  ent,
const int  part 
) const

get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_ENT_PART_FOR_LOOP_ for loops)

Definition at line 480 of file ProblemsMultiIndices.hpp.

480  {
481  return numeredDofsRows->get<Composite_Name_Ent_And_Part_mi_tag>().lower_bound(boost::make_tuple(name,ent,part));
482  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsBegin() [4/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsRowsBegin ( const int  part) const

get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_OWNPROC_FOR_LOOP_ for loops)

Definition at line 518 of file ProblemsMultiIndices.hpp.

518  {
519  return numeredDofsRows->get<Unique_mi_tag>().lower_bound(
521  );
522  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
static UId getGlobalUniqueIdCalculate_Low_Proc(const int owner_proc)

◆ getNumeredDofsRowsByEntBegin()

NumeredDofEntityByEnt::iterator MoFEM::Problem::getNumeredDofsRowsByEntBegin ( const EntityHandle  ent) const

get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_ENT_FOR_LOOP_ for loops)

Definition at line 388 of file ProblemsMultiIndices.hpp.

389  { return numeredDofsRows->get<Ent_mi_tag>().lower_bound(ent); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsByEntEnd()

NumeredDofEntityByEnt::iterator MoFEM::Problem::getNumeredDofsRowsByEntEnd ( const EntityHandle  ent) const

get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_ENT_FOR_LOOP_ for loops)

Definition at line 392 of file ProblemsMultiIndices.hpp.

393  { return numeredDofsRows->get<Ent_mi_tag>().upper_bound(ent); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsByLocIdxBegin()

NumeredDofEntityByLocalIdx::iterator MoFEM::Problem::getNumeredDofsRowsByLocIdxBegin ( const DofIdx  locidx) const

get begin iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_FOR_LOOP_ for loops)

Definition at line 342 of file ProblemsMultiIndices.hpp.

343  { return numeredDofsRows->get<PetscLocalIdx_mi_tag>().lower_bound(locidx); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsByLocIdxEnd()

NumeredDofEntityByLocalIdx::iterator MoFEM::Problem::getNumeredDofsRowsByLocIdxEnd ( const DofIdx  locidx) const

get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_FOR_LOOP_ for loops)

Definition at line 346 of file ProblemsMultiIndices.hpp.

347  { return numeredDofsRows->get<PetscLocalIdx_mi_tag>().upper_bound(locidx); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsEnd() [1/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsRowsEnd ( ) const

get end iterator for numeredDofsRows (insted you can use #_IT_NUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_ for loops)

Definition at line 304 of file ProblemsMultiIndices.hpp.

304 { return numeredDofsRows->end(); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsEnd() [2/4]

NumeredDofEntityByFieldName::iterator MoFEM::Problem::getNumeredDofsRowsEnd ( const std::string &  name) const

get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_FOR_LOOP_ for loops)

Definition at line 438 of file ProblemsMultiIndices.hpp.

439  { return numeredDofsRows->get<FieldName_mi_tag>().upper_bound(name); }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsEnd() [3/4]

NumeredDofEntityByNameEntAndPart::iterator MoFEM::Problem::getNumeredDofsRowsEnd ( const std::string &  name,
const EntityHandle  ent,
const int  part 
) const

get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_NAME_ENT_PART_FOR_LOOP_ for loops)

Definition at line 485 of file ProblemsMultiIndices.hpp.

485  {
486  return numeredDofsRows->get<Composite_Name_Ent_And_Part_mi_tag>().upper_bound(boost::make_tuple(name,ent,part));
487  }
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredDofsRowsEnd() [4/4]

NumeredDofEntity_multiIndex::iterator MoFEM::Problem::getNumeredDofsRowsEnd ( const int  part) const

get end iterator for numeredDofsRows (insted you can use _IT_NUMEREDDOF_ROW_BY_OWNPROC_FOR_LOOP_ for loops)

Definition at line 525 of file ProblemsMultiIndices.hpp.

525  {
526  return numeredDofsRows->get<Unique_mi_tag>().upper_bound(
528  );
529  }
static UId getGlobalUniqueIdCalculate_Hi_Proc(const int owner_proc)
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getNumeredFEsBegin()

NumeredEntFiniteElementbyName::iterator MoFEM::Problem::getNumeredFEsBegin ( std::string  fe_name) const

Definition at line 262 of file ProblemsMultiIndices.hpp.

262  {
263  return numeredFiniteElements.get<FiniteElement_name_mi_tag>().lower_bound(fe_name);
264  }
NumeredEntFiniteElement_multiIndex numeredFiniteElements
store finite elements

◆ getNumeredFEsEnd()

NumeredEntFiniteElementbyName::iterator MoFEM::Problem::getNumeredFEsEnd ( std::string  fe_name) const

Definition at line 266 of file ProblemsMultiIndices.hpp.

266  {
267  return numeredFiniteElements.get<FiniteElement_name_mi_tag>().upper_bound(fe_name);
268  }
NumeredEntFiniteElement_multiIndex numeredFiniteElements
store finite elements

◆ getNumeredFiniteElements()

const NumeredEntFiniteElement_multiIndex& MoFEM::Problem::getNumeredFiniteElements ( ) const

get access to reference for multi-index storing finite elements

Definition at line 122 of file ProblemsMultiIndices.hpp.

122  {
123  return numeredFiniteElements;
124  }
NumeredEntFiniteElement_multiIndex numeredFiniteElements
store finite elements

◆ getRowDofsByPetscGlobalDofIdx()

MoFEMErrorCode MoFEM::Problem::getRowDofsByPetscGlobalDofIdx ( DofIdx  idx,
const NumeredDofEntity **  dof_ptr 
) const

Definition at line 77 of file ProblemsMultiIndices.cpp.

77  {
79  NumeredDofEntity_multiIndex::index<PetscGlobalIdx_mi_tag>::type::iterator dit;
80  dit = numeredDofsRows->get<PetscGlobalIdx_mi_tag>().find(idx);
81  if(dit==numeredDofsRows->get<PetscGlobalIdx_mi_tag>().end()) {
82  SETERRQ1(PETSC_COMM_SELF,MOFEM_NOT_FOUND,"row dof <%d> not found",idx);
83  }
84  *dof_ptr = &*(*dit);
86 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:468
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:474
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem

◆ getRowDofsSequence()

boost::shared_ptr<SequenceDofContainer> MoFEM::Problem::getRowDofsSequence ( ) const

Get reference to sequence data numbered dof container.

In sequence data container data are physically stored. The purpose of this is to allocate NumeredDofEntity data in bulk, having only one allocation instead each time entity is inserted. That makes code efficient.

The vector in sequence is destroyed if last entity inside that vector is destroyed. All MoFEM::NumeredDofEntity have aliased shared_ptr which points to the vector.

Returns
MoFEM::Problem::SequenceDofContainer

Definition at line 655 of file ProblemsMultiIndices.hpp.

655  {
657  }
boost::shared_ptr< SequenceDofContainer > sequenceRowDofContainer

◆ getSubData()

boost::shared_ptr<SubProblemData> MoFEM::Problem::getSubData ( ) const

Get main problem of sub-problem is.

Returns
sub problem data structure
Examples:
cell_forces.cpp.

Definition at line 211 of file ProblemsMultiIndices.hpp.

211  {
212  return subProblemData;
213  }
boost::shared_ptr< SubProblemData > subProblemData

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Problem e 
)
friend

Definition at line 66 of file ProblemsMultiIndices.cpp.

66  {
67  os << "problem id " << e.getId()
68  << " FiniteElement id " << e.getBitFEId()
69  << " name "<<e.getName();
70  return os;
71 }

Member Data Documentation

◆ composedProblemsData

boost::shared_ptr<ComposedProblemsData> MoFEM::Problem::composedProblemsData
mutable

Pointer to data structure from which this problem is composed

Definition at line 218 of file ProblemsMultiIndices.hpp.

◆ meshset

EntityHandle MoFEM::Problem::meshset

Problem meshset (on tag of this meshset all data related to problem are stored)

Definition at line 86 of file ProblemsMultiIndices.hpp.

◆ nbDofsCol

DofIdx MoFEM::Problem::nbDofsCol
mutable

Global number of DOFs in col.

Definition at line 95 of file ProblemsMultiIndices.hpp.

◆ nbDofsRow

DofIdx MoFEM::Problem::nbDofsRow
mutable

Global number of DOFs in row.

Definition at line 94 of file ProblemsMultiIndices.hpp.

◆ nbGhostDofsCol

DofIdx MoFEM::Problem::nbGhostDofsCol
mutable

Number of ghost DOFs in col.

Definition at line 99 of file ProblemsMultiIndices.hpp.

◆ nbGhostDofsRow

DofIdx MoFEM::Problem::nbGhostDofsRow
mutable

Number of ghost DOFs in row.

Definition at line 98 of file ProblemsMultiIndices.hpp.

◆ nbLocDofsCol

DofIdx MoFEM::Problem::nbLocDofsCol
mutable

Local number of DOFs in colIs.

Definition at line 97 of file ProblemsMultiIndices.hpp.

◆ nbLocDofsRow

DofIdx MoFEM::Problem::nbLocDofsRow
mutable

Local number of DOFs in row.

Definition at line 96 of file ProblemsMultiIndices.hpp.

◆ numeredDofsCols

boost::shared_ptr<NumeredDofEntity_multiIndex> MoFEM::Problem::numeredDofsCols
mutable

store DOFs on columns for this problem

Definition at line 102 of file ProblemsMultiIndices.hpp.

◆ numeredDofsRows

boost::shared_ptr<NumeredDofEntity_multiIndex> MoFEM::Problem::numeredDofsRows
mutable

store DOFs on rows for this problem

Definition at line 101 of file ProblemsMultiIndices.hpp.

◆ numeredFiniteElements

NumeredEntFiniteElement_multiIndex MoFEM::Problem::numeredFiniteElements
mutable

store finite elements

Definition at line 103 of file ProblemsMultiIndices.hpp.

◆ sequenceColDofContainer

boost::shared_ptr<SequenceDofContainer> MoFEM::Problem::sequenceColDofContainer
mutableprivate

Definition at line 679 of file ProblemsMultiIndices.hpp.

◆ sequenceRowDofContainer

boost::shared_ptr<SequenceDofContainer> MoFEM::Problem::sequenceRowDofContainer
mutableprivate

Definition at line 678 of file ProblemsMultiIndices.hpp.

◆ subProblemData

boost::shared_ptr<SubProblemData> MoFEM::Problem::subProblemData
mutable

Pointer to data structure. This pointer has allocated data only for sub problems.

Definition at line 205 of file ProblemsMultiIndices.hpp.

◆ tagBitFEId

BitFEId* MoFEM::Problem::tagBitFEId

IDs of finite elements in problem.

Definition at line 90 of file ProblemsMultiIndices.hpp.

◆ tagBitRefLevel

BitRefLevel* MoFEM::Problem::tagBitRefLevel

BitRef level of finite elements in problem.

Definition at line 91 of file ProblemsMultiIndices.hpp.

◆ tagId

BitProblemId* MoFEM::Problem::tagId

Unique problem ID.

Definition at line 87 of file ProblemsMultiIndices.hpp.

◆ tagMaskBitRefLevel

BitRefLevel* MoFEM::Problem::tagMaskBitRefLevel

BItRefMask of elements in problem.

Definition at line 92 of file ProblemsMultiIndices.hpp.

◆ tagName

const char* MoFEM::Problem::tagName

Problem name.

Definition at line 88 of file ProblemsMultiIndices.hpp.

◆ tagNameSize

int MoFEM::Problem::tagNameSize

Size of problem name.

Definition at line 89 of file ProblemsMultiIndices.hpp.


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