https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMSolverBase.C
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#include "MFEMSolverBase.h"
13#include "MFEMProblem.h"
14
15namespace Moose::MFEM
16{
19{
21 params.addClassDescription("Base class for defining mfem::Solver derived classes for Moose.");
22 params.registerBase("Moose::MFEM::SolverBase");
23 params.registerSystemAttributeName("Moose::MFEM::SolverBase");
24 params.addParam<bool>("use_initial_guess",
25 false,
26 "Whether to preserve the current MFEM solution vector as the initial "
27 "guess for an iterative solver.");
28 return params;
29}
30
32 : MFEMObject(parameters), _solver{nullptr}
33{
34}
35
36void
37SolverBase::SetOperator(mfem::Operator & op)
38{
41}
42} // namespace Moose::MFEM
43
44#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void registerSystemAttributeName(const std::string &value)
This method is used to define the MOOSE system name that is used by the TheWarehouse object for stori...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
static InputParameters validParams()
Declare the common parameters required by MFEM MooseObject-backed classes.
Definition MFEMObject.C:17
SolverBase(const InputParameters &parameters)
virtual void UpdateEquationSystemContext()
Update the solver following any changes to the weak form it is responsible for solving.
void SetOperator(mfem::Operator &op)
Updates the solver and any associated weak form context at the operator level.
virtual void SetOperatorImpl(mfem::Operator &op)
Updates the solver at the operator level.
static InputParameters validParams()
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).