www.mooseframework.org
PolycrystalCircles.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 <array>
14 #include "DelimitedFileReader.h"
15 
16 // Forward Declarations
17 
27 {
28 public:
30 
32 
33  // Required functions from PolycrystalUserObjectBase
34  virtual void precomputeGrainStructure() override;
35  virtual void getGrainsBasedOnPoint(const Point & point,
36  std::vector<unsigned int> & grains) const override;
37  virtual Real getVariableValue(unsigned int op_index, const Point & p) const override;
38  virtual unsigned int getNumGrains() const override { return _grain_num; }
39 
40 protected:
41  enum COLS
42  {
43  X,
44  Y,
45  Z,
46  R
47  }; // Names of columns in text file.
49  const bool _columnar_3D;
50 
53 
55  unsigned int _grain_num;
56 
58  std::vector<Point> _centerpoints;
59 
61  std::vector<Real> _radii;
62 
63  Real computeDiffuseInterface(const Point & p, const unsigned int & i) const;
64 };
unsigned int _grain_num
Number of crystal grains to create.
const bool _columnar_3D
Whether to use columns or spheres in 3D geometries.
This object provides the base capability for creating proper polycrystal ICs.
virtual unsigned int getNumGrains() const override
Must be overridden by the deriving class to provide the number of grains in the polycrystal structure...
std::vector< Real > _radii
Radius for each circular grain created.
virtual Real getVariableValue(unsigned int op_index, const Point &p) const override
Returns the variable value for a given op_index and mesh point.
Real computeDiffuseInterface(const Point &p, const unsigned int &i) const
PolycrystalCircles(const InputParameters &parameters)
virtual void precomputeGrainStructure() override
This callback is triggered after the object is initialized and may be optionally overridden to do pre...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
virtual void getGrainsBasedOnPoint(const Point &point, std::vector< unsigned int > &grains) const override
Method for retrieving active grain IDs based on some point in the mesh.
const InputParameters & parameters() const
std::vector< Point > _centerpoints
x,y,z coordinates of circle centers
const Real _int_width
Interfacial width.
PolycrystalCircles creates a polycrystal made up of circles.