initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / utilities / mesh / generation / blockMesh / curvedEdges / simpleSplineEdge.C
blobb45f0ea3c29a68a63573a4838e74fba7456731aa
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Description
26     simpleSplineEdge : the actual access class for Bspline
28 \*---------------------------------------------------------------------------*/
30 #include "simpleSplineEdge.H"
31 #include "addToRunTimeSelectionTable.H"
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 namespace Foam
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(simpleSplineEdge, 0);
41 addToRunTimeSelectionTable(curvedEdge, simpleSplineEdge, Istream);
44 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
46 // Construct from components
47 simpleSplineEdge::simpleSplineEdge
49     const pointField& points,
50     const label start,
51     const label end,
52     const pointField& otherknots
55     curvedEdge(points, start, end),
56     BSpline(knotlist(points, start, end, otherknots))
60 // Construct from components
61 simpleSplineEdge::simpleSplineEdge
63     const pointField& points,
64     const label start,
65     const label end,
66     const pointField& otherknots,
67     const vector& fstend,
68     const vector& sndend
71     curvedEdge(points, start, end),
72     BSpline(knotlist(points, start, end, otherknots), fstend, sndend)
76 // Construct from Istream
77 simpleSplineEdge::simpleSplineEdge(const pointField& points, Istream& is)
79     curvedEdge(points, is),
80     BSpline(knotlist(points, start_, end_, pointField(is)))
84 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
86 //- Return the position of a point on the simple spline curve given by
87 //  the parameter 0 <= lambda <= 1
88 vector simpleSplineEdge::position(const scalar mu) const
90     return BSpline::position(mu);
94 //- Return the length of the simple spline curve
95 scalar simpleSplineEdge::length() const
97     notImplemented("simpleSplineEdge::length() const");
98     return 1.0;
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 } // End namespace Foam
106 // ************************************************************************* //