MFEM  v4.5.2
Finite element discretization library
Public Member Functions | Protected Attributes | List of all members
mfem::FiniteElementSpaceHierarchy Class Reference

#include <fespacehierarchy.hpp>

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

Public Member Functions

 FiniteElementSpaceHierarchy ()=default
 
 FiniteElementSpaceHierarchy (Mesh *mesh, FiniteElementSpace *fespace, bool ownM, bool ownFES)
 Constructs a space hierarchy with the given mesh and space on the coarsest level. More...
 
virtual ~FiniteElementSpaceHierarchy ()
 Destructor deleting all meshes and spaces that are owned. More...
 
int GetNumLevels () const
 Returns the number of levels in the hierarchy. More...
 
int GetFinestLevelIndex () const
 Returns the index of the finest level. More...
 
void AddLevel (Mesh *mesh, FiniteElementSpace *fespace, Operator *prolongation, bool ownM, bool ownFES, bool ownP)
 Adds one level to the hierarchy. More...
 
virtual void AddUniformlyRefinedLevel (int dim=1, int ordering=Ordering::byVDIM)
 Adds one level to the hierarchy by uniformly refining the mesh on the previous level. More...
 
virtual void AddOrderRefinedLevel (FiniteElementCollection *fec, int dim=1, int ordering=Ordering::byVDIM)
 Adds one level to the hierarchy by using a different finite element order defined through FiniteElementCollection. More...
 
virtual const FiniteElementSpaceGetFESpaceAtLevel (int level) const
 Returns the finite element space at the given level. More...
 
virtual FiniteElementSpaceGetFESpaceAtLevel (int level)
 Returns the finite element space at the given level. More...
 
virtual const FiniteElementSpaceGetFinestFESpace () const
 Returns the finite element space at the finest level. More...
 
virtual FiniteElementSpaceGetFinestFESpace ()
 Returns the finite element space at the finest level. More...
 
OperatorGetProlongationAtLevel (int level) const
 Returns the prolongation operator from the finite element space at level to the finite element space at level + 1. More...
 

Protected Attributes

Array< Mesh * > meshes
 
Array< FiniteElementSpace * > fespaces
 
Array< Operator * > prolongations
 
Array< bool > ownedMeshes
 
Array< bool > ownedFES
 
Array< bool > ownedProlongations
 

Detailed Description

Class bundling a hierarchy finite element spaces together with the corresponding prolongation operators

Definition at line 26 of file fespacehierarchy.hpp.

Constructor & Destructor Documentation

◆ FiniteElementSpaceHierarchy() [1/2]

mfem::FiniteElementSpaceHierarchy::FiniteElementSpaceHierarchy ( )
default

Construct an empty finite element space hierarchy. This is useful if the hierarchy is constructed by coarsening a fine space, rather than refining a coarse space.

◆ FiniteElementSpaceHierarchy() [2/2]

mfem::FiniteElementSpaceHierarchy::FiniteElementSpaceHierarchy ( Mesh mesh,
FiniteElementSpace fespace,
bool  ownM,
bool  ownFES 
)

Constructs a space hierarchy with the given mesh and space on the coarsest level.

The ownership of the mesh and space may be transferred to the FiniteElementSpaceHierarchy by setting the according boolean variables.

Definition at line 18 of file fespacehierarchy.cpp.

◆ ~FiniteElementSpaceHierarchy()

mfem::FiniteElementSpaceHierarchy::~FiniteElementSpaceHierarchy ( )
virtual

Destructor deleting all meshes and spaces that are owned.

Definition at line 28 of file fespacehierarchy.cpp.

Member Function Documentation

◆ AddLevel()

void mfem::FiniteElementSpaceHierarchy::AddLevel ( Mesh mesh,
FiniteElementSpace fespace,
Operator prolongation,
bool  ownM,
bool  ownFES,
bool  ownP 
)

Adds one level to the hierarchy.

Definition at line 59 of file fespacehierarchy.cpp.

◆ AddOrderRefinedLevel()

