18#include "libmesh/simple_range.h"
21 : _l_parameters(moose_object->parameters()),
22 _l_name(moose_object->name()),
23 _l_fe_problem(nullptr),
24 _l_app(moose_object->getMooseApp())
26 for (
const auto & var_name :
44 mooseError(
"Unable to find variable ", var_pair.first);
49 *(var_pair.second) = moose_var.
number();
51 *(var_pair.second) = std::numeric_limits<unsigned int>::max() - moose_var.number();
62 mooseError(
"Executioner is nullptr in LazyCoupleable. You cannot call the \"coupled\" method "
63 "until the add_algebraic_rm task");
70 return *(var_pair->second);
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
FEProblemBase * _l_fe_problem
Reference to FEProblemBase.
unsigned int & coupled(const std::string &var_name, unsigned int comp=0)
Returns the index for a coupled variable by name.
const InputParameters & _l_parameters
LazyCoupleable(const MooseObject *moose_object)
Constructing the object.
MooseApp & _l_app
Reference to the MooseApp.
std::map< std::string, std::unique_ptr< unsigned int > > _coupled_var_numbers
Coupled vars whose values we provide.
void setFEProblemPtr(FEProblemBase *fe_problem)
Sets the FEProblem pointer which can (and is expected) to happen long after this interface is constru...
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Every object that can be built by the factory should be derived from this class.
unsigned int number() const
Get variable number coming from libMesh.