www.mooseframework.org
FeatureVolumeVectorPostprocessor.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 FEATUREVOLUMEVECTORPOSTPROCESSOR_H
9 #define FEATUREVOLUMEVECTORPOSTPROCESSOR_H
10 
11 #include "GeneralVectorPostprocessor.h"
12 #include "MooseVariableDependencyInterface.h"
13 
14 // Forward Declarations
16 class FeatureFloodCount;
17 
18 template <>
20 
31 class FeatureVolumeVectorPostprocessor : public GeneralVectorPostprocessor,
32  public MooseVariableDependencyInterface
33 {
34 public:
35  FeatureVolumeVectorPostprocessor(const InputParameters & parameters);
36 
37  virtual void initialize() override;
38  virtual void execute() override;
39  virtual void finalize() override;
40 
44  Real getFeatureVolume(unsigned int feature_id) const;
45 
46 protected:
49 
52 
53  VectorPostprocessorValue & _var_num;
54  VectorPostprocessorValue & _feature_volumes;
55  VectorPostprocessorValue & _intersects_bounds;
56 
57 private:
59  void accumulateVolumes(const Elem * elem,
60  const std::vector<unsigned int> & var_to_features,
61  std::size_t num_features);
62 
64  Real computeIntegral(std::size_t var_index) const;
65 
66  const std::vector<MooseVariable *> & _vars;
67  std::vector<const VariableValue *> _coupled_sln;
68 
69  MooseMesh & _mesh;
70  Assembly & _assembly;
71  const MooseArray<Point> & _q_point;
72  QBase *& _qrule;
73  const MooseArray<Real> & _JxW;
74  const MooseArray<Real> & _coord;
75 };
76 
77 #endif
void accumulateVolumes(const Elem *elem, const std::vector< unsigned int > &var_to_features, std::size_t num_features)
Add volume contributions to one or entries in the feature volume vector.
This VectorPostprocessor is intended to be used to calculate accurate volumes from the FeatureFloodCo...
const std::vector< MooseVariable * > & _vars
Real computeIntegral(std::size_t var_index) const
Calculate the integral value of the passed in variable (index)
This object will mark nodes or elements of continuous regions all with a unique number for the purpos...
const FeatureFloodCount & _feature_counter
A reference to the feature flood count object.
std::vector< const VariableValue * > _coupled_sln
Real getFeatureVolume(unsigned int feature_id) const
Returns the volume for the given grain number.
InputParameters validParams< FeatureVolumeVectorPostprocessor >()
const bool _single_feature_per_elem
A Boolean indicating how the volume is calculated.
FeatureVolumeVectorPostprocessor(const InputParameters &parameters)