www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADComputeStressBase< compute_stage > Class Template Referenceabstract

ADComputeStressBase is the base class for stress tensors. More...

#include <ADComputeStressBase.h>

Inheritance diagram for ADComputeStressBase< compute_stage >:
[legend]

Public Member Functions

 ADComputeStressBase (const InputParameters &parameters)
 

Protected Member Functions

virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
virtual void computeQpStress ()=0
 
const ADMaterialProperty (RankTwoTensor) &_mechanical_strain
 
 ADMaterialProperty (RankTwoTensor) &_stress
 
 ADMaterialProperty (RankTwoTensor) &_elastic_strain
 
const ADMaterialProperty (RankFourTensor) &_elasticity_tensor
 

Protected Attributes

const std::string _base_name
 
const std::string _elasticity_tensor_name
 
std::vector< Function * > _initial_stress_fcn
 initial stress components More...
 
 usingMaterialMembers
 

Detailed Description

template<ComputeStage compute_stage>
class ADComputeStressBase< compute_stage >

ADComputeStressBase is the base class for stress tensors.

Definition at line 28 of file ADComputeStressBase.h.

Constructor & Destructor Documentation

◆ ADComputeStressBase()

template<ComputeStage compute_stage>
ADComputeStressBase< compute_stage >::ADComputeStressBase ( const InputParameters &  parameters)

Definition at line 24 of file ADComputeStressBase.C.

25  : ADMaterial<compute_stage>(parameters),
26  _base_name(isParamValid("base_name") ? adGetParam<std::string>("base_name") + "_" : ""),
27  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
28  _mechanical_strain(adGetADMaterialProperty<RankTwoTensor>(_base_name + "mechanical_strain")),
29  _stress(adDeclareADProperty<RankTwoTensor>(_base_name + "stress")),
30  _elastic_strain(adDeclareADProperty<RankTwoTensor>(_base_name + "elastic_strain")),
31  _elasticity_tensor(adGetADMaterialProperty<RankFourTensor>(_elasticity_tensor_name))
32 {
33 
34  if (adGetParam<bool>("use_displaced_mesh"))
35  mooseError("The stress calculator needs to run on the undisplaced mesh.");
36 }
const std::string _base_name
const std::string _elasticity_tensor_name

Member Function Documentation

◆ ADMaterialProperty() [1/4]

template<ComputeStage compute_stage>
const ADComputeStressBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

◆ ADMaterialProperty() [2/4]

template<ComputeStage compute_stage>
ADComputeStressBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

◆ ADMaterialProperty() [3/4]

template<ComputeStage compute_stage>
ADComputeStressBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

◆ ADMaterialProperty() [4/4]

template<ComputeStage compute_stage>
const ADComputeStressBase< compute_stage >::ADMaterialProperty ( RankFourTensor  ) &
protected

◆ computeQpProperties()

template<ComputeStage compute_stage>
void ADComputeStressBase< compute_stage >::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 48 of file ADComputeStressBase.C.

49 {
51 
52  // TODO: Add in extra stress (using a list of extra_stress_names analogous to eigenstrain_names)
53 }
virtual void computeQpStress()=0

◆ computeQpStress()

template<ComputeStage compute_stage>
virtual void ADComputeStressBase< compute_stage >::computeQpStress ( )
protectedpure virtual

◆ initQpStatefulProperties()

template<ComputeStage compute_stage>
void ADComputeStressBase< compute_stage >::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 40 of file ADComputeStressBase.C.

41 {
42  _elastic_strain[_qp].zero();
43  _stress[_qp].zero();
44 }

Member Data Documentation

◆ _base_name

template<ComputeStage compute_stage>
const std::string ADComputeStressBase< compute_stage >::_base_name
protected

Definition at line 54 of file ADComputeStressBase.h.

◆ _elasticity_tensor_name

template<ComputeStage compute_stage>
const std::string ADComputeStressBase< compute_stage >::_elasticity_tensor_name
protected

Definition at line 55 of file ADComputeStressBase.h.

◆ _initial_stress_fcn

template<ComputeStage compute_stage>
std::vector<Function *> ADComputeStressBase< compute_stage >::_initial_stress_fcn
protected

initial stress components

Definition at line 64 of file ADComputeStressBase.h.

◆ usingMaterialMembers

template<ComputeStage compute_stage>
ADComputeStressBase< compute_stage >::usingMaterialMembers
protected

Definition at line 66 of file ADComputeStressBase.h.


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