https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PolycrystalCircles.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 <array>
14#include "DelimitedFileReader.h"
15
16// Forward Declarations
17
27{
28public:
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
40protected:
41 enum COLS
42 {
46 R
47 }; // Names of columns in text file.
49 const bool _columnar_3D;
50
52 const Real _int_width;
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};
const Real p
const InputParameters & parameters() const
PolycrystalCircles creates a polycrystal made up of circles.
virtual unsigned int getNumGrains() const override
Must be overridden by the deriving class to provide the number of grains in the polycrystal structure...
static InputParameters validParams()
virtual Real getVariableValue(unsigned int op_index, const Point &p) const override
Returns the variable value for a given op_index and mesh point.
unsigned int _grain_num
Number of crystal grains to create.
virtual void precomputeGrainStructure() override
This callback is triggered after the object is initialized and may be optionally overridden to do pre...
std::vector< Point > _centerpoints
x,y,z coordinates of circle centers
Real computeDiffuseInterface(const Point &p, const unsigned int &i) const
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.
std::vector< Real > _radii
Radius for each circular grain created.
const Real _int_width
Interfacial width.
const bool _columnar_3D
Whether to use columns or spheres in 3D geometries.
This object provides the base capability for creating proper polycrystal ICs.