https://mooseframework.inl.gov
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
Moose::MFEM::EquationSystemProblemOperator Class Reference

Steady-state problem operator with an equation system. More...

#include <EquationSystemProblemOperator.h>

Inheritance diagram for Moose::MFEM::EquationSystemProblemOperator:
[legend]

Public Member Functions

 EquationSystemProblemOperator (MFEMProblemData &problem)
 
void SetGridFunctions () override
 
void Init (mfem::BlockVector &X) override
 
virtual void Solve (mfem::Vector &X) override
 
Moose::MFEM::EquationSystemGetEquationSystem () const override
 Returns a pointer to the operator's equation system. More...
 
void Mult (const mfem::Vector &, mfem::Vector &) const override
 
virtual void SetTestVariablesFromTrueVectors ()
 
virtual void SetTrialVariablesFromTrueVectors ()
 

Public Attributes

mfem::Array< int_block_true_offsets
 
mfem::BlockVector _true_x
 
mfem::BlockVector _true_rhs
 
mfem::OperatorHandle _equation_system_operator
 

Protected Attributes

MFEMProblemData_problem
 
std::vector< std::string > _test_var_names
 
std::vector< mfem::ParGridFunction * > _test_variables
 
std::vector< std::string > _trial_var_names
 
std::vector< mfem::ParGridFunction * > _trial_variables
 

Private Attributes

std::shared_ptr< Moose::MFEM::EquationSystem_equation_system {nullptr}
 

Detailed Description

Steady-state problem operator with an equation system.

Definition at line 19 of file EquationSystemProblemOperator.h.

Constructor & Destructor Documentation

◆ EquationSystemProblemOperator()

Moose::MFEM::EquationSystemProblemOperator::EquationSystemProblemOperator ( MFEMProblemData problem)
inline

Definition at line 22 of file EquationSystemProblemOperator.h.

23  : ProblemOperator(problem), _equation_system(problem.eqn_system)
24  {
25  }
ProblemOperator(MFEMProblemData &problem)
std::shared_ptr< Moose::MFEM::EquationSystem > _equation_system
std::shared_ptr< Moose::MFEM::EquationSystem > eqn_system

Member Function Documentation

◆ GetEquationSystem()

Moose::MFEM::EquationSystem* Moose::MFEM::EquationSystemProblemOperator::GetEquationSystem ( ) const
inlineoverridevirtual

Returns a pointer to the operator's equation system.

Implements Moose::MFEM::EquationSystemInterface.

Definition at line 31 of file EquationSystemProblemOperator.h.

Referenced by Init(), SetGridFunctions(), and Solve().

32  {
33  if (!_equation_system)
34  {
35  MFEM_ABORT("No equation system has been added to ProblemOperator.");
36  }
37 
38  return _equation_system.get();
39  }
std::shared_ptr< Moose::MFEM::EquationSystem > _equation_system

◆ Init()

void Moose::MFEM::EquationSystemProblemOperator::Init ( mfem::BlockVector &  X)
overridevirtual

Reimplemented from Moose::MFEM::ProblemOperatorInterface.

Definition at line 24 of file EquationSystemProblemOperator.C.

25 {
27 
29 }
Moose::MFEM::EquationSystem * GetEquationSystem() const override
Returns a pointer to the operator&#39;s equation system.
virtual void BuildEquationSystem()
virtual void Init(mfem::BlockVector &X)

◆ Mult()

void Moose::MFEM::ProblemOperator::Mult ( const mfem::Vector &  ,
mfem::Vector &   
) const
inlineoverrideinherited

Definition at line 27 of file ProblemOperator.h.

27 {}

◆ SetGridFunctions()

void Moose::MFEM::EquationSystemProblemOperator::SetGridFunctions ( )
overridevirtual

Reimplemented from Moose::MFEM::ProblemOperatorInterface.

Definition at line 17 of file EquationSystemProblemOperator.C.

18 {
21 }
const std::vector< std::string > & TrialVarNames() const
void SetGridFunctions() override
Moose::MFEM::EquationSystem * GetEquationSystem() const override
Returns a pointer to the operator&#39;s equation system.

◆ SetTestVariablesFromTrueVectors()

