15 #include "../config/config.hpp"
16 #include "../linalg/sparsemat.hpp"
17 #include "../mesh/mesh.hpp"
376 void Save (std::ostream &out)
const;
~RefinementData()
Releases the allocated memory.
Abstract class for Finite Elements.
void GetVertexVDofs(int i, Array< int > &vdofs) const
int GetAttribute(int i) const
Array< RefinementData * > RefData
Collection of currently known refinement data.
int GetNDofs() const
Returns number of degrees of freedom.
int ndofs
Number of degrees of freedom. Number of unknowns are ndofs*vdim.
int GetBdrAttribute(int i) const
Return the attribute of boundary element i.
const Table & GetBdrElementToDofTable() const
void GetElementInteriorVDofs(int i, Array< int > &vdofs) const
Class for grid function - Vector with associated FE space.
int DofToVDof(int dof, int vd, int ndofs=-1) const
void GetElementVertices(int i, Array< int > &vertices) const
Returns the vertices of element i.
int GetNBE() const
Returns number of boundary elements.
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
virtual void GetEssentialVDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_vdofs) const
int VDofToDof(int vdof) const
int GetElementBaseGeometry(int i) const
virtual void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list)
int num_fine_elems
Number of the fine elements.
int GetFaceOrder(int i) const
Returns the order of the i'th face finite element.
void BuildElementToDofTable()
void GetEdgeFaceDofs(int type, int index, Array< int > &dofs)
Data type dense matrix using column-major storage.
int vdim
Vector dimension (number of unknowns per degree of freedom).
int num_fine_dofs
Number of the fine dofs on the coarse element (fc)
int GetNumElementInteriorDofs(int i) const
SparseMatrix * GlobalRestrictionMatrix(FiniteElementSpace *cfes, int one_vdim=-1)
const FiniteElement * GetTraceElement(int i, int geom_type) const
Return the trace element from element 'i' to the given 'geom_type'.
int GetBdrAttribute(int i) const
int GetNE() const
Returns number of elements.
int GetBdrElementType(int i) const
Returns the type of boundary element i.
void GetElementVertices(int i, Array< int > &dofs) const
Returns the indices of the dofs of element i.
int GetNV() const
Returns number of nodes in the mesh.
const FiniteElement * GetFaceElement(int i) const
void GetConformingInterpolation()
int RefinementType
Type of refinement (int, a tree, etc.)
const FiniteElementCollection * fec
NURBSExtension * GetNURBSext()
DenseMatrix * LocalInterpolation(int k, int cdofs, RefinementType type, Array< int > &rows)
Generates the local interpolation matrix for coarse element k.
Array< int > dof_elem_array
static void MarkerToList(const Array< int > &marker, Array< int > &list)
Convert a Boolean marker array to a list containing all marked indices.
virtual void GetFaceDofs(int i, Array< int > &dofs) const
ElementTransformation * GetBdrElementTransformation(int i)
Returns the transformation defining the i-th boundary element.
void ConvertFromConformingVDofs(const Array< int > &cdofs, Array< int > &dofs)
int GetNE() const
Returns number of elements in the mesh.
void GetVertexDofs(int i, Array< int > &dofs) const
const FiniteElement * GetEdgeElement(int i) const
const SparseMatrix * GetConformingRestriction()
int GetNBE() const
Returns number of boundary elements in the mesh.
Table * fl_to_fc
(local dofs of) fine element <-> fine dofs on the coarse element
Mesh * GetMesh() const
Returns the mesh.
SparseMatrix * D2Const_GlobalRestrictionMatrix(FiniteElementSpace *cfes)
SparseMatrix * D2C_GlobalRestrictionMatrix(FiniteElementSpace *cfes)
virtual void GetElementDofs(int i, Array< int > &dofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
NURBSExtension * StealNURBSext()
ElementTransformation * GetBdrElementTransformation(int i) const
Returns ElementTransformation for the i'th boundary element.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
Array< int > dof_ldof_array
int GetElementType(int i) const
Returns the type of element i.
const SparseMatrix * GetConformingProlongation()
FiniteElementSpace(FiniteElementSpace &)
int GetVDim() const
Returns vector dimension.
A class for non-conforming AMR on higher-order hexahedral, quadrilateral or triangular meshes...
virtual const SparseMatrix * GetRestrictionMatrix()
void GetEdgeDofs(int i, Array< int > &dofs) const
int GetBdrElementType(int i) const
Returns the type of boundary element i.
void GetElementInteriorDofs(int i, Array< int > &dofs) const
int GetLocalDofForDof(int i)
int GetOrdering() const
Return the ordering method.
int GetElementForDof(int i)
ElementTransformation * GetElementTransformation(int i) const
Returns ElementTransformation for the i'th element.
Data kept for every type of refinement.
Abstract finite element space.
virtual ~FiniteElementSpace()
SparseMatrix * NC_GlobalRestrictionMatrix(FiniteElementSpace *cfes, NCMesh *ncmesh)
SparseMatrix * H2L_GlobalRestrictionMatrix(FiniteElementSpace *lfes)
int GetOrder(int i) const
Returns the order of the i'th finite element.
void MakeVDimMatrix(SparseMatrix &mat) const
void GetEdgeInteriorVDofs(int i, Array< int > &vdofs) const
int GetElementType(int i) const
Returns the type of element i.
bool Nonconforming() const
virtual void GetBdrElementDofs(int i, Array< int > &dofs) const
Returns indexes of degrees of freedom for i'th boundary element.
void ConvertToConformingVDofs(const Array< int > &dofs, Array< int > &cdofs)
virtual int GetTrueVSize()
Return the number of vector true (conforming) dofs.
Mesh * mesh
The mesh that FE space lives on.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
virtual void UpdateAndInterpolate(int num_grid_fns,...)
void GetEdgeInteriorDofs(int i, Array< int > &dofs) const
RefinementType type
Refinement type.
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement associated with i'th element.
void GetFaceVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th face element (2D and 3D).
void GetEdgeVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th edge.
static void ListToMarker(const Array< int > &list, int marker_size, Array< int > &marker, int mark_val=-1)
void ConstructRefinementData(int k, int cdofs, RefinementType type)
Constructs new refinement data using coarse element k as a template.
void DofsToVDofs(Array< int > &dofs) const
const FiniteElementCollection * FEColl() const
const Table & GetElementToDofTable() const
void EliminateEssentialBCFromGRM(FiniteElementSpace *cfes, Array< int > &bdr_attr_is_ess, SparseMatrix *R)
const FiniteElement * GetBE(int i) const
Returns pointer to the FiniteElement for the i'th boundary element.
NURBSExtension * NURBSext
void GetBdrElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th boundary element.
virtual int DofForGeometry(int GeomType) const =0
void Save(std::ostream &out) const
DenseMatrix * I
Local interpolation matrix.
virtual FiniteElementSpace * SaveUpdate()
Return a copy of the current FE space and update.
int GetAttribute(int i) const
Return the attribute of element i.
static void AdjustVDofs(Array< int > &vdofs)
void UpdateAndInterpolate(GridFunction *gf)
A shortcut for passing only one GridFunction to UndateAndInterpolate.