https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LazyCoupleable.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#pragma once
11
12// MOOSE includes
13#include "MooseVariableBase.h"
14
15// Forward declarations
16class InputParameters;
17class MooseObject;
18class MooseApp;
19
25{
26public:
32 LazyCoupleable(const MooseObject * moose_object);
33
34 virtual ~LazyCoupleable() = default;
35
42 void setFEProblemPtr(FEProblemBase * fe_problem);
43
44private:
45 void init();
46
54 unsigned int & coupled(const std::string & var_name, unsigned int comp = 0);
55
56 // Reference to the interface's input parameters
58
60 const std::string & _l_name;
61
64
67
69 std::map<std::string, std::unique_ptr<unsigned int>> _coupled_var_numbers;
70};
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Interface for objects that need coupling capabilities.
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
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...
virtual ~LazyCoupleable()=default
const std::string & _l_name
The name of the object this interface is part of.
Base class for MOOSE-based applications.
Definition MooseApp.h:110
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31