v0.9.0
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...
 
boost::weak_ptr< FENumeredDofEntitygetRowDofsByPetscGlobalDofIdx (const int idx) const
 get FE dof by petsc index More...
 
boost::weak_ptr< FENumeredDofEntitygetColDofsByPetscGlobalDofIdx (const int idx) const
 get FE dof by petsc index More...
 
DEPRECATED MoFEMErrorCode getRowDofsByPetscGlobalDofIdx (const int idx, const FENumeredDofEntity **dof_raw_ptr) const
 
DEPRECATED MoFEMErrorCode getColDofsByPetscGlobalDofIdx (const int idx, const FENumeredDofEntity **dof_raw_ptr) const
 
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 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 619 of file FEMultiIndices.hpp.

Member Typedef Documentation

◆ interface_type_EntFiniteElement

Definition at line 625 of file FEMultiIndices.hpp.

◆ interface_type_FiniteElement

Definition at line 623 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ NumeredEntFiniteElement()

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

\Construct indexed finite element

Definition at line 640 of file FEMultiIndices.hpp.

641  : interface_EntFiniteElement<EntFiniteElement>(sptr), part(-1),
642  rows_dofs(boost::shared_ptr<FENumeredDofEntity_multiIndex>(
644  cols_dofs(boost::shared_ptr<FENumeredDofEntity_multiIndex>(
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< 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::BaseFEEntity, 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.
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.

Member Function Documentation

◆ getColDofsByPetscGlobalDofIdx() [1/2]

boost::weak_ptr< FENumeredDofEntity > MoFEM::NumeredEntFiniteElement::getColDofsByPetscGlobalDofIdx ( const int  idx) const

get FE dof by petsc index

Definition at line 969 of file FEMultiIndices.cpp.

969  {
970  auto comp = [idx](const auto &a) { return a->getPetscGlobalDofIdx() == idx; };
971  auto dit = std::find_if(cols_dofs->begin(), cols_dofs->end(), comp);
972  if (dit != cols_dofs->end())
973  return *dit;
974  else
975  return boost::weak_ptr<FENumeredDofEntity>();
976 }
boost::shared_ptr< FENumeredDofEntity_multiIndex > cols_dofs
indexed dofs on columns

◆ getColDofsByPetscGlobalDofIdx() [2/2]

DEPRECATED MoFEMErrorCode MoFEM::NumeredEntFiniteElement::getColDofsByPetscGlobalDofIdx ( const int  idx,
const FENumeredDofEntity **  dof_raw_ptr 
) const
Deprecated:
Unsafe to use, will be removed in future releases.

Get the Row Dofs By Petsc Global Dof Idx object

Parameters
idx
dof_raw_ptr
Returns
MoFEMErrorCode

Definition at line 710 of file FEMultiIndices.hpp.

711  {
713  if (auto r = getColDofsByPetscGlobalDofIdx(idx).lock())
714  *dof_raw_ptr = r.get();
715  else
716  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_FOUND,
717  "dof which index < %d > not found", idx);
719  }
boost::weak_ptr< FENumeredDofEntity > getColDofsByPetscGlobalDofIdx(const int idx) const
get FE dof by petsc index
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ 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 749 of file FEMultiIndices.hpp.

749  {
750  return dofsColSequce;
751  }
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsColSequce

◆ getColsDofs()

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

get FE dof on column

Definition at line 663 of file FEMultiIndices.hpp.

663  {
664  return *cols_dofs;
665  };
boost::shared_ptr< FENumeredDofEntity_multiIndex > cols_dofs
indexed dofs on columns

◆ getEntFiniteElement()

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

Definition at line 633 of file FEMultiIndices.hpp.

633  {
634  return this->sPtr;
635  }
boost::shared_ptr< EntFiniteElement > sPtr

◆ getPart()

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

Get partition number.

Returns
[description]

Definition at line 651 of file FEMultiIndices.hpp.

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

◆ getRowDofsByPetscGlobalDofIdx() [1/2]

boost::weak_ptr< FENumeredDofEntity > MoFEM::NumeredEntFiniteElement::getRowDofsByPetscGlobalDofIdx ( const int  idx) const

get FE dof by petsc index

Definition at line 959 of file FEMultiIndices.cpp.

959  {
960  auto comp = [idx](const auto &a) { return a->getPetscGlobalDofIdx() == idx; };
961  auto dit = std::find_if(rows_dofs->begin(), rows_dofs->end(), comp);
962  if (dit != rows_dofs->end())
963  return *dit;
964  else
965  return boost::weak_ptr<FENumeredDofEntity>();
966 }
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows

◆ getRowDofsByPetscGlobalDofIdx() [2/2]

DEPRECATED MoFEMErrorCode MoFEM::NumeredEntFiniteElement::getRowDofsByPetscGlobalDofIdx ( const int  idx,
const FENumeredDofEntity **  dof_raw_ptr 
) const
Deprecated:
Unsafe to use, will be removed in future releases.

Get the Row Dofs By Petsc Global Dof Idx object

Parameters
idx
dof_raw_ptr
Returns
MoFEMErrorCode

Definition at line 689 of file FEMultiIndices.hpp.

690  {
692  if (auto r = getRowDofsByPetscGlobalDofIdx(idx).lock())
693  *dof_raw_ptr = r.get();
694  else
695  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_FOUND,
696  "dof which index < %d > not found", idx);
698  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
boost::weak_ptr< FENumeredDofEntity > getRowDofsByPetscGlobalDofIdx(const int idx) const
get FE dof by petsc index
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ 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 736 of file FEMultiIndices.hpp.

736  {
737  return dofsRowSequce;
738  }
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsRowSequce

◆ getRowsDofs()

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

get FE dof on row

Definition at line 656 of file FEMultiIndices.hpp.

656  {
657  return *rows_dofs;
658  };
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

Definition at line 721 of file FEMultiIndices.hpp.

722  {
723  os << "part " << e.part << " " << *(e.sFePtr);
724  return os;
725  }

Member Data Documentation

◆ cols_dofs

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

indexed dofs on columns

Definition at line 631 of file FEMultiIndices.hpp.

◆ dofsColSequce

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

Definition at line 756 of file FEMultiIndices.hpp.

◆ dofsRowSequce

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

Definition at line 755 of file FEMultiIndices.hpp.

◆ part

unsigned int MoFEM::NumeredEntFiniteElement::part

Partition number.

Definition at line 627 of file FEMultiIndices.hpp.

◆ rows_dofs

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

indexed dofs on rows

Definition at line 629 of file FEMultiIndices.hpp.


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