www.mooseframework.org
NodalAreaVarAction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "NodalAreaVarAction.h"
8 
9 #include "Factory.h"
10 #include "FEProblem.h"
11 #include "Parser.h"
12 #include "MooseApp.h"
13 #include "libmesh/string_to_enum.h"
14 
15 template <>
16 InputParameters
18 {
19  MooseEnum orders("CONSTANT FIRST SECOND THIRD FOURTH", "FIRST");
20 
21  InputParameters params = validParams<Action>();
22  params.addParam<MooseEnum>("order", orders, "The finite element order: " + orders.getRawNames());
23  return params;
24 }
25 
26 NodalAreaVarAction::NodalAreaVarAction(const InputParameters & params) : Action(params) {}
27 
28 void
30 {
31  _problem->addAuxVariable("nodal_area_" + _name,
32  FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
33  Utility::string_to_enum<FEFamily>("LAGRANGE")));
34 }
NodalAreaVarAction(const InputParameters &params)
InputParameters validParams< NodalAreaVarAction >()