v0.8.13
Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
MoFEM::NumeredEntFiniteElement Struct Reference

Partitioned (Indexed) Finite Element in Problem. More...

#include <src/multi_indices/FEMultiIndices.hpp>

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

Public Types

typedef interface_FiniteElement< EntFiniteElementinterface_type_FiniteElement
 
typedef interface_EntFiniteElement< EntFiniteElementinterface_type_EntFiniteElement
 
- Public Types inherited from MoFEM::interface_RefElement< EntFiniteElement >
typedef interface_RefEntity< EntFiniteElementinterface_type_RefEntity
 
typedef interface_RefElement< EntFiniteElementinterface_type_RefElement
 

Public Member Functions

boost::shared_ptr< EntFiniteElement > & getEntFiniteElement () const
 
 NumeredEntFiniteElement (const boost::shared_ptr< EntFiniteElement > &sptr)
 
unsigned int getPart () const
 Get partition number. More...
 
const FENumeredDofEntity_multiIndexgetRowsDofs () const
 get FE dof on row More...
 
const FENumeredDofEntity_multiIndexgetColsDofs () const
 get FE dof on column More...
 
MoFEMErrorCode getRowDofsByPetscGlobalDofIdx (DofIdx idx, const FENumeredDofEntity **dof_ptr) const
 get FE dof by petsc index More...
 
MoFEMErrorCode getColDofsByPetscGlobalDofIdx (DofIdx idx, const FENumeredDofEntity **dof_ptr) const
 get FE dof by petsc index More...
 
boost::weak_ptr< std::vector< FENumeredDofEntity > > & getRowDofsSequence () const
 Get weak_ptr reference to sequence/vector storing dofs on entity. More...
 
boost::weak_ptr< std::vector< FENumeredDofEntity > > & getColDofsSequence () const
 Get weak_ptr reference to sequence/vector storing dofs on entity. More...
 
- Public Member Functions inherited from MoFEM::interface_EntFiniteElement< EntFiniteElement >
 interface_EntFiniteElement (const boost::shared_ptr< EntFiniteElement > &sptr)
 
const FEDofEntity_multiIndexgetDataDofs () const
 
DofIdx getNbDofsRow () const
 Get number of DOFs on row. More...
 
DofIdx getNbDofsCol () const
 Get number of DOFs on col. More...
 
DofIdx getNbDofsData () const
 Get number of DOFs on data. More...
 
EntityHandle getEnt () const
 Get element entity. More...
 
UId getGlobalUniqueId () const
 Get unique UId for finite element entity. More...
 
SideNumber_multiIndexgetSideNumberTable () const
 
MoFEMErrorCode getElementAdjacency (const Field *field_ptr, Range &adjacency)
 
boost::shared_ptr< RefElement > & getRefElement () const
 
- Public Member Functions inherited from MoFEM::interface_FiniteElement< EntFiniteElement >
 interface_FiniteElement (const boost::shared_ptr< EntFiniteElement > &ptr)
 
const boost::shared_ptr< FiniteElement > & get_MoFEMFiniteElementPtr ()
 
BitFEId getId () const
 Get finite element id. More...
 
EntityHandle getMeshset () const
 Get meshset containing element entities. More...
 
boost::string_ref getNameRef () const
 Get finite element name. More...
 
std::string getName () const
 Get finite element name. More...
 
BitFieldId getBitFieldIdCol () const
 Get field ids on columns. More...
 
BitFieldId getBitFieldIdRow () const
 Get field ids on rows. More...
 
BitFieldId getBitFieldIdData () const
 Get field ids on data. More...
 
unsigned int getBitNumber () const
 Get bit identifying this element. More...
 
- Public Member Functions inherited from MoFEM::interface_RefElement< EntFiniteElement >
 interface_RefElement (const boost::shared_ptr< EntFiniteElement > &sptr)
 
int getBitRefEdgesUlong () const
 
SideNumber_multiIndexgetSideNumberTable () const
 
const boost::shared_ptr< SideNumber > & getSideNumberPtr (const EntityHandle ent) const
 
boost::shared_ptr< RefEntity > & getRefEntityPtr () const
 
const boost::shared_ptr< EntFiniteElement > & getRefElement () const
 
virtual ~interface_RefElement ()
 
- Public Member Functions inherited from MoFEM::interface_RefEntity< EntFiniteElement >
 interface_RefEntity (const boost::shared_ptr< EntFiniteElement > &sptr)
 
 interface_RefEntity (const interface_RefEntity< EntFiniteElement > &interface)
 
virtual ~interface_RefEntity ()
 
boost::shared_ptr< BasicEntityData > & getBasicDataPtr ()
 
const boost::shared_ptr< BasicEntityData > & getBasicDataPtr () const
 
