Loading [MathJax]/extensions/tex2jax.js
MeshKernel
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages Concepts
SamplesHessianCalculator.hpp
1//---- GPL ---------------------------------------------------------------------
2//
3// Copyright (C) Stichting Deltares, 2011-2023.
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation version 3.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16//
17// contact: delft3d.support@deltares.nl
18// Stichting Deltares
19// P.O. Box 177
20// 2600 MH Delft, The Netherlands
21//
22// All indications and logos of, and references to, "Delft3D" and "Deltares"
23// are registered trademarks of Stichting Deltares, and remain the property of
24// Stichting Deltares. All rights reserved.
25//
26//------------------------------------------------------------------------------
27
28#pragma once
29
30#include <vector>
31
32#include "MeshKernel/Entities.hpp"
33#include "MeshKernel/Hessian.hpp"
34#include "MeshKernel/Point.hpp"
35#include "MeshKernel/Utilities/LinearAlgebra.hpp"
36
37namespace meshkernel
38{
41 {
42 public:
50 static std::vector<Sample> ComputeSamplesHessian(const std::vector<Sample>& rawSamplePoints,
51 const Projection projection,
52 UInt numberOfSmoothingIterations,
53 const UInt numX,
54 const UInt numY);
55
56 private:
63 static void SmoothSamples(const std::vector<Sample>& sampleData,
64 const UInt numberOfSmoothingIterations,
65 Hessian& hessian);
66
68 static void ComputeGradient(const std::vector<Sample>& samplePoints,
69 const Projection projection,
70 const Hessian& hessian,
71 const UInt ip0,
72 const UInt ip1,
73 const UInt ip0L,
74 const UInt ip0R,
75 const UInt ip1L,
76 const UInt ip1R,
77 meshkernel::Vector& gradient,
79 double& dareaL,
80 double& dareaR);
81
83 static void ComputeSampleGradient(const std::vector<Sample>& samplePoints,
84 const Projection projection,
85 const Hessian& hessian,
86 const UInt direction,
87 const UInt i,
88 const UInt j,
89 meshkernel::Vector& gradient,
91 double& dareaL,
92 double& dareaR);
93
95 static void ComputeHessian(const std::vector<Sample>& samplePoints,
96 const Projection projection,
97 Hessian& hessian);
98
100 static void PrepareSampleForHessian(const std::vector<Sample>& samplePoints,
101 const Projection projection,
102 UInt numberOfSmoothingIterations,
103 Hessian& hessian);
104 };
105
106} // namespace meshkernel
The hessian values.
Definition Hessian.hpp:49
A class implementing the computation of the real component the local hessian eigenvalues.
Definition SamplesHessianCalculator.hpp:41
static std::vector< Sample > ComputeSamplesHessian(const std::vector< Sample > &rawSamplePoints, const Projection projection, UInt numberOfSmoothingIterations, const UInt numX, const UInt numY)
Computation of the samples Hessian.
A class defining a vector.
Definition Vector.hpp:39
Contains the logic of the C++ static library.
Definition AveragingInterpolation.hpp:37
Projection
Enumerator describing the supported projections.
Definition Definitions.hpp:43
std::uint32_t UInt
Integer type used when indexing mesh graph entities.
Definition Definitions.hpp:39