LCOV - code coverage report
Current view: top level - src/ics - BrittleDamageIC.C (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 17 35.3 %
Date: 2025-02-21 01:06:12 Functions: 1 3 33.3 %

          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 "BrittleDamageIC.h"
       6             : 
       7             : registerMooseObject("raccoonApp", BrittleDamageIC);
       8             : 
       9             : InputParameters
      10         138 : BrittleDamageIC::validParams()
      11             : {
      12         138 :   InputParameters params = DamageICBase::validParams();
      13         138 :   params.addClassDescription(
      14             :       "This class initializes the phase-field with the closed-form solution associated "
      15             :       "with the quadratic crack geometric function $\\alpha(d) = d^2$, i.e. $d(\\tau) = "
      16             :       "\\exp(-\\tau / l)$.");
      17         276 :   params.addParam<Real>(
      18         276 :       "bandwidth_multiplier", 1, "impose the initial condition within bandwidth_multiplier*l");
      19         138 :   return params;
      20           0 : }
      21             : 
      22           0 : BrittleDamageIC::BrittleDamageIC(const InputParameters & parameters)
      23           0 :   : DamageICBase(parameters), _m(getParam<Real>("bandwidth_multiplier"))
      24             : {
      25           0 : }
      26             : 
      27             : Real
      28           0 : BrittleDamageIC::value(const Point & p)
      29             : {
      30           0 :   Real damage = 0.0;
      31             : 
      32           0 :   Real s = dist(p);
      33           0 :   if (s <= _m * _l)
      34           0 :     damage = _d0 * std::exp(-s / _l);
      35             : 
      36           0 :   damage = std::min(damage, 1.0);
      37             : 
      38           0 :   return damage;
      39             : }

Generated by: LCOV version 1.16