https://mooseframework.inl.gov
EquationSystemProblemOperator.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 
13 
14 namespace Moose::MFEM
15 {
16 void
18 {
22 }
23 
24 void
26 {
28 
30 }
31 
32 void
34 {
36 
37  if (_problem.jacobian_solver->isLOR() && _equation_system->_test_var_names.size() > 1)
38  mooseError("LOR solve is only supported for single-variable systems");
39 
40  _problem.jacobian_solver->updateSolver(
41  *_equation_system->_blfs.Get(_equation_system->_test_var_names.at(0)),
42  _equation_system->_ess_tdof_lists.at(0));
43 
44  _problem.nonlinear_solver->SetSolver(_problem.jacobian_solver->getSolver());
47 
49 }
50 
51 } // namespace Moose::MFEM
52 
53 #endif
virtual void Solve(mfem::Vector &X) override
virtual void RecoverFEMSolution(mfem::BlockVector &trueX, Moose::MFEM::GridFunctions &gridfunctions)
Update variable from solution vector after solve.
const std::vector< std::string > & TestVarNames() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::vector< std::string > & TrialVarNames() const
MFEMProblemData & _problem
Reference to the current problem.
std::shared_ptr< Moose::MFEM::EquationSystem > _equation_system
void SetGridFunctions() override
std::vector< std::string > _test_var_names
Vector of names of state gridfunctions used in formulation, ordered by appearance in block vector dur...
Moose::MFEM::EquationSystem * GetEquationSystem() const override
Returns a pointer to the operator&#39;s equation system.
virtual void BuildEquationSystem()
std::shared_ptr< mfem::NewtonSolver > nonlinear_solver
std::vector< std::string > _trial_var_names
Vector of names of state gridfunctions used in formulation, ordered by appearance in block vector dur...
virtual void BuildJacobian(mfem::BlockVector &trueX, mfem::BlockVector &trueRHS)
Build linear system, with essential boundary conditions accounted for.
Moose::MFEM::GridFunctions gridfunctions
std::shared_ptr< MFEMSolverBase > jacobian_solver
virtual void Init(mfem::BlockVector &X)