https://mooseframework.inl.gov
EBSDMeshGenerator.h
Go to the documentation of this file.
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 
20 {
21 public:
23 
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  const std::string & getEBSDFilename() const { return _filename; }
43 
44 protected:
45  std::unique_ptr<MeshBase> & buildMeshSubgenerator();
46 
48  void readEBSDHeader();
49 
51  const bool _distributed;
52 
54  const FileName & _filename;
55 
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 };
const Geometry & getEBSDGeometry() const
static InputParameters validParams()
EBSDMeshGenerator(const InputParameters &parameters)
const std::string & getEBSDFilename() const
const bool _distributed
are we working on a distributed mesh?
Mesh generated from parameters read from a DREAM3D EBSD file.
void readEBSDHeader()
Read the EBSD data file header.
const unsigned int _pre_refine
std::array< Real, 3 > min
std::unique_ptr< MeshBase > generate() override
std::array< Real, 3 > d
Geometry _geometry
EBSD data file mesh information.
const FileName & _filename
Name of the file containing the EBSD data.
std::unique_ptr< MeshBase > & _base
const InputParameters & parameters() const
std::array< unsigned int, 3 > n
std::unique_ptr< MeshBase > & buildMeshSubgenerator()