https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FeatureVolumeVectorPostprocessor.h
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
10#pragma once
11
15
16#include <array>
17
18// Forward Declarations
20
34{
35public:
37
39
40 virtual void initialize() override;
41 virtual void execute() override;
42 virtual void finalize() override;
43
47 Real getFeatureVolume(unsigned int feature_id) const;
48
49protected:
53
56
62
65
66private:
68 void accumulateVolumes(const Elem * elem,
69 const std::vector<unsigned int> & var_to_features,
70 std::size_t num_features);
71
73 void accumulateBoundaryFaces(const Elem * elem,
74 const std::vector<unsigned int> & var_to_features,
75 std::size_t num_features,
76 unsigned int side);
77
79 Real computeIntegral(std::size_t var_index) const;
80
82 Real computeFaceIntegral(std::size_t var_index) const;
83
84 const std::vector<MooseVariableFEBase *> & _vars;
85 std::vector<const VariableValue *> _coupled_sln;
86
90 const QBase * const & _qrule;
93 const QBase * const & _qrule_face;
95
96 std::array<VectorPostprocessorValue *, 3> _centroid;
97};
std::vector< Real > VectorPostprocessorValue
This object will mark nodes or elements of continuous regions all with a unique number for the purpos...
This VectorPostprocessor is intended to be used to calculate accurate volumes from the FeatureFloodCo...
std::vector< const VariableValue * > _coupled_sln
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.
Real computeFaceIntegral(std::size_t var_index) const
Calculate the integral on the face if boundary is supplied as input.
Real computeIntegral(std::size_t var_index) const
Calculate the integral value of the passed in variable (index)
const std::vector< MooseVariableFEBase * > & _vars
std::array< VectorPostprocessorValue *, 3 > _centroid
bool _is_boundary_restricted
Indicates whether the calculation should be run on volumes or area of a boundary.
const bool _single_feature_per_elem
A Boolean indicating how the volume is calculated.
void accumulateBoundaryFaces(const Elem *elem, const std::vector< unsigned int > &var_to_features, std::size_t num_features, unsigned int side)
When boundary is supplied as input, compute coverage of that boundary by each feature.
const FeatureFloodCount & _feature_counter
A reference to the feature flood count object.
VectorPostprocessorValue & _intersects_specified_bounds
Real getFeatureVolume(unsigned int feature_id) const
Returns the volume for the given grain number.
const InputParameters & parameters() const