MFEM  v3.3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Member Functions | Public Attributes | List of all members
mfem::ParFiniteElementSpace Class Reference

Abstract parallel finite element space. More...

#include <pfespace.hpp>

Inheritance diagram for mfem::ParFiniteElementSpace:
[legend]
Collaboration diagram for mfem::ParFiniteElementSpace:
[legend]

Public Member Functions

 ParFiniteElementSpace (ParMesh *pm, const FiniteElementCollection *f, int dim=1, int ordering=Ordering::byNODES)
 
MPI_Comm GetComm () const
 
int GetNRanks () const
 
int GetMyRank () const
 
ParMeshGetParMesh ()
 
int GetDofSign (int i)
 
HYPRE_Int * GetDofOffsets () const
 
HYPRE_Int * GetTrueDofOffsets () const
 
HYPRE_Int GlobalVSize () const
 
HYPRE_Int GlobalTrueVSize () const
 
virtual int GetTrueVSize () const
 Return the number of local vector true dofs. More...
 
virtual void GetElementDofs (int i, Array< int > &dofs) const
 Returns indexes of degrees of freedom in array dofs for i'th element. More...
 
virtual void GetBdrElementDofs (int i, Array< int > &dofs) const
 Returns indexes of degrees of freedom for i'th boundary element. More...
 
virtual void GetFaceDofs (int i, Array< int > &dofs) const
 
void GetSharedEdgeDofs (int group, int ei, Array< int > &dofs) const
 
void GetSharedFaceDofs (int group, int fi, Array< int > &dofs) const
 
HypreParMatrixDof_TrueDof_Matrix () const
 The true dof-to-dof interpolation matrix. More...
 
HypreParMatrixGetPartialConformingInterpolation ()
 For a non-conforming mesh, construct and return the interpolation matrix from the partially conforming true dofs to the local dofs. The returned pointer must be deleted by the caller. More...
 
HypreParVectorNewTrueDofVector ()
 
void DivideByGroupSize (double *vec)
 Scale a vector of true dofs. More...
 
GroupCommunicatorGroupComm ()
 Return a reference to the internal GroupCommunicator (on VDofs) More...
 
GroupCommunicatorScalarGroupComm ()
 Return a new GroupCommunicator on Dofs. More...
 
void Synchronize (Array< int > &ldof_marker) const
 
virtual void GetEssentialVDofs (const Array< int > &bdr_attr_is_ess, Array< int > &ess_dofs, int component=-1) const
 Determine the boundary degrees of freedom. More...
 
virtual void GetEssentialTrueDofs (const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1)
 
int GetLocalTDofNumber (int ldof) const
 
HYPRE_Int GetGlobalTDofNumber (int ldof) const
 Returns the global tdof number of the given local degree of freedom. More...
 
HYPRE_Int GetGlobalScalarTDofNumber (int sldof)
 
HYPRE_Int GetMyDofOffset () const
 
HYPRE_Int GetMyTDofOffset () const
 
virtual const OperatorGetProlongationMatrix ()
 
virtual const SparseMatrixGetRestrictionMatrix ()
 Get the R matrix which restricts a local dof vector to true dof vector. More...
 
void ExchangeFaceNbrData ()
 
int GetFaceNbrVSize () const
 
void GetFaceNbrElementVDofs (int i, Array< int > &vdofs) const
 
void GetFaceNbrFaceVDofs (int i, Array< int > &vdofs) const
 
const FiniteElementGetFaceNbrFE (int i) const
 
const FiniteElementGetFaceNbrFaceFE (int i) const
 
const HYPRE_Int * GetFaceNbrGlobalDofMap ()
 
void Lose_Dof_TrueDof_Matrix ()
 
void LoseDofOffsets ()
 
void LoseTrueDofOffsets ()
 
bool Conforming () const
 
bool Nonconforming () const
 
virtual void Update (bool want_transform=true)
 
virtual void UpdatesFinished ()
 Free ParGridFunction transformation matrix (if any), to save memory. More...
 
virtual ~ParFiniteElementSpace ()
 
int TrueVSize () const
 
- Public Member Functions inherited from mfem::FiniteElementSpace
 FiniteElementSpace (Mesh *mesh, const FiniteElementCollection *fec, int vdim=1, int ordering=Ordering::byNODES)
 
