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