LCOV - code coverage report
Current view: top level - src/materials/lagrangian - ComputeLagrangianLinearElasticStress.C (source / functions) Hit Total Coverage
Test: idaholab/moose tensor_mechanics: d6b47a Lines: 13 14 92.9 %
Date: 2024-02-27 11:53:14 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 "ComputeLagrangianLinearElasticStress.h"
      11             : 
      12             : registerMooseObject("TensorMechanicsApp", ComputeLagrangianLinearElasticStress);
      13             : 
      14             : InputParameters
      15        2156 : ComputeLagrangianLinearElasticStress::validParams()
      16             : {
      17        2156 :   InputParameters params = ComputeLagrangianObjectiveStress::validParams();
      18             : 
      19        4312 :   params.addParam<MaterialPropertyName>(
      20             :       "elasticity_tensor", "elasticity_tensor", "The name of the elasticity tensor.");
      21             : 
      22        2156 :   return params;
      23           0 : }
      24             : 
      25        1617 : ComputeLagrangianLinearElasticStress::ComputeLagrangianLinearElasticStress(
      26        1617 :     const InputParameters & parameters)
      27             :   : ComputeLagrangianObjectiveStress(parameters),
      28        1617 :     _elasticity_tensor(
      29        3234 :         getMaterialProperty<RankFourTensor>(getParam<MaterialPropertyName>("elasticity_tensor")))
      30             : {
      31        1617 : }
      32             : 
      33             : void
      34    30443108 : ComputeLagrangianLinearElasticStress::computeQpSmallStress()
      35             : {
      36    30443108 :   _small_stress[_qp] = _elasticity_tensor[_qp] * _mechanical_strain[_qp];
      37    30443108 :   _small_jacobian[_qp] = _elasticity_tensor[_qp];
      38    30443108 : }

Generated by: LCOV version 1.14