From 79efd0a546b5cfbd1f6fba0156890cb8de070a9a Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 26 Oct 2009 13:59:50 +0100 Subject: [PATCH] BSpline code cleanup --- src/mesh/blockMesh/curvedEdges/BSpline.C | 49 +++++++++++------------- src/mesh/blockMesh/curvedEdges/BSpline.H | 11 ++---- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/src/mesh/blockMesh/curvedEdges/BSpline.C b/src/mesh/blockMesh/curvedEdges/BSpline.C index 8932651647..4e53399719 100644 --- a/src/mesh/blockMesh/curvedEdges/BSpline.C +++ b/src/mesh/blockMesh/curvedEdges/BSpline.C @@ -38,75 +38,70 @@ Foam::pointField Foam::BSpline::findKnots const vector& sndend ) { - label newnKnots(allknots.size() + 2); - label NKnots(allknots.size()); - pointField newknots(newnKnots); + const label NKnots = allknots.size(); // set up 1/6 and 2/3 which are the matrix elements throughout most // of the matrix - register scalar oneSixth = 1.0/6.0; - register scalar twoThird = 2.0/3.0; - - simpleMatrix M(newnKnots, pTraits::zero); + register const scalar oneSixth = 1.0/6.0; + register const scalar twoThird = 2.0/3.0; + simpleMatrix M(NKnots+2, pTraits::zero); // set up the matrix - M[0][0] = -0.5*scalar(NKnots - 1); M[0][2] = 0.5*scalar(NKnots - 1); - for (register label i=1; i