www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
GlobalDisplacementAux Class Reference

#include <GlobalDisplacementAux.h>

Inheritance diagram for GlobalDisplacementAux:
[legend]

Public Member Functions

 GlobalDisplacementAux (const InputParameters &parameters)
 
virtual Real computeValue () override
 

Protected Attributes

const VariableValue & _scalar_global_strain
 
const unsigned int _component
 
bool _output_global_disp
 
const GlobalStrainUserObjectInterface_pst
 
const VectorValue< bool > & _periodic_dir
 
const Point _ref_point
 
const unsigned int _dim
 
const unsigned int _ndisp
 
std::vector< const VariableValue * > _disp
 

Detailed Description

Definition at line 23 of file GlobalDisplacementAux.h.

Constructor & Destructor Documentation

◆ GlobalDisplacementAux()

GlobalDisplacementAux::GlobalDisplacementAux ( const InputParameters &  parameters)

Definition at line 47 of file GlobalDisplacementAux.C.

48  : AuxKernel(parameters),
49  _scalar_global_strain(coupledScalarValue("scalar_global_strain")),
50  _component(getParam<unsigned int>("component")),
51  _output_global_disp(getParam<bool>("output_global_displacement")),
52  _pst(getUserObject<GlobalStrainUserObjectInterface>("global_strain_uo")),
54  _ref_point(parameters.get<Point>("reference_point")),
55  _dim(_mesh.dimension()),
56  _ndisp(coupledComponents("displacements")),
57  _disp(_ndisp)
58 {
59  if (!isNodal())
60  paramError("variable", "GlobalDisplacementAux must be used on a nodal auxiliary variable");
61 
62  if (_component >= _dim)
63  paramError("component",
64  "The component ",
65  _component,
66  " does not exist for ",
67  _dim,
68  " dimensional problems");
69 
70  for (unsigned int i = 0; i < _ndisp; ++i)
71  _disp[i] = &coupledValue("displacements", i);
72 }
const unsigned int _component
const GlobalStrainUserObjectInterface & _pst
const unsigned int _ndisp
const VectorValue< bool > & _periodic_dir
std::vector< const VariableValue * > _disp
const VariableValue & _scalar_global_strain
virtual const VectorValue< bool > & getPeriodicDirections() const =0

Member Function Documentation

◆ computeValue()

Real GlobalDisplacementAux::computeValue ( )
overridevirtual

Definition at line 75 of file GlobalDisplacementAux.C.

76 {
77  RankTwoTensor strain;
78  strain.fillFromScalarVariable(_scalar_global_strain);
79 
80  for (unsigned int dir = 0; dir < _dim; ++dir)
81  if (!_periodic_dir(dir))
82  for (unsigned int var = 0; var < _ndisp; ++var)
83  strain(dir, var) = 0.0;
84 
85  const RealVectorValue & global_disp = strain * ((*_current_node) - _ref_point);
86 
88  return global_disp(_component);
89  else
90  return global_disp(_component) + (*_disp[_component])[_qp];
91 }
const unsigned int _component
const unsigned int _ndisp
const VectorValue< bool > & _periodic_dir
std::vector< const VariableValue * > _disp
const VariableValue & _scalar_global_strain

Member Data Documentation

◆ _component

const unsigned int GlobalDisplacementAux::_component
protected

Definition at line 32 of file GlobalDisplacementAux.h.

Referenced by computeValue(), and GlobalDisplacementAux().

◆ _dim

const unsigned int GlobalDisplacementAux::_dim
protected

Definition at line 40 of file GlobalDisplacementAux.h.

Referenced by computeValue(), and GlobalDisplacementAux().

◆ _disp

std::vector<const VariableValue *> GlobalDisplacementAux::_disp
protected

Definition at line 42 of file GlobalDisplacementAux.h.

Referenced by computeValue(), and GlobalDisplacementAux().

◆ _ndisp

const unsigned int GlobalDisplacementAux::_ndisp
protected

Definition at line 41 of file GlobalDisplacementAux.h.

Referenced by computeValue(), and GlobalDisplacementAux().

◆ _output_global_disp

bool GlobalDisplacementAux::_output_global_disp
protected

Definition at line 34 of file GlobalDisplacementAux.h.

Referenced by computeValue().

◆ _periodic_dir

const VectorValue<bool>& GlobalDisplacementAux::_periodic_dir
protected

Definition at line 37 of file GlobalDisplacementAux.h.

Referenced by computeValue().

◆ _pst

const GlobalStrainUserObjectInterface& GlobalDisplacementAux::_pst
protected

Definition at line 36 of file GlobalDisplacementAux.h.

◆ _ref_point

const Point GlobalDisplacementAux::_ref_point
protected

Definition at line 38 of file GlobalDisplacementAux.h.

Referenced by computeValue().

◆ _scalar_global_strain

const VariableValue& GlobalDisplacementAux::_scalar_global_strain
protected

Definition at line 31 of file GlobalDisplacementAux.h.

Referenced by computeValue().


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