59 Real getData(
const Elem *
const elem,
const unsigned int prop_num)
const;
75 Real getNodeData(
const Node *
const node,
const unsigned int prop_num)
const;
92 Real getBlockData(
const Elem *
const elem,
const unsigned int prop_num)
const;
void readData()
This function reads the data from file.
BoundingBox _bounding_box
Bounding box for the mesh.
Real getVoronoiData(const Point &point, const unsigned int prop_num) const
This function retrieves properties for elements from a file with nearest neighbor / grain based prope...
bool & _initialize_called_once
To keep track of initialization to avoid reading the files twice.
Real getBlockData(const Elem *const elem, const unsigned int prop_num) const
This function retrieves properties for elements, from a file that has block-based data...
std::vector< FileName > _prop_file_names
Name of file containing property values.
std::vector< Point > _center
unsigned int & _current_file_index
Index of the file we last read.
const ReadTypeEnum _read_type
Type of read - element, grain, or block.
PropertyReadFile(const InputParameters ¶meters)
virtual ~PropertyReadFile()
Read properties from file - grain, element, node or block Input file syntax: prop1 prop2 etc...
ReadTypeEnum getReadType() const
Returns the ordering of data expected in the CSV file.
const MooseEnum _rve_type
Type of voronoi tesselation/grain structure - non-periodic default.
MooseUtils::DelimitedFileReader _reader
Use DelimitedFileReader to read and store data from file.
Real getNodeData(const Node *const node, const unsigned int prop_num) const
This function retrieves properties for nodes, from a file that has node-based data.
static InputParameters validParams()
Real getData(const Elem *const elem, const unsigned int prop_num) const
This function retrieves property data for elements.
Real minPeriodicDistance(const Point &, const Point &) const
This function calculates minimum distance between 2 points considering periodicity of the simulation ...
const unsigned int _rand_seed
Random seed - used for generating grain centers.
const unsigned int _nvoronoi
Number of grains (for reading a CSV file with properties ordered by grains)
ReadTypeEnum
How data is organized in the CSV file.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const bool _load_on_construction
Whether to read the first CSV file in the constructor or on the first initialization before execution...
const unsigned int _nblock
Number of blocks (for reading a CSV file with properties ordered by blocks)
virtual void finalize()
Finalize.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Utility class for reading delimited data (e.g., CSV data).
const bool _use_random_tesselation
Parameters for the nearest neighbor / grain interpolation Whether to use a random tesselation for the...
const InputParameters & parameters() const
Get the parameters of the object.
const unsigned int _nprop
Class attributes useful for range-checking Number of properties in a row.
virtual void initVoronoiCenterPoints()
This function generates voronoi tesselation center points Presently random generated.
bool _block_zero
Do the block numbers start with zero or one?
const unsigned int _ngrain
Legacy attribute to keep Grizzly functional, see idaholab/moose#19109, idaholab/Grizzly#182.
std::vector< FileName > getFileNames()
Retrieve the property file names from the parameters.
unsigned int getNumProperties() const
Returns the number of properties (columns) read in the file.
virtual void initialize()
Called before execute() is ever called so that data can be cleared.
virtual void execute()
Execute method.
Real getElementData(const Elem *const elem, const unsigned int prop_num) const
This function retrieves properties for elements, from a file that has element-based data...