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 #ifndef MED_GaussUtils_HeaderFile
00029 #define MED_GaussUtils_HeaderFile
00030
00031 #include "MED_WrapperBase.hxx"
00032
00033 #include "MED_Structures.hxx"
00034
00035 namespace MED
00036 {
00037
00038 typedef TVector<TCCoordSlice> TCCoordSliceArr;
00039 typedef TVector<TCoordSlice> TCoordSliceArr;
00040
00042 class MEDWRAPPER_EXPORT TGaussCoord:
00043 virtual TModeSwitchInfo
00044 {
00045 TInt myNbElem;
00046 TInt myNbGauss;
00047 TInt myDim;
00048
00049 TInt myGaussStep;
00050
00051 TNodeCoord myGaussCoord;
00052
00053 public:
00054
00055 TGaussCoord();
00056
00058 void
00059 Init(TInt theNbElem,
00060 TInt theNbGauss,
00061 TInt theDim,
00062 EModeSwitch theMode = eFULL_INTERLACE);
00063
00064 TInt
00065 GetNbElem() const;
00066
00067 TInt
00068 GetNbGauss() const;
00069
00070 TInt
00071 GetDim() const;
00072
00073 unsigned char*
00074 GetValuePtr();
00075
00077 TCCoordSliceArr
00078 GetCoordSliceArr(TInt theElemId) const;
00079
00081 TCoordSliceArr
00082 GetCoordSliceArr(TInt theElemId);
00083 };
00084 typedef SharedPtr<TGaussCoord> PGaussCoord;
00085
00086
00087
00089 MEDWRAPPER_EXPORT
00090 bool
00091 GetGaussCoord3D(const TGaussInfo& theGaussInfo,
00092 const TCellInfo& theCellInfo,
00093 const TNodeInfo& theNodeInfo,
00094 TGaussCoord& theGaussCoord,
00095 const TElemNum& theElemNum = TElemNum(),
00096 EModeSwitch theMode = eFULL_INTERLACE);
00097
00098
00099
00101 MEDWRAPPER_EXPORT
00102 bool
00103 GetBaryCenter(const TCellInfo& theCellInfo,
00104 const TNodeInfo& theNodeInfo,
00105 TGaussCoord& theGaussCoord,
00106 const TElemNum& theElemNum = TElemNum(),
00107 EModeSwitch theMode = eFULL_INTERLACE);
00108
00110 MEDWRAPPER_EXPORT
00111 bool
00112 GetBaryCenter(const TPolygoneInfo& thePolygoneInfo,
00113 const TNodeInfo& theNodeInfo,
00114 TGaussCoord& theGaussCoord,
00115 const TElemNum& theElemNum = TElemNum(),
00116 EModeSwitch theMode = eFULL_INTERLACE);
00117
00119 MEDWRAPPER_EXPORT
00120 bool
00121 GetBaryCenter(const TPolyedreInfo& thePolyedreInfo,
00122 const TNodeInfo& theNodeInfo,
00123 TGaussCoord& theGaussCoord,
00124 const TElemNum& theElemNum = TElemNum(),
00125 EModeSwitch theMode = eFULL_INTERLACE);
00126
00127
00129
00130 struct MEDWRAPPER_EXPORT TShapeFun
00131 {
00132 class TFun;
00133
00134 TFloatVector myRefCoord;
00135 TInt myDim;
00136 TInt myNbRef;
00137
00138 TShapeFun(TInt theDim = 0, TInt theNbRef = 0);
00139
00140 TInt GetNbRef() const { return myNbRef; }
00141
00142 TCCoordSlice GetCoord(TInt theRefId) const;
00143
00144 TCoordSlice GetCoord(TInt theRefId);
00145
00146 void GetFun(const TCCoordSliceArr& theRef,
00147 const TCCoordSliceArr& theGauss,
00148 TFun& theFun) const;
00149 virtual
00150 void InitFun(const TCCoordSliceArr& theRef,
00151 const TCCoordSliceArr& theGauss,
00152 TFun& theFun) const = 0;
00153 virtual
00154 bool IsSatisfy(const TCCoordSliceArr& theRefCoord) const;
00155
00156 bool Eval(const TCellInfo& theCellInfo,
00157 const TNodeInfo& theNodeInfo,
00158 const TElemNum& theElemNum,
00159 const TCCoordSliceArr& theRef,
00160 const TCCoordSliceArr& theGauss,
00161 TGaussCoord& theGaussCoord,
00162 EModeSwitch theMode);
00163 };
00164
00165 struct TSeg2a: TShapeFun {
00166 TSeg2a();
00167 virtual void InitFun(const TCCoordSliceArr& theRef,
00168 const TCCoordSliceArr& theGauss,
00169 TFun& theFun) const;
00170 };
00171
00172 struct TSeg3a: TShapeFun {
00173 TSeg3a();
00174 virtual void InitFun(const TCCoordSliceArr& theRef,
00175 const TCCoordSliceArr& theGauss,
00176 TFun& theFun) const;
00177 };
00178
00179 struct TTria3a: TShapeFun {
00180 TTria3a();
00181 virtual void InitFun(const TCCoordSliceArr& theRef,
00182 const TCCoordSliceArr& theGauss,
00183 TFun& theFun) const;
00184 };
00185
00186 struct TTria6a: TShapeFun {
00187 TTria6a();
00188 virtual void InitFun(const TCCoordSliceArr& theRef,
00189 const TCCoordSliceArr& theGauss,
00190 TFun& theFun) const;
00191 };
00192
00193 struct TTria3b: TShapeFun {
00194 TTria3b();
00195 virtual void InitFun(const TCCoordSliceArr& theRef,
00196 const TCCoordSliceArr& theGauss,
00197 TFun& theFun) const;
00198 };
00199
00200 struct TTria6b: TShapeFun {
00201 TTria6b();
00202 virtual void InitFun(const TCCoordSliceArr& theRef,
00203 const TCCoordSliceArr& theGauss,
00204 TFun& theFun) const;
00205 };
00206
00207 struct TQuad4a: TShapeFun {
00208 TQuad4a();
00209 virtual void InitFun(const TCCoordSliceArr& theRef,
00210 const TCCoordSliceArr& theGauss,
00211 TFun& theFun) const;
00212 };
00213
00214 struct TQuad8a: TShapeFun {
00215 TQuad8a();
00216 virtual void InitFun(const TCCoordSliceArr& theRef,
00217 const TCCoordSliceArr& theGauss,
00218 TFun& theFun) const;
00219 };
00220
00221 struct TQuad4b: TShapeFun {
00222 TQuad4b();
00223 virtual void InitFun(const TCCoordSliceArr& theRef,
00224 const TCCoordSliceArr& theGauss,
00225 TFun& theFun) const;
00226 };
00227
00228 struct TQuad8b: TShapeFun {
00229 TQuad8b();
00230 virtual void InitFun(const TCCoordSliceArr& theRef,
00231 const TCCoordSliceArr& theGauss,
00232 TFun& theFun) const;
00233 };
00234
00235 struct TTetra4a: TShapeFun {
00236 TTetra4a();
00237 virtual void InitFun(const TCCoordSliceArr& theRef,
00238 const TCCoordSliceArr& theGauss,
00239 TFun& theFun) const;
00240 };
00241
00242 struct TTetra10a: TShapeFun {
00243 TTetra10a();
00244 virtual void InitFun(const TCCoordSliceArr& theRef,
00245 const TCCoordSliceArr& theGauss,
00246 TFun& theFun) const;
00247 };
00248
00249 struct TTetra4b: TShapeFun {
00250 TTetra4b();
00251 virtual void InitFun(const TCCoordSliceArr& theRef,
00252 const TCCoordSliceArr& theGauss,
00253 TFun& theFun) const;
00254 };
00255
00256 struct TTetra10b: TShapeFun {
00257 TTetra10b();
00258 virtual void InitFun(const TCCoordSliceArr& theRef,
00259 const TCCoordSliceArr& theGauss,
00260 TFun& theFun) const;
00261 };
00262
00263 struct THexa8a: TShapeFun {
00264 THexa8a();
00265 virtual void InitFun(const TCCoordSliceArr& theRef,
00266 const TCCoordSliceArr& theGauss,
00267 TFun& theFun) const;
00268 };
00269
00270 struct THexa20a: TShapeFun {
00271 THexa20a(TInt theDim = 3, TInt theNbRef = 20);
00272 virtual void InitFun(const TCCoordSliceArr& theRef,
00273 const TCCoordSliceArr& theGauss,
00274 TFun& theFun) const;
00275 };
00276
00277 struct THexa27a: THexa20a {
00278 THexa27a();
00279 virtual void InitFun(const TCCoordSliceArr& theRef,
00280 const TCCoordSliceArr& theGauss,
00281 TFun& theFun) const;
00282 };
00283
00284 struct THexa8b: TShapeFun {
00285 THexa8b();
00286 virtual void InitFun(const TCCoordSliceArr& theRef,
00287 const TCCoordSliceArr& theGauss,
00288 TFun& theFun) const;
00289 };
00290
00291 struct THexa20b: TShapeFun {
00292 THexa20b(TInt theDim = 3, TInt theNbRef = 20);
00293 virtual void InitFun(const TCCoordSliceArr& theRef,
00294 const TCCoordSliceArr& theGauss,
00295 TFun& theFun) const;
00296 };
00297
00298 struct TPenta6a: TShapeFun {
00299 TPenta6a();
00300 virtual void InitFun(const TCCoordSliceArr& theRef,
00301 const TCCoordSliceArr& theGauss,
00302 TFun& theFun) const;
00303 };
00304
00305 struct TPenta6b: TShapeFun {
00306 TPenta6b();
00307 virtual void InitFun(const TCCoordSliceArr& theRef,
00308 const TCCoordSliceArr& theGauss,
00309 TFun& theFun) const;
00310 };
00311
00312 struct TPenta15a: TShapeFun {
00313 TPenta15a();
00314 virtual void InitFun(const TCCoordSliceArr& theRef,
00315 const TCCoordSliceArr& theGauss,
00316 TFun& theFun) const;
00317 };
00318
00319 struct TPenta15b: TShapeFun {
00320 TPenta15b();
00321 virtual void InitFun(const TCCoordSliceArr& theRef,
00322 const TCCoordSliceArr& theGauss,
00323 TFun& theFun) const;
00324 };
00325
00326 struct TPyra5a: TShapeFun {
00327 TPyra5a();
00328 virtual void InitFun(const TCCoordSliceArr& theRef,
00329 const TCCoordSliceArr& theGauss,
00330 TFun& theFun) const;
00331 };
00332
00333 struct TPyra5b: TShapeFun {
00334 TPyra5b();
00335 virtual void InitFun(const TCCoordSliceArr& theRef,
00336 const TCCoordSliceArr& theGauss,
00337 TFun& theFun) const;
00338 };
00339
00340 struct TPyra13a: TShapeFun {
00341 TPyra13a();
00342 virtual void InitFun(const TCCoordSliceArr& theRef,
00343 const TCCoordSliceArr& theGauss,
00344 TFun& theFun) const;
00345 };
00346
00347 struct TPyra13b: TShapeFun {
00348 TPyra13b();
00349 virtual void InitFun(const TCCoordSliceArr& theRef,
00350 const TCCoordSliceArr& theGauss,
00351 TFun& theFun) const;
00352 };
00353
00354
00355 }
00356
00357 #endif