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 25 of file SumTensorIncrements.h.

Constructor & Destructor Documentation

◆ SumTensorIncrements()

SumTensorIncrements::SumTensorIncrements ( const InputParameters &  parameters)

Definition at line 27 of file SumTensorIncrements.C.

28  : DerivativeMaterialInterface<Material>(parameters),
29  _property_names(getParam<std::vector<MaterialPropertyName>>("coupled_tensor_increment_names")),
30  _tensor(declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("tensor_name"))),
32  getMaterialPropertyOld<RankTwoTensor>(getParam<MaterialPropertyName>("tensor_name"))),
33  _tensor_increment(declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("tensor_name") +
34  "_increment"))
35 {
37 
38  if (_num_property > 0)
39  {
41 
42  for (unsigned int i = 0; i < _num_property; ++i)
43  _coupled_tensor_increments[i] = &getMaterialProperty<RankTwoTensor>(_property_names[i]);
44  }
45 }
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

◆ computeQpProperties()

void SumTensorIncrements::computeQpProperties ( )
protectedvirtual

Definition at line 55 of file SumTensorIncrements.C.

56 {
57  _tensor_increment[_qp].zero();
58 
59  for (unsigned int i = 0; i < _num_property; ++i)
61 
62  _tensor[_qp] = _tensor_old[_qp] + _tensor_increment[_qp];
63 }
MaterialProperty< RankTwoTensor > & _tensor
MaterialProperty< RankTwoTensor > & _tensor_increment
const MaterialProperty< RankTwoTensor > & _tensor_old
std::vector< const MaterialProperty< RankTwoTensor > * > _coupled_tensor_increments

◆ initQpStatefulProperties()

void SumTensorIncrements::initQpStatefulProperties ( )
protectedvirtual

Definition at line 48 of file SumTensorIncrements.C.

49 {
50  _tensor[_qp].zero();
51  _tensor_increment[_qp].zero();
52 }
MaterialProperty< RankTwoTensor > & _tensor
MaterialProperty< RankTwoTensor > & _tensor_increment

Member Data Documentation

◆ _coupled_tensor_increments

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

Definition at line 41 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and SumTensorIncrements().

◆ _num_property

unsigned int SumTensorIncrements::_num_property
protected

Definition at line 35 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and SumTensorIncrements().

◆ _property_names

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

Definition at line 34 of file SumTensorIncrements.h.

Referenced by SumTensorIncrements().

◆ _tensor

MaterialProperty<RankTwoTensor>& SumTensorIncrements::_tensor
protected

Definition at line 37 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

◆ _tensor_increment

MaterialProperty<RankTwoTensor>& SumTensorIncrements::_tensor_increment
protected

Definition at line 39 of file SumTensorIncrements.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

◆ _tensor_old

const MaterialProperty<RankTwoTensor>& SumTensorIncrements::_tensor_old
protected

Definition at line 38 of file SumTensorIncrements.h.

Referenced by computeQpProperties().


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