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

#include <StrainGradDispDerivatives.h>

Inheritance diagram for StrainGradDispDerivatives:
[legend]

Public Member Functions

 StrainGradDispDerivatives (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

unsigned int _nvar
 
unsigned int _gdim
 
std::vector< MaterialProperty< RankTwoTensor > * > _dstrain
 

Detailed Description

Definition at line 19 of file StrainGradDispDerivatives.h.

Constructor & Destructor Documentation

StrainGradDispDerivatives::StrainGradDispDerivatives ( const InputParameters &  parameters)

Definition at line 22 of file StrainGradDispDerivatives.C.

23  : DerivativeMaterialInterface<Material>(parameters),
24  _nvar(coupledComponents("displacement_gradients")),
26 {
27  switch (_nvar)
28  {
29  case 1:
30  _gdim = 1;
31  break;
32 
33  case 4:
34  _gdim = 2;
35  break;
36 
37  case 9:
38  _gdim = 3;
39  break;
40 
41  default:
42  mooseError("Supply 1, 4, or 9 displacement_gradient component variables");
43  }
44 
45  if (_gdim > LIBMESH_DIM)
46  mooseError("Too many gradient component variables for the current LIBMESH_DIM");
47 
48  for (unsigned int i = 0; i < _nvar; ++i)
49  _dstrain[i] = &declarePropertyDerivative<RankTwoTensor>(
50  "elastic_strain", getVar("displacement_gradients", i)->name());
51 }
std::vector< MaterialProperty< RankTwoTensor > * > _dstrain

Member Function Documentation

void StrainGradDispDerivatives::computeQpProperties ( )
protectedvirtual

Definition at line 54 of file StrainGradDispDerivatives.C.

55 {
56  unsigned int i = 0;
57  for (unsigned int j = 0; j < _gdim; ++j)
58  for (unsigned int k = 0; k < _gdim; ++k)
59  {
60  (*_dstrain[i])[_qp].zero();
61  (*_dstrain[i])[_qp](j, k) += 0.5;
62  (*_dstrain[i])[_qp](k, j) += 0.5;
63  ++i;
64  }
65 }
std::vector< MaterialProperty< RankTwoTensor > * > _dstrain

Member Data Documentation

std::vector<MaterialProperty<RankTwoTensor> *> StrainGradDispDerivatives::_dstrain
protected

Definition at line 30 of file StrainGradDispDerivatives.h.

Referenced by computeQpProperties(), and StrainGradDispDerivatives().

unsigned int StrainGradDispDerivatives::_gdim
protected

Definition at line 28 of file StrainGradDispDerivatives.h.

Referenced by computeQpProperties(), and StrainGradDispDerivatives().

unsigned int StrainGradDispDerivatives::_nvar
protected

Definition at line 27 of file StrainGradDispDerivatives.h.

Referenced by StrainGradDispDerivatives().


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