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

#include <RankTwoAux.h>

Inheritance diagram for RankTwoAux:
[legend]

Public Member Functions

 RankTwoAux (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeValue ()
 

Private Attributes

const MaterialProperty< RankTwoTensor > & _tensor
 
const unsigned int _i
 
const unsigned int _j
 
const bool _has_selected_qp
 whether or not selected_qp has been set More...
 
const unsigned int _selected_qp
 The std::vector will be evaluated at this quadpoint only if defined. More...
 

Detailed Description

Definition at line 26 of file RankTwoAux.h.

Constructor & Destructor Documentation

◆ RankTwoAux()

RankTwoAux::RankTwoAux ( const InputParameters &  parameters)

Definition at line 37 of file RankTwoAux.C.

38  : NodalPatchRecovery(parameters),
39  _tensor(getMaterialProperty<RankTwoTensor>("rank_two_tensor")),
40  _i(getParam<unsigned int>("index_i")),
41  _j(getParam<unsigned int>("index_j")),
42  _has_selected_qp(isParamValid("selected_qp")),
43  _selected_qp(_has_selected_qp ? getParam<unsigned int>("selected_qp") : 0)
44 {
45 }

Member Function Documentation

◆ computeValue()

Real RankTwoAux::computeValue ( )
protectedvirtual

Definition at line 48 of file RankTwoAux.C.

49 {
50  unsigned int qp = _qp;
51  if (_has_selected_qp)
52  {
53  if (_selected_qp >= _q_point.size())
54  {
55  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
56  mooseError("RankTwoAux. selected_qp specified as ",
58  " but there are only ",
59  _q_point.size(),
60  " quadpoints in the element");
61  }
62  qp = _selected_qp;
63  }
64 
66 }

◆ validParams()

InputParameters RankTwoAux::validParams ( )
static

Definition at line 18 of file RankTwoAux.C.

19 {
20  InputParameters params = NodalPatchRecovery::validParams();
21  params.addClassDescription("Access a component of a RankTwoTensor");
22  params.addRequiredParam<MaterialPropertyName>("rank_two_tensor",
23  "The rank two material tensor name");
24  params.addRequiredRangeCheckedParam<unsigned int>(
25  "index_i",
26  "index_i >= 0 & index_i <= 2",
27  "The index i of ij for the tensor to output (0, 1, 2)");
28  params.addRequiredRangeCheckedParam<unsigned int>(
29  "index_j",
30  "index_j >= 0 & index_j <= 2",
31  "The index j of ij for the tensor to output (0, 1, 2)");
32  params.addParam<unsigned int>("selected_qp", "Evaluate the tensor at this specific quadpoint");
33  params.addParamNamesToGroup("selected_qp", "Advanced");
34  return params;
35 }

Member Data Documentation

◆ _has_selected_qp

const bool RankTwoAux::_has_selected_qp
private

whether or not selected_qp has been set

Definition at line 42 of file RankTwoAux.h.

Referenced by computeValue().

◆ _i

const unsigned int RankTwoAux::_i
private

Definition at line 38 of file RankTwoAux.h.

Referenced by computeValue().

◆ _j

const unsigned int RankTwoAux::_j
private

Definition at line 39 of file RankTwoAux.h.

Referenced by computeValue().

◆ _selected_qp

const unsigned int RankTwoAux::_selected_qp
private

The std::vector will be evaluated at this quadpoint only if defined.

Definition at line 45 of file RankTwoAux.h.

Referenced by computeValue().

◆ _tensor

const MaterialProperty<RankTwoTensor>& RankTwoAux::_tensor
private

Definition at line 37 of file RankTwoAux.h.

Referenced by computeValue().


The documentation for this class was generated from the following files:
RankTwoAux::_tensor
const MaterialProperty< RankTwoTensor > & _tensor
Definition: RankTwoAux.h:37
RankTwoAux::_selected_qp
const unsigned int _selected_qp
The std::vector will be evaluated at this quadpoint only if defined.
Definition: RankTwoAux.h:45
RankTwoAux::_j
const unsigned int _j
Definition: RankTwoAux.h:39
validParams
InputParameters validParams()
RankTwoScalarTools::component
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)
Definition: RankTwoScalarTools.h:31
RankTwoAux::_i
const unsigned int _i
Definition: RankTwoAux.h:38
RankTwoAux::_has_selected_qp
const bool _has_selected_qp
whether or not selected_qp has been set
Definition: RankTwoAux.h:42