www.mooseframework.org
ADComputeStressBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "ADMaterial.h"
13 #include "Function.h"
14 
15 #define usingComputeStressBaseMembers \
16  usingMaterialMembers; \
17  using ADComputeStressBase<compute_stage>::_stress; \
18  using ADComputeStressBase<compute_stage>::_mechanical_strain; \
19  using ADComputeStressBase<compute_stage>::_elastic_strain; \
20  using ADComputeStressBase<compute_stage>::_base_name; \
21  using ADComputeStressBase<compute_stage>::_initial_stress_fcn
22 
23 // Forward Declarations
24 template <ComputeStage>
26 template <typename>
30 template <typename>
34 
36 
40 template <ComputeStage compute_stage>
41 class ADComputeStressBase : public ADMaterial<compute_stage>
42 {
43 public:
44  ADComputeStressBase(const InputParameters & parameters);
45 
46 protected:
47  virtual void initQpStatefulProperties() override;
48  virtual void computeQpProperties() override;
49  virtual void computeQpStress() = 0;
50 
51  const std::string _base_name;
52 
53  const ADMaterialProperty(RankTwoTensor) & _mechanical_strain;
55  ADMaterialProperty(RankTwoTensor) & _elastic_strain;
56 
58  std::vector<Function *> _initial_stress_fcn;
59 
61 };
62 
const ADMaterialProperty(RankTwoTensor) &_mechanical_strain
virtual void computeQpStress()=0
ADComputeStressBase is the base class for stress tensors.
const std::string _base_name
RankFourTensorTempl< Real > RankFourTensor
virtual void initQpStatefulProperties() override
RankFourTensorTempl< DualReal > DualRankFourTensor
RankTwoTensorTempl< Real > RankTwoTensor
ADComputeStressBase(const InputParameters &parameters)
RankTwoTensorTempl< DualReal > DualRankTwoTensor
virtual void computeQpProperties() override
declareADValidParams(ADComputeStressBase)
std::vector< Function * > _initial_stress_fcn
initial stress components