www.mooseframework.org
EBSDMesh.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
14 #include <array>
15 
16 class EBSDMesh;
17 
18 template <>
19 InputParameters validParams<EBSDMesh>();
20 
24 class EBSDMesh : public GeneratedMesh
25 {
26 public:
27  EBSDMesh(const InputParameters & parameters);
28  virtual ~EBSDMesh();
29 
30  virtual void buildMesh();
31 
33  {
34  // grid spacing
35  std::array<Real, 3> d;
36  // grid origin
37  std::array<Real, 3> min;
38  // mesh dimension
39  unsigned int dim;
40  // grid size
41  std::array<unsigned int, 3> n;
42  };
43 
44  // Interface functions for the EBSDReader
45  const EBSDMeshGeometry & getEBSDGeometry() const { return _geometry; }
46  const std::string & getEBSDFilename() const { return _filename; }
47 
48 protected:
50  void readEBSDHeader();
51 
53  std::string _filename;
54 
57 };
58 
EBSDMesh::EBSDMesh
EBSDMesh(const InputParameters &parameters)
Definition: EBSDMesh.C:43
EBSDMesh::~EBSDMesh
virtual ~EBSDMesh()
Definition: EBSDMesh.C:50
EBSDMesh::EBSDMeshGeometry::dim
unsigned int dim
Definition: EBSDMesh.h:39
validParams< EBSDMesh >
InputParameters validParams< EBSDMesh >()
Definition: EBSDMesh.C:19
EBSDMesh::_filename
std::string _filename
Name of the file containing the EBSD data.
Definition: EBSDMesh.h:53
EBSDMesh
Mesh generated from parameters.
Definition: EBSDMesh.h:24
EBSDMesh::_geometry
EBSDMeshGeometry _geometry
EBSD data file mesh information.
Definition: EBSDMesh.h:56
EBSDMesh::EBSDMeshGeometry::n
std::array< unsigned int, 3 > n
Definition: EBSDMesh.h:41
EBSDMesh::getEBSDFilename
const std::string & getEBSDFilename() const
Definition: EBSDMesh.h:46
EBSDMesh::EBSDMeshGeometry
Definition: EBSDMesh.h:32
EBSDMesh::EBSDMeshGeometry::d
std::array< Real, 3 > d
Definition: EBSDMesh.h:35
EBSDMesh::readEBSDHeader
void readEBSDHeader()
Read the EBSD data file header.
Definition: EBSDMesh.C:53
EBSDMesh::EBSDMeshGeometry::min
std::array< Real, 3 > min
Definition: EBSDMesh.h:37
EBSDMesh::getEBSDGeometry
const EBSDMeshGeometry & getEBSDGeometry() const
Definition: EBSDMesh.h:45
EBSDMesh::buildMesh
virtual void buildMesh()
Definition: EBSDMesh.C:133