https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MeshDivisionFunctorReductionVectorPostprocessor.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
14
20 : public SpatialUserObjectFunctor<ElementVectorPostprocessor>
21{
22public:
25
26 virtual void initialize() override;
27 virtual void execute() override;
28 virtual void finalize() override;
29 virtual void threadJoin(const UserObject & uo) override;
30
32 const std::vector<VectorPostprocessorValue *> & getReductions() const
33 {
35 };
36
37 virtual Real spatialValue(const Point & p) const override;
38
46
47 virtual bool hasBlocks(SubdomainID sub) const override;
48
49protected:
53 const unsigned int _nfunctors;
57 std::vector<const Moose::Functor<Real> *> _functors;
59 std::vector<VectorPostprocessorValue *> _functor_reductions;
61 std::vector<Real> _volumes;
62};
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This MeshDivisionFunctorReductionVectorPostprocessor serves to integrate functors based on the index ...
const MeshDivision & _mesh_division
Mesh division providing the division.
std::vector< VectorPostprocessorValue * > _functor_reductions
Vectors holding functor reductions (integrals, averages, extrema..) over each mesh division.
std::vector< const Moose::Functor< Real > * > _functors
Functors that are evaluated to create the reduction.
const unsigned int _nfunctors
Number of functors to be integrated.
virtual void threadJoin(const UserObject &uo) override
Must override.
const std::vector< VectorPostprocessorValue * > & getReductions() const
Return Integral values.
virtual Real spatialValue(const Point &p) const override
Optional interface function for "evaluating" a UserObject at a spatial position.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::vector< Real > _volumes
Vectors holding the mesh division volumes.
virtual bool hasBlocks(SubdomainID sub) const override
Returns whether the functor is defined on this block.
Base class for MeshDivision objects.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs.
Base class for user-specific data.
Definition UserObject.h:20