void mfem::FiniteElementSpaceHierarchy::AddOrderRefinedLevel ( FiniteElementCollection fec,
int  dim = 1,
int  ordering = Ordering::byVDIM 
)
virtual

Adds one level to the hierarchy by using a different finite element order defined through FiniteElementCollection.

Reimplemented in mfem::ParFiniteElementSpaceHierarchy.

Definition at line 86 of file fespacehierarchy.cpp.

◆ AddUniformlyRefinedLevel()

void mfem::FiniteElementSpaceHierarchy::AddUniformlyRefinedLevel ( int  dim = 1,
int  ordering = Ordering::byVDIM 
)
virtual

Adds one level to the hierarchy by uniformly refining the mesh on the previous level.

Reimplemented in mfem::ParFiniteElementSpaceHierarchy.

Definition at line 73 of file fespacehierarchy.cpp.

◆ GetFESpaceAtLevel() [1/2]

const FiniteElementSpace & mfem::FiniteElementSpaceHierarchy::GetFESpaceAtLevel ( int  level) const
virtual

Returns the finite element space at the given level.

Reimplemented in mfem::ParFiniteElementSpaceHierarchy.

Definition at line 98 of file fespacehierarchy.cpp.

◆ GetFESpaceAtLevel() [2/2]

FiniteElementSpace & mfem::FiniteElementSpaceHierarchy::GetFESpaceAtLevel ( int  level)
virtual

Returns the finite element space at the given level.

Reimplemented in mfem::ParFiniteElementSpaceHierarchy.

Definition at line 106 of file fespacehierarchy.cpp.

◆ GetFinestFESpace() [1/2]

const FiniteElementSpace & mfem::FiniteElementSpaceHierarchy::GetFinestFESpace ( ) const
virtual

Returns the finite element space at the finest level.

Reimplemented in mfem::ParFiniteElementSpaceHierarchy.

Definition at line 113 of file fespacehierarchy.cpp.

◆ GetFinestFESpace() [2/2]

FiniteElementSpace & mfem::FiniteElementSpaceHierarchy::GetFinestFESpace ( )
virtual

Returns the finite element space at the finest level.

Reimplemented in mfem::ParFiniteElementSpaceHierarchy.

Definition at line 118 of file fespacehierarchy.cpp.

◆ GetFinestLevelIndex()

int mfem::FiniteElementSpaceHierarchy::GetFinestLevelIndex ( ) const

Returns the index of the finest level.

Definition at line 57 of file fespacehierarchy.cpp.

◆ GetNumLevels()

int mfem::FiniteElementSpaceHierarchy::GetNumLevels ( ) const

Returns the number of levels in the hierarchy.

Definition at line 55 of file fespacehierarchy.cpp.

◆ GetProlongationAtLevel()

Operator * mfem::FiniteElementSpaceHierarchy::GetProlongationAtLevel ( int  level) const

Returns the prolongation operator from the finite element space at level to the finite element space at level + 1.

Definition at line 123 of file fespacehierarchy.cpp.

Member Data Documentation

◆ fespaces

Array<FiniteElementSpace*> mfem::FiniteElementSpaceHierarchy::fespaces
protected

Definition at line 30 of file fespacehierarchy.hpp.

◆ meshes

Array<Mesh*> mfem::FiniteElementSpaceHierarchy::meshes
protected

Definition at line 29 of file fespacehierarchy.hpp.

◆ ownedFES

Array<bool> mfem::FiniteElementSpaceHierarchy::ownedFES
protected

Definition at line 33 of file fespacehierarchy.hpp.

◆ ownedMeshes

Array<bool> mfem::FiniteElementSpaceHierarchy::ownedMeshes
protected

Definition at line 32 of file fespacehierarchy.hpp.

◆ ownedProlongations

Array<bool> mfem::FiniteElementSpaceHierarchy::ownedProlongations
protected

Definition at line 34 of file fespacehierarchy.hpp.

◆ prolongations

Array<Operator*> mfem::FiniteElementSpaceHierarchy::prolongations
protected

Definition at line 31 of file fespacehierarchy.hpp.


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