https://mooseframework.inl.gov
ComputeEigenstrainBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "Material.h"
13 #include "RankTwoTensorForward.h"
14 
18 template <bool is_ad>
20 {
21 public:
23 
25 
26  // We need this to be public for crystal plasticity eigenstrain calculations
27  virtual void computeQpProperties() override;
28 
29 protected:
30  virtual void initQpStatefulProperties() override;
31 
33  virtual void computeQpEigenstrain() = 0;
34 
36  const std::string _base_name;
37 
39  std::string _eigenstrain_name;
40 
43 
53  computeVolumetricStrainComponent(const GenericReal<is_ad> & volumetric_strain) const;
54 
56  bool & _step_zero;
57 };
58 
Moose::GenericType< Real, is_ad > GenericReal
ComputeEigenstrainBaseTempl(const InputParameters &parameters)
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
static InputParameters validParams()
ComputeEigenstrainBaseTempl< false > ComputeEigenstrainBase
GenericReal< is_ad > computeVolumetricStrainComponent(const GenericReal< is_ad > &volumetric_strain) const
Helper function for models that compute the eigenstrain based on a volumetric strain.
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
ComputeEigenstrainBase is the base class for eigenstrain tensors.
virtual void computeQpProperties() override
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
GenericMaterialProperty< RankTwoTensor, is_ad > & _eigenstrain
Stores the current total eigenstrain.
const std::string _base_name
Base name prepended to material property name.
const InputParameters & parameters() const
ComputeEigenstrainBaseTempl< true > ADComputeEigenstrainBase
std::string _eigenstrain_name
Material property name for the eigenstrain tensor.
virtual void initQpStatefulProperties() override