https://mooseframework.inl.gov
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 {
22 public:
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  {
34  return _functor_reductions;
35  };
36 
37  virtual Real spatialValue(const Point & p) const override;
38 
40  {
43  MIN,
45  };
46 
47  virtual bool hasBlocks(SubdomainID sub) const override;
48 
49 protected:
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 };
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::vector< const Moose::Functor< Real > * > _functors
Functors that are evaluated to create the reduction.
const std::vector< VectorPostprocessorValue * > & getReductions() const
Return Integral values.
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
const MeshDivision & _mesh_division
Mesh division providing the division.
This MeshDivisionFunctorReductionVectorPostprocessor serves to integrate functors based on the index ...
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.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
virtual bool hasBlocks(SubdomainID sub) const override
Returns whether the functor is defined on this block.
const MooseEnum _reduction
Reduction operation to be performed.
virtual void threadJoin(const UserObject &uo) override
Must override.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _nfunctors
Number of functors to be integrated.
virtual Real spatialValue(const Point &p) const override
Optional interface function for "evaluating" a UserObject at a spatial position.
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs...
std::vector< VectorPostprocessorValue * > _functor_reductions
Vectors holding functor reductions (integrals, averages, extrema..) over each mesh division...
Base class for user-specific data.
Definition: UserObject.h:40