Skip to content

Commit

Permalink
GRIDEDIT-247 Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
BillSenior committed Jul 17, 2023
1 parent b5e8c82 commit da067b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/MeshKernel/src/Splines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,14 @@ void Splines::snapSpline(const LandBoundaries& landBoundary,
{
Point point(xf(i), yf(i));
landBoundary.nearestPointOnLandBoundary(point, 2, nearestPoint, smallestDistance, segmentIndex, scaledDistance);
// toLand(xf[i], 1, mxlan, 2, nearestPoint, smallestDistance, segmentIndex, scaledDistance);
xbVec(i) = nearestPoint.x;
ybVec(i) = nearestPoint.y;
}

// TODO how to get a pointwise multiply here?
// xbVec = weights.colwise() * xbVec.colwise();
// Can then replace the two nested loops below with a gemv.

// Could be replaced with gemv.
for (size_t i = 0; i < splinePoints.size(); ++i)
{
Expand All @@ -729,6 +732,7 @@ void Splines::snapSpline(const LandBoundaries& landBoundary,
}
}

// Compute constraints.
lambda = eMatrix * (bMatrix * atwaInverse * atwxb + cMatrix * atwaInverse * atwyb - dVector);

rhsx = atwxb - bMatrix.transpose() * lambda;
Expand Down

0 comments on commit da067b2

Please sign in to comment.