LCOV - code coverage report
Current view: top level - include/meshgenerators - EBSDMeshGenerator.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 "MeshGenerator.h"
      13             : 
      14             : #include <array>
      15             : 
      16             : /**
      17             :  * Mesh generated from parameters read from a DREAM3D EBSD file
      18             :  */
      19             : class EBSDMeshGenerator : public MeshGenerator
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             : 
      24             :   EBSDMeshGenerator(const InputParameters & parameters);
      25             : 
      26             :   std::unique_ptr<MeshBase> generate() override;
      27             : 
      28             :   struct Geometry
      29             :   {
      30             :     // grid spacing
      31             :     std::array<Real, 3> d;
      32             :     // grid origin
      33             :     std::array<Real, 3> min;
      34             :     // mesh dimension
      35             :     unsigned int dim;
      36             :     // grid size
      37             :     std::array<unsigned int, 3> n;
      38             :   };
      39             : 
      40             :   // Interface functions for the EBSDReader
      41             :   const Geometry & getEBSDGeometry() const { return _geometry; }
      42         168 :   const std::string & getEBSDFilename() const { return _filename; }
      43             : 
      44             : protected:
      45             :   std::unique_ptr<MeshBase> & buildMeshSubgenerator();
      46             : 
      47             :   /// Read the EBSD data file header
      48             :   void readEBSDHeader();
      49             : 
      50             :   /// are we working on a distributed mesh?
      51             :   const bool _distributed;
      52             : 
      53             :   /// Name of the file containing the EBSD data
      54             :   const FileName & _filename;
      55             : 
      56             :   /// EBSD data file mesh information
      57             :   Geometry _geometry;
      58             : 
      59             :   // Number of coarsening levels available in adaptive mesh refinement
      60             :   const unsigned int _pre_refine;
      61             : 
      62             :   // Sub-MeshGenerator for the regular base mesh
      63             :   std::unique_ptr<MeshBase> & _base;
      64             : };

Generated by: LCOV version 1.14