www.mooseframework.org
ADCompute1DSmallStrain.C
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 #include "ADCompute1DSmallStrain.h"
11 
12 #include "libmesh/quadrature.h"
13 
16 {
18  params.addClassDescription("Compute a small strain in 1D problem");
19  return params;
20 }
21 
23  : ADComputeSmallStrain(parameters)
24 {
25 }
26 
27 void
29 {
30  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
31  {
32  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
35 
37 
38  // Remove the eigenstrain
39  for (const auto es : _eigenstrains)
40  _mechanical_strain[_qp] -= (*es)[_qp];
41  }
42 }
const QBase *const & _qrule
static InputParameters validParams()
ADCompute1DSmallStrain(const InputParameters &parameters)
unsigned int _qp
virtual ADReal computeStrainZZ()=0
Computes the strain_zz; as a virtual function, this function is overwritten for the specific geometri...
std::vector< const ADVariableGradient * > _grad_disp
Gradient of displacements.
virtual ADReal computeStrainYY()=0
Computes the strain_yy; as a virtual function, this function is overwritten for the specific geometri...
std::vector< const ADMaterialProperty< R2 > * > _eigenstrains
ADMaterialProperty< R2 > & _mechanical_strain
ADComputeSmallStrain defines a strain tensor, assuming small strains.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
ADMaterialProperty< R2 > & _total_strain