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

RankTwoScalarAux uses the namespace RankTwoScalarTools to compute scalar values from Rank-2 tensors. More...

#include <RankTwoScalarAux.h>

Inheritance diagram for RankTwoScalarAux:
[legend]

Public Member Functions

 RankTwoScalarAux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue ()
 

Protected Attributes

const MaterialProperty< RankTwoTensor > & _tensor
 
MooseEnum _scalar_type
 Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace, e.g., vonMisesStress, EquivalentPlasticStrain, L2norm, MaxPrincipal eigenvalue, etc. More...
 
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...
 
const Point _point1
 
const Point _point2
 
Point _input_direction
 

Detailed Description

RankTwoScalarAux uses the namespace RankTwoScalarTools to compute scalar values from Rank-2 tensors.

Definition at line 22 of file RankTwoScalarAux.h.

Constructor & Destructor Documentation

RankTwoScalarAux::RankTwoScalarAux ( const InputParameters &  parameters)

Definition at line 39 of file RankTwoScalarAux.C.

40  : AuxKernel(parameters),
41  _tensor(getMaterialProperty<RankTwoTensor>("rank_two_tensor")),
42  _scalar_type(getParam<MooseEnum>("scalar_type")),
43  _has_selected_qp(isParamValid("selected_qp")),
44  _selected_qp(_has_selected_qp ? getParam<unsigned int>("selected_qp") : 0),
45  _point1(parameters.get<Point>("point1")),
46  _point2(parameters.get<Point>("point2")),
47  _input_direction(parameters.get<Point>("direction") / parameters.get<Point>("direction").norm())
48 {
49 }
const Point _point2
MooseEnum _scalar_type
Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace...
const Point _point1
const bool _has_selected_qp
whether or not selected_qp has been set
const unsigned int _selected_qp
The std::vector will be evaluated at this quadpoint only if defined.
const MaterialProperty< RankTwoTensor > & _tensor

Member Function Documentation

Real RankTwoScalarAux::computeValue ( )
protectedvirtual

Definition at line 52 of file RankTwoScalarAux.C.

53 {
54  unsigned int qp = _qp;
55  if (_has_selected_qp)
56  {
57  if (_selected_qp >= _q_point.size())
58  {
59  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
60  mooseError("RankTwoScalarAux. selected_qp specified as ",
62  " but there are only ",
63  _q_point.size(),
64  " quadpoints in the element");
65  }
66  qp = _selected_qp;
67  }
68 
70  _tensor[qp], _scalar_type, _point1, _point2, _q_point[qp], _input_direction);
71 }
const Point _point2
MooseEnum _scalar_type
Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace...
const Point _point1
const bool _has_selected_qp
whether or not selected_qp has been set
const unsigned int _selected_qp
The std::vector will be evaluated at this quadpoint only if defined.
Real getQuantity(const RankTwoTensor &tensor, const MooseEnum scalar_type, const Point &point1, const Point &point2, const Point &curr_point, Point &direction)
const MaterialProperty< RankTwoTensor > & _tensor

Member Data Documentation

const bool RankTwoScalarAux::_has_selected_qp
protected

whether or not selected_qp has been set

Definition at line 40 of file RankTwoScalarAux.h.

Referenced by computeValue().

Point RankTwoScalarAux::_input_direction
protected

Definition at line 47 of file RankTwoScalarAux.h.

Referenced by computeValue().

const Point RankTwoScalarAux::_point1
protected

Definition at line 45 of file RankTwoScalarAux.h.

Referenced by computeValue().

const Point RankTwoScalarAux::_point2
protected

Definition at line 46 of file RankTwoScalarAux.h.

Referenced by computeValue().

MooseEnum RankTwoScalarAux::_scalar_type
protected

Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace, e.g., vonMisesStress, EquivalentPlasticStrain, L2norm, MaxPrincipal eigenvalue, etc.

Definition at line 37 of file RankTwoScalarAux.h.

Referenced by computeValue().

const unsigned int RankTwoScalarAux::_selected_qp
protected

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

Definition at line 43 of file RankTwoScalarAux.h.

Referenced by computeValue().

const MaterialProperty<RankTwoTensor>& RankTwoScalarAux::_tensor
protected

Definition at line 30 of file RankTwoScalarAux.h.

Referenced by computeValue().


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