EntityHandle getRefEnt () const
 
EntityType getParentEntType () const
 
EntityHandle getParentEnt () const
 
BitRefLevelgetBitRefLevelPtr () const
 
const BitRefLevelgetBitRefLevel () const
 
unsigned long int getBitRefLevelULong () const
 
EntityType getEntType () const
 
EntityID getEntId () const
 
EntityHandle getOwnerEnt () const
 
EntityHandlegetOwnerEnt ()
 
int getOwnerProc () const
 
intgetOwnerProc ()
 
int getPartProc () const
 
intgetPartProc ()
 
unsigned char getPStatus () const
 
intgetSharingProcsPtr () const
 
EntityHandlegetSharingHandlersPtr () const
 
boost::shared_ptr< EntFiniteElement > & getRefEntityPtr () const
 

Public Attributes

unsigned int part
 Partition number. More...
 
boost::shared_ptr< FENumeredDofEntity_multiIndexrows_dofs
 indexed dofs on rows More...
 
boost::shared_ptr< FENumeredDofEntity_multiIndexcols_dofs
 indexed dofs on columns More...
 
- Public Attributes inherited from MoFEM::interface_FiniteElement< EntFiniteElement >
boost::shared_ptr< EntFiniteElementsFePtr
 
- Public Attributes inherited from MoFEM::interface_RefEntity< EntFiniteElement >
boost::shared_ptr< EntFiniteElementsPtr
 

Private Attributes

boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsRowSequce
 
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsColSequce
 

Friends

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

Detailed Description

Partitioned (Indexed) Finite Element in Problem.

This type of structure is used to compose problem. Problem is build from indexed finite elements. This data structure carry information about partition, which is specific to problem.

Definition at line 694 of file FEMultiIndices.hpp.

Member Typedef Documentation

◆ interface_type_EntFiniteElement

Definition at line 700 of file FEMultiIndices.hpp.

◆ interface_type_FiniteElement

Definition at line 698 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ NumeredEntFiniteElement()

MoFEM::NumeredEntFiniteElement::NumeredEntFiniteElement ( const boost::shared_ptr< EntFiniteElement > &  sptr)

indexed finite element

Definition at line 715 of file FEMultiIndices.hpp.

