www.mooseframework.org
AddMeshModifierAction.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 "AddMeshModifierAction.h"
11 #include "MooseMesh.h"
12 #include "MeshModifier.h"
13 #include "Factory.h"
14 #include "MooseApp.h"
15 
16 registerMooseAction("MooseApp", AddMeshModifierAction, "add_mesh_modifier");
17 
18 template <>
21 {
23  return params;
24 }
25 
27 
28 void
30 {
31  // Don't do mesh modifiers when recovering!
32  if (_app.isRecovering())
33  return;
34 
35  // Add a pointer to the mesh, this is required for this MeshModifier to inherit from the
36  // BlockRestrictable,
37  // as is the case for SideSetAroundSubdomain
38  _moose_object_pars.set<MooseMesh *>("_mesh") = _mesh.get();
39 
41 }
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
InputParameters validParams< AddMeshModifierAction >()
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:177
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:1353
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: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", AddMeshModifierAction, "add_mesh_modifier")
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
AddMeshModifierAction(InputParameters params)