MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
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.
 
virtual ~FiniteElementSpaceHierarchy ()
 Destructor deleting all meshes and spaces that are owned.
 
int GetNumLevels () const
 Returns the number of levels in the hierarchy.
 
int GetFinestLevelIndex () const
 Returns the index of the finest level.
 
void AddLevel (Mesh *mesh, FiniteElementSpace *fespace, Operator *prolongation, bool ownM, bool ownFES, bool ownP)
 Adds one level to the hierarchy.
 
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.
 
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.
 
virtual const FiniteElementSpaceGetFESpaceAtLevel (int level) const
 Returns the finite element space at the given level.
 
virtual FiniteElementSpaceGetFESpaceAtLevel (int level)
 Returns the finite element space at the given level.
 
virtual const FiniteElementSpaceGetFinestFESpace () const
 Returns the finite element space at the finest level.
 
virtual FiniteElementSpaceGetFinestFESpace ()
 Returns the finite element space at the finest level.
 
OperatorGetProlongationAtLevel (int level) const
 Returns the prolongation operator from the finite element space at level to the finite element space at level + 1.
 

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]

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.

◆ GetFESpaceAtLevel() [2/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.

◆ GetFinestFESpace() [1/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.

◆ GetFinestFESpace() [2/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.

◆ 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: