https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ExecutorInterface.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#include "ExecutorInterface.h"
11
12#include "FEProblem.h"
13#include "MooseObject.h"
14#include "NullExecutor.h"
15#include "Executor.h"
16#include "MooseApp.h"
17
23
25 : _ei_moose_object(moose_object), _ei_app(moose_object->getMooseApp())
26{
27}
28
30ExecutorInterface::getExecutor(const std::string & param_name) const
31{
32 auto & params = _ei_moose_object->parameters();
33
34 if (!params.isParamValid(param_name))
35 return *_ei_app.getNullExecutor();
36
37 return _ei_app.getExecutor(_ei_moose_object->getParam<ExecutorName>(param_name));
38}
39
41ExecutorInterface::getExecutorByName(const ExecutorName & executor_name) const
42{
43 return _ei_app.getExecutor(executor_name);
44}
InputParameters emptyInputParameters()
Executor & getExecutorByName(const ExecutorName &executor_name) const
Get an Executor based on its actual name.
static InputParameters validParams()
const MooseObject * _ei_moose_object
Executor & getExecutor(const std::string &param_name) const
Get an Executor based on a parameter name.
ExecutorInterface(const MooseObject *moose_object)
The Executor class directs the execution flow of simulations.
Definition Executor.h:27
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
NullExecutor * getNullExecutor() const
Definition MooseApp.h:342
Executor * getExecutor() const
Definition MooseApp.h:341
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:406
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31