![]() |
MFEM
v4.2.0
Finite element discretization library
|
#include <fem_extras.hpp>
Public Member Functions | |
| H1_FESpace (Mesh *m, const int p, const int space_dim=3, const int type=BasisType::GaussLobatto, int vdim=1, int order=Ordering::byNODES) | |
| ~H1_FESpace () | |
Public Member Functions inherited from mfem::FiniteElementSpace | |
| FiniteElementSpace () | |
| Default constructor: the object is invalid until initialized using the method Load(). More... | |
| FiniteElementSpace (const FiniteElementSpace &orig, Mesh *mesh=NULL, const FiniteElementCollection *fec=NULL) | |
| Copy constructor: deep copy all data from orig except the Mesh, the FiniteElementCollection, ans some derived data. More... | |
| FiniteElementSpace (Mesh *mesh, const FiniteElementCollection *fec, int vdim=1, int ordering=Ordering::byNODES) | |
| FiniteElementSpace (Mesh *mesh, NURBSExtension *ext, const FiniteElementCollection *fec, int vdim=1, int ordering=Ordering::byNODES) | |
| Construct a NURBS FE space based on the given NURBSExtension, ext. More... | |
| Mesh * | GetMesh () const |
| Returns the mesh. More... | |
| const NURBSExtension * | GetNURBSext () const |
| NURBSExtension * | GetNURBSext () |
| NURBSExtension * | StealNURBSext () |
| bool | Conforming () const |
| bool | Nonconforming () const |
| const SparseMatrix * | GetConformingProlongation () const |
| The returned SparseMatrix is owned by the FiniteElementSpace. More... | |
| const SparseMatrix * | GetConformingRestriction () const |
| The returned SparseMatrix is owned by the FiniteElementSpace. More... | |
| virtual const Operator * | GetProlongationMatrix () const |
| The returned Operator is owned by the FiniteElementSpace. More... | |
| virtual const SparseMatrix * | GetRestrictionMatrix () const |
| The returned SparseMatrix is owned by the FiniteElementSpace. More... | |
| const Operator * | GetElementRestriction (ElementDofOrdering e_ordering) const |
| Return an Operator that converts L-vectors to E-vectors. More... | |
| virtual const Operator * | GetFaceRestriction (ElementDofOrdering e_ordering, FaceType, L2FaceValues mul=L2FaceValues::DoubleValued) const |
| Return an Operator that converts L-vectors to E-vectors on each face. More... | |
| const QuadratureInterpolator * | GetQuadratureInterpolator (const IntegrationRule &ir) const |
| Return a QuadratureInterpolator that interpolates E-vectors to quadrature point values and/or derivatives (Q-vectors). More... | |
| const QuadratureInterpolator * | GetQuadratureInterpolator (const QuadratureSpace &qs) const |
| Return a QuadratureInterpolator that interpolates E-vectors to quadrature point values and/or derivatives (Q-vectors). More... | |
| const FaceQuadratureInterpolator * | GetFaceQuadratureInterpolator (const IntegrationRule &ir, FaceType type) const |
| Return a FaceQuadratureInterpolator that interpolates E-vectors to quadrature point values and/or derivatives (Q-vectors). More... | |
| int | GetVDim () const |
| Returns vector dimension. More... | |
| int | GetOrder (int i) const |
| Returns the order of the i'th finite element. More... | |
| int | GetFaceOrder (int i) const |
| Returns the order of the i'th face finite element. More... | |
| int | GetNDofs () const |
| Returns number of degrees of freedom. More... | |
| int | GetVSize () const |
| Return the number of vector dofs, i.e. GetNDofs() x GetVDim(). More... | |
| virtual int | GetTrueVSize () const |
| Return the number of vector true (conforming) dofs. More... | |
| int | GetNConformingDofs () const |
| int | GetConformingVSize () const |
| Ordering::Type | GetOrdering () const |
| Return the ordering method. More... | |
| const FiniteElementCollection * | FEColl () const |
| int | GetNVDofs () const |
| Number of all scalar vertex dofs. More... | |
| int | GetNEDofs () const |
| Number of all scalar edge-interior dofs. More... | |
| int | GetNFDofs () const |
| Number of all scalar face-interior dofs. More... | |
| int | GetNV () const |
| Returns number of vertices in the mesh. More... | |
| int | GetNE () const |
| Returns number of elements in the mesh. More... | |
| int | GetNF () const |
| Returns number of faces (i.e. co-dimension 1 entities) in the mesh. More... | |
| int | GetNBE () const |
| Returns number of boundary elements in the mesh. More... | |
| int | GetNFbyType (FaceType type) const |
| Returns the number of faces according to the requested type. More... | |
| int | GetElementType (int i) const |
| Returns the type of element i. More... | |
| void | GetElementVertices (int i, Array< int > &vertices) const |
| Returns the vertices of element i. More... | |
| int | GetBdrElementType (int i) const |
| Returns the type of boundary element i. More... | |
| ElementTransformation * | GetElementTransformation (int i) const |
| Returns ElementTransformation for the i-th element. More... | |
| void | GetElementTransformation (int i, IsoparametricTransformation *ElTr) |
| Returns the transformation defining the i-th element in the user-defined variable ElTr. More... | |
| ElementTransformation * | GetBdrElementTransformation (int i) const |
| Returns ElementTransformation for the i-th boundary element. More... | |
| int | GetAttribute (int i) const |
| int | GetBdrAttribute (int i) const |
| virtual void | GetElementDofs (int i, Array< int > &dofs) const |
| Returns indexes of degrees of freedom in array dofs for i'th element. More... | |
| virtual void | GetBdrElementDofs (int i, Array< int > &dofs) const |
| Returns indexes of degrees of freedom for i'th boundary element. More... | |
| virtual void | GetFaceDofs (int i, Array< int > &dofs) const |
| Returns the indexes of the degrees of freedom for i'th face including the dofs for the edges and the vertices of the face. More... | |
| void | GetEdgeDofs (int i, Array< int > &dofs) const |
| Returns the indexes of the degrees of freedom for i'th edge including the dofs for the vertices of the edge. More... | |
| void | GetVertexDofs (int i, Array< int > &dofs) const |
| void | GetElementInteriorDofs (int i, Array< int > &dofs) const |
| void | GetFaceInteriorDofs (int i, Array< int > &dofs) const |
| int | GetNumElementInteriorDofs (int i) const |
| void | GetEdgeInteriorDofs (int i, Array< int > &dofs) const |
| void | DofsToVDofs (Array< int > &dofs, int ndofs=-1) const |
| void | DofsToVDofs (int vd, Array< int > &dofs, int ndofs=-1) const |
| int | DofToVDof (int dof, int vd, int ndofs=-1) const |
| int | VDofToDof (int vdof) const |
| void | GetElementVDofs (int i, Array< int > &vdofs) const |
| Returns indexes of degrees of freedom in array dofs for i'th element. More... | |
| void | GetBdrElementVDofs (int i, Array< int > &vdofs) const |
| Returns indexes of degrees of freedom for i'th boundary element. More... | |
| void | GetFaceVDofs (int i, Array< int > &vdofs) const |
| Returns indexes of degrees of freedom for i'th face element (2D and 3D). More... | |
| void | GetEdgeVDofs (int i, Array< int > &vdofs) const |
| Returns indexes of degrees of freedom for i'th edge. More... | |
| void | GetVertexVDofs (int i, Array< int > &vdofs) const |
| void | GetElementInteriorVDofs (int i, Array< int > &vdofs) const |
| void | GetEdgeInteriorVDofs (int i, Array< int > &vdofs) const |
| void | RebuildElementToDofTable () |
| void | ReorderElementToDofTable () |
| Reorder the scalar DOFs based on the element ordering. More... | |
| const Table & | GetElementToDofTable () const |
| Return a reference to the internal Table that stores the lists of scalar dofs, for each mesh element, as returned by GetElementDofs(). More... | |
| const Table & | GetBdrElementToDofTable () const |
| Return a reference to the internal Table that stores the lists of scalar dofs, for each boundary mesh element, as returned by GetBdrElementDofs(). More... | |
| const Table & | GetFaceToDofTable () const |
| Return a reference to the internal Table that stores the lists of scalar dofs, for each face in the mesh, as returned by GetFaceDofs(). In this context, "face" refers to a (dim-1)-dimensional mesh entity. More... | |
| void | BuildDofToArrays () |
| Initialize internal data that enables the use of the methods GetElementForDof() and GetLocalDofForDof(). More... | |
| int | GetElementForDof (int i) const |
| Return the index of the first element that contains dof i. More... | |
| int | GetLocalDofForDof (int i) const |
| Return the local dof index in the first element that contains dof i. More... | |
| const FiniteElement * | GetFE (int i) const |
| Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in the mesh object. More... | |
| const FiniteElement * | GetBE (int i) const |
| Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th boundary face in the mesh object. More... | |
| const FiniteElement * | GetFaceElement (int i) const |
| Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th face in the mesh object. Faces in this case refer to the MESHDIM-1 primitive so in 2D they are segments and in 1D they are points. More... | |
| const FiniteElement * | GetEdgeElement (int i) const |
| Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th edge in the mesh object. More... | |
| const FiniteElement * | GetTraceElement (int i, Geometry::Type geom_type) const |
| Return the trace element from element 'i' to the given 'geom_type'. More... | |
| virtual void | GetEssentialVDofs (const Array< int > &bdr_attr_is_ess, Array< int > &ess_vdofs, int component=-1) const |
| Mark degrees of freedom associated with boundary elements with the specified boundary attributes (marked in 'bdr_attr_is_ess'). For spaces with 'vdim' > 1, the 'component' parameter can be used to restricts the marked vDOFs to the specified component. More... | |
| virtual void | GetEssentialTrueDofs (const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1) |
| Get a list of essential true dofs, ess_tdof_list, corresponding to the boundary attributes marked in the array bdr_attr_is_ess. For spaces with 'vdim' > 1, the 'component' parameter can be used to restricts the marked tDOFs to the specified component. More... | |
| void | ConvertToConformingVDofs (const Array< int > &dofs, Array< int > &cdofs) |
| For a partially conforming FE space, convert a marker array (nonzero entries are true) on the partially conforming dofs to a marker array on the conforming dofs. A conforming dofs is marked iff at least one of its dependent dofs is marked. More... | |
| void | ConvertFromConformingVDofs (const Array< int > &cdofs, Array< int > &dofs) |
| For a partially conforming FE space, convert a marker array (nonzero entries are true) on the conforming dofs to a marker array on the (partially conforming) dofs. A dof is marked iff it depends on a marked conforming dofs, where dependency is defined by the ConformingRestriction matrix; in other words, a dof is marked iff it corresponds to a marked conforming dof. More... | |
| SparseMatrix * | D2C_GlobalRestrictionMatrix (FiniteElementSpace *cfes) |
| Generate the global restriction matrix from a discontinuous FE space to the continuous FE space of the same polynomial degree. More... | |
| SparseMatrix * | D2Const_GlobalRestrictionMatrix (FiniteElementSpace *cfes) |
| Generate the global restriction matrix from a discontinuous FE space to the piecewise constant FE space. More... | |
| SparseMatrix * | H2L_GlobalRestrictionMatrix (FiniteElementSpace *lfes) |
| Construct the restriction matrix from the FE space given by (*this) to the lower degree FE space given by (*lfes) which is defined on the same mesh. More... | |
| void | GetTransferOperator (const FiniteElementSpace &coarse_fes, OperatorHandle &T) const |
| Construct and return an Operator that can be used to transfer GridFunction data from coarse_fes, defined on a coarse mesh, to this FE space, defined on a refined mesh. More... | |
| virtual void | GetTrueTransferOperator (const FiniteElementSpace &coarse_fes, OperatorHandle &T) const |
| Construct and return an Operator that can be used to transfer true-dof data from coarse_fes, defined on a coarse mesh, to this FE space, defined on a refined mesh. More... | |
| virtual void | Update (bool want_transform=true) |
| Reflect changes in the mesh: update number of DOFs, etc. Also, calculate GridFunction transformation operator (unless want_transform is false). Safe to call multiple times, does nothing if space already up to date. More... | |
| const Operator * | GetUpdateOperator () |
| Get the GridFunction update operator. More... | |
| void | GetUpdateOperator (OperatorHandle &T) |
| Return the update operator in the given OperatorHandle, T. More... | |
| void | SetUpdateOperatorOwner (bool own) |
| Set the ownership of the update operator: if set to false, the Operator returned by GetUpdateOperator() must be deleted outside the FiniteElementSpace. More... | |
| void | SetUpdateOperatorType (Operator::Type tid) |
| Specify the Operator::Type to be used by the update operators. More... | |
| virtual void | UpdatesFinished () |
| Free the GridFunction update operator (if any), to save memory. More... | |
| long | GetSequence () const |
| Return update counter (see Mesh::sequence) More... | |
| bool | IsDGSpace () const |
| Return whether or not the space is discontinuous (L2) More... | |
| void | Save (std::ostream &out) const |
| Save finite element space to output stream out. More... | |
| FiniteElementCollection * | Load (Mesh *m, std::istream &input) |
| Read a FiniteElementSpace from a stream. The returned FiniteElementCollection is owned by the caller. More... | |
| virtual | ~FiniteElementSpace () |
Additional Inherited Members | |
Static Public Member Functions inherited from mfem::FiniteElementSpace | |
| static void | AdjustVDofs (Array< int > &vdofs) |
| static void | MarkerToList (const Array< int > &marker, Array< int > &list) |
| Convert a Boolean marker array to a list containing all marked indices. More... | |
| static void | ListToMarker (const Array< int > &list, int marker_size, Array< int > &marker, int mark_val=-1) |
| Convert an array of indices (list) to a Boolean marker array where all indices in the list are marked with the given value and the rest are set to zero. More... | |
Protected Types inherited from mfem::FiniteElementSpace | |
| using | key_face = std::tuple< bool, ElementDofOrdering, FaceType, L2FaceValues > |
| The face restriction operators, see GetFaceRestriction(). More... | |
| using | map_L2F = std::unordered_map< const key_face, Operator *, key_hash > |
Protected Member Functions inherited from mfem::FiniteElementSpace | |
| void | UpdateNURBS () |
| void | Construct () |
| void | Destroy () |
| void | BuildElementToDofTable () const |
| void | BuildBdrElementToDofTable () const |
| void | BuildFaceToDofTable () const |
| void | BuildNURBSFaceToDofTable () const |
| Generates partial face_dof table for a NURBS space. More... | |
| void | GetEntityDofs (int entity, int index, Array< int > &dofs, Geometry::Type master_geom=Geometry::INVALID) const |
| Helper to get vertex, edge or face DOFs (entity=0,1,2 resp.). More... | |
| void | GetDegenerateFaceDofs (int index, Array< int > &dofs, Geometry::Type master_geom) const |
| void | BuildConformingInterpolation () const |
| Calculate the cP and cR matrices for a nonconforming mesh. More... | |
| void | MakeVDimMatrix (SparseMatrix &mat) const |
| Replicate 'mat' in the vector dimension, according to vdim ordering mode. More... | |
| SparseMatrix * | RefinementMatrix_main (const int coarse_ndofs, const Table &coarse_elem_dof, const DenseTensor localP[]) const |
| void | GetLocalRefinementMatrices (Geometry::Type geom, DenseTensor &localP) const |
| void | GetLocalDerefinementMatrices (Geometry::Type geom, DenseTensor &localR) const |
| SparseMatrix * | RefinementMatrix (int old_ndofs, const Table *old_elem_dof) |
| SparseMatrix * | DerefinementMatrix (int old_ndofs, const Table *old_elem_dof) |
| Calculate GridFunction restriction matrix after mesh derefinement. More... | |
| void | GetLocalRefinementMatrices (const FiniteElementSpace &coarse_fes, Geometry::Type geom, DenseTensor &localP) const |
| Return in localP the local refinement matrices that map between fespaces after mesh refinement. More... | |
| void | Constructor (Mesh *mesh, NURBSExtension *ext, const FiniteElementCollection *fec, int vdim=1, int ordering=Ordering::byNODES) |
| Help function for constructors + Load(). More... | |
Static Protected Member Functions inherited from mfem::FiniteElementSpace | |
| static int | DecodeDof (int dof) |
| Helpers to remove encoded sign from a DOF. More... | |
| static int | DecodeDof (int dof, double &sign) |
| static void | AddDependencies (SparseMatrix &deps, Array< int > &master_dofs, Array< int > &slave_dofs, DenseMatrix &I) |
| static bool | DofFinalizable (int dof, const Array< bool > &finalized, const SparseMatrix &deps) |
Protected Attributes inherited from mfem::FiniteElementSpace | |
| Mesh * | mesh |
| The mesh that FE space lives on (not owned). More... | |
| const FiniteElementCollection * | fec |
| Associated FE collection (not owned). More... | |
| int | vdim |
| Vector dimension (number of unknowns per degree of freedom). More... | |
| Ordering::Type | ordering |
| int | ndofs |
| Number of degrees of freedom. Number of unknowns is ndofs * vdim. More... | |
| int | nvdofs |
| int | nedofs |
| int | nfdofs |
| int | nbdofs |
| int * | fdofs |
| int * | bdofs |
| Table * | elem_dof |
| Table * | bdrElem_dof |
| Table * | face_dof |
| Array< int > | face_to_be |
| Array< int > | dof_elem_array |
| Array< int > | dof_ldof_array |
| NURBSExtension * | NURBSext |
| int | own_ext |
| SparseMatrix * | cP |
| SparseMatrix * | cR |
| Conforming restriction matrix such that cR.cP=I. More... | |
| bool | cP_is_set |
| OperatorHandle | Th |
| Transformation to apply to GridFunctions after space Update(). More... | |
| OperatorHandle | L2E_nat |
| The element restriction operators, see GetElementRestriction(). More... | |
| OperatorHandle | L2E_lex |
| map_L2F | L2F |
| Array< QuadratureInterpolator * > | E2Q_array |
| Array < FaceQuadratureInterpolator * > | E2IFQ_array |
| Array < FaceQuadratureInterpolator * > | E2BFQ_array |
| long | sequence |
The H1_FESpace class is a FiniteElementSpace which automatically allocates and destroys its own FiniteElementCollection, in this case an H1_FECollection object.
Definition at line 28 of file fem_extras.hpp.
| mfem::common::H1_FESpace::H1_FESpace | ( | Mesh * | m, |
| const int | p, | ||
| const int | space_dim = 3, |
||
| const int | type = BasisType::GaussLobatto, |
||
| int | vdim = 1, |
||
| int | order = Ordering::byNODES |
||
| ) |
Definition at line 22 of file fem_extras.cpp.
| mfem::common::H1_FESpace::~H1_FESpace | ( | ) |
Definition at line 30 of file fem_extras.cpp.
1.8.5