www.mooseframework.org
AverageGrainVolume.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 
8 #ifndef AVERAGEGRAINVOLUME_H
9 #define AVERAGEGRAINVOLUME_H
10 
11 #include "GeneralPostprocessor.h"
12 #include "Coupleable.h"
13 #include "MooseVariableDependencyInterface.h"
14 
15 // Forward Declarations
16 class FeatureFloodCount;
17 class AverageGrainVolume;
18 class MooseMesh;
19 template <>
20 InputParameters validParams<AverageGrainVolume>();
21 
25 class AverageGrainVolume : public GeneralPostprocessor,
26  public Coupleable,
27  public MooseVariableDependencyInterface
28 {
29 public:
30  AverageGrainVolume(const InputParameters & parameters);
31  virtual void initialize() override;
32  virtual void execute() override;
33  virtual Real getValue() override;
34 
35 protected:
36  void accumulateVolumes(const std::vector<unsigned int> & var_to_features,
37  std::size_t libmesh_dbg_var(num_features));
38  Real computeIntegral(std::size_t var_index) const;
39 
40 private:
42  MooseMesh & _mesh;
43  Assembly & _assembly;
44  std::vector<unsigned int> _static_var_to_feature;
45  std::vector<const VariableValue *> _vals;
46  std::vector<Real> _feature_volumes;
47  const MooseArray<Point> & _q_point;
48  QBase *& _qrule;
49  const MooseArray<Real> & _JxW;
50  const MooseArray<Real> & _coord;
52 };
53 #endif // AVERAGEGRAINVOLUME_H
std::vector< unsigned int > _static_var_to_feature
virtual Real getValue() override
const FeatureFloodCount * _feature_counter
AverageGrainVolume(const InputParameters &parameters)
virtual void execute() override
const MooseArray< Point > & _q_point
void accumulateVolumes(const std::vector< unsigned int > &var_to_features, std::size_t libmesh_dbg_var(num_features))
const MooseArray< Real > & _coord
std::vector< Real > _feature_volumes
const MooseArray< Real > & _JxW
virtual void initialize() override
InputParameters validParams< AverageGrainVolume >()
This object will mark nodes or elements of continuous regions all with a unique number for the purpos...
MooseMesh & _mesh
A reference to the mesh.
Real computeIntegral(std::size_t var_index) const
Compute the average grain area in a polycrystal.
std::vector< const VariableValue * > _vals