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

#include <ContactPenetrationAuxAction.h>

Inheritance diagram for ContactPenetrationAuxAction:
[legend]

Public Member Functions

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

Private Attributes

const BoundaryName _master
 
const BoundaryName _slave
 
const MooseEnum _order
 

Detailed Description

Definition at line 22 of file ContactPenetrationAuxAction.h.

Constructor & Destructor Documentation

◆ ContactPenetrationAuxAction()

ContactPenetrationAuxAction::ContactPenetrationAuxAction ( const InputParameters &  params)

Definition at line 34 of file ContactPenetrationAuxAction.C.

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

Member Function Documentation

◆ act()

void ContactPenetrationAuxAction::act ( )
virtual

Definition at line 43 of file ContactPenetrationAuxAction.C.

44 {
45  if (!_problem->getDisplacedProblem())
46  {
47  mooseError("Contact requires updated coordinates. Use the 'displacements = ...' line in the "
48  "Mesh block.");
49  }
50 
51  {
52  InputParameters params = _factory.getValidParams("PenetrationAux");
53  params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_LINEAR};
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") = "penetration";
62  params.set<MooseEnum>("order") = _order;
63 
64  params.set<bool>("use_displaced_mesh") = true;
65 
66  std::stringstream name;
67  name << _name;
68  name << "_contact_";
69  name << counter++;
70  _problem->addAuxKernel("PenetrationAux", name.str(), params);
71  }
72 }
const std::string name
Definition: Setup.h:22
static unsigned int counter

Member Data Documentation

◆ _master

const BoundaryName ContactPenetrationAuxAction::_master
private

Definition at line 30 of file ContactPenetrationAuxAction.h.

Referenced by act().

◆ _order

const MooseEnum ContactPenetrationAuxAction::_order
private

Definition at line 32 of file ContactPenetrationAuxAction.h.

Referenced by act().

◆ _slave

const BoundaryName ContactPenetrationAuxAction::_slave
private

Definition at line 31 of file ContactPenetrationAuxAction.h.

Referenced by act().


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