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 #ifndef VISU_Structures_HeaderFile
00028 #define VISU_Structures_HeaderFile
00029
00035 #include "VISUConvertor.hxx"
00036 #include "VISU_IDMapper.hxx"
00037 #include "VISU_ConvertorDef.hxx"
00038
00039 #include "MED_Vector.hxx"
00040
00041 #include <map>
00042 #include <set>
00043 #include <string>
00044 #include <stdexcept>
00045
00046 namespace VISU
00047 {
00048 using MED::TVector;
00049
00050
00051 typedef std::string TName;
00052 typedef TVector<TName> TNames;
00053
00054
00056 struct VISU_CONVERTOR_EXPORT TIntId: virtual TBaseStructure
00057 {
00058 vtkIdType myId;
00059
00060 TIntId();
00061 };
00062
00063
00064
00066 struct VISU_CONVERTOR_EXPORT TIsVTKDone: virtual TBaseStructure
00067 {
00068 mutable bool myIsDone;
00069 mutable bool myIsVTKDone;
00070
00071 TIsVTKDone();
00072 };
00073
00074
00075
00076 typedef std::map<TEntity, PMeshOnEntity> TMeshOnEntityMap;
00077 typedef std::map<TName, PGroup> TGroupMap;
00078
00080
00084 struct VISU_CONVERTOR_EXPORT TMesh: virtual TBaseStructure
00085 {
00086 TMeshOnEntityMap myMeshOnEntityMap;
00087 TGroupMap myGroupMap;
00088 TName myName;
00089 vtkIdType myDim;
00090
00091 std::string myGroupsEntry;
00092 std::string myFieldsEntry;
00093 std::string myPartsEntry;
00094
00095 TMesh();
00096 };
00097 typedef std::map<std::string, PMesh> TMeshMap;
00098
00099
00100
00102 struct VISU_CONVERTOR_EXPORT TSubProfile: virtual TBaseStructure
00103 {
00105 virtual
00106 vtkIdType
00107 GetElemObjID(vtkIdType theID) const = 0;
00108
00110 virtual
00111 vtkIdType
00112 GetElemVTKID(vtkIdType theID) const = 0;
00113 };
00114
00115
00116
00118 struct VISU_CONVERTOR_EXPORT TProfile: virtual TNamedIDMapper
00119 {};
00120
00121
00122
00123 bool VISU_CONVERTOR_EXPORT
00124 operator<(const PSubProfile& theLeft, const PSubProfile& theRight);
00125
00126 typedef std::set<PSubProfile> TProfileKey;
00127 typedef std::map<TProfileKey, PProfile> TProfileMap;
00128
00129
00130
00132 struct VISU_CONVERTOR_EXPORT TGauss: virtual TBaseStructure
00133 {};
00134
00135
00136
00138 struct VISU_CONVERTOR_EXPORT TGaussSubMesh: virtual TBaseStructure
00139 {
00140 PSubProfile mySubProfile;
00141 };
00142
00143
00144
00146 struct VISU_CONVERTOR_EXPORT TGaussMesh: virtual TGaussPtsIDMapper
00147 {};
00148
00149
00150
00151 bool VISU_CONVERTOR_EXPORT
00152 operator<(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight);
00153
00154 typedef std::set<PGaussSubMesh> TGaussKey;
00155 typedef std::map<TGaussKey, PGaussMesh> TGaussMeshMap;
00156
00157
00158
00159
00160 typedef std::map<TName, PFamily> TFamilyMap;
00161 typedef std::map<TName, PField> TFieldMap;
00162
00163 typedef std::map<vtkIdType, PFamily> TFamilyIDMap;
00164
00166
00170 struct VISU_CONVERTOR_EXPORT TMeshOnEntity: virtual TNamedIDMapper
00171 {
00172 TGaussMeshMap myGaussMeshMap;
00173 TProfileMap myProfileMap;
00174
00175 TFamilyMap myFamilyMap;
00176 TFamilyIDMap myFamilyIDMap;
00177
00178 TFieldMap myFieldMap;
00179
00180 TName myMeshName;
00181 TEntity myEntity;
00182
00183 TMeshOnEntity();
00184 };
00185
00186
00187
00189 struct VISU_CONVERTOR_EXPORT TFamily: virtual TIntId,
00190 virtual TUnstructuredGridIDMapper
00191 {
00192 TEntity myEntity;
00193 TName myName;
00194
00195 TFamily();
00196 };
00197
00198
00199
00200 bool VISU_CONVERTOR_EXPORT
00201 operator<(const PFamily& theLeft, const PFamily& theRight);
00202
00203 typedef std::pair<TEntity, PFamily> TEnity2Family;
00204 typedef std::set<TEnity2Family> TFamilySet;
00205
00207 struct VISU_CONVERTOR_EXPORT TGroup: virtual TUnstructuredGridIDMapper
00208 {
00209 TFamilySet myFamilySet;
00210 };
00211
00212
00213
00214 typedef std::map<vtkIdType, PValForTime> TValField;
00215 typedef std::pair<vtkFloatingPointType, vtkFloatingPointType> TMinMax;
00216
00218 struct VISU_CONVERTOR_EXPORT TField: virtual TIntId
00219 {
00220 TEntity myEntity;
00221 TName myName;
00222 TName myMeshName;
00223 TValField myValField;
00224 TNames myCompNames;
00225 TNames myUnitNames;
00226 vtkIdType myNbComp;
00227 bool myIsELNO;
00228
00230
00234 virtual
00235 TMinMax
00236 GetMinMax(vtkIdType theCompID,
00237 const TNames& theGroupNames,
00238 TGaussMetric theGaussMetric = VISU::AVERAGE_METRIC) = 0;
00239
00241 virtual
00242 TMinMax
00243 GetAverageMinMax(vtkIdType theCompID,
00244 const TNames& theGroupNames,
00245 TGaussMetric theGaussMetric = VISU::AVERAGE_METRIC) = 0;
00246
00247 bool myIsMinMaxInitilized;
00248
00249 TField();
00250 };
00251
00252
00253 struct VISU_CONVERTOR_EXPORT TPart: virtual TIntId
00254 {
00255 vtkIdType myCurrentRes;
00256
00257 TPart();
00258 };
00259
00260
00261
00262 typedef std::pair<double, std::string> TTime;
00263
00265 struct VISU_CONVERTOR_EXPORT TValForTime: virtual TIntId
00266 {
00267 TEntity myEntity;
00268 TName myMeshName;
00269 TName myFieldName;
00270 TTime myTime;
00271
00272 PProfile myProfile;
00273 PGaussMesh myGaussMesh;
00274
00276 virtual
00277 int
00278 GetMaxNbGauss() const = 0;
00279 };
00280
00281
00282
00283 }
00284
00285
00286 #endif