https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GrainCentersPostprocessor.C
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
12
15{
17 params.addClassDescription("Outputs the values from ComputeGrainCenterUserObject");
18 params.addParam<UserObjectName>(
19 "grain_data", "Specify user object that gives center of mass and volume of grains");
20 return params;
21}
22
24 : GeneralVectorPostprocessor(parameters),
25 _grain_volume_center_vector(declareVector("grain_volume_center_vector")),
26 _grain_data(getUserObject<ComputeGrainCenterUserObject>("grain_data")),
27 _grain_volumes(_grain_data.getGrainVolumes()),
28 _grain_centers(_grain_data.getGrainCenters()),
29 _total_grains(_grain_volumes.size())
30{
32}
33
34void
36{
37 for (unsigned int i = 0; i < _total_grains; ++i)
38 {
43 }
44}
This UserObject computes a volumes and centers of grains.
VectorPostprocessorValue & _grain_volume_center_vector
The VectorPostprocessorValue object where the results are stored.
GrainCentersPostprocessor(const InputParameters &parameters)
const std::vector< Real > & _grain_volumes
Extracting grain volumes from Userobject.
const std::vector< Point > & _grain_centers
Extracting grain centers from Userobject.
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()