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

SumTensorIncrements update a tensor by summing tensor increments passed as property. More...

#include <SumTensorIncrements.h>

Inheritance diagram for SumTensorIncrements:
[legend]

Public Member Functions

 SumTensorIncrements (const InputParameters &parameters)
 

Protected Member Functions

virtual void initQpStatefulProperties ()
 
virtual void computeQpProperties ()
 

Protected Attributes

std::vector< MaterialPropertyName > _property_names
 
unsigned int _num_property
 
MaterialProperty< RankTwoTensor > & _tensor
 
const MaterialProperty< RankTwoTensor > & _tensor_old
 
MaterialProperty< RankTwoTensor > & _tensor_increment
 
std::vector< const MaterialProperty< RankTwoTensor > * > _coupled_tensor_increments
 

Detailed Description

SumTensorIncrements update a tensor by summing tensor increments passed as property.

Definition at line 19 of file SumTensorIncrements.h.

Constructor & Destructor Documentation

SumTensorIncrements::SumTensorIncrements ( const InputParameters &  parameters)

Definition at line 22 of file SumTensorIncrements.C.

23  : DerivativeMaterialInterface<Material>(parameters),
24  _property_names(getParam<std::vector<MaterialPropertyName>>("coupled_tensor_increment_names")),
25  _tensor(declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("tensor_name"))),
27  getMaterialPropertyOld<RankTwoTensor>(getParam<MaterialPropertyName>("tensor_name"))),
28  _tensor_increment(declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("tensor_name") +
29  "_increment"))
30 {
32 
33  if (_num_property > 0)
34  {
36 
37  for (unsigned int i = 0; i < _num_property; ++i)
38  _coupled_tensor_increments[i] = &getMaterialProperty<RankTwoTensor>(_property_names[i]);
39  }
40 }
MaterialProperty< RankTwoTensor > & _tensor
MaterialProperty< RankTwoTensor > & _tensor_increment
std::vector< MaterialPropertyName > _property_names
const MaterialProperty< RankTwoTensor > & _tensor_old
std::vector< const MaterialProperty< RankTwoTensor > * > _coupled_tensor_increments

Member Function Documentation

void SumTensorIncrements::computeQpProperties ( )
protectedvirtual

Definition at line 50 of file SumTensorIncrements.C.

51 {
52  _tensor_increment[_qp].zero();
53 
54  for (unsigned int i = 0; i < _num_property; ++i)
56 
57  _tensor[_qp] = _tensor_old[_qp] + _tensor_increment[_qp];
58 }
MaterialProperty< RankTwoTensor > & _tensor
MaterialProperty< RankTwoTensor > & _tensor_increment
const MaterialProperty< RankTwoTensor > & _tensor_old
std::vector< const MaterialProperty< RankTwoTensor > * > _coupled_tensor_increments
void SumTensorIncrements::initQpStatefulProperties ( )
protectedvirtual

Definition at line 43 of file SumTensorIncrements.C.

44 {
45  _tensor[_qp].zero();
46  _tensor_increment[_qp].zero();
47 }
MaterialProperty< RankTwoTensor > & _tensor
MaterialProperty< RankTwoTensor > & _tensor_increment

Member Data Documentation

std::vector<const MaterialProperty<RankTwoTensor> *> SumTensorIncrements::_coupled_tensor_increments
protected

Definition at line 35 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and SumTensorIncrements().

unsigned int SumTensorIncrements::_num_property
protected

Definition at line 29 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and SumTensorIncrements().

std::vector<MaterialPropertyName> SumTensorIncrements::_property_names
protected

Definition at line 28 of file SumTensorIncrements.h.

Referenced by SumTensorIncrements().

MaterialProperty<RankTwoTensor>& SumTensorIncrements::_tensor
protected

Definition at line 31 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

MaterialProperty<RankTwoTensor>& SumTensorIncrements::_tensor_increment
protected

Definition at line 33 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

const MaterialProperty<RankTwoTensor>& SumTensorIncrements::_tensor_old
protected

Definition at line 32 of file SumTensorIncrements.h.

Referenced by computeQpProperties().


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