10 #ifdef MOOSE_MFEM_ENABLED 14 #include "libmesh/int_range.h" 46 mfem::ConstantCoefficient one(1.0);
48 std::unique_ptr<mfem::ParBilinearForm> m = std::make_unique<mfem::ParBilinearForm>(fespace);
50 if (fespace->GetTypicalFE()->GetRangeType() == mfem::FiniteElement::SCALAR)
51 m->AddDomainIntegrator(
new mfem::MassIntegrator(one));
53 m->AddDomainIntegrator(
new mfem::VectorFEMassIntegrator(one));
69 "Eigensolve is only supported for single-variable, square systems");
71 height = trueX.Size();
NamedFieldsMap< mfem::ParBilinearForm > _blfs
mfem::OperatorHandle _mass_rhs
The mass operator (e.g. the RHS operator for a generalized eigenproblem)
std::vector< mfem::Array< int > > _ess_tdof_lists
void FormMassMatrix()
Form mass matrix for the eigensolver with Dirichlet BC elimination.
void PrepareEigensolver(EigensolverBase &solver)
Prepare the provided eigensolver.
std::vector< mfem::ParFiniteElementSpace * > _test_pfespaces
Pointers to finite element spaces associated with test variables.
virtual void SetOperator(mfem::OperatorHandle &op) override=0
Sets the operator for the eigensolver in derived classes.
std::vector< std::string > _trial_var_names
Subset of _coupled_var_names of all variables corresponding to gridfunctions with degrees of freedom ...
mfem::Array< int > _global_ess_markers
T * Get(const std::string &field_name) const
Returns a non-owning pointer to the field. This is guaranteed to return a non-null pointer...
virtual void SetMassMatrix(mfem::OperatorHandle &mass)=0
Sets the mass matrix for the eigensolver in derived classes.
void FormEigenproblemMatrix()
Form HypreParMatrix matrix operator for the eigensolver with Dirichlet BC elimination.
mfem::OperatorHandle _jacobian
std::vector< std::string > _test_var_names
Names of all test variables corresponding to linear forms in this equation system.
std::vector< std::unique_ptr< mfem::ParGridFunction > > _var_ess_constraints
Gridfunctions holding essential constraints from Dirichlet BCs.
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
T & GetRef(const std::string &field_name) const
Returns a reference to a field.
virtual void ApplyEssentialBCs() override
Mark external boundaries as essential for eigenproblem BC elimination.
Base class for eigensolvers.
auto min(const L &left, const R &right)
void BuildEigenproblemJacobian(mfem::BlockVector &trueX)
Build eigenproblem system, with essential boundary conditions accounted for.
Moose::MFEM::GridFunctions * _gfuncs