OpenFOAM logo
Open Source CFD Toolkit

structuredVectors2D.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) 1991-2005 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 Class
00026     structuredVectors2D
00027 
00028 Description
00029 
00030 SourceFiles
00031     structuredVectors2DI.H
00032     structuredVectors2D.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef structuredVectors2D_H
00037 #define structuredVectors2D_H
00038 
00039 #include "List.H"
00040 #include "point2D.H"
00041 #include "shape2D.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 class Gstream;
00049 class Istream;
00050 class Ostream;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                            Class structuredVectors2D Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class structuredVectors2D
00057 :
00058     public virtual shape2D
00059 {
00060 
00061     // Private data
00062 
00063         point2D startat;
00064 
00065         scalar Xskip;
00066         scalar Yskip;
00067 
00068         label Xnum;
00069         label Ynum;
00070         label Xjump;
00071         label Yjump;
00072 
00073         scalar vectorScale;
00074 
00075         List< List <point2D> >& vects;
00076 
00077     // Private Member Functions
00078 
00079         //- Disallow default bitwise copy construct and assignment
00080         structuredVectors2D(const structuredVectors2D&);
00081         void operator=(const structuredVectors2D&);
00082 
00083 public:
00084 
00085     // Constructors
00086 
00087         //- Construct from components
00088         structuredVectors2D
00089         (
00090             const point2D&,
00091             List< List <point2D> >&,
00092             const scalar&,
00093             const scalar&,
00094             label = 1,
00095             scalar = 1.0
00096         );
00097 
00098 
00099     // Destructor
00100 
00101         ~structuredVectors2D();
00102 
00103 
00104     // Member Functions
00105 
00106         // Access
00107 
00108             const point2D& origin() const;
00109 
00110             label xnum() const;
00111             label ynum() const;
00112 
00113             scalar xskip() const;
00114             scalar yskip() const;
00115 
00116             scalar vscale() const;
00117 
00118             const List<List<point2D> >& Vects() const;
00119 
00120 
00121         //- Draw
00122         virtual void draw(Gstream&) const;
00123 
00124         //- Write
00125         virtual void write(Ostream&) const;
00126 
00127 
00128     // Friend Operators
00129 
00130         friend Gstream& operator<<(Gstream&, const structuredVectors2D&);
00131 
00132 
00133     // IOstream Operators
00134 
00135         friend Ostream& operator<<(Ostream&, const structuredVectors2D&);
00136 };
00137 
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 } // End namespace Foam
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 #include "structuredVectors2DI.H"
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 #endif
00150 
00151 // ************************************************************************* //
For further information go to www.openfoam.org