LCOV - code coverage report
Current view: top level - src/materials/lagrangian - ComputeLagrangianLinearElasticStress.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 13 14 92.9 %
Date: 2025-07-25 05:00:39 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        4336 : ComputeLagrangianLinearElasticStress::validParams()
      16             : {
      17        4336 :   InputParameters params = ComputeLagrangianObjectiveStress::validParams();
      18             : 
      19        8672 :   params.addParam<MaterialPropertyName>(
      20             :       "elasticity_tensor", "elasticity_tensor", "The name of the elasticity tensor.");
      21             : 
      22        4336 :   return params;
      23           0 : }
      24             : 
      25        3252 : ComputeLagrangianLinearElasticStress::ComputeLagrangianLinearElasticStress(
      26        3252 :     const InputParameters & parameters)
      27             :   : ComputeLagrangianObjectiveStress(parameters),
      28        3252 :     _elasticity_tensor(getMaterialProperty<RankFourTensor>(
      29        6504 :         _base_name + getParam<MaterialPropertyName>("elasticity_tensor")))
      30             : {
      31        3252 : }
      32             : 
      33             : void
      34    59636796 : ComputeLagrangianLinearElasticStress::computeQpSmallStress()
      35             : {
      36    59636796 :   _small_stress[_qp] = _elasticity_tensor[_qp] * _mechanical_strain[_qp];
      37    59636796 :   _small_jacobian[_qp] = _elasticity_tensor[_qp];
      38    59636796 : }

Generated by: LCOV version 1.14