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 "GeneratedMesh.h" 13 : #include "EBSDMeshGenerator.h" 14 : 15 : #include <array> 16 : 17 : /** 18 : * Mesh generated from parameters 19 : */ 20 : class EBSDMesh : public GeneratedMesh 21 : { 22 : public: 23 : static InputParameters validParams(); 24 : 25 : EBSDMesh(const InputParameters & parameters); 26 : virtual ~EBSDMesh(); 27 : 28 : virtual void buildMesh(); 29 : 30 : struct EBSDMeshGeometry 31 : { 32 : // grid spacing 33 : std::array<Real, 3> d; 34 : // grid origin 35 : std::array<Real, 3> min; 36 : // mesh dimension 37 : unsigned int dim; 38 : // grid size 39 : std::array<unsigned int, 3> n; 40 : }; 41 : 42 : // Interface functions for the EBSDReader 43 : const EBSDMeshGenerator::Geometry & getEBSDGeometry() const { return _geometry; } 44 0 : const std::string & getEBSDFilename() const { return _filename; } 45 : 46 : protected: 47 : /// Read the EBSD data file header 48 : void readEBSDHeader(); 49 : 50 : /// Name of the file containing the EBSD data 51 : std::string _filename; 52 : 53 : /// EBSD data file mesh information 54 : EBSDMeshGenerator::Geometry _geometry; 55 : };