|
|
|
simpleSplineEdge.CGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Description 00026 simpleSplineEdge : the actual access class for Bspline 00027 00028 \*---------------------------------------------------------------------------*/ 00029 00030 #include "simpleSplineEdge.H" 00031 #include "addToRunTimeSelectionTable.H" 00032 00033 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00034 00035 namespace Foam 00036 { 00037 00038 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // 00039 00040 defineTypeNameAndDebug(simpleSplineEdge, 0); 00041 addToRunTimeSelectionTable(curvedEdge, simpleSplineEdge, Istream); 00042 00043 00044 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // 00045 00046 // Construct from components 00047 simpleSplineEdge::simpleSplineEdge 00048 ( 00049 const pointField& points, 00050 const label start, 00051 const label end, 00052 const pointField& otherknots 00053 ) 00054 : 00055 curvedEdge(points, start, end), 00056 BSpline(knotlist(points, start, end, otherknots)) 00057 {} 00058 00059 00060 // Construct from components 00061 simpleSplineEdge::simpleSplineEdge 00062 ( 00063 const pointField& points, 00064 const label start, 00065 const label end, 00066 const pointField& otherknots, 00067 const vector& fstend, 00068 const vector& sndend 00069 ) 00070 : 00071 curvedEdge(points, start, end), 00072 BSpline(knotlist(points, start, end, otherknots), fstend, sndend) 00073 {} 00074 00075 00076 // Construct from Istream 00077 simpleSplineEdge::simpleSplineEdge(const pointField& points, Istream& is) 00078 : 00079 curvedEdge(points, is), 00080 BSpline(knotlist(points, start_, end_, pointField(is))) 00081 {} 00082 00083 00084 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // 00085 00086 //- Return the position of a point on the simple spline curve given by 00087 // the parameter 0 <= lambda <= 1 00088 vector simpleSplineEdge::position(const scalar mu) const 00089 { 00090 return BSpline::position(mu); 00091 } 00092 00093 00094 //- Return the length of the simple spline curve 00095 scalar simpleSplineEdge::length() const 00096 { 00097 notImplemented("simpleSplineEdge::length() const"); 00098 return 1.0; 00099 } 00100 00101 00102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00103 00104 } // End namespace Foam 00105 00106 // ************************************************************************* // |