https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Postprocessor.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
12#include "OutputInterface.h"
14#include "libmesh/parallel.h"
15
16class MooseObject;
17
25 public Moose::FunctorBase<Real>
26{
27public:
29
30 Postprocessor(const MooseObject * moose_object);
31
32#ifdef MOOSE_KOKKOS_ENABLED
36 Postprocessor(const Postprocessor & object, const Moose::Kokkos::FunctorCopy & key);
37#endif
38
46 virtual PostprocessorValue getValue() const = 0;
47
64
68 const std::string & PPName() const { return _pp_name; }
69
70 virtual bool hasBlocks(SubdomainID /* id */) const override { return true; }
71
72 bool supportsFaceArg() const override final { return true; }
73 bool supportsElemSideQpArg() const override final { return true; }
74
75protected:
77 const std::string & _pp_name;
78
81
82private:
87 const PostprocessorValue & declareValue(const MooseObject & moose_object);
88
95
96 ValueType evaluate(const ElemArg & elem, const Moose::StateArg & state) const override final;
97 ValueType evaluate(const FaceArg & face, const Moose::StateArg & state) const override final;
98 ValueType evaluate(const ElemQpArg & qp, const Moose::StateArg & state) const override final;
99 ValueType evaluate(const ElemSideQpArg & elem_side_qp,
100 const Moose::StateArg & state) const override final;
101 ValueType evaluate(const ElemPointArg & elem_point,
102 const Moose::StateArg & state) const override final;
103 ValueType evaluate(const NodeArg & node, const Moose::StateArg & state) const override final;
104
106 const Moose::StateArg & state) const override final;
108 const Moose::StateArg & state) const override final;
110 const Moose::StateArg & state) const override final;
111 GradientType evaluateGradient(const ElemSideQpArg & elem_side_qp,
112 const Moose::StateArg & state) const override final;
113 GradientType evaluateGradient(const ElemPointArg & elem_point,
114 const Moose::StateArg & state) const override final;
116 const Moose::StateArg & state) const override final;
117
118 DotType evaluateDot(const ElemArg & elem, const Moose::StateArg & state) const override final;
119 DotType evaluateDot(const FaceArg & face, const Moose::StateArg & state) const override final;
120 DotType evaluateDot(const ElemQpArg & qp, const Moose::StateArg & state) const override final;
121 DotType evaluateDot(const ElemSideQpArg & elem_side_qp,
122 const Moose::StateArg & state) const override final;
123 DotType evaluateDot(const ElemPointArg & elem_point,
124 const Moose::StateArg & state) const override final;
125 DotType evaluateDot(const NodeArg & node, const Moose::StateArg & state) const override final;
126
130 void evaluateDotWarning() const;
131
134};
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
Base class template for functor objects.
typename FunctorReturnType< Real, FunctorEvaluationKind::Gradient >::type GradientType
This rigmarole makes it so that a user can create functors that return containers (std::vector,...
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
A class to provide an common interface to objects requiring "outputs" option.
Base class for all Postprocessors.
GradientType evaluateGradient(const ElemArg &elem, const Moose::StateArg &state) const override final
Evaluate the functor gradient with a given element.
const std::string & PPName() const
Returns the name of the Postprocessor.
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.
virtual PostprocessorValue getValue() const =0
This will get called to actually grab the final value the postprocessor has calculated.
const std::string & _pp_name
Post-processor name.
const MooseObject & _pp_moose_object
MOOSE object.
virtual bool hasBlocks(SubdomainID) const override
Returns whether the functor is defined on this block.
const PostprocessorValue & declareValue(const MooseObject &moose_object)
Internal method to be used to declare the value and store it within _current_value in the constructor...
bool supportsElemSideQpArg() const override final
Whether this functor supports evaluation with ElemSideQpArg.
static InputParameters validParams()
DotType evaluateDot(const ElemArg &elem, const Moose::StateArg &state) const override final
Evaluate the functor time derivative with a given element.
const PostprocessorValue & getCurrentValue() const
ValueType evaluate(const ElemArg &elem, const Moose::StateArg &state) const override final
Evaluate the functor with a given element.
bool supportsFaceArg() const override final
Whether this functor supports evaluation with FaceArg.
const PostprocessorValue & _current_value
The current value, which is the Reporter value that changes when we execute UOs in the problem.
A structure that is used to evaluate Moose functors logically at an element/cell center.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
Argument for requesting functor evaluation at a quadrature point location in an element.
Argument for requesting functor evaluation at quadrature point locations on an element side.
A structure defining a "face" evaluation calling argument for Moose functors.
State argument for evaluating functors.