MeshedSurfaceProxy.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
00038 #ifndef MeshedSurfaceProxy_H
00039 #define MeshedSurfaceProxy_H
00040
00041 #include "pointField.H"
00042 #include "face.H"
00043 #include "triFace.H"
00044
00045 #include "surfZoneList.H"
00046 #include "surfaceFormatsCore.H"
00047 #include "runTimeSelectionTables.H"
00048 #include "memberFunctionSelectionTables.H"
00049 #include "HashSet.H"
00050
00051
00052
00053 namespace Foam
00054 {
00055
00056
00057
00058 template<class Face> class MeshedSurface;
00059
00060
00061
00062
00063
00064 template<class Face>
00065 class MeshedSurfaceProxy
00066 :
00067 public fileFormats::surfaceFormatsCore
00068 {
00069
00070
00071 const pointField& points_;
00072
00073 const List<Face>& faces_;
00074
00075 const List<surfZone>& zones_;
00076
00077 const List<label>& faceMap_;
00078
00079
00080 public:
00081
00082
00083
00084
00085 ClassName("MeshedSurfaceProxy");
00086
00087
00088 static wordHashSet writeTypes();
00089
00090
00091 static bool canWriteType(const word& ext, const bool verbose=false);
00092
00093
00094
00095
00096
00097 MeshedSurfaceProxy
00098 (
00099 const pointField&,
00100 const List<Face>&,
00101 const List<surfZone>& = List<surfZone>(),
00102 const List<label>& faceMap = List<label>()
00103 );
00104
00105
00106
00107
00108 virtual ~MeshedSurfaceProxy();
00109
00110
00111
00112
00113 declareMemberFunctionSelectionTable
00114 (
00115 void,
00116 MeshedSurfaceProxy,
00117 write,
00118 fileExtension,
00119 (
00120 const fileName& name,
00121 const MeshedSurfaceProxy<Face>& surf
00122 ),
00123 (name, surf)
00124 );
00125
00126
00127 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
00128
00129
00130
00131
00132
00133
00134
00135 inline const pointField& points() const
00136 {
00137 return points_;
00138 }
00139
00140
00141 inline const List<Face>& faces() const
00142 {
00143 return faces_;
00144 }
00145
00146
00147
00148
00149 inline const List<surfZone>& surfZones() const
00150 {
00151 return zones_;
00152 }
00153
00154
00155 inline const List<label>& faceMap() const
00156 {
00157 return faceMap_;
00158 }
00159
00160
00161 inline bool useFaceMap() const
00162 {
00163 return faceMap_.size() == faces_.size();
00164 }
00165
00166
00167
00168
00169 virtual void write(const fileName& name) const
00170 {
00171 write(name, *this);
00172 }
00173
00174
00175 virtual void write(const Time&, const word& surfName = "") const;
00176 };
00177
00178
00179
00180
00181 }
00182
00183
00184
00185 #ifdef NoRepository
00186 # include "MeshedSurfaceProxy.C"
00187 #endif
00188
00189
00190
00191 #endif
00192
00193
Copyright © 2000-2009 OpenCFD Ltd