www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
ContactPressureAuxAction Class Reference

#include <ContactPressureAuxAction.h>

Inheritance diagram for ContactPressureAuxAction:
[legend]

Public Member Functions

 ContactPressureAuxAction (const InputParameters &params)
 
virtual void act ()
 

Private Attributes

const BoundaryName _master
 
const BoundaryName _slave
 
const MooseEnum _order
 

Detailed Description

Definition at line 14 of file ContactPressureAuxAction.h.

Constructor & Destructor Documentation

ContactPressureAuxAction::ContactPressureAuxAction ( const InputParameters &  params)

Definition at line 30 of file ContactPressureAuxAction.C.

31  : Action(params),
32  _master(getParam<BoundaryName>("master")),
33  _slave(getParam<BoundaryName>("slave")),
34  _order(getParam<MooseEnum>("order"))
35 {
36 }

Member Function Documentation

void ContactPressureAuxAction::act ( )
virtual

Definition at line 39 of file ContactPressureAuxAction.C.

40 {
41  if (!_problem->getDisplacedProblem())
42  {
43  mooseError("Contact requires updated coordinates. Use the 'displacements = ...' line in the "
44  "Mesh block.");
45  }
46 
47  {
48  InputParameters params = _factory.getValidParams("ContactPressureAux");
49 
50  // Extract global params
51  if (isParamValid("parser_syntax"))
52  _app.parser().extractParams(getParam<std::string>("parser_syntax"), params);
53 
54  params.set<std::vector<BoundaryName>>("boundary") = {_slave};
55  params.set<BoundaryName>("paired_boundary") = _master;
56  params.set<AuxVariableName>("variable") = "contact_pressure";
57  params.addRequiredCoupledVar("nodal_area", "The nodal area");
58  params.set<std::vector<VariableName>>("nodal_area") = {"nodal_area_" + _name};
59  params.set<MooseEnum>("order") = _order;
60 
61  params.set<bool>("use_displaced_mesh") = true;
62 
63  std::stringstream name;
64  name << _name;
65  name << "_contact_pressure_";
66  name << counter++;
67 
68  MultiMooseEnum execute_options(SetupInterface::getExecuteOptions());
69  execute_options = "nonlinear timestep_end timestep_begin";
70  params.set<MultiMooseEnum>("execute_on") = execute_options;
71  _problem->addAuxKernel("ContactPressureAux", name.str(), params);
72  }
73 }
static unsigned int counter

Member Data Documentation

const BoundaryName ContactPressureAuxAction::_master
private

Definition at line 22 of file ContactPressureAuxAction.h.

Referenced by act().

const MooseEnum ContactPressureAuxAction::_order
private

Definition at line 24 of file ContactPressureAuxAction.h.

Referenced by act().

const BoundaryName ContactPressureAuxAction::_slave
private

Definition at line 23 of file ContactPressureAuxAction.h.

Referenced by act().


The documentation for this class was generated from the following files: