www.mooseframework.org
GrainCentersPostprocessor.C
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 
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<VectorPostprocessor>();
18  params.addClassDescription("Outputs the values from ComputeGrainCenterUserObject");
19  params.addParam<UserObjectName>(
20  "grain_data", "Specify user object that gives center of mass and volume of grains");
21  return params;
22 }
23 
24 GrainCentersPostprocessor::GrainCentersPostprocessor(const InputParameters & parameters)
25  : GeneralVectorPostprocessor(parameters),
26  _grain_volume_center_vector(declareVector("grain_volume_center_vector")),
27  _grain_data(getUserObject<ComputeGrainCenterUserObject>("grain_data")),
28  _grain_volumes(_grain_data.getGrainVolumes()),
29  _grain_centers(_grain_data.getGrainCenters()),
30  _total_grains(_grain_volumes.size())
31 {
33 }
34 
35 void
37 {
38  for (unsigned int i = 0; i < _total_grains; ++i)
39  {
44  }
45 }
GrainCentersPostprocessor::_total_grains
unsigned int _total_grains
Definition: GrainCentersPostprocessor.h:46
validParams< GrainCentersPostprocessor >
InputParameters validParams< GrainCentersPostprocessor >()
Definition: GrainCentersPostprocessor.C:15
GrainCentersPostprocessor::_grain_centers
const std::vector< Point > & _grain_centers
Extracting grain centers from Userobject.
Definition: GrainCentersPostprocessor.h:44
ComputeGrainCenterUserObject
This UserObject computes a volumes and centers of grains.
Definition: ComputeGrainCenterUserObject.h:23
GrainCentersPostprocessor::_grain_volumes
const std::vector< Real > & _grain_volumes
Extracting grain volumes from Userobject.
Definition: GrainCentersPostprocessor.h:42
GrainCentersPostprocessor::_grain_volume_center_vector
VectorPostprocessorValue & _grain_volume_center_vector
The VectorPostprocessorValue object where the results are stored.
Definition: GrainCentersPostprocessor.h:37
ComputeGrainCenterUserObject.h
GrainCentersPostprocessor::execute
virtual void execute()
Definition: GrainCentersPostprocessor.C:36
GrainCentersPostprocessor.h
GrainCentersPostprocessor::GrainCentersPostprocessor
GrainCentersPostprocessor(const InputParameters &parameters)
Definition: GrainCentersPostprocessor.C:24