www.mooseframework.org
SetupDampersAction.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 "SetupDampersAction.h"
16 #include "FEProblem.h"
17 #include "ActionWarehouse.h"
18 
19 template <>
22 {
24  return params;
25 }
26 
28 
29 void
31 {
32  // if we have add_damper action, we will setup dampers ;-)
33  ActionIterator it_beg = _awh.actionBlocksWithActionBegin("add_damper");
34  ActionIterator it_end = _awh.actionBlocksWithActionEnd("add_damper");
35  if (it_beg != it_end)
36  _problem->setupDampers();
37 }
InputParameters validParams< SetupDampersAction >()
std::list< Action * >::iterator ActionIterator
alias to hide implementation details
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition: Action.h:122
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Base class for actions.
Definition: Action.h:39
SetupDampersAction(InputParameters params)
virtual void act() override
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:131
ActionIterator actionBlocksWithActionEnd(const std::string &task)
ActionIterator actionBlocksWithActionBegin(const std::string &task)
Iterators to the Actions in the warehouse.
InputParameters validParams< Action >()
Definition: Action.C:23