LCOV - code coverage report
Current view: top level - src/materials/nucleation_models - NucleationMicroForceBase.C (source / functions) Hit Total Coverage
Test: coverage.info Lines: 28 29 96.6 %
Date: 2025-02-21 01:06:12 Functions: 2 2 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 "InputParameters.h"
       6             : #include "NucleationMicroForceBase.h"
       7             : 
       8             : InputParameters
       9         426 : NucleationMicroForceBase::validParams()
      10             : {
      11         426 :   InputParameters params = Material::validParams();
      12         426 :   params += BaseNameInterface::validParams();
      13             : 
      14             :   // common parameters
      15         852 :   params.addParam<MaterialPropertyName>(
      16             :       "fracture_toughness", "Gc", "energy release rate or fracture toughness");
      17         852 :   params.addParam<MaterialPropertyName>(
      18             :       "normalization_constant", "c0", "The normalization constant $c_0$");
      19         852 :   params.addParam<MaterialPropertyName>(
      20             :       "regularization_length", "l", "the phase field regularization length");
      21         852 :   params.addParam<MaterialPropertyName>("lambda", "lambda", "Lame's first parameter lambda");
      22         852 :   params.addParam<MaterialPropertyName>("shear_modulus", "G", "shear modulus mu or G");
      23         852 :   params.addParam<MaterialPropertyName>(
      24             :       "stress_balance_name", "stress_balance", "Name of the stress balance function $F(\\sigma)$");
      25         852 :   params.addParam<MaterialPropertyName>("stress_name", "stress", "Name of the stress tensor");
      26         852 :   params.addParam<MaterialPropertyName>(
      27             :       "external_driving_force_name",
      28             :       "ex_driving",
      29             :       "Name of the material that holds the external_driving_force");
      30         852 :   params.addRequiredCoupledVar("phase_field", "Name of the phase-field (damage) variable");
      31         852 :   params.addParam<MaterialPropertyName>("degradation_function", "g", "The degradation function");
      32         426 :   return params;
      33           0 : }
      34             : 
      35           9 : NucleationMicroForceBase::NucleationMicroForceBase(const InputParameters & parameters)
      36             :   : Material(parameters),
      37             :     BaseNameInterface(parameters),
      38          27 :     _Gc(getADMaterialProperty<Real>(prependBaseName("fracture_toughness", true))),
      39          27 :     _c0(getADMaterialProperty<Real>(prependBaseName("normalization_constant", true))),
      40          27 :     _L(getADMaterialProperty<Real>(prependBaseName("regularization_length", true))),
      41          27 :     _lambda(getADMaterialProperty<Real>(prependBaseName("lambda", true))),
      42          27 :     _mu(getADMaterialProperty<Real>(prependBaseName("shear_modulus", true))),
      43          27 :     _stress(getADMaterialProperty<RankTwoTensor>(prependBaseName("stress_name", true))),
      44          18 :     _stress_balance(declareADProperty<Real>(prependBaseName("stress_balance_name", true))),
      45           9 :     _ex_driving(declareADProperty<Real>(prependBaseName("external_driving_force_name", true))),
      46          18 :     _d_name(getVar("phase_field", 0)->name()),
      47           9 :     _g_name(prependBaseName("degradation_function", true)),
      48           9 :     _g(getADMaterialProperty<Real>(_g_name)),
      49          36 :     _dg_dd(getADMaterialProperty<Real>(derivativePropertyName(_g_name, {_d_name})))
      50             : {
      51          18 : }

Generated by: LCOV version 1.16