intersection with triangle plane for miss
[OpenFOAM-1.5.x.git] / applications / utilities / mesh / generation / blockMesh / curvedEdges / simpleSplineEdge.C
blob961fb2530452b6e4b994115cef3da11145b59686
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 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 "error.H"
32 #include "simpleSplineEdge.H"
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 namespace Foam
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(simpleSplineEdge, 0);
43 // Add the curvedEdge constructor functions to the hash tables
44 curvedEdge::addIstreamConstructorToTable<simpleSplineEdge>
45     addSimpleSplineEdgeIstreamConstructorToTable_;
47 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
49 // Construct from components
50 simpleSplineEdge::simpleSplineEdge
52     const pointField& points,
53     const label start,
54     const label end,
55     const pointField& otherknots
58     curvedEdge(points, start, end),
59     BSpline(knotlist(points, start, end, otherknots))
63 // Construct from components
64 simpleSplineEdge::simpleSplineEdge
66     const pointField& points,
67     const label start,
68     const label end,
69     const pointField& otherknots,
70     const vector& fstend,
71     const vector& sndend
74     curvedEdge(points, start, end),
75     BSpline(knotlist(points, start, end, otherknots), fstend, sndend)
79 // Construct from Istream
80 simpleSplineEdge::simpleSplineEdge(const pointField& points, Istream& is)
82     curvedEdge(points, is),
83     BSpline(knotlist(points, start_, end_, pointField(is)))
87 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
89 //- Return the position of a point on the simple spline curve given by
90 //  the parameter 0 <= lambda <= 1
91 vector simpleSplineEdge::position(const scalar mu) const
93     return BSpline::position(mu);
97 //- Return the length of the simple spline curve
98 scalar simpleSplineEdge::length() const
100     notImplemented("simpleSplineEdge::length() const");
101     return 1.0;
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 } // End namespace Foam
109 // ************************************************************************* //