void Moose::MFEM::ProblemOperatorInterface::SetTestVariablesFromTrueVectors ( )
virtualinherited

Definition at line 47 of file ProblemOperatorInterface.C.

Referenced by Moose::MFEM::TimeDomainEquationSystemProblemOperator::ImplicitSolve().

48 {
49  for (unsigned int ind = 0; ind < _test_variables.size(); ++ind)
50  {
51  _test_variables.at(ind)->SetFromTrueVector();
52  }
53 }
std::vector< mfem::ParGridFunction * > _test_variables

◆ SetTrialVariablesFromTrueVectors()

void Moose::MFEM::ProblemOperatorInterface::SetTrialVariablesFromTrueVectors ( )
virtualinherited

Definition at line 56 of file ProblemOperatorInterface.C.

Referenced by Moose::MFEM::TimeDomainEquationSystemProblemOperator::ImplicitSolve().

57 {
58  for (unsigned int ind = 0; ind < _trial_variables.size(); ++ind)
59  {
60  _trial_variables.at(ind)->SetFromTrueVector();
61  }
62 }
std::vector< mfem::ParGridFunction * > _trial_variables

◆ Solve()

void Moose::MFEM::EquationSystemProblemOperator::Solve ( mfem::Vector &  X)
overridevirtual

Reimplemented from Moose::MFEM::ProblemOperator.

Definition at line 32 of file EquationSystemProblemOperator.C.

33 {
35 
36  if (_problem.jacobian_solver->isLOR() && _equation_system->_test_var_names.size() > 1)
37  mooseError("LOR solve is only supported for single-variable systems");
38 
39  _problem.jacobian_solver->updateSolver(
40  *_equation_system->_blfs.Get(_equation_system->_test_var_names.at(0)),
41  _equation_system->_ess_tdof_lists.at(0));
42 
43  _problem.nonlinear_solver->SetSolver(_problem.jacobian_solver->getSolver());
46 
48 }
virtual void RecoverFEMSolution(mfem::BlockVector &trueX, Moose::MFEM::GridFunctions &gridfunctions)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::shared_ptr< Moose::MFEM::EquationSystem > _equation_system
Moose::MFEM::EquationSystem * GetEquationSystem() const override
Returns a pointer to the operator&#39;s equation system.
std::shared_ptr< mfem::NewtonSolver > nonlinear_solver
virtual void BuildJacobian(mfem::BlockVector &trueX, mfem::BlockVector &trueRHS)
Moose::MFEM::GridFunctions gridfunctions
std::shared_ptr< MFEMSolverBase > jacobian_solver

Member Data Documentation

◆ _block_true_offsets

mfem::Array<int> Moose::MFEM::ProblemOperatorInterface::_block_true_offsets
inherited

◆ _equation_system

std::shared_ptr<Moose::MFEM::EquationSystem> Moose::MFEM::EquationSystemProblemOperator::_equation_system {nullptr}
private

Definition at line 42 of file EquationSystemProblemOperator.h.

Referenced by GetEquationSystem(), and Solve().

◆ _equation_system_operator

mfem::OperatorHandle Moose::MFEM::ProblemOperatorInterface::_equation_system_operator
inherited

Definition at line 32 of file ProblemOperatorInterface.h.

◆ _problem

MFEMProblemData& Moose::MFEM::ProblemOperatorInterface::_problem
protectedinherited

◆ _test_var_names

std::vector<std::string> Moose::MFEM::ProblemOperatorInterface::_test_var_names
protectedinherited

◆ _test_variables

std::vector<mfem::ParGridFunction *> Moose::MFEM::ProblemOperatorInterface::_test_variables
protectedinherited

◆ _trial_var_names

std::vector<std::string> Moose::MFEM::ProblemOperatorInterface::_trial_var_names
protectedinherited

◆ _trial_variables

std::vector<mfem::ParGridFunction *> Moose::MFEM::ProblemOperatorInterface::_trial_variables
protectedinherited

◆ _true_rhs

mfem::BlockVector Moose::MFEM::ProblemOperatorInterface::_true_rhs
inherited

◆ _true_x

mfem::BlockVector Moose::MFEM::ProblemOperatorInterface::_true_x
inherited

The documentation for this class was generated from the following files: