www.mooseframework.org
ADComputeStrainBase.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 
14 #define usingComputeStrainBaseMembers \
15  usingMaterialMembers; \
16  using ADComputeStrainBase<compute_stage>::_ndisp; \
17  using ADComputeStrainBase<compute_stage>::_disp; \
18  using ADComputeStrainBase<compute_stage>::_grad_disp; \
19  using ADComputeStrainBase<compute_stage>::_base_name; \
20  using ADComputeStrainBase<compute_stage>::_mechanical_strain; \
21  using ADComputeStrainBase<compute_stage>::_global_strain; \
22  using ADComputeStrainBase<compute_stage>::_volumetric_locking_correction; \
23  using ADComputeStrainBase<compute_stage>::_current_elem_volume; \
24  using ADComputeStrainBase<compute_stage>::_eigenstrain_names; \
25  using ADComputeStrainBase<compute_stage>::_eigenstrains; \
26  using ADComputeStrainBase<compute_stage>::_total_strain
27 
28 // Forward Declarations
29 template <ComputeStage>
31 template <typename>
35 
37 
41 template <ComputeStage compute_stage>
42 class ADComputeStrainBase : public ADMaterial<compute_stage>
43 {
44 public:
45  ADComputeStrainBase(const InputParameters & parameters);
46 
47  void initialSetup() override;
48 
49 protected:
50  virtual void initQpStatefulProperties() override;
51  virtual void displacementIntegrityCheck();
52 
54  const unsigned int _ndisp;
55  std::vector<const ADVariableValue *> _disp;
56  std::vector<const ADVariableGradient *> _grad_disp;
57 
58  std::string _base_name;
59 
60  ADMaterialProperty(RankTwoTensor) & _mechanical_strain;
61  ADMaterialProperty(RankTwoTensor) & _total_strain;
62 
63  std::vector<MaterialPropertyName> _eigenstrain_names;
64  std::vector<const ADMaterialProperty(RankTwoTensor) *> _eigenstrains;
65 
66  const ADMaterialProperty(RankTwoTensor) * _global_strain;
67 
69  const Real & _current_elem_volume;
70 
72 };
73 
declareADValidParams(ADComputeStrainBase)
std::vector< const ADMaterialProperty(RankTwoTensor) * > _eigenstrains
const bool _volumetric_locking_correction
const unsigned int _ndisp
Coupled displacement variables.
virtual void initQpStatefulProperties() override
const Real & _current_elem_volume
ADMaterialProperty(RankTwoTensor) &_mechanical_strain
std::vector< const ADVariableValue * > _disp
std::vector< MaterialPropertyName > _eigenstrain_names
std::vector< const ADVariableGradient * > _grad_disp
virtual void displacementIntegrityCheck()
ADComputeStrainBase(const InputParameters &parameters)
RankTwoTensorTempl< Real > RankTwoTensor
void initialSetup() override
RankTwoTensorTempl< DualReal > DualRankTwoTensor
ADADComputeStrainBase is the base class for strain tensors.