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
 

Protected Attributes

const std::string _base_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 25 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  _mechanical_strain(adGetADMaterialProperty<RankTwoTensor>(_base_name + "mechanical_strain")),
28  _stress(adDeclareADProperty<RankTwoTensor>(_base_name + "stress")),
29  _elastic_strain(adDeclareADProperty<RankTwoTensor>(_base_name + "elastic_strain"))
30 {
31 
32  if (adGetParam<bool>("use_displaced_mesh"))
33  mooseError("The stress calculator needs to run on the undisplaced mesh.");
34 }
const std::string _base_name

Member Function Documentation

◆ ADMaterialProperty() [1/3]

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

◆ ADMaterialProperty() [2/3]

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

◆ ADMaterialProperty() [3/3]

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

◆ computeQpProperties()

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

Definition at line 46 of file ADComputeStressBase.C.

47 {
49 
50  // TODO: Add in extra stress (using a list of extra_stress_names analogous to eigenstrain_names)
51 }
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

Reimplemented in ADComputeMultipleInelasticStress< compute_stage >.

Definition at line 38 of file ADComputeStressBase.C.

Referenced by ADComputeMultipleInelasticStress< compute_stage >::initQpStatefulProperties().

39 {
40  _elastic_strain[_qp].zero();
41  _stress[_qp].zero();
42 }

Member Data Documentation

◆ _base_name

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

Definition at line 51 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 58 of file ADComputeStressBase.h.

◆ usingMaterialMembers

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

Definition at line 60 of file ADComputeStressBase.h.


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