https://mooseframework.inl.gov
MFEMNewtonNonlinearSolver.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 
15 
20 {
21 public:
23 
25 
26  void ConstructSolver() override;
27 
28  void SetOperator(const mfem::Operator & op) override;
29  void SetLinearSolver(mfem::Solver & solver) override;
30  void Mult(const mfem::Vector & rhs, mfem::Vector & x) override;
31  bool RequiresGradient() const override { return true; }
32  bool RequiresExternalLinearSolver() const override { return true; }
33 };
34 
35 #endif
void Mult(const mfem::Vector &rhs, mfem::Vector &x) override
Solve the nonlinear system for the provided right-hand side and solution vector.
void SetLinearSolver(mfem::Solver &solver) override
Configure the linear solver used inside the nonlinear solve.
MFEMNewtonNonlinearSolver(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void SetOperator(const mfem::Operator &op) override
Configure the nonlinear solver with the residual/Jacobian operator.
bool RequiresExternalLinearSolver() const override
Return whether this nonlinear solver requires an externally configured MFEM linear solver...
static InputParameters validParams()
bool RequiresGradient() const override
Return whether this nonlinear solver requires Jacobian/gradient information from the operator...
MooseObject base for nonlinear MFEM solve strategies configured in the input file.
void ConstructSolver() override
Override in derived classes to construct and set the solver options.
MooseObject wrapper for mfem::NewtonSolver-backed nonlinear solves.