27 namespace UnaryStatisticOperations
30 struct Max {
static inline constexpr
double mInitial = std::numeric_limits<double>::lowest();
static inline constexpr
double Evaluate(
const double V1,
const double V2) {
return std::max(V1, V2); } };
31 struct Sum {
static inline constexpr
double mInitial = 0.0;
static inline constexpr
double Evaluate(
const double V1,
const double V2) {
return V1 + V2; } };
39 template<
class TOperationType>
62 const IndexType ComponentIndex)
const override;
64 const std::vector<IndexType>
GetItemShape()
const override;
68 std::string
Info()
const override;
Base class or all the expression types.
Definition: expression.h:38
Kratos::intrusive_ptr< Expression > Pointer
Definition: expression.h:44
std::size_t IndexType
Definition: expression.h:48
Kratos::intrusive_ptr< const Expression > ConstPointer
Definition: expression.h:46
Used to create lazy expression to get statistical quantities of entity values.
Definition: unary_statistics_expression.h:40
UnaryStatisticsExpression(Expression::ConstPointer pExpression)
Definition: unary_statistics_expression.cpp:24
std::string Info() const override
Definition: unary_statistics_expression.cpp:64
IndexType GetMaxDepth() const override
Get the Max Depth of the lazy expression tree.
Definition: unary_statistics_expression.cpp:58
double Evaluate(const IndexType EntityIndex, const IndexType EntityDataBeginIndex, const IndexType ComponentIndex) const override
Evalute the expression for the given entity data start index and component index and returns the valu...
Definition: unary_statistics_expression.cpp:38
const std::vector< IndexType > GetItemShape() const override
Get the Shape of the expression.
Definition: unary_statistics_expression.cpp:52
static Expression::Pointer Create(Expression::ConstPointer pExpression)
Definition: unary_statistics_expression.cpp:32
static double max(double a, double b)
Definition: GeometryFunctions.h:79
static double min(double a, double b)
Definition: GeometryFunctions.h:71
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Definition: unary_statistics_expression.h:30
static constexpr double Evaluate(const double V1, const double V2)
Definition: unary_statistics_expression.h:30
static constexpr double mInitial
Definition: unary_statistics_expression.h:30
Definition: unary_statistics_expression.h:29
static constexpr double mInitial
Definition: unary_statistics_expression.h:29
static constexpr double Evaluate(const double V1, const double V2)
Definition: unary_statistics_expression.h:29
Definition: unary_statistics_expression.h:31
static constexpr double mInitial
Definition: unary_statistics_expression.h:31
static constexpr double Evaluate(const double V1, const double V2)
Definition: unary_statistics_expression.h:31