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

ComputeGlobalStrain calculates the global strain tensor from the scalar variables. More...

#include <ComputeGlobalStrain.h>

Inheritance diagram for ComputeGlobalStrain:
[legend]

Public Member Functions

 ComputeGlobalStrain (const InputParameters &parameters)
 

Protected Member Functions

virtual void initQpStatefulProperties ()
 
virtual void computeProperties ()
 

Protected Attributes

std::string _base_name
 Base name prepended to material property name. More...
 
const VariableValue & _scalar_global_strain
 
MaterialProperty< RankTwoTensor > & _global_strain
 
const GlobalStrainUserObjectInterface_pst
 
const VectorValue< bool > & _periodic_dir
 
const unsigned int _dim
 
const unsigned int _ndisp
 

Detailed Description

ComputeGlobalStrain calculates the global strain tensor from the scalar variables.

Definition at line 26 of file ComputeGlobalStrain.h.

Constructor & Destructor Documentation

◆ ComputeGlobalStrain()

ComputeGlobalStrain::ComputeGlobalStrain ( const InputParameters &  parameters)

Definition at line 37 of file ComputeGlobalStrain.C.

38  : Material(parameters),
39  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
40  _scalar_global_strain(coupledScalarValue("scalar_global_strain")),
41  _global_strain(declareProperty<RankTwoTensor>(_base_name + "global_strain")),
42  _pst(getUserObject<GlobalStrainUserObjectInterface>("global_strain_uo")),
44  _dim(_mesh.dimension()),
45  _ndisp(coupledComponents("displacements"))
46 {
47 }
const unsigned int _ndisp
std::string _base_name
Base name prepended to material property name.
const VectorValue< bool > & _periodic_dir
const GlobalStrainUserObjectInterface & _pst
const unsigned int _dim
MaterialProperty< RankTwoTensor > & _global_strain
const VariableValue & _scalar_global_strain
virtual const VectorValue< bool > & getPeriodicDirections() const =0

Member Function Documentation

◆ computeProperties()

void ComputeGlobalStrain::computeProperties ( )
protectedvirtual

Definition at line 56 of file ComputeGlobalStrain.C.

57 {
58  RankTwoTensor & strain = _global_strain[0];
59  strain.fillFromScalarVariable(_scalar_global_strain);
60 
61  for (unsigned int dir = 0; dir < _dim; ++dir)
62  if (!_periodic_dir(dir))
63  for (unsigned int var = 0; var < _ndisp; ++var)
64  strain(dir, var) = 0.0;
65 
66  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
67  _global_strain[_qp] = strain;
68 }
const unsigned int _ndisp
const VectorValue< bool > & _periodic_dir
const unsigned int _dim
MaterialProperty< RankTwoTensor > & _global_strain
const VariableValue & _scalar_global_strain

◆ initQpStatefulProperties()

void ComputeGlobalStrain::initQpStatefulProperties ( )
protectedvirtual

Definition at line 50 of file ComputeGlobalStrain.C.

51 {
52  _global_strain[_qp].zero();
53 }
MaterialProperty< RankTwoTensor > & _global_strain

Member Data Documentation

◆ _base_name

std::string ComputeGlobalStrain::_base_name
protected

Base name prepended to material property name.

Definition at line 36 of file ComputeGlobalStrain.h.

◆ _dim

const unsigned int ComputeGlobalStrain::_dim
protected

Definition at line 43 of file ComputeGlobalStrain.h.

Referenced by computeProperties().

◆ _global_strain

MaterialProperty<RankTwoTensor>& ComputeGlobalStrain::_global_strain
protected

Definition at line 38 of file ComputeGlobalStrain.h.

Referenced by computeProperties(), and initQpStatefulProperties().

◆ _ndisp

const unsigned int ComputeGlobalStrain::_ndisp
protected

Definition at line 44 of file ComputeGlobalStrain.h.

Referenced by computeProperties().

◆ _periodic_dir

const VectorValue<bool>& ComputeGlobalStrain::_periodic_dir
protected

Definition at line 41 of file ComputeGlobalStrain.h.

Referenced by computeProperties().

◆ _pst

const GlobalStrainUserObjectInterface& ComputeGlobalStrain::_pst
protected

Definition at line 40 of file ComputeGlobalStrain.h.

◆ _scalar_global_strain

const VariableValue& ComputeGlobalStrain::_scalar_global_strain
protected

Definition at line 37 of file ComputeGlobalStrain.h.

Referenced by computeProperties().


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