716  : interface_EntFiniteElement<EntFiniteElement>(sptr), part(-1),
717  rows_dofs(boost::shared_ptr<FENumeredDofEntity_multiIndex>(
719  cols_dofs(boost::shared_ptr<FENumeredDofEntity_multiIndex>(
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows
boost::shared_ptr< FENumeredDofEntity_multiIndex > cols_dofs
indexed dofs on columns
unsigned int part
Partition number.
multi_index_container< boost::shared_ptr< FENumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, const UId, &FENumeredDofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, EntityHandle, &FENumeredDofEntity::getEnt > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef > >, ordered_non_unique< tag< PetscGlobalIdx_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_NumeredDofEntity, DofIdx, &FENumeredDofEntity::getPetscGlobalDofIdx > >, ordered_non_unique< tag< Composite_Name_Type_And_Side_Number_mi_tag >, composite_key< FENumeredDofEntity, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef >, const_mem_fun< FENumeredDofEntity::interface_type_RefEntity, EntityType, &FENumeredDofEntity::getEntType >, KeyFromKey< member< SideNumber, char, &SideNumber::side_number >, member< FENumeredDofEntity::BaseFEDofEntity, boost::shared_ptr< SideNumber >, &FENumeredDofEntity::sideNumberPtr > > > >, ordered_non_unique< tag< Composite_Name_And_Type_mi_tag >, composite_key< FENumeredDofEntity, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef >, const_mem_fun< FENumeredDofEntity::interface_type_RefEntity, EntityType, &FENumeredDofEntity::getEntType > > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< FENumeredDofEntity, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, EntityHandle, &FENumeredDofEntity::getEnt > > > > > FENumeredDofEntity_multiIndex
MultiIndex container keeps FENumeredDofEntity.

Member Function Documentation

◆ getColDofsByPetscGlobalDofIdx()

MoFEMErrorCode MoFEM::NumeredEntFiniteElement::getColDofsByPetscGlobalDofIdx ( DofIdx  idx,
const FENumeredDofEntity **  dof_ptr 
) const

get FE dof by petsc index

Deprecated:
Use getRowDofsByPetscGlobalDofIdx() instead

Definition at line 1224 of file FEMultiIndices.cpp.

1225  {
1227  FENumeredDofEntity_multiIndex::index<PetscGlobalIdx_mi_tag>::type::iterator
1228  dit;
1229  dit = rows_dofs->get<PetscGlobalIdx_mi_tag>().find(idx);
1230  if (dit == rows_dofs->get<PetscGlobalIdx_mi_tag>().end()) {
1231  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_FOUND,
1232  "dof which index < %d > not found", idx);
1233  }
1234  *dof_ptr = &*dit->get();
1236 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows

◆ getColDofsSequence()

boost::weak_ptr<std::vector<FENumeredDofEntity> >& MoFEM::NumeredEntFiniteElement::getColDofsSequence ( ) const

Get weak_ptr reference to sequence/vector storing dofs on entity.

Vector is automatically destroy when last DOF in vector os destroyed. Every shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that vector. That do the trick.

Definition at line 800 of file FEMultiIndices.hpp.

800  {
801  return dofsColSequce;
802  }
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsColSequce

◆ getColsDofs()

const FENumeredDofEntity_multiIndex& MoFEM::NumeredEntFiniteElement::getColsDofs ( ) const

get FE dof on column

Definition at line 738 of file FEMultiIndices.hpp.

738  {
739  return *cols_dofs;
740  };
boost::shared_ptr< FENumeredDofEntity_multiIndex > cols_dofs
indexed dofs on columns

◆ getEntFiniteElement()

boost::shared_ptr<EntFiniteElement>& MoFEM::NumeredEntFiniteElement::getEntFiniteElement ( ) const

Definition at line 708 of file FEMultiIndices.hpp.

708  {
709  return this->sPtr;
710  }
boost::shared_ptr< EntFiniteElement > sPtr

◆ getPart()

unsigned int MoFEM::NumeredEntFiniteElement::getPart ( ) const

Get partition number.

Returns
[description]

Definition at line 726 of file FEMultiIndices.hpp.

726 { return part; };
unsigned int part
Partition number.

◆ getRowDofsByPetscGlobalDofIdx()

MoFEMErrorCode MoFEM::NumeredEntFiniteElement::getRowDofsByPetscGlobalDofIdx ( DofIdx  idx,
const FENumeredDofEntity **  dof_ptr 
) const

get FE dof by petsc index

Definition at line 1210 of file FEMultiIndices.cpp.

1211  {
1213  FENumeredDofEntity_multiIndex::index<PetscGlobalIdx_mi_tag>::type::iterator
1214  dit;
1215  dit = rows_dofs->get<PetscGlobalIdx_mi_tag>().find(idx);
1216  if (dit == rows_dofs->get<PetscGlobalIdx_mi_tag>().end()) {
1217  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_FOUND,
1218  "dof which index < %d > not found", idx);
1219  }
1220  *dof_ptr = &*dit->get();
1222 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows

◆ getRowDofsSequence()

boost::weak_ptr<std::vector<FENumeredDofEntity> >& MoFEM::NumeredEntFiniteElement::getRowDofsSequence ( ) const

Get weak_ptr reference to sequence/vector storing dofs on entity.

Vector is automatically destroy when last DOF in vector os destroyed. Every shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that vector. That do the trick.

Definition at line 787 of file FEMultiIndices.hpp.

787  {
788  return dofsRowSequce;
789  }
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsRowSequce

◆ getRowsDofs()

const FENumeredDofEntity_multiIndex& MoFEM::NumeredEntFiniteElement::getRowsDofs ( ) const

get FE dof on row

Definition at line 731 of file FEMultiIndices.hpp.

731  {
732  return *rows_dofs;
733  };
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const NumeredEntFiniteElement e 
)
friend
Deprecated:
Use getColDofsByPetscGlobalDofIdx() instead

Definition at line 772 of file FEMultiIndices.hpp.

773  {
774  os << "part " << e.part << " " << *(e.sFePtr);
775  return os;
776  }

Member Data Documentation

◆ cols_dofs

boost::shared_ptr<FENumeredDofEntity_multiIndex> MoFEM::NumeredEntFiniteElement::cols_dofs

indexed dofs on columns

Definition at line 706 of file FEMultiIndices.hpp.

◆ dofsColSequce

boost::weak_ptr<std::vector<FENumeredDofEntity> > MoFEM::NumeredEntFiniteElement::dofsColSequce
mutableprivate

Definition at line 807 of file FEMultiIndices.hpp.

◆ dofsRowSequce

boost::weak_ptr<std::vector<FENumeredDofEntity> > MoFEM::NumeredEntFiniteElement::dofsRowSequce
mutableprivate

Definition at line 806 of file FEMultiIndices.hpp.

◆ part

unsigned int MoFEM::NumeredEntFiniteElement::part

Partition number.

Definition at line 702 of file FEMultiIndices.hpp.

◆ rows_dofs

boost::shared_ptr<FENumeredDofEntity_multiIndex> MoFEM::NumeredEntFiniteElement::rows_dofs

indexed dofs on rows

Definition at line 704 of file FEMultiIndices.hpp.


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