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
41protected:
43 virtual void ApplyEssentialBCs() override;
44
46 virtual void CheckProblemIsHomogeneous();
47
50
52 void FormMassMatrix(EigenRHSCoefficient rhs_coefficient);
53
54private:
56
58 mfem::OperatorHandle _mass_rhs;
59};
60
61} // namespace Moose::MFEM
62
63#endif
Steady-state eigenproblem operator with an equation system.
Equation system specialization for eigenproblems.
virtual void ApplyEssentialBCs() override
Mark external boundaries as essential for eigenproblem BC elimination.
void FormMassMatrix(EigenRHSCoefficient rhs_coefficient)
Form mass matrix for the eigensolver with Dirichlet BC elimination.
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.
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.