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...
int Size() const
Return the logical size of the array.
ParMesh * GetParMesh() const
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.
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.
Mesh * GetMesh() const
Returns the mesh.
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
virtual ~FiniteElementSpaceHierarchy()
Destructor deleting all meshes and spaces that are owned.
Array< FiniteElementSpace * > fespaces
int GetNumLevels() const
Returns the number of levels in the hierarchy.
void AddLevel(Mesh *mesh, FiniteElementSpace *fespace, Operator *prolongation, bool ownM, bool ownFES, bool ownP)
Adds one level to the hierarchy.
int GetFinestLevelIndex() const
Returns the index of the finest level.
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
FiniteElementSpaceHierarchy(Mesh *mesh, FiniteElementSpace *fespace, bool ownM, bool ownFES)
Constructs a space hierarchy with the given mesh and space on the coarsest level. ...
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.
ParFiniteElementSpaceHierarchy(ParMesh *mesh, ParFiniteElementSpace *fespace, bool ownM, bool ownFES)
Constructs a parallel space hierarchy with the given mesh and spaces on level zero.
const FiniteElementCollection * FEColl() const
Operator * GetProlongationAtLevel(int level) const
Returns the prolongation operator from the finite element space at level to the finite element space ...
Class for parallel meshes.
virtual const FiniteElementSpace & GetFinestFESpace() const
Returns the finite element space at the finest level.
Matrix-free transfer operator between finite element spaces working on true degrees of freedom...