LCOV - code coverage report
Current view: top level - include/ics - PolycrystalVoronoiVoidIC.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: 0 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 "MultiSmoothCircleIC.h"
      13             : #include "MooseRandom.h"
      14             : #include "PolycrystalICTools.h"
      15             : 
      16             : // Forward Declarationsc
      17             : class GrainTrackerInterface;
      18             : class PolycrystalVoronoi;
      19             : 
      20             : /**
      21             :  * PolycrystalVoronoiVoidIC initializes either grain or void values for a
      22             :  * voronoi tesselation with voids distributed along the grain boundaries.
      23             :  */
      24             : class PolycrystalVoronoiVoidIC : public MultiSmoothCircleIC
      25             : {
      26             : public:
      27             :   static InputParameters validParams();
      28             : 
      29             :   PolycrystalVoronoiVoidIC(const InputParameters & parameters);
      30             : 
      31             :   virtual void initialSetup() override;
      32             : 
      33             :   static InputParameters actionParameters();
      34             : 
      35             : protected:
      36             :   const MooseEnum _structure_type;
      37             : 
      38             :   const unsigned int _op_num;
      39             :   const unsigned int _op_index;
      40             : 
      41             :   const bool _columnar_3D;
      42             : 
      43             :   const PolycrystalVoronoi & _poly_ic_uo;
      44             : 
      45             :   const FileName _file_name;
      46             : 
      47             :   virtual void computeCircleCenters() override;
      48             : 
      49             :   virtual Real value(const Point & p) override;
      50             :   virtual RealGradient gradient(const Point & p) override;
      51             : 
      52             :   unsigned int _grain_num;
      53             :   std::vector<Point> _centerpoints;
      54             : 
      55             :   /// Type for distance and point
      56             :   struct DistancePoint
      57             :   {
      58             :     Real d;
      59             :     unsigned int gr;
      60             :   };
      61             : 
      62             :   /// Sorts the temp_centerpoints into order of magnitude
      63             :   struct DistancePointComparator
      64             :   {
      65      451206 :     bool operator()(const DistancePoint & a, const DistancePoint & b) { return a.d < b.d; }
      66             :   } _customLess;
      67             : };

Generated by: LCOV version 1.14