LCOV - code coverage report
Current view: top level - src/materials - GBRelaxationStrainIncrement.C (source / functions) Hit Total Coverage
Test: idaholab/moose tensor_mechanics: d6b47a Lines: 0 20 0.0 %
Date: 2024-02-27 11:53:14 Functions: 0 4 0.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 "GBRelaxationStrainIncrement.h"
      11             : #include "libmesh/quadrature.h"
      12             : 
      13             : registerMooseObject("TensorMechanicsApp", GBRelaxationStrainIncrement);
      14             : 
      15             : InputParameters
      16           0 : GBRelaxationStrainIncrement::validParams()
      17             : {
      18           0 :   InputParameters params = Material::validParams();
      19           0 :   params.addClassDescription("Compute strain increment based on lattice relaxation at GB");
      20           0 :   params.addParam<MaterialPropertyName>("prefactor_name", "Name of prefactor property");
      21           0 :   params.addParam<MaterialPropertyName>("gb_normal_name", "Name of GB normal property");
      22           0 :   params.addParam<MaterialPropertyName>("property_name",
      23             :                                         "Name of GB relaxation strain increment property");
      24           0 :   return params;
      25           0 : }
      26             : 
      27           0 : GBRelaxationStrainIncrement::GBRelaxationStrainIncrement(const InputParameters & parameters)
      28             :   : DerivativeMaterialInterface<Material>(parameters),
      29           0 :     _prefactor(getMaterialProperty<Real>("prefactor_name")),
      30           0 :     _gb_normal_tensor(getMaterialProperty<RankTwoTensor>("gb_normal_name")),
      31           0 :     _strain_increment(
      32           0 :         declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("property_name")))
      33             : {
      34           0 : }
      35             : 
      36             : void
      37           0 : GBRelaxationStrainIncrement::initQpStatefulProperties()
      38             : {
      39           0 :   _strain_increment[_qp].zero();
      40           0 : }
      41             : 
      42             : void
      43           0 : GBRelaxationStrainIncrement::computeQpProperties()
      44             : {
      45           0 :   _strain_increment[_qp] = _prefactor[_qp] * _dt * _gb_normal_tensor[_qp];
      46           0 : }

Generated by: LCOV version 1.14