https://mooseframework.inl.gov
Loading...
Searching...
No Matches
EigenproblemEquationSystem.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#ifdef MOOSE_MFEM_ENABLED
11
12#pragma once
13
14#include "EquationSystem.h"
15
16#include <variant>
17
18namespace Moose::MFEM
19{
20class EigensolverBase;
21
24using EigenRHSCoefficient = std::variant<mfem::Coefficient *, mfem::MatrixCoefficient *>;
25
28{
29public:
31 ~EigenproblemEquationSystem() override = default;
32
34 void BuildEigenproblemJacobian(mfem::BlockVector & trueX, EigenRHSCoefficient rhs_coefficient);
35
38
39 bool IsEigen() const override { return true; }
40
43 void AddEssentialConstraint(std::shared_ptr<MFEMEssentialConstraint> constraint) override;
44
45protected:
47 virtual void ApplyEssentialConstraints() override;
48
50 virtual void CheckProblemIsHomogeneous();
51
54
56 void FormMassMatrix(EigenRHSCoefficient rhs_coefficient);
57
58private:
60
62 mfem::OperatorHandle _mass_rhs;
63};
64
65} // namespace Moose::MFEM
66
67#endif
Steady-state eigenproblem operator with an equation system.
Equation system specialization for eigenproblems.
void FormMassMatrix(EigenRHSCoefficient rhs_coefficient)
Form mass matrix for the eigensolver with Dirichlet BC elimination.
void AddEssentialConstraint(std::shared_ptr< MFEMEssentialConstraint > constraint) override
Eigenproblems mark external boundaries as essential and do not consult the constraint map,...
virtual void CheckProblemIsHomogeneous()
Verify that the problem is homogeneous (all Dirichlet BCs are zero)
mfem::OperatorHandle _mass_rhs
The mass operator (e.g. the RHS operator for a generalized eigenproblem)
~EigenproblemEquationSystem() override=default
void PrepareEigensolver(EigensolverBase &solver)
Prepare the provided eigensolver.
void BuildEigenproblemJacobian(mfem::BlockVector &trueX, EigenRHSCoefficient rhs_coefficient)
Build eigenproblem system, with essential boundary conditions accounted for.
void FormEigenproblemMatrix()
Form HypreParMatrix matrix operator for the eigensolver with Dirichlet BC elimination.
virtual void ApplyEssentialConstraints() override
Mark external boundaries as essential for eigenproblem BC elimination.
Base class for eigensolvers.
Owns the weak-form mathematics of a MOOSE MFEM problem.
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
std::variant< mfem::Coefficient *, mfem::MatrixCoefficient * > EigenRHSCoefficient
Scalar or matrix coefficient scaling the eigenproblem right-hand side.