13 #include "transfer.hpp" 20 bool ownM,
bool ownFES)
30 for (
int i = 0; i <
meshes.Size(); ++i)
62 bool ownM,
bool ownFES,
76 MFEM_VERIFY(
GetNumLevels() > 0,
"There is no level which can be refined");
83 AddLevel(mesh, fineFEspace, P,
true,
true,
true);
90 MFEM_VERIFY(
GetNumLevels() > 0,
"There is no level which can be refined");
95 AddLevel(mesh, newFEspace, P,
false,
true,
true);
102 "FE space at given level does not exist.");
109 "FE space at given level does not exist.");
126 "Prolongation at given level does not exist.");
149 AddLevel(mesh, fineFEspace, P,
true,
true,
true);
154 int dim,
int ordering)
160 AddLevel(mesh, newFEspace, P,
false,
true,
true);
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 FiniteEleme...
Operator * GetProlongationAtLevel(int level) const
Returns the prolongation operator from the finite element space at level to the finite element space ...
const ParFiniteElementSpace & GetFinestFESpace() const override
Returns the finite element space at the finest level.
Abstract parallel finite element space.
Array< Operator * > prolongations
void DeleteAll()
Delete the whole array.
const ParFiniteElementSpace & GetFESpaceAtLevel(int level) const override
Returns the finite element space at the given level.
virtual const FiniteElementSpace & GetFinestFESpace() const
Returns the finite element space at the finest level.
int GetNumLevels() const
Returns the number of levels in the hierarchy.
void AddOrderRefinedLevel(FiniteElementCollection *fec, int dim=1, int ordering=Ordering::byVDIM) override
Adds one level to the hierarchy by using a different finite element order defined through FiniteEleme...
void AddUniformlyRefinedLevel(int dim=1, int ordering=Ordering::byVDIM) override
Adds one level to the hierarchy by uniformly refining the mesh on the previous level.
Array< bool > ownedProlongations
int Append(const T &el)
Append element 'el' to array, resize if necessary.
const FiniteElementCollection * FEColl() const
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
ParMesh * GetParMesh() const
virtual ~FiniteElementSpaceHierarchy()
Destructor deleting all meshes and spaces that are owned.
Array< FiniteElementSpace * > fespaces
ParFiniteElementSpaceHierarchy()=default
void AddLevel(Mesh *mesh, FiniteElementSpace *fespace, Operator *prolongation, bool ownM, bool ownFES, bool ownP)
Adds one level to the hierarchy.
Mesh * GetMesh() const
Returns the mesh.
virtual const FiniteElementSpace & GetFESpaceAtLevel(int level) const
Returns the finite element space at the given level.
Matrix-free transfer operator between finite element spaces.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
Array< bool > ownedMeshes
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.
FiniteElementSpaceHierarchy()=default
int GetFinestLevelIndex() const
Returns the index of the finest level.
int Size() const
Return the logical size of the array.
Class for parallel meshes.
Matrix-free transfer operator between finite element spaces working on true degrees of freedom...