Loading [MathJax]/extensions/tex2jax.js
MeshKernel
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages Concepts
Network1D.hpp
1//---- GPL ---------------------------------------------------------------------
2//
3// Copyright (C) Stichting Deltares, 2011-2020.
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 <MeshKernel/Entities.hpp>
31
34namespace meshkernel
35{
40 {
41 public:
43 Network1D() = default;
44
45 // @brief Construct a Network1D only from the projection
47 explicit Network1D(Projection projection);
48
52 Network1D(std::vector<std::vector<Point>> const& polyLines,
53 Projection projection);
54
59 void ComputeFixedChainages(std::vector<std::vector<double>> const& fixedChainagesByPolyline,
60 double minFaceSize,
61 double fixedChainagesOffset);
62
65 void ComputeOffsettedChainages(double offset);
66
69 [[nodiscard]] std::vector<std::vector<Point>> ComputeDiscretizationsFromChainages();
70
72
73 private:
74 std::vector<std::vector<Point>> m_polyLines;
75 std::vector<std::vector<double>> m_chainages;
76 };
77
78} // namespace meshkernel
A class describing a network 1d.
Definition Network1D.hpp:40
Network1D(Projection projection)
std::vector< std::vector< Point > > ComputeDiscretizationsFromChainages()
Computes the discretization points from the chainages for all polylines.
Projection m_projection
The projection used.
Definition Network1D.hpp:71
Network1D(std::vector< std::vector< Point > > const &polyLines, Projection projection)
Construct a mesh1d by discretizing polyLines.
void ComputeOffsettedChainages(double offset)
Compute the chainages at a regular offset for all polylines.
Network1D()=default
Default constructor.
void ComputeFixedChainages(std::vector< std::vector< double > > const &fixedChainagesByPolyline, double minFaceSize, double fixedChainagesOffset)
Compute the chainages from fixed point locations.
Contains the logic of the C++ static library.
Definition AveragingInterpolation.hpp:37
Projection
Enumerator describing the supported projections.
Definition Definitions.hpp:43