https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CreateApplicationBlockAction.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
11#include "MooseApp.h"
12#include "MooseObjectAction.h"
13#include "ActionFactory.h"
14#include "MooseUtils.h"
15
16registerMooseAction("MooseApp", CreateApplicationBlockAction, "create_application_block");
17
20{
22 params.addParam<std::string>(
23 "type", "", "The name of the application that should run this input file.");
24 // Declared here so the [Application] block accepts it; the value is read directly from the
25 // parser by MooseApp at construction (well before this action's task runs), so this action
26 // does not apply it. See MooseApp::n_threads().
27 params.addParam<unsigned int>(
28 "num_threads",
29 "Caps the number of threads this application uses (must be <= the process-wide --n-threads); "
30 "defaults to --n-threads.");
31
32 params.addClassDescription("Adds application and application related parameters.");
33
34 return params;
35}
36
38 : Action(parameters), _type(getParam<std::string>("type"))
39{
40}
41
42void
registerMooseAction("MooseApp", CreateApplicationBlockAction, "create_application_block")
Base class for actions.
Definition Action.h:38
static InputParameters validParams()
Definition Action.C:26
Action that create Application Block.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
CreateApplicationBlockAction(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.