MeshGetMesh () const
 Returns the mesh. More...
 
NURBSExtensionGetNURBSext ()
 
NURBSExtensionStealNURBSext ()
 
bool Conforming () const
 
bool Nonconforming () const
 
const SparseMatrixGetConformingProlongation () const
 
const SparseMatrixGetConformingRestriction () const
 
int GetVDim () const
 Returns vector dimension. More...
 
int GetOrder (int i) const
 Returns the order of the i'th finite element. More...
 
int GetFaceOrder (int i) const
 Returns the order of the i'th face finite element. More...
 
int GetNDofs () const
 Returns number of degrees of freedom. More...
 
int GetVSize () const
 
int GetNConformingDofs () const
 
int GetConformingVSize () const
 
Ordering::Type GetOrdering () const
 Return the ordering method. More...
 
const FiniteElementCollectionFEColl () const
 
int GetNVDofs () const
 
int GetNEDofs () const
 
int GetNFDofs () const
 
int GetNE () const
 Returns number of elements in the mesh. More...
 
int GetNV () const
 Returns number of nodes in the mesh. More...
 
int GetNBE () const
 Returns number of boundary elements in the mesh. More...
 
int GetElementType (int i) const
 Returns the type of element i. More...
 
void GetElementVertices (int i, Array< int > &vertices) const
 Returns the vertices of element i. More...
 
int GetBdrElementType (int i) const
 Returns the type of boundary element i. More...
 
ElementTransformationGetElementTransformation (int i) const
 Returns ElementTransformation for the i'th element. More...
 
void GetElementTransformation (int i, IsoparametricTransformation *ElTr)
 
ElementTransformationGetBdrElementTransformation (int i) const
 Returns ElementTransformation for the i'th boundary element. More...
 
int GetAttribute (int i) const
 
int GetBdrAttribute (int i) const
 
void GetEdgeDofs (int i, Array< int > &dofs) const
 
void GetVertexDofs (int i, Array< int > &dofs) const
 
void GetElementInteriorDofs (int i, Array< int > &dofs) const
 
void GetFaceInteriorDofs (int i, Array< int > &dofs) const
 
int GetNumElementInteriorDofs (int i) const
 
void GetEdgeInteriorDofs (int i, Array< int > &dofs) const
 
void DofsToVDofs (Array< int > &dofs, int ndofs=-1) const
 
void DofsToVDofs (int vd, Array< int > &dofs, int ndofs=-1) const
 
int DofToVDof (int dof, int vd, int ndofs=-1) const
 
int VDofToDof (int vdof) const
 
void GetElementVDofs (int i, Array< int > &vdofs) const
 Returns indexes of degrees of freedom in array dofs for i'th element. More...
 
void GetBdrElementVDofs (int i, Array< int > &vdofs) const
 Returns indexes of degrees of freedom for i'th boundary element. More...
 
void GetFaceVDofs (int i, Array< int > &vdofs) const
 Returns indexes of degrees of freedom for i'th face element (2D and 3D). More...
 
void GetEdgeVDofs (int i, Array< int > &vdofs) const
 Returns indexes of degrees of freedom for i'th edge. More...
 
void GetVertexVDofs (int i, Array< int > &vdofs) const
 
void GetElementInteriorVDofs (int i, Array< int > &vdofs) const
 
void GetEdgeInteriorVDofs (int i, Array< int > &vdofs) const
 
void RebuildElementToDofTable ()
 
void ReorderElementToDofTable ()
 Reorder the scalar DOFs based on the element ordering. More...
 
void BuildDofToArrays ()
 
const TableGetElementToDofTable () const
 
const TableGetBdrElementToDofTable () const
 
int GetElementForDof (int i) const
 
int GetLocalDofForDof (int i) const
 
const FiniteElementGetFE (int i) const
 Returns pointer to the FiniteElement associated with i'th element. More...
 
const FiniteElementGetBE (int i) const
 Returns pointer to the FiniteElement for the i'th boundary element. More...
 
const FiniteElementGetFaceElement (int i) const
 
const FiniteElementGetEdgeElement (int i) const
 
