FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

splineEdge.H

Go 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) 2009-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::splineEdge
00026 
00027 Description
00028     A curvedEdge interface for Catmull-Rom splines.
00029 
00030 Note
00031     For compatibility, also accepts the type names 'polySpline' and
00032     'simpleSpline'.
00033 
00034 SourceFiles
00035     splineEdge.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef splineEdge_H
00040 #define splineEdge_H
00041 
00042 #include "curvedEdge.H"
00043 #include "CatmullRomSpline.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                       Class splineEdge Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class splineEdge
00055 :
00056     public curvedEdge,
00057     public CatmullRomSpline
00058 {
00059     // Private Member Functions
00060 
00061         //- Disallow default bitwise copy construct
00062         splineEdge(const splineEdge&);
00063 
00064         //- Disallow default bitwise assignment
00065         void operator=(const splineEdge&);
00066 
00067 
00068 public:
00069 
00070     //- Runtime type information
00071     TypeName("spline");
00072 
00073 
00074     // Constructors
00075 
00076         //- Construct from components
00077         splineEdge
00078         (
00079             const pointField&,
00080             const label start,
00081             const label end,
00082             const pointField& internalPoints
00083         );
00084 
00085         //- Construct from Istream, setting pointsList
00086         splineEdge(const pointField&, Istream&);
00087 
00088 
00089     //- Destructor
00090     virtual ~splineEdge();
00091 
00092 
00093     // Member Functions
00094 
00095         //- Return the point position corresponding to the curve parameter
00096         //  0 <= lambda <= 1
00097         virtual point position(const scalar) const;
00098 
00099         //- Return the length of the spline curve (not implemented)
00100         virtual scalar length() const;
00101 };
00102 
00103 
00104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00105 
00106 } // End namespace Foam
00107 
00108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00109 
00110 #endif
00111 
00112 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines