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 17 of file ContactPressureAuxAction.h.

Constructor & Destructor Documentation

◆ ContactPressureAuxAction()

ContactPressureAuxAction::ContactPressureAuxAction ( const InputParameters &  params)

Definition at line 35 of file ContactPressureAuxAction.C.

36  : Action(params),
37  _master(getParam<BoundaryName>("master")),
38  _slave(getParam<BoundaryName>("slave")),
39  _order(getParam<MooseEnum>("order"))
40 {
41 }

Member Function Documentation

◆ act()

void ContactPressureAuxAction::act ( )
virtual

Definition at line 44 of file ContactPressureAuxAction.C.

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

Member Data Documentation

◆ _master

const BoundaryName ContactPressureAuxAction::_master
private

Definition at line 25 of file ContactPressureAuxAction.h.

Referenced by act().

◆ _order

const MooseEnum ContactPressureAuxAction::_order
private

Definition at line 27 of file ContactPressureAuxAction.h.

Referenced by act().

◆ _slave

const BoundaryName ContactPressureAuxAction::_slave
private

Definition at line 26 of file ContactPressureAuxAction.h.

Referenced by act().


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