const FiniteElementGetTraceElement (int i, int geom_type) const
 Return the trace element from element 'i' to the given 'geom_type'. More...
 
void ConvertToConformingVDofs (const Array< int > &dofs, Array< int > &cdofs)
 
void ConvertFromConformingVDofs (const Array< int > &cdofs, Array< int > &dofs)
 
SparseMatrixD2C_GlobalRestrictionMatrix (FiniteElementSpace *cfes)
 
SparseMatrixD2Const_GlobalRestrictionMatrix (FiniteElementSpace *cfes)
 
SparseMatrixH2L_GlobalRestrictionMatrix (FiniteElementSpace *lfes)
 
const OperatorGetUpdateOperator ()
 Get the GridFunction update matrix. More...
 
void SetUpdateOperatorOwner (bool own)
 Set the ownership of the update operator: if set to false, the Operator returned by GetUpdateOperator() must be deleted outside the FiniteElementSpace. More...
 
long GetSequence () const
 Return update counter (see Mesh::sequence) More...
 
void Save (std::ostream &out) const
 
virtual ~FiniteElementSpace ()
 

Public Attributes

int num_face_nbr_dofs
 
Table face_nbr_element_dof
 
Table face_nbr_ldof
 
Array< HYPRE_Int > face_nbr_glob_dof_map
 
Table send_face_nbr_ldof
 

Additional Inherited Members

- Static Public Member Functions inherited from mfem::FiniteElementSpace
static void AdjustVDofs (Array< int > &vdofs)
 
static void MarkerToList (const Array< int > &marker, Array< int > &list)
 Convert a Boolean marker array to a list containing all marked indices. More...
 
static void ListToMarker (const Array< int > &list, int marker_size, Array< int > &marker, int mark_val=-1)
 
- Protected Member Functions inherited from mfem::FiniteElementSpace
void UpdateNURBS ()
 
void Construct ()
 
void Destroy ()
 
void BuildElementToDofTable () const
 
void GetEdgeFaceDofs (int type, int index, Array< int > &dofs) const
 
void GetConformingInterpolation () const
 Calculate the cP and cR matrices for a nonconforming mesh. More...
 
void MakeVDimMatrix (SparseMatrix &mat) const
 
SparseMatrixRefinementMatrix (int old_ndofs, const Table *old_elem_dof)
 Calculate GridFunction interpolation matrix after mesh refinement. More...
 
void GetLocalDerefinementMatrices (int geom, const CoarseFineTransformations &dt, DenseTensor &localR)
 
SparseMatrixDerefinementMatrix (int old_ndofs, const Table *old_elem_dof)
 Calculate GridFunction restriction matrix after mesh derefinement. More...
 
- Protected Attributes inherited from mfem::FiniteElementSpace
Meshmesh
 The mesh that FE space lives on. More...
 
const FiniteElementCollectionfec
 
int vdim
 Vector dimension (number of unknowns per degree of freedom). More...
 
Ordering::Type ordering
 
int ndofs
 Number of degrees of freedom. Number of unknowns are ndofs*vdim. More...
 
int nvdofs
 
int nedofs
 
int nfdofs
 
int nbdofs
 
int * fdofs
 
int * bdofs
 
Tableelem_dof
 
TablebdrElem_dof
 
Array< int > dof_elem_array
 
Array< int > dof_ldof_array
 
NURBSExtensionNURBSext
 
int own_ext
 
SparseMatrixcP
 
SparseMatrixcR
 Conforming restriction matrix such that cR.cP=I. More...
 
bool cP_is_set
 
OperatorT
 Transformation to apply to GridFunctions after space Update(). More...
 
bool own_T
 
long sequence
 

Detailed Description

Abstract parallel finite element space.

Definition at line 31 of file pfespace.hpp.

Constructor & Destructor Documentation

mfem::ParFiniteElementSpace::ParFiniteElementSpace ( ParMesh pm,
const FiniteElementCollection f,
int  dim = 1,
int  ordering = Ordering::byNODES 
)

Definition at line 27 of file pfespace.cpp.

virtual mfem::ParFiniteElementSpace::~ParFiniteElementSpace ( )
inlinevirtual

Definition at line 280 of file pfespace.hpp.

Member Function Documentation

bool mfem::ParFiniteElementSpace::Conforming ( ) const
inline

