www.mooseframework.org
AddMeshModifierAction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "AddMeshModifierAction.h"
16 #include "MooseMesh.h"
17 #include "MeshModifier.h"
18 #include "Factory.h"
19 #include "MooseApp.h"
20 
21 template <>
24 {
26  return params;
27 }
28 
30 
31 void
33 {
34  // Don't do mesh modifiers when recovering!
35  if (_app.isRecovering())
36  return;
37 
38  // Add a pointer to the mesh, this is required for this MeshModifier to inherit from the
39  // BlockRestrictable,
40  // as is the case for SideSetAroundSubdomain
41  _moose_object_pars.set<MooseMesh *>("_mesh") = _mesh.get();
42 
44 }
virtual void act() override
InputParameters validParams< AddMeshModifierAction >()
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:608
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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:92
void addMeshModifier(const std::string &modifier_name, const std::string &name, InputParameters parameters)
Add a mesh modifier that will act on the meshes in the system.
Definition: MooseApp.C:1134
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
InputParameters validParams< MooseObjectAction >()
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:127
std::string _type
The Object type that is being created.
InputParameters _moose_object_pars
The parameters for the object to be created.
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:98
AddMeshModifierAction(InputParameters params)