www.mooseframework.org
ComputeGrainCenterUserObject.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef COMPUTEGRAINCENTERUSEROBJECT_H
8 #define COMPUTEGRAINCENTERUSEROBJECT_H
9 
10 #include "ElementUserObject.h"
11 
12 // Forward Declarations
14 
15 template <>
17 
21 class ComputeGrainCenterUserObject : public ElementUserObject
22 {
23 public:
24  ComputeGrainCenterUserObject(const InputParameters & parameters);
25 
26  virtual void initialize();
27  virtual void execute();
28  virtual void threadJoin(const UserObject & y);
29  virtual void finalize();
30 
31  const std::vector<Real> & getGrainVolumes() const;
32  const std::vector<Point> & getGrainCenters() const;
33 
34 protected:
35  unsigned int _qp;
36  unsigned int _ncrys;
37  std::vector<const VariableValue *> _vals;
38  unsigned int _ncomp;
40  std::vector<Real> _grain_data;
41  std::vector<Real> _grain_volumes;
42  std::vector<Point> _grain_centers;
44 };
45 
46 #endif // COMPUTEGRAINCENTERUSEROBJECT_H
std::vector< Real > _grain_data
storing volumes and centers of all the grains
virtual void threadJoin(const UserObject &y)
This UserObject computes a volumes and centers of grains.
InputParameters validParams< ComputeGrainCenterUserObject >()
const std::vector< Real > & getGrainVolumes() const
const std::vector< Point > & getGrainCenters() const
ComputeGrainCenterUserObject(const InputParameters &parameters)
std::vector< const VariableValue * > _vals