https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
21public:
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
44protected:
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};
Mesh generated from parameters read from a DREAM3D EBSD file.
const bool _distributed
are we working on a distributed mesh?
Geometry _geometry
EBSD data file mesh information.
const Geometry & getEBSDGeometry() const
std::unique_ptr< MeshBase > generate() override
const FileName & _filename
Name of the file containing the EBSD data.
static InputParameters validParams()
std::unique_ptr< MeshBase > & buildMeshSubgenerator()
const std::string & getEBSDFilename() const
void readEBSDHeader()
Read the EBSD data file header.
std::unique_ptr< MeshBase > & _base
const unsigned int _pre_refine
const InputParameters & parameters() const
std::array< Real, 3 > min
std::array< unsigned int, 3 > n