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);
101 MFEM_ASSERT(level <
fespaces.Size(),
102 "FE space at given level does not exist.");
108 MFEM_ASSERT(level <
fespaces.Size(),
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);
int Append(const T &el)
Append element 'el' to array, resize if necessary.
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
int GetNumLevels() const
Returns the number of levels in the hierarchy.
virtual const FiniteElementSpace & GetFinestFESpace() const
Returns the finite element space at the finest level.
int GetFinestLevelIndex() const
Returns the index of the finest level.
Operator * GetProlongationAtLevel(int level) const
Returns the prolongation operator from the finite element space at level to the finite element space ...
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.
Array< bool > ownedProlongations
virtual ~FiniteElementSpaceHierarchy()
Destructor deleting all meshes and spaces that are owned.
virtual const FiniteElementSpace & GetFESpaceAtLevel(int level) const
Returns the finite element space at the given level.
FiniteElementSpaceHierarchy()=default
Array< bool > ownedMeshes
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...
Array< Operator * > prolongations
Array< FiniteElementSpace * > fespaces
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
const FiniteElementCollection * FEColl() const
Mesh * GetMesh() const
Returns the mesh.
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
ParFiniteElementSpaceHierarchy()=default
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.
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...
const ParFiniteElementSpace & GetFinestFESpace() const override
Returns the finite element space at the finest level.
const ParFiniteElementSpace & GetFESpaceAtLevel(int level) const override
Returns the finite element space at the given level.
Abstract parallel finite element space.
ParMesh * GetParMesh() const
Class for parallel meshes.
Matrix-free transfer operator between finite element spaces.
Matrix-free transfer operator between finite element spaces working on true degrees of freedom.