Definition at line 266 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::DivideByGroupSize ( double *  vec)

Scale a vector of true dofs.

Definition at line 460 of file pfespace.cpp.

HypreParMatrix* mfem::ParFiniteElementSpace::Dof_TrueDof_Matrix ( ) const
inline

The true dof-to-dof interpolation matrix.

Definition at line 198 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::ExchangeFaceNbrData ( )

Definition at line 645 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetBdrElementDofs ( int  i,
Array< int > &  dofs 
) const
virtual

Returns indexes of degrees of freedom for i'th boundary element.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 280 of file pfespace.cpp.

MPI_Comm mfem::ParFiniteElementSpace::GetComm ( ) const
inline

Definition at line 166 of file pfespace.hpp.

HYPRE_Int* mfem::ParFiniteElementSpace::GetDofOffsets ( ) const
inline

Definition at line 174 of file pfespace.hpp.

int mfem::ParFiniteElementSpace::GetDofSign ( int  i)
inline

Definition at line 172 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::GetElementDofs ( int  i,
Array< int > &  dofs 
) const
virtual

Returns indexes of degrees of freedom in array dofs for i'th element.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 266 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetEssentialTrueDofs ( const Array< int > &  bdr_attr_is_ess,
Array< int > &  ess_tdof_list,
int  component = -1 
)
virtual

Get a list of essential true dofs, ess_tdof_list, corresponding to the boundary attributes marked in the array bdr_attr_is_ess.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 529 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetEssentialVDofs ( const Array< int > &  bdr_attr_is_ess,
Array< int > &  ess_dofs,
int  component = -1 
) const
virtual

Determine the boundary degrees of freedom.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 515 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetFaceDofs ( int  i,
Array< int > &  dofs 
) const
virtual

Returns the indexes of the degrees of freedom for i'th face including the dofs for the edges and the vertices of the face.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 294 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetFaceNbrElementVDofs ( int  i,
Array< int > &  vdofs 
) const

Definition at line 865 of file pfespace.cpp.

const FiniteElement * mfem::ParFiniteElementSpace::GetFaceNbrFaceFE ( int  i) const

Definition at line 913 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetFaceNbrFaceVDofs ( int  i,
Array< int > &  vdofs 
) const

Definition at line 871 of file pfespace.cpp.

const FiniteElement * mfem::ParFiniteElementSpace::GetFaceNbrFE ( int  i) const

Definition at line 899 of file pfespace.cpp.

const HYPRE_Int* mfem::ParFiniteElementSpace::GetFaceNbrGlobalDofMap ( )
inline

Definition at line 260 of file pfespace.hpp.

int mfem::ParFiniteElementSpace::GetFaceNbrVSize ( ) const
inline

Definition at line 255 of file pfespace.hpp.

HYPRE_Int mfem::ParFiniteElementSpace::GetGlobalScalarTDofNumber ( int  sldof)

Returns the global tdof number of the given local degree of freedom in the scalar version of the current finite element space. The input should be a scalar local dof.

Definition at line 585 of file pfespace.cpp.

HYPRE_Int mfem::ParFiniteElementSpace::GetGlobalTDofNumber ( int  ldof) const

Returns the global tdof number of the given local degree of freedom.

Definition at line 562 of file pfespace.cpp.

int mfem::ParFiniteElementSpace::GetLocalTDofNumber ( int  ldof) const

If the given ldof is owned by the current processor, return its local tdof number, otherwise return -1

Definition at line 541 of file pfespace.cpp.

HYPRE_Int mfem::ParFiniteElementSpace::GetMyDofOffset ( ) const

Definition at line 622 of file pfespace.cpp.

int mfem::ParFiniteElementSpace::GetMyRank ( ) const
inline

Definition at line 168 of file pfespace.hpp.

HYPRE_Int mfem::ParFiniteElementSpace::GetMyTDofOffset ( ) const

Definition at line 627 of file pfespace.cpp.

int mfem::ParFiniteElementSpace::GetNRanks ( ) const
inline

Definition at line 167 of file pfespace.hpp.

ParMesh* mfem::ParFiniteElementSpace::GetParMesh ( )
inline

Definition at line 170 of file pfespace.hpp.

