Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s). More...
Classes | |
| class | BlockDistribution |
| Block distribution of a dense global index range [0, n) over the ranks of a communicator: rank r owns [begin(r), end(r)). More... | |
| class | CoefficientManager |
| Front-end class for creating and storing MFEM coefficients. More... | |
| class | CoefficientMap |
| Class to manage MFEM coefficient objects representing material properties. More... | |
| class | ComplexEquationSystem |
| Class to store weak form components (bilinear and linear forms, and optionally mixed and nonlinear forms) and build methods. More... | |
| class | ComplexEquationSystemProblemOperator |
| Steady-state problem operator with an equation system. More... | |
| class | DampedNewtonSolver |
| mfem::NewtonSolver applying a constant damping factor to the Newton update, optionally shortening it further with a backtracking line search on the residual norm. More... | |
| struct | DistributedEdge |
| An undirected edge of the distributed vertex graph. More... | |
| class | EigenproblemEquationSystem |
| Equation system specialization for eigenproblems. More... | |
| class | EigenproblemESProblemOperator |
| Steady-state eigenproblem operator with an equation system. More... | |
| class | EigensolverBase |
| Base class for eigensolvers. More... | |
| class | EquationSystem |
| Owns the weak-form mathematics of a MOOSE MFEM problem. More... | |
| class | EquationSystemInterface |
| Interface required for: More... | |
| class | EquationSystemProblemOperator |
| Steady-state ProblemOperator that prepares and solves a single EquationSystem. More... | |
| class | LinearSolverBase |
| Base class for linear MFEM solvers and preconditioners. More... | |
| class | LORLinearSolverBase |
| Base class for LOR compatible linear MFEM solvers and preconditioners. More... | |
| class | MeridionalCurlVectorCoefficient |
| Class to compute the meridional curl associated with an azimuthal scalar field A_theta. More... | |
| class | NamedFieldsMap |
| Lightweight adaptor over an std::map from strings to pointer to T. More... | |
| class | NLBoundaryConvectiveHeatFluxIntegrator |
| class | NLCurlCurlIntegrator |
| class | NLCurlCurlJacMatrixCoefficient |
| Matrix coefficient for the Jacobian of NLCurlCurlIntegrator. More... | |
| class | NLDiffusionIntegrator |
| class | NLScaleIntegrator |
| NonlinearFormIntegrator which scales its results by a constant value. More... | |
| class | NonlinearSolverBase |
| MooseObject base for nonlinear MFEM solve strategies configured in the input file. More... | |
| class | ProblemOperator |
| Steady-state problem operator with no equation system. More... | |
| class | ProblemOperatorBase |
| Connects MFEMProblem's MOOSE solver objects to EquationSystem's mathematics. More... | |
| class | ScaleIntegrator |
| Integrator which scales its results by a constant value. More... | |
| struct | SolutionState |
| class | SolverBase |
| Base class for wrapping mfem::Solver-derived classes. More... | |
| class | SuperLUSolver |
| Wrapper for mfem::SuperLUSolver that creates a SuperLURowLocMatrix from the operator when set. More... | |
| class | TimeDependentEquationSystem |
| Class to store weak form components for time dependent PDEs. More... | |
| class | TimeDependentEquationSystemProblemOperator |
| Problem operator for time-dependent problems with an equation system. More... | |
| class | TimeDependentProblemOperator |
| Problem operator for time-dependent problems with no equation system. More... | |
| class | TimeDerivativeMap |
| Lightweight adaptor over a std::map relating names of GridFunctions with the name of their time derivatives. More... | |
| class | TreeCotreeGauge |
| Shared implementation of the tree-cotree gauge for an H(curl) (Nedelec) variable, used by both the real (MFEMTreeCotreeGaugeEssentialConstraint) and complex (MFEMComplexTreeCotreeGaugeEssentialConstraint) constraints. More... | |
Typedefs | |
| using | FECollections = NamedFieldsMap< mfem::FiniteElementCollection > |
| using | FESpaces = NamedFieldsMap< mfem::ParFiniteElementSpace > |
| using | SubMeshes = NamedFieldsMap< mfem::ParSubMesh > |
| using | GridFunctions = NamedFieldsMap< mfem::ParGridFunction > |
| using | ComplexGridFunctions = NamedFieldsMap< mfem::ParComplexGridFunction > |
| using | FESpaceHierarchies = NamedFieldsMap< mfem::ParFiniteElementSpaceHierarchy > |
| using | Kernels = NamedFieldsMap< MFEMKernel > |
| using | BoundaryConditions = NamedFieldsMap< MFEMBoundaryCondition > |
| using | Constraints = NamedFieldsMap< MFEMConstraint > |
| using | EquationSystems = NamedFieldsMap< EquationSystem > |
| using | EigenRHSCoefficient = std::variant< mfem::Coefficient *, mfem::MatrixCoefficient * > |
| Scalar or matrix coefficient scaling the eigenproblem right-hand side. | |
| using | ScalarMap = CoefficientMap< mfem::Coefficient, mfem::PWCoefficient > |
| using | VectorMap = CoefficientMap< mfem::VectorCoefficient, mfem::PWVectorCoefficient > |
| using | MatrixMap = CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient > |
Functions | |
| void | subdomainTDofs (mfem::ParFiniteElementSpace &pfes, const mfem::Array< int > &subdomain_markers, bool include_boundary, mfem::Array< int > &ldof_marker, mfem::Array< int > &tdofs) |
Degrees of freedom of pfes belonging to elements whose mesh attribute is set in the attribute marker array subdomain_markers, as returned by MFEMBlockRestrictable::getSubdomainMarkers. | |
| void | projectCoefficientOnSubdomains (mfem::ParGridFunction &gf, mfem::Coefficient &coef, const mfem::Array< int > &subdomain_markers, const mfem::Array< int > &ldof_marker) |
Overwrite the degrees of freedom of grid function gf marked in the local dof marker ldof_marker with the projection of coefficient coef over the elements whose mesh attribute is set in the attribute marker array subdomain_markers. | |
| void | projectCoefficientOnSubdomains (mfem::ParGridFunction &gf, mfem::VectorCoefficient &coef, const mfem::Array< int > &subdomain_markers, const mfem::Array< int > &ldof_marker) |
| void | zeroTrueDofs (mfem::ParGridFunction &gf, const mfem::Array< int > &tdofs) |
Strongly set the true dofs listed in tdofs of grid function gf to zero, leaving its local vector consistent with the true vector. | |
| template<typename T , typename DestinationFn > | |
| std::vector< T > | groupByDestination (const std::vector< T > &items, int nprocs, DestinationFn destination, std::vector< int > &counts) |
Group items by the destination rank returned by destination, so they can be handed to allToAll. | |
| template<typename T > | |
| std::vector< T > | allToAll (const std::vector< T > &send, const std::vector< int > &send_counts, MPI_Comm comm) |
| MPI_Alltoallv over a trivially copyable payload. | |
| void | distributedSpanningForest (std::vector< DistributedEdge > &edges, std::int64_t num_labels, MPI_Comm comm, std::vector< int > *selected, std::vector< std::int64_t > *owned_labels=nullptr) |
Distributed Boruvka over the edges held collectively by the ranks of comm. | |
| std::vector< std::int64_t > | fetchLabels (const std::vector< std::int64_t > &queries, const std::vector< std::int64_t > &owned_labels, const BlockDistribution &dist, MPI_Comm comm) |
Final component representative of each id in queries, looked up from the distributed label array. | |
| std::size_t | MFEMIndex (const std::size_t i_dim, const std::size_t i_point, const std::size_t num_dims, const std::size_t num_points, const mfem::Ordering::Type ordering) |
| Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering. | |
| libMesh::Point | libMeshPointFromMFEMVector (const mfem::Vector &vec) |
| Convert an MFEM position vector to a libMesh::Point. | |
| mfem::Vector | libMeshPointsToMFEMVector (const std::vector< libMesh::Point > &points, const unsigned int num_dims, const mfem::Ordering::Type ordering) |
| Convert a vector of libMesh::Point objects to an mfem::Vector containing all points, given an ordering. | |
| std::vector< Point > | generateLinePoints (const Point &start_point, const Point &end_point, unsigned int num_points) |
Variables | |
| template<typename T , typename... Ts> | |
| constexpr bool | is_any_of_v = (std::is_same_v<T, Ts> || ...) |
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
| using Moose::MFEM::BoundaryConditions = typedef NamedFieldsMap<MFEMBoundaryCondition> |
Definition at line 251 of file MFEMContainers.h.
| using Moose::MFEM::ComplexGridFunctions = typedef NamedFieldsMap<mfem::ParComplexGridFunction> |
Definition at line 248 of file MFEMContainers.h.
| using Moose::MFEM::Constraints = typedef NamedFieldsMap<MFEMConstraint> |
Definition at line 252 of file MFEMContainers.h.
| using Moose::MFEM::EigenRHSCoefficient = typedef std::variant<mfem::Coefficient *, mfem::MatrixCoefficient *> |
Scalar or matrix coefficient scaling the eigenproblem right-hand side.
mfem::Coefficient and mfem::MatrixCoefficient are unrelated types, so no single reference can express both.
Definition at line 24 of file EigenproblemEquationSystem.h.
| using Moose::MFEM::EquationSystems = typedef NamedFieldsMap<EquationSystem> |
Definition at line 253 of file MFEMContainers.h.
| using Moose::MFEM::FECollections = typedef NamedFieldsMap<mfem::FiniteElementCollection> |
Definition at line 244 of file MFEMContainers.h.
| using Moose::MFEM::FESpaceHierarchies = typedef NamedFieldsMap<mfem::ParFiniteElementSpaceHierarchy> |
Definition at line 249 of file MFEMContainers.h.
| using Moose::MFEM::FESpaces = typedef NamedFieldsMap<mfem::ParFiniteElementSpace> |
Definition at line 245 of file MFEMContainers.h.
| using Moose::MFEM::GridFunctions = typedef NamedFieldsMap<mfem::ParGridFunction> |
Definition at line 247 of file MFEMContainers.h.
| using Moose::MFEM::Kernels = typedef NamedFieldsMap<MFEMKernel> |
Definition at line 250 of file MFEMContainers.h.
| using Moose::MFEM::MatrixMap = typedef CoefficientMap<mfem::MatrixCoefficient, mfem::PWMatrixCoefficient> |
Definition at line 173 of file CoefficientMap.h.
| using Moose::MFEM::ScalarMap = typedef CoefficientMap<mfem::Coefficient, mfem::PWCoefficient> |
Definition at line 171 of file CoefficientMap.h.
| using Moose::MFEM::SubMeshes = typedef NamedFieldsMap<mfem::ParSubMesh> |
Definition at line 246 of file MFEMContainers.h.
| using Moose::MFEM::VectorMap = typedef CoefficientMap<mfem::VectorCoefficient, mfem::PWVectorCoefficient> |
Definition at line 172 of file CoefficientMap.h.
| std::vector< T > Moose::MFEM::allToAll | ( | const std::vector< T > & | send, |
| const std::vector< int > & | send_counts, | ||
| MPI_Comm | comm | ||
| ) |
MPI_Alltoallv over a trivially copyable payload.
send holds the outgoing items grouped by destination rank (see groupByDestination), send_counts their per-rank counts. The received items are returned grouped by source rank.
Definition at line 82 of file MFEMDistributedGraph.h.
Referenced by distributedSpanningForest(), and fetchLabels().
| void Moose::MFEM::distributedSpanningForest | ( | std::vector< DistributedEdge > & | edges, |
| std::int64_t | num_labels, | ||
| MPI_Comm | comm, | ||
| std::vector< int > * | selected, | ||
| std::vector< std::int64_t > * | owned_labels = nullptr |
||
| ) |
Distributed Boruvka over the edges held collectively by the ranks of comm.
Each rank passes only its own edges; nothing is replicated, so the memory used is proportional to this rank's share of the graph.
Because the edge weights are distinct, the minimum spanning forest is unique, so the result is identical to a serial Kruskal pass over the globally sorted edge list and does not depend on how the graph is distributed.
| edges | this rank's edges. Endpoint labels are updated in place to the final component representative of each endpoint |
| num_labels | size of the dense label space the endpoints live in |
| selected | if non-null, receives origin_index for every edge of this rank that was selected into the spanning forest. Pass nullptr when only the components are wanted |
| owned_labels | if non-null, receives the final component representative of every label this rank owns under BlockDistribution(num_labels, comm size), ready to be passed to fetchLabels |
Definition at line 102 of file MFEMDistributedGraph.C.
| std::vector< std::int64_t > Moose::MFEM::fetchLabels | ( | const std::vector< std::int64_t > & | queries, |
| const std::vector< std::int64_t > & | owned_labels, | ||
| const BlockDistribution & | dist, | ||
| MPI_Comm | comm | ||
| ) |
Final component representative of each id in queries, looked up from the distributed label array.
owned_labels holds the labels of the ids this rank owns under dist.
Definition at line 66 of file MFEMDistributedGraph.C.
Referenced by distributedSpanningForest().
| std::vector< Point > Moose::MFEM::generateLinePoints | ( | const Point & | start_point, |
| const Point & | end_point, | ||
| unsigned int | num_points | ||
| ) |
Definition at line 21 of file MFEMVariableSamplerBase.C.
| std::vector< T > Moose::MFEM::groupByDestination | ( | const std::vector< T > & | items, |
| int | nprocs, | ||
| DestinationFn | destination, | ||
| std::vector< int > & | counts | ||
| ) |
Group items by the destination rank returned by destination, so they can be handed to allToAll.
The per-rank counts are written to counts.
Definition at line 54 of file MFEMDistributedGraph.h.
Referenced by distributedSpanningForest(), and fetchLabels().
| libMesh::Point Moose::MFEM::libMeshPointFromMFEMVector | ( | const mfem::Vector & | vec | ) |
Convert an MFEM position vector to a libMesh::Point.
Definition at line 18 of file MFEMVectorUtils.C.
Referenced by MFEMProblem::addFunction().
| mfem::Vector Moose::MFEM::libMeshPointsToMFEMVector | ( | const std::vector< libMesh::Point > & | points, |
| const unsigned int | num_dims, | ||
| const mfem::Ordering::Type | ordering | ||
| ) |
Convert a vector of libMesh::Point objects to an mfem::Vector containing all points, given an ordering.
Definition at line 24 of file MFEMVectorUtils.C.
Referenced by MultiAppMFEMTolibMeshShapeEvaluationTransfer::transferVariables().
|
inline |
Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering.
Definition at line 29 of file MFEMVectorUtils.h.
Referenced by MFEMComplexVariableValueSamplerBase::finalize(), MFEMVariableValueSamplerBase::finalize(), libMeshPointsToMFEMVector(), and MFEMNodalProjector::projectNodalValues().
| void Moose::MFEM::projectCoefficientOnSubdomains | ( | mfem::ParGridFunction & | gf, |
| mfem::Coefficient & | coef, | ||
| const mfem::Array< int > & | subdomain_markers, | ||
| const mfem::Array< int > & | ldof_marker | ||
| ) |
Overwrite the degrees of freedom of grid function gf marked in the local dof marker ldof_marker with the projection of coefficient coef over the elements whose mesh attribute is set in the attribute marker array subdomain_markers.
Every marked dof must belong to such an element. The projected values are averaged across all elements and ranks contributing to a shared dof, so they agree on every rank including the one that owns the dof. coef must have the same number of components as the space of gf.
The vector overload works for vector H1 as well as H(curl)/H(div) spaces.
Definition at line 183 of file MFEMConstraintUtils.C.
Referenced by MFEMComplexScalarEssentialConstraint::ApplyConstraint(), MFEMComplexVectorEssentialConstraint::ApplyConstraint(), MFEMScalarEssentialConstraint::ApplyConstraint(), and MFEMVectorEssentialConstraint::ApplyConstraint().
| void Moose::MFEM::projectCoefficientOnSubdomains | ( | mfem::ParGridFunction & | gf, |
| mfem::VectorCoefficient & | coef, | ||
| const mfem::Array< int > & | subdomain_markers, | ||
| const mfem::Array< int > & | ldof_marker | ||
| ) |
Definition at line 192 of file MFEMConstraintUtils.C.
| void Moose::MFEM::subdomainTDofs | ( | mfem::ParFiniteElementSpace & | pfes, |
| const mfem::Array< int > & | subdomain_markers, | ||
| bool | include_boundary, | ||
| mfem::Array< int > & | ldof_marker, | ||
| mfem::Array< int > & | tdofs | ||
| ) |
Degrees of freedom of pfes belonging to elements whose mesh attribute is set in the attribute marker array subdomain_markers, as returned by MFEMBlockRestrictable::getSubdomainMarkers.
If include_boundary is false, the dofs on the boundary of the subdomains - those shared with any other element and those on the exterior boundary of the mesh - are left out.
ldof_marker is set to a local dof marker of the selected dofs and tdofs to the matching true-dof indices; both are overwritten. Both are parallel-consistent: a dof shared across a processor boundary that coincides with the subdomain boundary is selected on every rank that touches it, even a rank whose own elements do not carry the attribute.
Definition at line 119 of file MFEMConstraintUtils.C.
Referenced by Moose::MFEM::TreeCotreeGauge::trueDofs(), and MFEMConstraint::updateSubdomainTDofs().
| void Moose::MFEM::zeroTrueDofs | ( | mfem::ParGridFunction & | gf, |
| const mfem::Array< int > & | tdofs | ||
| ) |
Strongly set the true dofs listed in tdofs of grid function gf to zero, leaving its local vector consistent with the true vector.
Definition at line 201 of file MFEMConstraintUtils.C.
Referenced by MFEMComplexTreeCotreeGaugeEssentialConstraint::ApplyConstraint(), and MFEMTreeCotreeGaugeEssentialConstraint::ApplyConstraint().
|
constexpr |
Definition at line 74 of file MFEMLORLinearSolverBase.h.