patchWriter.H
Go to the documentation of this file.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
00036
00037 #ifndef patchWriter_H
00038 #define patchWriter_H
00039
00040 #include "pointMesh.H"
00041 #include "OFstream.H"
00042 #include "volFields.H"
00043 #include "pointFields.H"
00044 #include "vtkMesh.H"
00045 #include "indirectPrimitivePatch.H"
00046 #include "PrimitivePatchInterpolation.H"
00047
00048 using namespace Foam;
00049
00050
00051
00052 namespace Foam
00053 {
00054
00055 class volPointInterpolation;
00056
00057
00058
00059
00060
00061 class patchWriter
00062 {
00063 const vtkMesh& vMesh_;
00064
00065 const bool binary_;
00066
00067 const bool nearCellValue_;
00068
00069 const fileName fName_;
00070
00071 const labelList patchIDs_;
00072
00073 std::ofstream os_;
00074
00075 label nPoints_;
00076
00077 label nFaces_;
00078
00079 public:
00080
00081
00082
00083
00084 patchWriter
00085 (
00086 const vtkMesh&,
00087 const bool binary,
00088 const bool nearCellValue,
00089 const fileName&,
00090 const labelList& patchIDs
00091 );
00092
00093
00094
00095
00096 std::ofstream& os()
00097 {
00098 return os_;
00099 }
00100
00101 label nPoints() const
00102 {
00103 return nPoints_;
00104 }
00105
00106 label nFaces() const
00107 {
00108 return nFaces_;
00109 }
00110
00111
00112 void writePatchIDs();
00113
00114
00115 template<class Type>
00116 void write
00117 (
00118 const PtrList<GeometricField<Type, fvPatchField, volMesh> >&
00119 );
00120
00121
00122 template<class Type>
00123 void write
00124 (
00125 const PtrList<GeometricField<Type, pointPatchField, pointMesh> >&
00126 );
00127
00128
00129 template<class Type>
00130 void write
00131 (
00132 const PrimitivePatchInterpolation<primitivePatch>&,
00133 const PtrList<GeometricField<Type, fvPatchField, volMesh> >&
00134 );
00135 };
00136
00137
00138
00139
00140 }
00141
00142
00143
00144 #ifdef NoRepository
00145 # include "patchWriterTemplates.C"
00146 #endif
00147
00148
00149
00150
00151 #endif
00152
00153
Copyright © 2000-2009 OpenCFD Ltd