www.mooseframework.org
AddMeshGeneratorAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "AddMeshGeneratorAction.h"
11 #include "MooseMesh.h"
12 #include "MeshGenerator.h"
13 #include "Factory.h"
14 #include "MooseApp.h"
15 
16 registerMooseAction("MooseApp", AddMeshGeneratorAction, "add_mesh_generator");
17 
18 template <>
21 {
23  return params;
24 }
25 
27 {
28 }
29 
30 void
32 {
33  // Don't do mesh generators when recovering!
34  if (_app.isRecovering())
35  return;
36 
37  if (!_mesh)
38  mooseError("No mesh file was supplied and no generation block was provided");
39 
41 }
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:207
InputParameters validParams< AddMeshGeneratorAction >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string _name
The name of the action.
Definition: Action.h:177
void addMeshGenerator(const std::string &generator_name, const std::string &name, InputParameters parameters)
Add a mesh generator that will act on the meshes in the system.
Definition: MooseApp.C:1438
AddMeshGeneratorAction(InputParameters params)
InputParameters validParams< MooseObjectAction >()
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:212
std::string _type
The Object type that is being created.
InputParameters _moose_object_pars
The parameters for the object to be created.
registerMooseAction("MooseApp", AddMeshGeneratorAction, "add_mesh_generator")
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:183
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:859