LCOV - code coverage report
Current view: top level - src/materials/lagrangian - ComputeLagrangianLinearElasticStress.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #32971 (54bef8) with base c6cf66 Lines: 13 14 92.9 %
Date: 2026-05-29 20:40:07 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://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             : #include "ComputeLagrangianLinearElasticStress.h"
      11             : 
      12             : registerMooseObject("SolidMechanicsApp", ComputeLagrangianLinearElasticStress);
      13             : 
      14             : InputParameters
      15        2408 : ComputeLagrangianLinearElasticStress::validParams()
      16             : {
      17        2408 :   InputParameters params = ComputeLagrangianObjectiveStress::validParams();
      18             : 
      19        4816 :   params.addParam<MaterialPropertyName>(
      20             :       "elasticity_tensor", "elasticity_tensor", "The name of the elasticity tensor.");
      21             : 
      22        2408 :   return params;
      23           0 : }
      24             : 
      25        1806 : ComputeLagrangianLinearElasticStress::ComputeLagrangianLinearElasticStress(
      26        1806 :     const InputParameters & parameters)
      27             :   : ComputeLagrangianObjectiveStress(parameters),
      28        1806 :     _elasticity_tensor(getMaterialProperty<RankFourTensor>(
      29        3612 :         _base_name + getParam<MaterialPropertyName>("elasticity_tensor")))
      30             : {
      31        1806 : }
      32             : 
      33             : void
      34    23371756 : ComputeLagrangianLinearElasticStress::computeQpSmallStress()
      35             : {
      36    23371756 :   _small_stress[_qp] = _elasticity_tensor[_qp] * _mechanical_strain[_qp];
      37    23371756 :   _small_jacobian[_qp] = _elasticity_tensor[_qp];
      38    23371756 : }

Generated by: LCOV version 1.14