LCOV - code coverage report
Current view: top level - include/userobjects - DiscreteNucleationInserter.h (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 1 1 100.0 %
Date: 2025-09-04 07:55:36 Functions: 1 1 100.0 %
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             : 
      14             : /**
      15             :  * This UserObject manages the insertion and expiration of nuclei in the simulation
      16             :  * domain it manages a list of nuclei with their insertion times, center
      17             :  * positions and radius. A DiscreteNucleationMap is needed to enable the
      18             :  * DiscreteNucleation material to look up if a nucleus is present at a given element/qp.
      19             :  */
      20             : class DiscreteNucleationInserter : public DiscreteNucleationInserterBase
      21             : {
      22             : public:
      23             :   static InputParameters validParams();
      24             : 
      25             :   DiscreteNucleationInserter(const InputParameters & parameters);
      26             : 
      27             :   virtual void initialize();
      28             :   virtual void execute();
      29             :   virtual void threadJoin(const UserObject & y);
      30             :   virtual void finalize();
      31             : 
      32          99 :   const Real & getRate() const { return _nucleation_rate; }
      33             : 
      34             : protected:
      35             :   /// Adds a nucleus to the list containing nucleus information
      36             :   virtual void addNucleus(unsigned int & qp);
      37             : 
      38             :   /// Nucleation rate density (should be a material property implementing nucleation theory)
      39             :   const MaterialProperty<Real> & _probability;
      40             : 
      41             :   /// Duration of time each nucleus is kept active after insertion
      42             :   Real _hold_time;
      43             : 
      44             :   /// the local nucleus list of nuclei centered in the domain of the current processor
      45             :   NucleusList & _local_nucleus_list;
      46             : 
      47             :   /** Total nucleation rate.
      48             :    * For time-dependent statistics, this is probability rate density,
      49             :    * for time-independent statistics, it is probability density
      50             :    */
      51             :   Real _nucleation_rate;
      52             : 
      53             :   /// store the local nucleus radius
      54             :   const MaterialProperty<Real> & _local_radius;
      55             : 
      56             :   /// indicates whether time-dependent statistics are used or not
      57             :   const bool _time_dep_stats;
      58             : };

Generated by: LCOV version 1.14