MeshKernel
Static Public Member Functions | List of all members
meshkernel::SplineAlgorithms Class Reference

Provide algorithms operating on splines. More...

#include <SplineAlgorithms.hpp>

Static Public Member Functions

static std::vector< PointSecondOrderDerivative (const std::vector< Point > &splines, size_t startIndex, size_t endIndex)
 Second order derivative at spline corner points, from the start node to the end node of the spline (splint) More...
 
static std::vector< double > SecondOrderDerivative (const std::vector< double > &coordinates, size_t startIndex, size_t endIndex)
 Second order derivative at spline corner point coordinates (splint) More...
 
static std::tuple< Point, Point, double > ComputeCurvatureOnSplinePoint (const std::vector< Point > &splinePoints, const std::vector< Point > &splineDerivative, double adimensionalPointCoordinate, const Projection projection)
 Computes curvature in a spline point (comp_curv) More...
 
static Point Evaluate (const std::vector< Point > &coordinates, const std::vector< Point > &secondDerivative, const double evaluationPoint)
 Evaluate a spline function (splint) More...
 
static void SnapSplineToBoundary (std::vector< Point > &splinePoints, const std::vector< Point > &splineDerivative, const LandBoundary &landBoundary, const Projection projection, const int numberOfIterations=constants::numeric::defaultSnappingIterations)
 Snap the spline to the land boundary (snap_spline) More...
 

Detailed Description

Provide algorithms operating on splines.

Member Function Documentation

◆ ComputeCurvatureOnSplinePoint()

static std::tuple<Point, Point, double> meshkernel::SplineAlgorithms::ComputeCurvatureOnSplinePoint ( const std::vector< Point > &  splinePoints,
const std::vector< Point > &  splineDerivative,
double  adimensionalPointCoordinate,
const Projection  projection 
)
static

Computes curvature in a spline point (comp_curv)

Parameters
[in]splinePointsthe spline points
[in]splineDerivativethe spline derivative points
[in]adimensionalPointCoordinateThe adimensional coordinate of the point along the spline
[in]projectionThe coordinate system projection
Returns
The computed curvatureFactor, normal vector and tangential vector

◆ Evaluate()

static Point meshkernel::SplineAlgorithms::Evaluate ( const std::vector< Point > &  coordinates,
const std::vector< Point > &  secondDerivative,
const double  evaluationPoint 
)
static

Evaluate a spline function (splint)

Parameters
[in]coordinatesThe spline points
[in]secondDerivativeSecond derivative of the spline
[in]evaluationPointThe point at which the spline is to be evaluated
Returns
the result of evaluating the spline at the point.

◆ SecondOrderDerivative() [1/2]

static std::vector<double> meshkernel::SplineAlgorithms::SecondOrderDerivative ( const std::vector< double > &  coordinates,
size_t  startIndex,
size_t  endIndex 
)
static

Second order derivative at spline corner point coordinates (splint)

Parameters
[in]coordinatesThe spline corner point coordinate (x or y)
[in]startIndexThe start spline node
[in]endIndexThe end spline node
Returns
coordinatesDerivatives The second order derivative at corner points (x derivative or y derivative)

◆ SecondOrderDerivative() [2/2]

static std::vector<Point> meshkernel::SplineAlgorithms::SecondOrderDerivative ( const std::vector< Point > &  splines,
size_t  startIndex,
size_t  endIndex 
)
static

Second order derivative at spline corner points, from the start node to the end node of the spline (splint)

Parameters
[in]splinesThe spline corner points
[in]startIndexThe start spline node
[in]endIndexThe end spline node
Returns
coordinatesDerivatives The second order derivative at corner points

◆ SnapSplineToBoundary()

static void meshkernel::SplineAlgorithms::SnapSplineToBoundary ( std::vector< Point > &  splinePoints,
const std::vector< Point > &  splineDerivative,
const LandBoundary landBoundary,
const Projection  projection,
const int  numberOfIterations = constants::numeric::defaultSnappingIterations 
)
static

Snap the spline to the land boundary (snap_spline)

Uses an iterated Lagrange multiplier scheme to snap the points.

Parameters
[in,out]splinePointsThe spline points, these will be updated
[in]splineDerivativeDerivative of the spline at the spline points
[in]landBoundaryThe land boundary to which the spline will be snapped
[in]projectionThe coordinate system projection
[in]numberOfIterationsThe maximum number of iterations to be performed

The documentation for this class was generated from the following file: