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 #include "NonADFunctorInterface.h"
15 
21  : public SpatialUserObjectFunctor<ElementVectorPostprocessor>,
23 {
24 public:
27 
28  virtual void initialize() override;
29  virtual void execute() override;
30  virtual void finalize() override;
31  virtual void threadJoin(const UserObject & uo) override;
32 
34  const std::vector<VectorPostprocessorValue *> & getReductions() const
35  {
36  return _functor_reductions;
37  };
38 
39  virtual Real spatialValue(const Point & p) const override;
40 
42  {
45  MIN,
47  };
48 
49  virtual bool hasBlocks(SubdomainID sub) const override;
50 
51 protected:
55  const unsigned int _nfunctors;
59  std::vector<const Moose::Functor<Real> *> _functors;
61  std::vector<VectorPostprocessorValue *> _functor_reductions;
63  std::vector<Real> _volumes;
64 };
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
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...
const InputParameters & parameters() const
Get the parameters of the object.
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