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 22 of file StrainGradDispDerivatives.h.

Constructor & Destructor Documentation

◆ StrainGradDispDerivatives()

StrainGradDispDerivatives::StrainGradDispDerivatives ( const InputParameters &  parameters)

Definition at line 27 of file StrainGradDispDerivatives.C.

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

Member Function Documentation

◆ computeQpProperties()

void StrainGradDispDerivatives::computeQpProperties ( )
protectedvirtual

Definition at line 59 of file StrainGradDispDerivatives.C.

60 {
61  unsigned int i = 0;
62  for (unsigned int j = 0; j < _gdim; ++j)
63  for (unsigned int k = 0; k < _gdim; ++k)
64  {
65  (*_dstrain[i])[_qp].zero();
66  (*_dstrain[i])[_qp](j, k) += 0.5;
67  (*_dstrain[i])[_qp](k, j) += 0.5;
68  ++i;
69  }
70 }
std::vector< MaterialProperty< RankTwoTensor > * > _dstrain

Member Data Documentation

◆ _dstrain

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

Definition at line 33 of file StrainGradDispDerivatives.h.

Referenced by computeQpProperties(), and StrainGradDispDerivatives().

◆ _gdim

unsigned int StrainGradDispDerivatives::_gdim
protected

Definition at line 31 of file StrainGradDispDerivatives.h.

Referenced by computeQpProperties(), and StrainGradDispDerivatives().

◆ _nvar

unsigned int StrainGradDispDerivatives::_nvar
protected

Definition at line 30 of file StrainGradDispDerivatives.h.

Referenced by StrainGradDispDerivatives().


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