www.mooseframework.org
ContactPenetrationVarAction.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 /****************************************************************/
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: FIRST, SECOND, etc.");
23  return params;
24 }
25 
27  : Action(params)
28 {
29 }
30 
31 void
33 {
34  if (!_problem->getDisplacedProblem())
35  mooseError("Contact requires updated coordinates. Use the 'displacements = ...' line in the "
36  "Mesh block.");
37 
38  _problem->addAuxVariable("penetration",
39  FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
40  Utility::string_to_enum<FEFamily>("LAGRANGE")));
41 }
ContactPenetrationVarAction(const InputParameters &params)
InputParameters validParams< ContactPenetrationVarAction >()