Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDMEM / MEDMEM_InterlacingPolicy.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef MEDMEM_INTERLACING_HXX
24 #define MEDMEM_INTERLACING_HXX
25
26 #include <MEDMEM.hxx>
27
28 #include <iostream>
29 #include "MEDMEM_Utilities.hxx"
30
31 #include "MEDMEM_PointerOf.hxx"
32 #include "MEDMEM_define.hxx"
33
34 namespace MEDMEM {
35
36 class MEDMEM_EXPORT InterlacingPolicy {
37 protected:
38   ~InterlacingPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
39 public :
40   InterlacingPolicy(void) : _dim(0), _nbelem(0),
41                             _arraySize(0),
42                             _interlacing(MED_EN::MED_UNDEFINED_INTERLACE),
43                             _gaussPresence(false) {}
44
45   InterlacingPolicy(int nbelem, int dim, int arraySize=0, int interlacing=MED_EN::MED_UNDEFINED_INTERLACE) :
46     _dim(dim),
47     _nbelem(nbelem),
48     _arraySize(arraySize),
49     _interlacing(interlacing),
50     _gaussPresence(false) {}
51
52   // Constructeur par recopie
53   InterlacingPolicy(const InterlacingPolicy & intpol,
54                     bool shallowcopy = true) :_dim(intpol._dim),
55                                               _nbelem(intpol._nbelem),
56                                               _arraySize(intpol._arraySize),
57                                               _interlacing(intpol._interlacing),
58                                               _gaussPresence(intpol._gaussPresence) {}
59
60   InterlacingPolicy & operator=(const InterlacingPolicy & intpol) {
61     if ( this == &intpol ) return *this;
62   const char* LOC = "InterlacingPolicy operator =";
63   BEGIN_OF_MED(LOC);
64
65     _dim           = intpol._dim;
66     _nbelem        = intpol._nbelem; //ne prend pas en compte les points de Gauss
67     _arraySize     = intpol._arraySize;
68     _interlacing   = intpol._interlacing;
69     _gaussPresence = intpol._gaussPresence;
70
71     return *this;
72   }
73
74   inline int getDim()       const { return _dim; }
75   inline int getNbElem()    const { return _nbelem; }
76   inline int getArraySize() const { return _arraySize; }
77   inline MED_EN::medModeSwitch getInterlacingType() const {return _interlacing;}
78   inline bool getGaussPresence() const { return _gaussPresence;}
79   virtual int getNbGauss(int i) const = 0;
80
81   int _dim;
82   int _nbelem;
83   int _arraySize;
84   MED_EN::medModeSwitch _interlacing;
85   bool _gaussPresence;
86 };
87
88
89 class MEDMEM_EXPORT FullInterlaceNoGaussPolicy : public  InterlacingPolicy {
90
91 protected:
92   ~FullInterlaceNoGaussPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
93
94 public :
95   FullInterlaceNoGaussPolicy() : InterlacingPolicy() {}
96   FullInterlaceNoGaussPolicy(int nbelem, int dim) :
97     InterlacingPolicy(nbelem, dim, dim*nbelem,MED_EN::MED_FULL_INTERLACE) {}
98
99   FullInterlaceNoGaussPolicy(const FullInterlaceNoGaussPolicy & policy,
100                                 bool shallowcopie=true)
101     : InterlacingPolicy(policy) {};
102  
103   inline int getIndex(int i,int j) const {
104     return (i-1)*_dim + j-1;
105   }
106
107   inline int getIndex(int i,int j,int k) const {
108     return (i-1)*_dim + j-1;
109   }
110
111   inline int getNbGauss(int i) const { return 1; }
112
113 };
114
115 class MEDMEM_EXPORT NoInterlaceNoGaussPolicy : public InterlacingPolicy {
116
117 protected:
118   ~NoInterlaceNoGaussPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
119
120 public :
121
122   NoInterlaceNoGaussPolicy():InterlacingPolicy() {}
123   NoInterlaceNoGaussPolicy(int nbelem, int dim) : 
124     InterlacingPolicy(nbelem, dim, dim*nbelem,MED_EN::MED_NO_INTERLACE) {}
125
126   NoInterlaceNoGaussPolicy(const NoInterlaceNoGaussPolicy & policy,
127                               bool shallowcopie=true)
128     : InterlacingPolicy(policy) {}
129
130   inline int getIndex(int i,int j) const {
131     return (j-1)*_nbelem + i-1;
132   }
133
134   inline int getIndex(int i,int j,int k) const {
135     return (j-1)*_nbelem + i-1;
136   }
137
138   inline int getNbGauss(int i) const { return 1; }
139
140 };
141
142 class MEDMEM_EXPORT NoInterlaceByTypeNoGaussPolicy : public InterlacingPolicy {
143
144 protected:
145   ~NoInterlaceByTypeNoGaussPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
146
147   PointerOf<int> _T; //!< type of element
148   PointerOf<int> _G; //!< where type begin
149   int _nbtypegeo;
150   PointerOf<int> _nbelegeoc;
151
152 public :
153
154   NoInterlaceByTypeNoGaussPolicy():InterlacingPolicy(),_nbtypegeo(-1)
155   {
156   }
157
158   NoInterlaceByTypeNoGaussPolicy(int nbelem, int dim):InterlacingPolicy()
159   {
160     // constructor is incoorect for this type of interlace
161     throw MEDEXCEPTION(LOCALIZED("Wrong constructor of NoInterlaceByTypeNoGaussPolicy "));
162   }
163
164   NoInterlaceByTypeNoGaussPolicy(int nbelem, int dim, int nbtypegeo,
165                                  const int * const nbelgeoc) : 
166     InterlacingPolicy(nbelem, dim, dim*nbelem,MED_EN::MED_NO_INTERLACE_BY_TYPE),
167     _nbtypegeo(nbtypegeo)
168   {
169     _nbelegeoc.set(_nbtypegeo+1,nbelgeoc);
170     _G.set(nbtypegeo+1);
171     _T.set(nbelem+1);
172     int elemno = 1;
173     int cumul = 0;
174
175     for (int ntyp=1; ntyp <= nbtypegeo; ntyp++ ) {
176       int nbelcurtype = nbelgeoc[ntyp]-nbelgeoc[ntyp-1];
177       for (int i=0; i < nbelcurtype; i++ ) {
178         _T[ elemno ] = ntyp;
179         elemno++;
180       };
181       _G[ ntyp ] = cumul;
182       cumul += nbelcurtype*_dim;
183 #ifdef ARRAY_DEBUG
184       std::cout << "Valeur de cumul " << cumul << std::endl;
185 #endif
186     };
187
188     _arraySize = cumul;
189
190 #ifdef ARRAY_DEBUG
191     for (int i =0; i< nbelem+1; i++ )
192       std::cout << "Valeur de _T["<<i<<"] = "<<_T[i] << std::endl;
193 #endif
194   }
195
196   NoInterlaceByTypeNoGaussPolicy(const NoInterlaceByTypeNoGaussPolicy & policy,
197                                  bool shallowcopie=true)
198     : InterlacingPolicy(policy),_nbtypegeo(policy._nbtypegeo)
199   {
200     //Seuls les tableaux de grande taille sont recopiés superficiellement
201     if(shallowcopie)
202     {
203       this->_G.set(policy._G);
204       this->_T.set(policy._T);
205     }
206     else
207     {
208       this->_G.set(_nbtypegeo+1,policy._G);
209       this->_T.set(_nbelem+1,policy._T);
210     }
211     
212     // Tableaux toujours recopiés par recopie profonde
213     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
214   }
215
216   NoInterlaceByTypeNoGaussPolicy & operator=(const NoInterlaceByTypeNoGaussPolicy & policy) {
217     if ( this == &policy) return *this;
218
219   const char* LOC = "NoInterlaceNoGaussPolicy operator =";
220   BEGIN_OF_MED(LOC);
221     InterlacingPolicy::operator=(policy);
222     this->_G.set(policy._G);
223     this->_T.set(policy._T);
224
225     // Tableaux toujours recopiés par recopie profonde
226     this->_nbtypegeo=policy._nbtypegeo;
227     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
228
229     return *this;
230   }
231   inline int getIndex(int t) const {
232     return _G[t];
233   }
234
235   inline int getIndex(int i,int j) const {
236     int t = _T[i];
237     return getIndexByType( i-(_nbelegeoc[t-1]-_nbelegeoc[0]), j, t );
238   }
239
240   inline int getIndex(int i,int j,int k) const {
241     return getIndex(i,j);
242   }
243
244   inline int getIndexByType(int i,int j,int t) const {
245     return _G[t] + i-1 + (j-1)*(_nbelegeoc[t]-_nbelegeoc[t-1]);
246   }
247
248   inline int getIndexByType(int i,int j,int k,int t) const {
249     return getIndexByType( i, j, t );
250   }
251
252   inline int getLengthOfType(int t) const {
253     return (_nbelegeoc[t]-_nbelegeoc[t-1]) * _dim;
254   }
255
256   inline int getNbGauss(int i) const { return 1; }
257
258   inline int getNbGeoType() const {return _nbtypegeo;}
259
260   inline const int * const getNbElemGeoC() const {return _nbelegeoc;}
261
262 };
263
264 class MEDMEM_EXPORT FullInterlaceGaussPolicy : public InterlacingPolicy {
265 protected:
266   ~FullInterlaceGaussPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
267 public :
268
269   PointerOf<int> _G;
270   PointerOf<int> _S;
271   int _nbtypegeo;
272   PointerOf<int> _nbelegeoc;
273   PointerOf<int> _nbgaussgeo;
274
275   FullInterlaceGaussPolicy():InterlacingPolicy(),_nbtypegeo(-1) {
276     InterlacingPolicy::_gaussPresence=true;
277   }
278   FullInterlaceGaussPolicy(int nbelem, int dim, int nbtypegeo,
279                   const int * const nbelgeoc, const int * const nbgaussgeo)
280     : InterlacingPolicy(nbelem, dim, -1, MED_EN::MED_FULL_INTERLACE),_nbtypegeo(nbtypegeo) {
281
282     InterlacingPolicy::_gaussPresence=true;
283
284     _nbelegeoc.set(_nbtypegeo+1,nbelgeoc);
285     _nbgaussgeo.set(_nbtypegeo+1,nbgaussgeo);
286     _G.set(nbelem+1);
287     // _G[0]       = 1;
288     _S.set(nbelem+1);
289     _S[0]       = -1;
290     int cumul   = 0;
291     int elemno  = 0;
292
293     // Construction of _G
294     for (int ntyp=1; ntyp <= nbtypegeo; ntyp++ ) {
295       for (int  i=0; i < (nbelgeoc[ntyp]-nbelgeoc[ntyp-1]) ; i++ ) {
296         _G[ elemno ] = cumul + i*nbgaussgeo[ntyp]*dim + 1;
297         elemno++;
298         _S[ elemno ] = nbgaussgeo[ntyp];
299       };
300       cumul += (nbelgeoc[ntyp]-nbelgeoc[ntyp-1]) * nbgaussgeo[ntyp] * dim;
301 #ifdef ARRAY_DEBUG
302       std::cout << "Valeur de cumul " << cumul << std::endl;
303 #endif
304     };
305
306     _G[ elemno ] = cumul+1;
307     _arraySize   = _G[ elemno ] -1 ;
308
309 #ifdef ARRAY_DEBUG
310     for (int i =0; i< nbelem+1; i++ )
311       std::cout << "Valeur de _G["<<i<<"] = "<<_G[i] << std::endl;
312 #endif
313   }
314
315   FullInterlaceGaussPolicy(const FullInterlaceGaussPolicy & policy,
316                               bool shallowcopie=true)
317     : InterlacingPolicy(policy),_nbtypegeo(policy._nbtypegeo) {
318
319     //Seuls les tableaux de grande taille sont recopiés superficiellement
320     if(shallowcopie) {
321       this->_G.set(policy._G);
322       this->_S.set(policy._S);
323     } else {
324       this->_G.set(_nbelem+1,policy._G);
325       this->_S.set(_nbelem+1,policy._S);
326     }
327     // Tableaux toujours recopiés par recopie profonde
328     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
329     this->_nbgaussgeo.set(_nbtypegeo+1,policy._nbgaussgeo);
330   }
331
332   FullInterlaceGaussPolicy & operator=(const FullInterlaceGaussPolicy & policy) {
333   const char* LOC = "FullInterlaceGaussPolicy operator =";
334   BEGIN_OF_MED(LOC);
335
336     if ( this == &policy) return *this;
337
338     //Seuls les tableaux de grande taille sont recopiés superficiellement
339     InterlacingPolicy::operator=(policy);
340     this->_G.set(policy._G);
341     this->_S.set(policy._S);
342
343     // Tableaux toujours recopiés par recopie profonde
344     this->_nbtypegeo=policy._nbtypegeo;
345     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
346     this->_nbgaussgeo.set(_nbtypegeo+1,policy._nbgaussgeo);
347
348     return *this;
349   }
350
351   inline int getIndex(int i,int j ) const {
352     return _G[i-1]-1 + (j-1);
353   }
354
355   inline int getIndex(int i,int j, int k ) const {
356     //std::cout << "Index : " << _G[i-1]-1 + _dim *(k-1) + (j-1) << std::endl;
357     return _G[i-1]-1 +  (k-1)*_dim + (j-1);
358   }
359
360   inline int getNbGauss(int i) const { return _S[i]; }
361
362   inline int getNbGeoType() const {return _nbtypegeo;}
363
364   inline const int * const getNbElemGeoC() const {return _nbelegeoc;}
365
366   inline const int * const getNbGaussGeo() const {return _nbgaussgeo;}
367
368
369 };
370
371 class MEDMEM_EXPORT NoInterlaceGaussPolicy : public InterlacingPolicy {
372
373 protected:
374   ~NoInterlaceGaussPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
375
376 public :
377
378   PointerOf<int> _G;
379   PointerOf<int> _S;
380   int _nbtypegeo;
381   PointerOf<int> _nbelegeoc;
382   PointerOf<int> _nbgaussgeo;
383   // _cumul is used in getIndex() to access directly to the first value
384   // of a given dimension.
385   int _cumul;
386
387   NoInterlaceGaussPolicy():InterlacingPolicy(),_nbtypegeo(-1),_cumul(0) {
388     InterlacingPolicy::_gaussPresence=true;
389   }
390
391   NoInterlaceGaussPolicy(int nbelem, int dim, int nbtypegeo,
392                          const int * const nbelgeoc, const int * const nbgaussgeo)
393     : InterlacingPolicy(nbelem, dim, -1, MED_EN::MED_NO_INTERLACE),_nbtypegeo(nbtypegeo) {
394
395     InterlacingPolicy::_gaussPresence=true;
396
397     _nbelegeoc.set(_nbtypegeo+1,nbelgeoc);
398     _nbgaussgeo.set(_nbtypegeo+1,nbgaussgeo);
399     _G.set(nbelem+1);
400     //_G[0]       = 1;
401     _S.set(nbelem+1);
402     _S[0] = -1;
403     int elemno = 0;
404
405     _cumul = 0;
406     for (int ntyp=1; ntyp <= nbtypegeo; ntyp++ ) {
407       for (int  i=0; i < (nbelgeoc[ntyp]-nbelgeoc[ntyp-1]) ; i++ ) {
408         _G[ elemno ] = _cumul + i*nbgaussgeo[ntyp] + 1;
409         elemno++;
410         _S[ elemno ] = nbgaussgeo[ntyp];
411       };
412       _cumul += (nbelgeoc[ntyp]-nbelgeoc[ntyp-1]) * nbgaussgeo[ntyp];
413 #ifdef ARRAY_DEBUG
414       std::cout << "Valeur de _cumul " << _cumul << std::endl;
415 #endif
416     };
417
418     _G[ elemno ] = _cumul+1;
419     _arraySize   = ( _G[ elemno ] -1 ) * dim ;
420
421 #ifdef ARRAY_DEBUG
422     for (int i =0; i< nbelem+1; i++ )
423       std::cout << "Valeur de _G["<<i<<"] = "<<_G[i] << std::endl;
424 #endif
425   }
426
427
428   NoInterlaceGaussPolicy(const NoInterlaceGaussPolicy & policy,
429                             bool shallowcopie=true)
430     : InterlacingPolicy(policy),_nbtypegeo(policy._nbtypegeo),_cumul(policy._cumul)
431   {
432     //Seuls les tableaux de grande taille sont recopiés superficiellement
433     if(shallowcopie) {
434       this->_G.set(policy._G);
435       this->_S.set(policy._S);
436     } else {
437       this->_G.set(_nbelem+1,policy._G);
438       this->_S.set(_nbelem+1,policy._S);
439     }
440     // Tableaux toujours recopiés par recopie profonde
441     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
442     this->_nbgaussgeo.set(_nbtypegeo+1,policy._nbgaussgeo);
443   }
444
445   NoInterlaceGaussPolicy & operator=(const NoInterlaceGaussPolicy & policy) {
446     if ( this == &policy) return *this;
447
448   const char* LOC = "NoInterlaceGaussPolicy operator =";
449   BEGIN_OF_MED(LOC);
450     InterlacingPolicy::operator=(policy);
451     this->_G.set(policy._G);
452     this->_S.set(policy._S);
453
454     this->_cumul = policy._cumul;
455
456     // Tableaux toujours recopiés par recopie profonde
457     this->_nbtypegeo=policy._nbtypegeo;
458     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
459     this->_nbgaussgeo.set(_nbtypegeo+1,policy._nbgaussgeo);
460
461     return *this;
462   }
463
464   inline int getIndex(int i,int j ) const {
465     return _G[i-1]-1 + (j-1)*_cumul ;
466   }
467
468   inline int getIndex(int i,int j, int k ) const {
469     return _G[i-1]-1 + (j-1)*_cumul + (k-1) ;
470   }
471
472   inline int getNbGauss(int i) const { return _S[i]; }
473
474   inline int getNbGeoType() const {return _nbtypegeo;}
475
476   inline const int * const getNbElemGeoC() const {return _nbelegeoc;}
477
478   inline const int * const getNbGaussGeo() const {return _nbgaussgeo;}
479
480 };
481
482 class MEDMEM_EXPORT NoInterlaceByTypeGaussPolicy : public InterlacingPolicy {
483
484 protected:
485   ~NoInterlaceByTypeGaussPolicy() {} //pour éviter qu'un utilisateur cast la class array en politique
486
487   PointerOf<int> _T; //!< type of element
488   PointerOf<int> _G; //!< where type begin
489   int _nbtypegeo;
490   PointerOf<int> _nbelegeoc;
491   PointerOf<int> _nbgaussgeo;
492
493 public :
494
495   NoInterlaceByTypeGaussPolicy():InterlacingPolicy(),_nbtypegeo(-1) {
496     InterlacingPolicy::_gaussPresence=true;
497   }
498
499   NoInterlaceByTypeGaussPolicy(int nbelem, int dim, int nbtypegeo,
500                                const int * const nbelgeoc, const int * const nbgaussgeo)
501     : InterlacingPolicy(nbelem, dim, -1, MED_EN::MED_NO_INTERLACE_BY_TYPE),_nbtypegeo(nbtypegeo) {
502
503     InterlacingPolicy::_gaussPresence=true;
504
505     _nbelegeoc.set(_nbtypegeo+1,nbelgeoc);
506     _nbgaussgeo.set(_nbtypegeo+1,nbgaussgeo);
507     _G.set(_nbtypegeo+1);
508     _T.set(nbelem+1);
509     int elemno = 1;
510     int cumul = 0;
511
512     for (int ntyp=1; ntyp <= nbtypegeo; ntyp++ ) {
513       int nbelcurtype = nbelgeoc[ntyp]-nbelgeoc[ntyp-1];
514       for (int i=0; i < nbelcurtype; i++ ) {
515         _T[ elemno ] = ntyp;
516         elemno++;
517       };
518       _G[ ntyp ] = cumul;
519       cumul += nbelcurtype * _dim * nbgaussgeo[ntyp];
520 #ifdef ARRAY_DEBUG
521       std::cout << "Valeur de cumul " << cumul << std::endl;
522 #endif
523     };
524
525     _arraySize = cumul;
526
527 #ifdef ARRAY_DEBUG
528     for (int i =0; i< nbelem+1; i++ )
529       std::cout << "Valeur de _T["<<i<<"] = "<<_T[i] << std::endl;
530 #endif
531   }
532
533
534   NoInterlaceByTypeGaussPolicy(const NoInterlaceByTypeGaussPolicy & policy,
535                                bool shallowcopie=true)
536     : InterlacingPolicy(policy),_nbtypegeo(policy._nbtypegeo)
537   {
538     //Seuls les tableaux de grande taille sont recopiés superficiellement
539     if(shallowcopie) {
540       this->_G.set(policy._G);
541       this->_T.set(policy._T);
542     } else {
543       this->_G.set(_nbtypegeo+1,policy._G);
544       this->_T.set(_nbelem+1,policy._T);
545     }
546     // Tableaux toujours recopiés par recopie profonde
547     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
548     this->_nbgaussgeo.set(_nbtypegeo+1,policy._nbgaussgeo);
549   }
550
551   NoInterlaceByTypeGaussPolicy & operator=(const NoInterlaceByTypeGaussPolicy & policy) {
552     if ( this == &policy) return *this;
553
554   const char* LOC = "NoInterlaceGaussPolicy operator =";
555   BEGIN_OF_MED(LOC);
556     InterlacingPolicy::operator=(policy);
557     this->_G.set(policy._G);
558     this->_T.set(policy._T);
559
560     // Tableaux toujours recopiés par recopie profonde
561     this->_nbtypegeo=policy._nbtypegeo;
562     this->_nbelegeoc.set(_nbtypegeo+1,policy._nbelegeoc);
563     this->_nbgaussgeo.set(_nbtypegeo+1,policy._nbgaussgeo);
564
565     return *this;
566   }
567
568   inline int getIndex(int t) const {
569     return _G[t];
570   }
571   inline int getIndex(int i,int j ) const {
572     int t = _T[i];
573     return getIndexByType( i-(_nbelegeoc[t-1]-_nbelegeoc[0]), j, t );
574   }
575
576   inline int getIndex(int i,int j, int k ) const {
577     return getIndex( i, j ) + (k-1);
578   }
579
580   inline int getIndexByType(int i,int j,int t) const {
581     return _G[t] + (i-1 + (j-1)*(_nbelegeoc[t]-_nbelegeoc[t-1])) * _nbgaussgeo[t];
582   }
583
584   inline int getIndexByType(int i,int j,int k,int t) const {
585     return getIndexByType( i,j,t ) + (k-1);
586   }
587
588   inline int getNbGauss(int i) const { return _nbgaussgeo[ _T[i] ]; }
589
590   inline int getNbGaussByType(int t) const { return _nbgaussgeo[ t ]; }
591
592   inline int getNbGeoType() const {return _nbtypegeo;}
593
594   inline const int * const getNbElemGeoC() const {return _nbelegeoc;}
595
596   inline const int * const getNbGaussGeo() const {return _nbgaussgeo;}
597
598   inline int getLengthOfType(int t) const {
599     return (_nbelegeoc[t]-_nbelegeoc[t-1]) * _dim * _nbgaussgeo[t];
600   }
601
602 };
603
604 } //END NAMESPACE
605
606 #endif