HypreParMatrix * mfem::ParFiniteElementSpace::GetPartialConformingInterpolation ( )

For a non-conforming mesh, construct and return the interpolation matrix from the partially conforming true dofs to the local dofs. The returned pointer must be deleted by the caller.

Definition at line 1570 of file pfespace.cpp.

const Operator * mfem::ParFiniteElementSpace::GetProlongationMatrix ( )
virtual

Reimplemented from mfem::FiniteElementSpace.

Definition at line 632 of file pfespace.cpp.

virtual const SparseMatrix* mfem::ParFiniteElementSpace::GetRestrictionMatrix ( )
inlinevirtual

Get the R matrix which restricts a local dof vector to true dof vector.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 250 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::GetSharedEdgeDofs ( int  group,
int  ei,
Array< int > &  dofs 
) const

Definition at line 303 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::GetSharedFaceDofs ( int  group,
int  fi,
Array< int > &  dofs 
) const

Definition at line 326 of file pfespace.cpp.

HYPRE_Int* mfem::ParFiniteElementSpace::GetTrueDofOffsets ( ) const
inline

Definition at line 175 of file pfespace.hpp.

virtual int mfem::ParFiniteElementSpace::GetTrueVSize ( ) const
inlinevirtual

Return the number of local vector true dofs.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 182 of file pfespace.hpp.

HYPRE_Int mfem::ParFiniteElementSpace::GlobalTrueVSize ( ) const
inline

Definition at line 178 of file pfespace.hpp.

HYPRE_Int mfem::ParFiniteElementSpace::GlobalVSize ( ) const
inline

Definition at line 176 of file pfespace.hpp.

GroupCommunicator& mfem::ParFiniteElementSpace::GroupComm ( )
inline

Return a reference to the internal GroupCommunicator (on VDofs)

Definition at line 215 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::Lose_Dof_TrueDof_Matrix ( )

Definition at line 922 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::LoseDofOffsets ( )
inline

Definition at line 263 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::LoseTrueDofOffsets ( )
inline

Definition at line 264 of file pfespace.hpp.

HypreParVector* mfem::ParFiniteElementSpace::NewTrueDofVector ( )
inline

Create and return a new HypreParVector on the true dofs, which is owned by (i.e. it must be destroyed by) the calling function.

Definition at line 208 of file pfespace.hpp.

bool mfem::ParFiniteElementSpace::Nonconforming ( ) const
inline

Definition at line 267 of file pfespace.hpp.

GroupCommunicator * mfem::ParFiniteElementSpace::ScalarGroupComm ( )

Return a new GroupCommunicator on Dofs.

Definition at line 478 of file pfespace.cpp.

void mfem::ParFiniteElementSpace::Synchronize ( Array< int > &  ldof_marker) const

Given an integer array on the local degrees of freedom, perform a bitwise OR between the shared dofs.

Definition at line 498 of file pfespace.cpp.

int mfem::ParFiniteElementSpace::TrueVSize ( ) const
inline

Definition at line 283 of file pfespace.hpp.

void mfem::ParFiniteElementSpace::Update ( bool  want_transform = true)
virtual

Reflect changes in the mesh. Calculate one of the refinement/derefinement /rebalance matrices, unless want_transform is false.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 2225 of file pfespace.cpp.

virtual void mfem::ParFiniteElementSpace::UpdatesFinished ( )
inlinevirtual

Free ParGridFunction transformation matrix (if any), to save memory.

Reimplemented from mfem::FiniteElementSpace.

Definition at line 274 of file pfespace.hpp.

Member Data Documentation

Table mfem::ParFiniteElementSpace::face_nbr_element_dof

Definition at line 155 of file pfespace.hpp.

Array<HYPRE_Int> mfem::ParFiniteElementSpace::face_nbr_glob_dof_map

Definition at line 159 of file pfespace.hpp.

Table mfem::ParFiniteElementSpace::face_nbr_ldof

Definition at line 157 of file pfespace.hpp.

int mfem::ParFiniteElementSpace::num_face_nbr_dofs

Definition at line 153 of file pfespace.hpp.

Table mfem::ParFiniteElementSpace::send_face_nbr_ldof

Definition at line 161 of file pfespace.hpp.


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