LCOV - code coverage report
Current view: top level - include/userobjects - DiscreteNucleationFromFile.h (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 2 3 66.7 %
Date: 2025-09-04 07:55:36 Functions: 2 3 66.7 %
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             : #pragma once
      11             : 
      12             : #include "DiscreteNucleationInserterBase.h"
      13             : #include "DelimitedFileReader.h"
      14             : 
      15             : /**
      16             :  * This UserObject manages the insertion and expiration of nuclei in the simulation
      17             :  * domain. It manages a list of nuclei with their insertion times and their center
      18             :  * positions. Optionally, nuclei with a fixed radius can be given or in the input
      19             :  * file, or individual radii for each nucleus can also be supplied within the data
      20             :  * file. A DiscreteNucleationMap is needed to enable the DiscreteNucleation
      21             :  * material to look up if a nucleus is present at a given element/qp.
      22             :  */
      23             : class DiscreteNucleationFromFile : public DiscreteNucleationInserterBase
      24             : {
      25             : public:
      26             :   static InputParameters validParams();
      27             : 
      28             :   DiscreteNucleationFromFile(const InputParameters & parameters);
      29             : 
      30             :   void initialize() override;
      31      617000 :   void execute() override {}
      32          22 :   void threadJoin(const UserObject &) override {}
      33             :   void finalize() override;
      34             : 
      35           0 :   const Real & getRate() const override { return _nucleation_rate; }
      36             : 
      37             : protected:
      38             :   /// Duration of time each nucleus is kept active after insertion
      39             :   const Real _hold_time;
      40             : 
      41             :   /// CSV file to read
      42             :   MooseUtils::DelimitedFileReader _reader;
      43             : 
      44             :   /// Total nucleation history read from file
      45             :   NucleusList _nucleation_history;
      46             : 
      47             :   /// index to the next nucleation event in the history
      48             :   unsigned int & _history_pointer;
      49             : 
      50             :   /// tolerance for determining insertion time
      51             :   const Real _tol;
      52             : 
      53             :   /// total nucleation rate
      54             :   const Real _nucleation_rate;
      55             : 
      56             :   /// Is a fixed radius or variable radius used?
      57             :   bool _fixed_radius;
      58             : 
      59             :   /// hold the radius of the nucleus
      60             :   const Real _radius;
      61             : };

Generated by: LCOV version 1.14