LCOV - code coverage report
Current view: top level - src/materials/large_deformation_models - LargeDeformationPlasticityModel.C (source / functions) Hit Total Coverage
Test: coverage.info Lines: 32 36 88.9 %
Date: 2026-04-22 20:21:53 Functions: 6 6 100.0 %

          Line data    Source code
       1             : //* This file is part of the RACCOON application
       2             : //* being developed at Dolbow lab at Duke University
       3             : //* http://dolbow.pratt.duke.edu
       4             : 
       5             : #include "LargeDeformationPlasticityModel.h"
       6             : #include "LargeDeformationElasticityModel.h"
       7             : 
       8             : InputParameters
       9         472 : LargeDeformationPlasticityModel::validParams()
      10             : {
      11         472 :   InputParameters params = Material::validParams();
      12         472 :   params += ADSingleVariableReturnMappingSolution::validParams();
      13         472 :   params += BaseNameInterface::validParams();
      14             : 
      15         944 :   params.addRequiredParam<MaterialName>("hardening_model", "Name of the plastic hardening model");
      16             : 
      17         472 :   params.set<bool>("compute") = false;
      18         472 :   params.suppressParameter<bool>("compute");
      19         472 :   return params;
      20           0 : }
      21             : 
      22          48 : LargeDeformationPlasticityModel::LargeDeformationPlasticityModel(const InputParameters & parameters)
      23             :   : Material(parameters),
      24             :     ADSingleVariableReturnMappingSolution(parameters),
      25             :     BaseNameInterface(parameters),
      26          96 :     _Fp(declareADProperty<RankTwoTensor>(prependBaseName("plastic_deformation_gradient"))),
      27          48 :     _Fp_old(getMaterialPropertyOldByName<RankTwoTensor>(
      28          96 :         prependBaseName("plastic_deformation_gradient"))),
      29          96 :     _ep(declareADProperty<Real>(prependBaseName("effective_plastic_strain"))),
      30         144 :     _ep_old(getMaterialPropertyOldByName<Real>(prependBaseName("effective_plastic_strain"))),
      31          96 :     _Np(declareADProperty<RankTwoTensor>(prependBaseName("flow_direction"))),
      32          96 :     _heat(declareADProperty<Real>(prependBaseName("plastic_heat_generation")))
      33             : {
      34          48 : }
      35             : 
      36             : void
      37          48 : LargeDeformationPlasticityModel::initialSetup()
      38             : {
      39          48 :   _hardening_model = dynamic_cast<PlasticHardeningModel *>(&getMaterial("hardening_model"));
      40          48 :   if (!_hardening_model)
      41           0 :     paramError("hardening_model",
      42           0 :                "Plastic hardening model " + _hardening_model->name() + " is not compatible with " +
      43           0 :                    name());
      44          48 : }
      45             : 
      46             : void
      47      215736 : LargeDeformationPlasticityModel::setQp(unsigned int qp)
      48             : {
      49      215736 :   _qp = qp;
      50      215736 :   _hardening_model->setQp(qp);
      51      215736 : }
      52             : 
      53             : void
      54          48 : LargeDeformationPlasticityModel::setElasticityModel(
      55             :     LargeDeformationElasticityModel * elasticity_model)
      56             : {
      57          48 :   _elasticity_model = elasticity_model;
      58          48 : }
      59             : 
      60             : void
      61       11232 : LargeDeformationPlasticityModel::initQpStatefulProperties()
      62             : {
      63       11232 :   _Fp[_qp].setToIdentity();
      64       11232 :   _ep[_qp] = 0;
      65       11232 : }

Generated by: LCOV version 1.16