00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef writeFuns_H
00036 #define writeFuns_H
00037
00038 #include <OpenFOAM/floatScalar.H>
00039 #include <OpenFOAM/DynamicList.H>
00040 #include <finiteVolume/volFieldsFwd.H>
00041 #include <OpenFOAM/pointFieldsFwd.H>
00042 #include "vtkMesh.H"
00043 #include <finiteVolume/volPointInterpolation.H>
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051
00052
00053
00054 class writeFuns
00055 {
00056
00057
00058
00059
00060 static void swapWord(label& word32);
00061 static void swapWords(const label nWords, label* words32);
00062
00063
00064 public:
00065
00066
00067
00068 static void write(std::ostream&, const bool, List<floatScalar>&);
00069 static void write(std::ostream&, const bool, DynamicList<floatScalar>&);
00070 static void write(std::ostream&, const bool, labelList&);
00071 static void write(std::ostream&, const bool, DynamicList<label>&);
00072
00073
00074
00075
00076 static void writeHeader(std::ostream&, const bool, const string&);
00077 static void writeCellDataHeader(std::ostream&, const label, const label);
00078 static void writePointDataHeader
00079 (
00080 std::ostream&,
00081 const label,
00082 const label
00083 );
00084
00085
00086
00087
00088 static void insert(const scalar&, DynamicList<floatScalar>&);
00089 static void insert(const point&, DynamicList<floatScalar>&);
00090 static void insert(const sphericalTensor&, DynamicList<floatScalar>&);
00091 static void insert(const symmTensor&, DynamicList<floatScalar>&);
00092 static void insert(const tensor&, DynamicList<floatScalar>&);
00093
00094
00095
00096 static void insert(const labelList&, DynamicList<label>&);
00097 template<class Type>
00098 static void insert(const List<Type>&, DynamicList<floatScalar>&);
00099
00100
00101 template<class Type>
00102 static void write
00103 (
00104 std::ostream&,
00105 const bool binary,
00106 const GeometricField<Type, fvPatchField, volMesh>&,
00107 const vtkMesh&
00108 );
00109
00110
00111
00112 template<class Type>
00113 static void write
00114 (
00115 std::ostream&,
00116 const bool binary,
00117 const GeometricField<Type, pointPatchField, pointMesh>&,
00118 const vtkMesh&
00119 );
00120
00121
00122
00123 template<class Type>
00124 static void write
00125 (
00126 std::ostream&,
00127 const bool binary,
00128 const GeometricField<Type, fvPatchField, volMesh>&,
00129 const GeometricField<Type, pointPatchField, pointMesh>&,
00130 const vtkMesh&
00131 );
00132
00133
00134 template<class Type, template<class> class PatchField, class GeoMesh>
00135 static void write
00136 (
00137 std::ostream&,
00138 const bool binary,
00139 const PtrList<GeometricField<Type, PatchField, GeoMesh> >&,
00140 const vtkMesh&
00141 );
00142
00143
00144 template<class Type>
00145 static void write
00146 (
00147 std::ostream&,
00148 const bool binary,
00149 const volPointInterpolation&,
00150 const PtrList<GeometricField<Type, fvPatchField, volMesh> >&,
00151 const vtkMesh&
00152 );
00153 };
00154
00155
00156
00157
00158 }
00159
00160
00161
00162 #ifdef NoRepository
00163 # include "writeFunsTemplates.C"
00164 #endif
00165
00166
00167
00168 #endif
00169
00170