LCOV - code coverage report
Current view: top level - src/materials - ComputeThermalExpansionEigenstrainBeam.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 11 12 91.7 %
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 "ComputeThermalExpansionEigenstrainBeam.h"
      11             : 
      12             : registerMooseObject("SolidMechanicsApp", ComputeThermalExpansionEigenstrainBeam);
      13             : 
      14             : InputParameters
      15          24 : ComputeThermalExpansionEigenstrainBeam::validParams()
      16             : {
      17          24 :   InputParameters params = ComputeThermalExpansionEigenstrainBeamBase::validParams();
      18          24 :   params.addClassDescription("Computes eigenstrain due to thermal expansion "
      19             :                              "with a constant coefficient");
      20          48 :   params.addParam<Real>("thermal_expansion_coeff", "Thermal expansion coefficient");
      21             : 
      22          24 :   return params;
      23           0 : }
      24             : 
      25          18 : ComputeThermalExpansionEigenstrainBeam::ComputeThermalExpansionEigenstrainBeam(
      26          18 :     const InputParameters & parameters)
      27             :   : ComputeThermalExpansionEigenstrainBeamBase(parameters),
      28          36 :     _thermal_expansion_coeff(getParam<Real>("thermal_expansion_coeff"))
      29             : {
      30          18 : }
      31             : 
      32             : Real
      33         320 : ComputeThermalExpansionEigenstrainBeam::computeThermalStrain()
      34             : {
      35         320 :   return _thermal_expansion_coeff * (_temperature[_qp] - _stress_free_temperature[_qp]);
      36             : }

Generated by: LCOV version 1.14