1 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/arch.h ParaView/Utilities/VisItBridge/databases/readers/Lata/arch.h
2 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/arch.h 2020-12-22 12:04:51.219334522 +0100
3 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/arch.h 2020-12-22 12:06:26.188148423 +0100
10 +typedef long integer;
11 +typedef int True_int;
16 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.C ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.C
17 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.C 2020-03-23 22:18:49.000000000 +0100
18 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.C 2020-12-22 12:06:26.189148420 +0100
21 //Implemente_instanciable_sans_constructeur_ni_destructeur(ArrOfBit,"ArrOfBit",Objet_U);
23 -const unsigned int ArrOfBit::SIZE_OF_INT_BITS = 5;
24 -const unsigned int ArrOfBit::DRAPEAUX_INT = 31;
25 +const unsigned long ArrOfBit::SIZE_OF_INT_BITS = 5;
26 +const unsigned long ArrOfBit::DRAPEAUX_INT = 31;
28 // Description: Constructeur d'un tableau de taille n, non initialise
29 ArrOfBit::ArrOfBit(entier n)
34 -// Taille en "int" du tableau requis pour stocker un tableau de bits
35 +// Taille en "long" du tableau requis pour stocker un tableau de bits
37 entier ArrOfBit::calculer_int_size(entier taille) const
41 entier oldsize = calculer_int_size(taille);
42 entier newsize = calculer_int_size(n);
43 - unsigned int * newdata = new unsigned int[newsize];
44 + unsigned long * newdata = new unsigned long[newsize];
45 entier size_copy = (newsize > oldsize) ? oldsize : newsize;
52 - data = new unsigned int[newsize];
53 + data = new unsigned long[newsize];
55 taille = array.taille;
57 - memcpy(data, array.data, newsize * sizeof(unsigned int));
58 + memcpy(data, array.data, newsize * sizeof(unsigned long));
64 ArrOfBit& ArrOfBit::operator=(entier val)
66 - unsigned int valeur = val ? (~((unsigned int) 0)) : 0;
67 + unsigned long valeur = val ? (~((unsigned long) 0)) : 0;
68 entier size = calculer_int_size(taille);
70 for (i = 0; i < size; i++)
71 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.h ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.h
72 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.h 2020-03-23 22:18:49.000000000 +0100
73 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfBit.h 2020-12-22 12:06:26.189148420 +0100
75 entier calculer_int_size(entier taille) const;
79 - static const unsigned int SIZE_OF_INT_BITS;
80 - static const unsigned int DRAPEAUX_INT;
81 + unsigned long *data;
82 + static const unsigned long SIZE_OF_INT_BITS;
83 + static const unsigned long DRAPEAUX_INT;
86 // Description: Renvoie 1 si le bit e est mis, 0 sinon.
87 inline entier ArrOfBit::operator[](entier e) const
89 assert(e >= 0 && e < taille);
90 - unsigned int i = (unsigned int) e;
91 - unsigned int x = data[i >> SIZE_OF_INT_BITS];
92 - unsigned int flag = 1 << (i & DRAPEAUX_INT);
93 + unsigned long i = (unsigned long) e;
94 + unsigned long x = data[i >> SIZE_OF_INT_BITS];
95 + unsigned long flag = 1 << (i & DRAPEAUX_INT);
96 entier resultat = ((x & flag) != 0) ? 1 : 0;
100 inline void ArrOfBit::setbit(entier e) const
102 assert(e >= 0 && e < taille);
103 - unsigned int i = (unsigned int) e;
104 - unsigned int flag = 1 << (i & DRAPEAUX_INT);
105 + unsigned long i = (unsigned long) e;
106 + unsigned long flag = 1 << (i & DRAPEAUX_INT);
107 data[i >> SIZE_OF_INT_BITS] |= flag;
111 inline entier ArrOfBit::testsetbit(entier e) const
113 assert(e >= 0 && e < taille);
114 - unsigned int i = (unsigned int) e;
115 - unsigned int flag = 1 << (i & DRAPEAUX_INT);
116 + unsigned long i = (unsigned long) e;
117 + unsigned long flag = 1 << (i & DRAPEAUX_INT);
118 entier index = i >> SIZE_OF_INT_BITS;
119 - unsigned int old = data[index];
120 + unsigned long old = data[index];
121 data[index] = old | flag;
122 return ((old & flag) != 0) ? 1 : 0;
125 inline void ArrOfBit::clearbit(entier e) const
127 assert(e >= 0 && e < taille);
128 - unsigned int i = (unsigned int) e;
129 - unsigned int flag = 1 << (i & DRAPEAUX_INT);
130 + unsigned long i = (unsigned long) e;
131 + unsigned long flag = 1 << (i & DRAPEAUX_INT);
132 data[i >> SIZE_OF_INT_BITS] &= ~flag;
135 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfDouble.C ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfDouble.C
136 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfDouble.C 2020-03-23 22:18:49.000000000 +0100
137 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfDouble.C 2020-12-22 12:06:26.189148420 +0100
140 // Un nouveau tableau utilise cette zone memoire :
141 // incremente ref_count
144 // Signification: ref_count
145 inline entier VDoubledata::add_one_ref()
148 // decremente ref_count
153 // Signification: ref_count
154 inline entier VDoubledata::suppr_one_ref()
158 // Parametre: const ArrOfDouble& dx
159 // Signification: tableau a utiliser
162 // Signification: indice du min
163 entier imin_array(const ArrOfDouble& dx)
167 // Parametre: const ArrOfDouble& dx
168 // Signification: tableau a utiliser
171 // Signification: indice du max
172 entier imax_array(const ArrOfDouble& dx)
175 // * annule p_, data_ et size_array_
176 // Si le tableau est "ref_data" :
177 // * annule data_ et size_array_
180 // Signification: 1 si les donnees du tableau ont ete supprimees
185 // Retourne le nombre de references des donnees du tableau
186 // si le tableau est "normal", -1 s'il est "detache" ou "ref_data"
189 // Signification: ref_count_
190 entier ArrOfDouble::ref_count() const
192 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfFloat.C ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfFloat.C
193 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfFloat.C 2020-03-23 22:18:49.000000000 +0100
194 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfFloat.C 2020-12-22 12:06:26.190148418 +0100
197 // Un nouveau tableau utilise cette zone memoire :
198 // incremente ref_count
201 // Signification: ref_count
202 inline entier VFloatdata::add_one_ref()
205 // decremente ref_count
210 // Signification: ref_count
211 inline entier VFloatdata::suppr_one_ref()
215 // Parametre: const ArrOfFloat& dx
216 // Signification: tableau a utiliser
219 // Signification: indice du min
220 entier imin_array(const ArrOfFloat& dx)
224 // Parametre: const ArrOfFloat& dx
225 // Signification: tableau a utiliser
228 // Signification: indice du max
229 entier imax_array(const ArrOfFloat& dx)
232 // * annule p_, data_ et size_array_
233 // Si le tableau est "ref_data" :
234 // * annule data_ et size_array_
237 // Signification: 1 si les donnees du tableau ont ete supprimees
242 // Retourne le nombre de references des donnees du tableau
243 // si le tableau est "normal", -1 s'il est "detache" ou "ref_data"
246 // Signification: ref_count_
247 entier ArrOfFloat::ref_count() const
249 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfInt.C ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfInt.C
250 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOfInt.C 2020-03-23 22:18:49.000000000 +0100
251 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOfInt.C 2020-12-22 12:06:26.190148418 +0100
254 // Un nouveau tableau utilise cette zone memoire :
255 // incremente ref_count
258 // Signification: ref_count
259 inline entier VIntdata::add_one_ref()
262 // decremente ref_count
267 // Signification: ref_count
268 inline entier VIntdata::suppr_one_ref()
272 // Parametre: const ArrOfInt& dx
273 // Signification: tableau a utiliser
276 // Signification: indice du min
277 entier imin_array(const ArrOfInt& dx)
281 // Parametre: const ArrOfInt& dx
282 // Signification: tableau a utiliser
285 // Signification: indice du max
286 entier imax_array(const ArrOfInt& dx)
289 // * annule p_, data_ et size_array_
290 // Si le tableau est "ref_data" :
291 // * annule data_ et size_array_
294 // Signification: 1 si les donnees du tableau ont ete supprimees
299 // Retourne le nombre de references des donnees du tableau
300 // si le tableau est "normal", -1 s'il est "detache" ou "ref_data"
303 // Signification: ref_count_
304 entier ArrOfInt::ref_count() const
306 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOf_Scalar_Prototype.cpp.h ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOf_Scalar_Prototype.cpp.h
307 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/ArrOf_Scalar_Prototype.cpp.h 2020-03-23 22:18:49.000000000 +0100
308 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/ArrOf_Scalar_Prototype.cpp.h 2020-12-22 12:06:26.191148416 +0100
311 // Un nouveau tableau utilise cette zone memoire :
312 // incremente ref_count
315 // Signification: ref_count
316 inline entier V__Scalar__data::add_one_ref()
319 // decremente ref_count
324 // Signification: ref_count
325 inline entier V__Scalar__data::suppr_one_ref()
329 // Parametre: const ArrOf__Scalar__& dx
330 // Signification: tableau a utiliser
333 // Signification: indice du min
334 entier imin_array(const ArrOf__Scalar__& dx)
338 // Parametre: const ArrOf__Scalar__& dx
339 // Signification: tableau a utiliser
342 // Signification: indice du max
343 entier imax_array(const ArrOf__Scalar__& dx)
347 // Fonction de comparaison utilisee pour trier le tableau
348 // dans ArrOf__Scalar__::trier(). Voir man qsort
349 -static int fonction_compare_arrof__scalar___ordonner(const void * data1, const void * data2)
350 +static long fonction_compare_arrof__scalar___ordonner(const void * data1, const void * data2)
352 const __scalar__ x = *(const __scalar__*)data1;
353 const __scalar__ y = *(const __scalar__*)data2;
355 // * annule p_, data_ et size_array_
356 // Si le tableau est "ref_data" :
357 // * annule data_ et size_array_
360 // Signification: 1 si les donnees du tableau ont ete supprimees
365 // Retourne le nombre de references des donnees du tableau
366 // si le tableau est "normal", -1 s'il est "detache" ou "ref_data"
369 // Signification: ref_count_
370 entier ArrOf__Scalar__::ref_count() const
372 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/EFichier.h ParaView/Utilities/VisItBridge/databases/readers/Lata/EFichier.h
373 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/EFichier.h 2020-03-23 22:18:49.000000000 +0100
374 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/EFichier.h 2020-12-22 12:06:26.191148416 +0100
376 class EFichier : public Entree
379 - int ouvrir(const char *name)
380 + long ouvrir(const char *name)
398 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Entree.h ParaView/Utilities/VisItBridge/databases/readers/Lata/Entree.h
399 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Entree.h 2020-03-23 22:18:49.000000000 +0100
400 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/Entree.h 2020-12-22 12:06:26.191148416 +0100
404 virtual operator std::istream& () = 0;
405 - virtual int eof() = 0;
406 - virtual int good() = 0;
407 + virtual long eof() = 0;
408 + virtual long good() = 0;
409 virtual ~Entree() {};
410 virtual std::istream& get_istream() = 0;
412 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataDB.C ParaView/Utilities/VisItBridge/databases/readers/Lata/LataDB.C
413 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataDB.C 2020-03-23 22:18:49.000000000 +0100
414 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataDB.C 2020-12-22 12:06:26.192148414 +0100
416 // Dump detailed subbloc interpretation at level+1
417 #define verb_level_data_bloc 5
419 -typedef int LataDBInt32;
420 -typedef long long int LataDBInt64;
421 +typedef long LataDBInt32;
422 +typedef long long LataDBInt64;
430 -int Field_UName::operator==(const Field_UName & f) const
431 +long Field_UName::operator==(const Field_UName & f) const
433 return (geometry_ == f.geometry_) && (field_name_ == f.field_name_) && (loc_ == f.loc_);
438 if (msb_ != LataDBDataType::machine_msb_) {
439 - Journal() << "LataDB LataDataFile::write(int) not coded for reverse binary msb" << endl;
440 + Journal() << "LataDB LataDataFile::write(long) not coded for reverse binary msb" << endl;
448 - void set_exception(int i) { exception_ = i; }
449 + void set_exception(long i) { exception_ = i; }
450 FileOffset position() { return (*stream_).tellp(); };
451 enum SeekType { ABSOLUTE, RELATIVE };
452 void seek(FileOffset pos, SeekType seekt) {
454 std::iostream *stream_; // Points to fstream_ or mem_buffer passed to constructor
455 LataDBDataType::MSB msb_;
456 LataDBDataType::Type type_;
461 void LataDataFile::read(LataDBInt32 *ptr, BigEntier n)
463 if (msb_ == LataDBDataType::ASCII) {
466 - Journal(verb_level_data_bloc+1) << "Reading ascii int data bloc size=" << n << endl;
467 + Journal(verb_level_data_bloc+1) << "Reading ascii long data bloc size=" << n << endl;
469 - Journal(verb_level_data_bloc+1) << "Skipping ascii int data bloc size=" << n << endl;
470 + Journal(verb_level_data_bloc+1) << "Skipping ascii long data bloc size=" << n << endl;
472 for (i = 0; i < n; i++) {
474 @@ -397,15 +397,15 @@
478 - if (type_ != LataDBDataType::INT32) {
479 + if ((type_ != LataDBDataType::INT64) && (type_ != LataDBDataType::INT32)) {
480 Journal() << "Internal error in LataDB.cpp LataDataFile::read(LataDBInt32) : size conversion not coded" << endl;
484 - Journal(verb_level_data_bloc+1) << "Reading binary int data bloc size=" << n << endl;
485 + Journal(verb_level_data_bloc+1) << "Reading binary long data bloc size=" << n << endl;
486 (*stream_).read((char*)ptr, n * sizeof(LataDBInt32));
488 - Journal(verb_level_data_bloc+1) << "Skipping binary int data bloc size=" << n << endl;
489 + Journal(verb_level_data_bloc+1) << "Skipping binary long data bloc size=" << n << endl;
490 seek(n * sizeof(LataDBInt32), RELATIVE);
492 if (exception_ && !(*stream_).good()) {
495 void LataDataFile::write(const LataDBInt32 *ptr, BigEntier n, BigEntier columns)
497 - Journal(verb_level_data_bloc+1) << "Writing int data bloc size=" << n << endl;
498 + Journal(verb_level_data_bloc+1) << "Writing long data bloc size=" << n << endl;
499 if (type_ != LataDBDataType::INT32) {
500 Journal() << "Error in lataDB bloc write: trying to write integer data to non integer file block" << endl;
501 throw LataDBError(LataDBError::DATA_ERROR);
505 if (msb_ != LataDBDataType::machine_msb_) {
506 - Journal() << "LataDB LataDataFile::write(int) not coded for reverse binary msb" << endl;
507 + Journal() << "LataDB LataDataFile::write(long) not coded for reverse binary msb" << endl;
509 // Put code here (and test !) to reverse bytes in the binary bloc:
513 (*stream_).seekg(0, std::ios::end);
514 if (exception_ && !(*stream_).good()) {
515 - Journal() << "Error writing file " << fname_ << " int[" << n << "]"
516 + Journal() << "Error writing file " << fname_ << " long[" << n << "]"
517 << endl << message_ << endl;
518 throw LataDBError(LataDBError::DATA_ERROR);
522 f.set_err_message("Error reading fortran blocsize");
523 f.set_encoding(type.msb_, type.bloc_marker_type_);
527 Journal(verb_level_data_bloc+1) << "Skipping blocsize marker value=" << i << endl;
531 f.set_encoding(msb, type);
533 - case LataDBDataType::INT32: f.read((LataDBInt32*) 0, size); break;
534 + case LataDBDataType::INT32:
535 + case LataDBDataType::INT64: f.read((LataDBInt32*) 0, size); break;
536 case LataDBDataType::REAL32: f.read((float*) 0, size); break;
538 Journal() << "Internal error: bloc read skip not code for this type" << endl;
539 @@ -592,14 +593,14 @@
542 void bloc_write(LataDataFile & f, LataDBDataType::MSB msb, LataDBDataType::Type type,
543 - const ArrOfInt & tab, int columns)
544 + const ArrOfInt & tab, long columns)
546 f.set_encoding(msb, type);
547 f.write(tab.addr(), tab.size_array(), columns);
550 void bloc_write(LataDataFile & f, LataDBDataType::MSB msb, LataDBDataType::Type type,
551 - const ArrOfFloat & tab, int columns)
552 + const ArrOfFloat & tab, long columns)
554 f.set_encoding(msb, type);
555 f.write(tab.addr(), tab.size_array(), columns);
557 param = strtoll(s, &errorptr, 0 /* base 10 par defaut */);
558 if (errno || *errorptr != 0) {
559 Journal() << "LataDB::read_master_file error: " << err_msg << endl
560 - << "Error converting a string to type long int : string = " << s << endl;
561 + << "Error converting a string to type long long : string = " << s << endl;
562 throw(LataDBError(LataDBError::READ_ERROR));
565 @@ -852,10 +853,10 @@
567 a faire extraire pour de vrai les differents mots de motlu
578 @@ -872,10 +873,10 @@
581 const char *s=motlu2;
582 - for (int i=0;i<nb_comp;i++)
583 + for (long i=0;i<nb_comp;i++)
586 - int j=motlu2.find(",");
587 + long j=motlu2.find(",");
590 cerr<<param[i]<<endl;
594 // We update only fields found in the string
595 -// A string can contain both an int type and a float type: we get both in int_type and float_type
596 +// A string can contain both an long type and a float type: we get both in int_type and float_type
597 static void read_format_string(const Motcle & n, LataDBDataType & data_type,
598 LataDBDataType::Type & int_type,
599 LataDBDataType::Type & float_type)
600 @@ -1104,7 +1105,7 @@
604 -int is_med(const char* filename)
605 +long is_med(const char* filename)
607 Motcle motcle_nom_fic(filename);
609 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataDB.h ParaView/Utilities/VisItBridge/databases/readers/Lata/LataDB.h
610 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataDB.h 2020-03-23 22:18:49.000000000 +0100
611 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataDB.h 2020-12-22 12:06:26.192148414 +0100
614 Field_UName(const char *domain_name, const char *field_name, const char *loc);
615 Field_UName(const Field_UName &);
616 - int operator==(const Field_UName &) const;
617 + long operator==(const Field_UName &) const;
618 Field_UName & operator=(const Field_UName &);
619 Nom build_string() const;
620 const Motcle & get_localisation() const { return loc_; }
622 // Field name (without localisation spec)
627 // Filename containing the data
628 // Special names: memory_buffer_file() => data stored in the LataDB memory buffer.
631 // Third line in the .lata file
634 - LataDBDataType default_type_float() const; // Everything same as int, but type_=default_float_type_
635 + LataDBDataType default_type_float() const; // Everything same as long, but type_=default_float_type_
636 LataDBDataType default_type_int_;
637 LataDBDataType::Type default_float_type_;
639 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataDBmed.h ParaView/Utilities/VisItBridge/databases/readers/Lata/LataDBmed.h
640 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataDBmed.h 2020-03-23 22:18:49.000000000 +0100
641 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataDBmed.h 2020-12-22 12:06:26.193148412 +0100
644 type_elem="Segment"; break;
646 - Cerr<<"type_geo " << (int)type_geo <<" is not a supported element."<<finl;
647 + Cerr<<"type_geo " << (long)type_geo <<" is not a supported element."<<finl;
651 @@ -128,12 +128,12 @@
653 extern med_geometry_type typmai3[MED_N_CELL_FIXED_GEO];
655 -void latadb_get_info_mesh_med(const char* filename,const char* meshname,med_geometry_type& type_geo,int& ncells,int& nnodes,int& spacedim, int &nbcomp,int& is_structured, std::vector<int>& NIJK)
656 +void latadb_get_info_mesh_med(const char* filename,const char* meshname,med_geometry_type& type_geo,long& ncells,long& nnodes,long& spacedim, long &nbcomp,long& is_structured, std::vector<long>& NIJK)
662 - std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > res = MEDCoupling::GetUMeshGlobalInfo(filename, meshname, meshDim, spacedim, nnodes);
663 + std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,long> > > res = MEDCoupling::GetUMeshGlobalInfo(filename, meshname, meshDim, spacedim, nnodes);
666 // on prend que la dimension la plus grande et on verifie que l'on a qu'un type elt
668 //on est force de lire le maillage pour avoir le bon nombre de cellules
669 MEDCoupling::MEDCouplingUMesh * mesh= MEDCoupling::ReadUMeshFromFile(filename,meshname);
670 ncells = mesh->getNumberOfCells();
671 - const int *idx = mesh->getNodalConnectivityIndex()->getConstPointer();
672 + const long *idx = mesh->getNodalConnectivityIndex()->getConstPointer();
673 for (i = 0, nbcomp = 0; i < ncells; i++) if (nbcomp < idx[i + 1] - idx[i] - 1) nbcomp = idx[i + 1] - idx[i] - 1;
677 // No UMesh try CMesh
678 MEDCoupling::MEDCouplingMesh* mesh= MEDCoupling::ReadMeshFromFile(filename, meshname);
680 - type_geo,int& ncells,int& nnodes,int& spacedim, int &nbcomp
681 + type_geo,long& ncells,long& nnodes,long& spacedim, long &nbcomp
683 MEDCoupling::MEDCouplingCMesh* cmesh = dynamic_cast<MEDCoupling::MEDCouplingCMesh*>(mesh);
684 spacedim=cmesh-> getSpaceDimension() ;
685 @@ -229,17 +229,17 @@
687 vector<double> times;
688 LataDBTimestep table;
692 - for (int i=0;i<geoms.size();i++)
693 + for (long i=0;i<geoms.size();i++)
696 dom.timestep_ = timesteps_.size()-1;
698 med_geometry_type type_geo;
699 - int ncells,nnodes,spacedim, nbcomp;
701 - std::vector<int> NIJK;
702 + long ncells,nnodes,spacedim, nbcomp;
703 + long is_structured;
704 + std::vector<long> NIJK;
705 latadb_get_info_mesh_med(filename,geoms[i].c_str(),type_geo,ncells,nnodes,spacedim,nbcomp,is_structured,NIJK);
707 dom.elem_type_=latadb_name_from_type_geo(type_geo);
710 elem.datatype_ = default_type_float(); // ??
714 get_element_data(dom.elem_type_, dim, elem.nb_comp_, ff, ef);
715 if (elem.nb_comp_ == -1) elem.nb_comp_ = nbcomp;
718 fields= MEDCoupling::GetAllFieldNamesOnMesh(filename,dom.name_.getString());
721 - for (int i=0;i<fields.size();i++)
722 + for (long i=0;i<fields.size();i++)
725 som.name_ = fields[i];
727 // cerr<<"field " <<fields[i]<< " "<< meshname<<" ";
728 vector< MEDCoupling::TypeOfField > ltypes=MEDCoupling::GetTypesOfField(filename,meshname.getString(),fields[i].c_str());
729 //if (ltypes.size()!=1) throw;
730 - for (int t=0;t<ltypes.size();t++)
731 + for (long t=0;t<ltypes.size();t++)
739 - vector<pair< int, int > > iters= MEDCoupling::GetFieldIterations(ltypes[t],filename,meshname.getString(),fields[i].c_str());
740 - for (int iter=0;iter<iters.size();iter++)
741 + vector<pair< long, long > > iters= MEDCoupling::GetFieldIterations(ltypes[t],filename,meshname.getString(),fields[i].c_str());
742 + for (long iter=0;iter<iters.size();iter++)
744 double t= MEDCoupling::GetTimeAttachedOnFieldIteration(filename,fields[i].c_str(),iters[iter].first,iters[iter].second);
750 - vector<pair<pair<int,int>,double> > vtimes=MEDCoupling::GetAllFieldIterations(filename,/*meshname,*/fields[i].c_str());
751 - for (int it=0;it<vtimes.size();it++)
752 + vector<pair<pair<long,long>,double> > vtimes=MEDCoupling::GetAllFieldIterations(filename,/*meshname,*/fields[i].c_str());
753 + for (long it=0;it<vtimes.size();it++)
756 double t=vtimes[it].second;
757 @@ -421,17 +421,17 @@
761 - for (int i=0;i<times.size();i++)
762 + for (long i=0;i<times.size();i++)
765 //LataDBTimestep & t = timesteps_.add(table);
766 LataDBTimestep& t = timesteps_.add(LataDBTimestep());
768 - for (int f=0;f<table.fields_.size();f++)
769 + for (long f=0;f<table.fields_.size();f++)
770 add(i+1,table.fields_[f]);
773 - for (int i=0;i<times.size()*0;i++)
774 + for (long i=0;i<times.size()*0;i++)
775 cerr<<" time "<<times[i]<<endl;
779 MEDCoupling::MEDCouplingUMesh * mesh= MEDCoupling::ReadUMeshFromFile(fld.filename_.getString(),fld.geometry_.getString());
780 const MEDCoupling::DataArrayDouble* coords=mesh->getCoords();
781 data->resize(fld.size_,fld.nb_comp_);
782 - for (int i=0;i<fld.size_;i++)
783 - for (int j=0;j<fld.nb_comp_;j++)
784 + for (long i=0;i<fld.size_;i++)
785 + for (long j=0;j<fld.nb_comp_;j++)
787 (*data)(i,j)=coords->getIJ(i,j);
789 @@ -468,15 +468,15 @@
790 ArrOfInt filter=renum_conn(type);
791 MEDCoupling::MEDCouplingUMesh * mesh= MEDCoupling::ReadUMeshFromFile(fld.filename_.getString(),fld.geometry_.getString());
792 const MEDCoupling::DataArrayInt *elems = mesh->getNodalConnectivity(), *idx = mesh->getNodalConnectivityIndex();
793 - const int *ptr_elems=elems->getConstPointer(), *ptr_idx = idx->getConstPointer();
794 + const long *ptr_elems=elems->getConstPointer(), *ptr_idx = idx->getConstPointer();
795 data->resize(fld.size_,fld.nb_comp_);
797 - for (int i=0;i<fld.size_;i++)
799 + for (long i=0;i<fld.size_;i++)
802 - for (int j=0;j<fld.nb_comp_;j++)
803 + for (long j=0;j<fld.nb_comp_;j++)
805 - int reel = j + ptr_idx[i] + 1 < ptr_idx[i + 1];
806 + long reel = j + ptr_idx[i] + 1 < ptr_idx[i + 1];
807 (*data)(i,filter.size_array()>0 ? filter[j] : j) = reel ? ptr_elems[compt] + 1 : 0;
811 MEDCoupling::MEDCouplingMesh * mesh= MEDCoupling::ReadMeshFromFile(fld.filename_.getString(),fld.geometry_.getString());
812 data->resize(fld.size_,fld.nb_comp_);
813 MEDCoupling::MEDCouplingCMesh* cmesh = dynamic_cast<MEDCoupling::MEDCouplingCMesh*>(mesh);
816 if (fld.name_=="SOMMETS_IJK_I")
818 else if (fld.name_=="SOMMETS_IJK_J")
822 const MEDCoupling::DataArrayDouble* coords=cmesh->getCoordsAt(dir);
823 - for (int i=0;i<fld.size_;i++)
824 - for (int j=0;j<fld.nb_comp_;j++)
825 + for (long i=0;i<fld.size_;i++)
826 + for (long j=0;j<fld.nb_comp_;j++)
828 (*data)(i,j)=coords->getIJ(i,j);
830 @@ -519,11 +519,11 @@
832 fieldname+=fld.geometry_;
837 vector<string> fields= MEDCoupling::GetAllFieldNamesOnMesh(fld.filename_.getString(),fld.geometry_.getString());
839 - for (int f=0;f<fields.size();f++)
840 + for (long f=0;f<fields.size();f++)
842 if (fieldname==fields[f].c_str())
844 @@ -535,10 +535,10 @@
848 - vector<pair<pair<int,int>,double> > vtimes=MEDCoupling::GetAllFieldIterations(fld.filename_.getString(),fieldname.getString());
849 + vector<pair<pair<long,long>,double> > vtimes=MEDCoupling::GetAllFieldIterations(fld.filename_.getString(),fieldname.getString());
851 - int it=fld.timestep_-1;
852 - pair <int,int> iter(fld.timestep_-1,-1);
853 + long it=fld.timestep_-1;
854 + pair <long,long> iter(fld.timestep_-1,-1);
855 if (fld.timestep_==1) it=0;
856 //Cerr<<iter.first <<" 00 "<<vtimes.size()<<finl;
860 assert(field->getNumberOfComponents()==fld.nb_comp_);
861 const double* ptr=values->getConstPointer();
862 - for (int i=0;i<fld.size_;i++)
863 + for (long i=0;i<fld.size_;i++)
865 - for (int j=0;j<fld.nb_comp_;j++)
866 + for (long j=0;j<fld.nb_comp_;j++)
868 (*data)(i,j)=ptr[i*fld.nb_comp_+j];
870 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataFilter.C ParaView/Utilities/VisItBridge/databases/readers/Lata/LataFilter.C
871 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataFilter.C 2020-03-23 22:18:49.000000000 +0100
872 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataFilter.C 2020-12-22 12:06:26.193148412 +0100
875 entier x = strtol(ptr+1, &errorptr, 0 /* base 10 par defaut */);
876 if (errno || *errorptr != 0) {
877 - Journal() << "LataOptions error reading int parameter: " << s << endl;
878 + Journal() << "LataOptions error reading long parameter: " << s << endl;
883 data.displayed_name_ = lata_geom_name;
885 Nom separ("boundaries_");
886 - int m=data.displayed_name_.find(separ);
887 + long m=data.displayed_name_.find(separ);
890 const Nom& name= data.displayed_name_;
891 @@ -990,17 +990,17 @@
893 void LataOptions::extract_path_basename(const char * s, Nom & path_prefix, Nom & basename)
896 - for (i=(int)strlen(s)-1;i>=0;i--)
898 + for (i=(long)strlen(s)-1;i>=0;i--)
899 if ((s[i]==PATH_SEPARATOR) ||(s[i]=='\\'))
904 for (j = 0; j <= i; j++)
905 path_prefix += Nom(s[j]);
907 // Parse basename : if extension given, remove it
908 - int n = (int)strlen(s);
909 + long n = (long)strlen(s);
910 if (n > 5 && strcmp(s+n-5,".lata") == 0)
913 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataFilter.h ParaView/Utilities/VisItBridge/databases/readers/Lata/LataFilter.h
914 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataFilter.h 2020-03-23 22:18:49.000000000 +0100
915 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataFilter.h 2020-12-22 12:06:26.194148410 +0100
918 bool reconnect; // Do we want to reconnect multiblock meshes
919 float reconnect_tolerance;
920 - int regularize_polyedre ; // if 1 Treate polyedre as poyledre extruder
921 - int regularize; // Do we want to force regularize the domain ie convert the mesh to a structured ijk (not necessary except for dual-mesh vdf)
922 + long regularize_polyedre ; // if 1 Treate polyedre as poyledre extruder
923 + long regularize; // Do we want to force regularize the domain ie convert the mesh to a structured ijk (not necessary except for dual-mesh vdf)
924 // special value 2 means "regularize if faces present and vdf"
925 - int extend_domain; // Extend the regularized domaine by n layers of cells
926 + long extend_domain; // Extend the regularized domaine by n layers of cells
927 float regularize_tolerance;
928 bool invalidate; // invalidate unused positions and connections;
929 bool load_virtual_elements; // Do we want to extend the loaded mesh subblocks with a layer of virtual elements
930 bool export_fields_at_faces_; // Should we show these fields in exportable fields
932 // When loading ijk regular meshes, virtually create this number of blocks in the K direction:
933 - int ijk_mesh_nb_parts_;
934 + long ijk_mesh_nb_parts_;
935 // When loading ijk regular meshes, merge N layers of virtual elements (default=1)
936 - int ijk_virt_layer;
937 + long ijk_virt_layer;
939 bool user_fields_; //activate user fields ?
941 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataStructures.C ParaView/Utilities/VisItBridge/databases/readers/Lata/LataStructures.C
942 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataStructures.C 2020-03-23 22:18:49.000000000 +0100
943 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataStructures.C 2020-12-22 12:06:26.194148410 +0100
945 case LataField_base::ELEM: n = nb_elements(); break;
946 case LataField_base::FACES: n = nb_faces(); break;
948 - Journal() << "Invalid localisation " << (int) loc << " in Domain::nb_items" << endl;
949 + Journal() << "Invalid localisation " << (long) loc << " in Domain::nb_items" << endl;
954 case LataField_base::ELEM: n = decal_elements_lata_; break;
955 case LataField_base::FACES: n = decal_faces_lata_; break;
957 - Journal() << "Invalid localisation " << (int) loc << " in Domain::lata_block_offset" << endl;
958 + Journal() << "Invalid localisation " << (long) loc << " in Domain::lata_block_offset" << endl;
962 - Journal() << "Error: lata_block_offset not set for localisation " << (int) loc << endl;
963 + Journal() << "Error: lata_block_offset not set for localisation " << (long) loc << endl;
968 case LataField_base::ELEM: decal_elements_lata_ = n; break;
969 case LataField_base::FACES: decal_faces_lata_ = n; break;
971 - Journal() << "Invalid localisation " << (int) loc << " in Domain::set_lata_block_offset" << endl;
972 + Journal() << "Invalid localisation " << (long) loc << " in Domain::set_lata_block_offset" << endl;
977 const entier nb_som_elem = elements_.dimension(1);
978 const double facteur = 1. / (double) nb_som_elem;
980 - for (int i = 0; i < nb_elem; i++) {
982 + for (long i = 0; i < nb_elem; i++) {
984 tmp[0] = tmp[1] = tmp[2] = 0.;
985 for (j = 0; j < nb_som_elem; j++) {
986 - int som = elements_(i, j);
987 + long som = elements_(i, j);
988 for (k = 0; k < loop_max(dim, 3); k++) {
989 tmp[k] += nodes_(som, k);
991 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataStructures.h ParaView/Utilities/VisItBridge/databases/readers/Lata/LataStructures.h
992 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataStructures.h 2020-03-23 22:18:49.000000000 +0100
993 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataStructures.h 2020-12-22 12:06:26.194148410 +0100
998 - Domain_Id(const char * name = "??", int t = 0, int block = -1) :
999 + Domain_Id(const char * name = "??", long t = 0, long block = -1) :
1000 name_(name), timestep_(t), block_(block) {};
1003 // At which timestep (needed for dynamic domains)
1006 // Which block of the parallel computation ? -1 => all blocks
1011 // Description: Field_Id is what you need to identify the content of a
1015 Field_Id() : timestep_(0) {};
1016 - Field_Id(const Field_UName & uname, int timestep, int block) :
1017 + Field_Id(const Field_UName & uname, long timestep, long block) :
1018 timestep_(timestep), block_(block), uname_(uname) {};
1026 operator Domain_Id() const { return Domain_Id(uname_.get_geometry(), timestep_, block_); }
1027 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Lata_tools.C ParaView/Utilities/VisItBridge/databases/readers/Lata/Lata_tools.C
1028 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Lata_tools.C 2020-03-23 22:18:49.000000000 +0100
1029 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/Lata_tools.C 2020-12-22 12:06:26.194148410 +0100
1034 -static int journal_level = 0;
1035 +static long journal_level = 0;
1037 void set_Journal_level(entier level)
1041 BigEntier memory_size(const ArrOfBit & tab)
1043 - return ((BigEntier)sizeof(tab)) + ((BigEntier)tab.size_array()) * sizeof(int) / 32;
1044 + return ((BigEntier)sizeof(tab)) + ((BigEntier)tab.size_array()) * sizeof(long) / 32;
1047 void split_path_filename(const char *s, Nom & path, Nom & filename)
1050 - for (i=(int)strlen(s)-1;i>=0;i--)
1052 + for (i=(long)strlen(s)-1;i>=0;i--)
1053 if ((s[i]==PATH_SEPARATOR) || (s[i]=='\\'))
1058 for (j = 0; j <= i; j++)
1061 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.C ParaView/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.C
1062 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.C 2020-03-23 22:18:49.000000000 +0100
1063 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.C 2020-12-22 12:06:26.195148408 +0100
1068 - int shape; // Vector size (-1 => dimension of the problem)
1069 + long shape; // Vector size (-1 => dimension of the problem)
1072 // COMPOSANTES EN MAJUSCULES !!!!!
1074 // Empty label means end of the table
1077 -int latav1_component_shape(const Motcle & compo)
1078 +long latav1_component_shape(const Motcle & compo)
1081 while (std_components[i].name[0] != 0) {
1082 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.h ParaView/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.h
1083 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.h 2020-03-23 22:18:49.000000000 +0100
1084 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataV1_field_definitions.h 2020-12-22 12:06:26.195148408 +0100
1086 // (separated from LataDB.cpp so that changes in this file are
1087 // easily identified)
1089 -int latav1_component_shape(const Motcle & compo);
1090 +long latav1_component_shape(const Motcle & compo);
1091 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataVector.h ParaView/Utilities/VisItBridge/databases/readers/Lata/LataVector.h
1092 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LataVector.h 2020-03-23 22:18:49.000000000 +0100
1093 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LataVector.h 2020-12-22 12:06:26.195148408 +0100
1095 LataVector(const LataVector<C> & x) : n_(0), data_(0) { operator=(x); }
1096 LataVector(entier n) : n_(0), data_(0) { for (entier i=0; i<n; i++) add(); }
1097 ~LataVector() { reset(); }
1098 - void reset() { for (int i=0; i<n_; i++) { delete data_[i]; }; delete[] data_; n_ = 0; data_ = 0; }
1099 + void reset() { for (long i=0; i<n_; i++) { delete data_[i]; }; delete[] data_; n_ = 0; data_ = 0; }
1100 const C & operator[](entier i) const { assert(i>=0 && i<n_); return *(data_[i]); }
1101 C & operator[](entier i) { assert(i>=0 && i<n_); return *(data_[i]); }
1102 C & add(const C & item) { return add_item(new C(item)); }
1103 C & add() { return add_item(new C); }
1104 entier size() const { return n_; }
1105 entier rang(const C & c) const { for (entier i = 0; i < n_; i++) if (*(data_[i]) == c) return i; return -1; }
1106 - LataVector<C> & operator=(const LataVector<C> & x) { reset(); for (int i=0; i<x.n_; i++) add(x[i]); return *this; }
1107 + LataVector<C> & operator=(const LataVector<C> & x) { reset(); for (long i=0; i<x.n_; i++) add(x[i]); return *this; }
1109 C & add_item(C* added_item) {
1111 data_ = new C*[n_+1];
1112 - for (int i=0; i<n_; i++) data_[i] = old[i];
1113 + for (long i=0; i<n_; i++) data_[i] = old[i];
1115 data_[n_++] = added_item;
1117 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LmlReader.C ParaView/Utilities/VisItBridge/databases/readers/Lata/LmlReader.C
1118 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/LmlReader.C 2020-03-23 22:18:49.000000000 +0100
1119 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/LmlReader.C 2020-12-22 12:06:26.195148408 +0100
1121 Journal(lmllevel) << "lml_reader: GRILLE " << geom.name_ << endl;
1122 is >> sommets.nb_comp_;
1127 sommets.size_ = tmp; // size_ est long long...
1129 @@ -160,12 +160,12 @@
1135 is >> tmp; // size_ est long long...
1136 elements.size_ = tmp;
1139 - int borne_index_min=0;
1140 + long borne_index_min=0;
1141 if (motlu == "TETRA4") {
1142 lata_db.set_elemtype(tstep, elements.geometry_, "TETRAEDRE");
1143 elements.nb_comp_ = 4;
1146 lata_db.write_data(tstep, elements.uname_, elems);
1147 } else if (motlu == "FACE") {
1152 throw LataDBError(LataDBError::READ_ERROR);
1155 throw LataDBError(LataDBError::READ_ERROR);
1160 field.size_ = tmp; // long long convert
1162 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Motcle.C ParaView/Utilities/VisItBridge/databases/readers/Lata/Motcle.C
1163 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Motcle.C 2020-03-23 22:18:49.000000000 +0100
1164 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/Motcle.C 2020-12-22 12:06:26.196148405 +0100
1167 Nom& Nom::majuscule()
1169 - const int n = longueur()-1;
1170 - for (int i = 0; i < n; i++)
1171 + const long n = longueur()-1;
1172 + for (long i = 0; i < n; i++)
1175 if (c >= 'a' && c <= 'z')
1178 // opt=0 => comparaison des chaines completes
1179 // opt=1 => le debut de n1 doit etre egal a n2
1180 -int Motcle::strcmp_uppercase(const char *n1, const char *n2, int opt)
1181 +long Motcle::strcmp_uppercase(const char *n1, const char *n2, long opt)
1184 unsigned char c1, c2;
1189 -int Nom::debute_par(const char * s) const
1190 +long Nom::debute_par(const char * s) const
1192 - const int l1 = longueur()-1;
1193 - const int l2 = (int)strlen(s);
1194 + const long l1 = longueur()-1;
1195 + const long l2 = (long)strlen(s);
1196 return (l1>=l2) ? (strncmp(s_.c_str(), s, l2) == 0) : 0;
1199 -int Nom::finit_par(const char * s) const
1200 +long Nom::finit_par(const char * s) const
1202 - const int l1 = longueur()-1;
1203 - const int l2 = (int)strlen(s);
1204 + const long l1 = longueur()-1;
1205 + const long l2 = (long)strlen(s);
1206 return (l1>=l2) ? (strncmp(s_.c_str()+(l1-l2), s, l2) == 0) : 0;
1209 @@ -107,15 +107,15 @@
1213 -int Motcle::debute_par(const char * s) const
1214 +long Motcle::debute_par(const char * s) const
1216 return (strcmp_uppercase(s_.c_str(), s, 1) == 0);
1219 -int Motcle::finit_par(const char * s) const
1220 +long Motcle::finit_par(const char * s) const
1222 - const int l1 = longueur()-1;
1223 - const int l2 = (int)strlen(s);
1224 + const long l1 = longueur()-1;
1225 + const long l2 = (long)strlen(s);
1226 return (l1>=l2) ? (strcmp_uppercase(s_.c_str()+(l1-l2), s) == 0) : 0;
1229 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Motcle.h ParaView/Utilities/VisItBridge/databases/readers/Lata/Motcle.h
1230 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/Motcle.h 2020-03-23 22:18:49.000000000 +0100
1231 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/Motcle.h 2020-12-22 12:06:26.196148405 +0100
1240 sprintf(s, "%d", i);
1245 - virtual int operator==(const char * s) const
1246 + virtual long operator==(const char * s) const
1250 - virtual int operator!=(const char * s) const
1251 + virtual long operator!=(const char * s) const
1253 return !operator==(s);
1258 virtual entier find(const char * n) const;
1259 - virtual int debute_par(const char * s) const;
1260 - virtual int finit_par(const char * s) const;
1261 + virtual long debute_par(const char * s) const;
1262 + virtual long finit_par(const char * s) const;
1263 virtual Nom& prefix(const char * s);
1266 @@ -118,11 +118,11 @@
1267 Motcle(const char * s) : Nom(s) {};
1268 Motcle(const Nom& n) : Nom(n) {};
1270 - int operator==(const char * s) const
1271 + long operator==(const char * s) const
1273 return (strcmp_uppercase(s_.c_str(), s) == 0);
1275 - int operator!=(const char * s) const
1276 + long operator!=(const char * s) const
1278 return !operator==(s);
1280 @@ -131,10 +131,10 @@
1284 - int debute_par(const char * s) const;
1285 - int finit_par(const char * s) const;
1286 + long debute_par(const char * s) const;
1287 + long finit_par(const char * s) const;
1289 - static int strcmp_uppercase(const char * s1, const char * s2, int opt = 0);
1290 + static long strcmp_uppercase(const char * s1, const char * s2, long opt = 0);
1291 virtual entier find(const char * n) const
1293 return Nom(*this).majuscule().find(Nom(n).majuscule());
1294 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.C ParaView/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.C
1295 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.C 2020-03-23 22:18:49.000000000 +0100
1296 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.C 2020-12-22 12:06:26.196148405 +0100
1300 DX_stream() : os_to_cout_(0), os_(0) {};
1301 - void init_cout(int is_ascii)
1302 + void init_cout(long is_ascii)
1309 - void init_file(const char *fname, int is_ascii)
1310 + void init_file(const char *fname, long is_ascii)
1317 DX_stream & operator<<(const float f) { (*os_) << f; return *this; }
1318 - DX_stream & operator<<(const int i) { (*os_) << i; return *this; }
1319 + DX_stream & operator<<(const long i) { (*os_) << i; return *this; }
1320 DX_stream & operator<<(const char * s) { (*os_) << s; return *this; }
1321 DX_stream & operator<<(DX_stream & f(DX_stream &)) { return f(*this); }
1323 - void write(char * ptr, int sz) { os_->write(ptr, sz); }
1324 + void write(char * ptr, long sz) { os_->write(ptr, sz); }
1325 entier ok() { return os_ != 0; }
1326 entier ascii() { return ascii_; }
1327 std::ostream & stream() { return *os_; }
1340 -void DX_write_vect(DX_stream & os, int dxobject, const ArrOfFloat & v)
1341 +void DX_write_vect(DX_stream & os, long dxobject, const ArrOfFloat & v)
1343 - const int places = v.size_array();
1344 + const long places = v.size_array();
1345 os << "object " << dxobject << " class array" << endl;
1346 os << "type float rank 1 shape 1 items " << places << " ";
1349 os.write((char*)v.addr(), sizeof(float) * places);
1351 os << "ascii data follows" << endl;
1352 - for (int i=0;i<places;i++) {
1353 + for (long i=0;i<places;i++) {
1359 -void DX_write_vect(DX_stream & os, int dxobject, const FloatTab & v)
1360 +void DX_write_vect(DX_stream & os, long dxobject, const FloatTab & v)
1362 - const int places = v.dimension(0);
1363 - const int shape = v.dimension(1);
1364 + const long places = v.dimension(0);
1365 + const long shape = v.dimension(1);
1366 os << "object " << dxobject << " class array" << endl;
1367 os << "type float rank 1 shape " << shape << " items " << places << " ";
1369 @@ -111,32 +111,32 @@
1370 os.write((char*)v.addr(), sizeof(float) * places * shape);
1372 os << "ascii data follows" << endl;
1373 - for (int i=0;i<places;i++) {
1374 - for (int j=0;j<shape;j++)
1375 + for (long i=0;i<places;i++) {
1376 + for (long j=0;j<shape;j++)
1377 os << v(i, j) << " ";
1383 -void DX_write_vect(DX_stream & os, int dxobject, const IntTab & v)
1384 +void DX_write_vect(DX_stream & os, long dxobject, const IntTab & v)
1386 - if (sizeof(int) != 4) {
1387 - Journal() << "Error DX_write_vect : int size != 32 bits" << endl;
1388 + if (sizeof(long) != 4) {
1389 + Journal() << "Error DX_write_vect : long size != 32 bits" << endl;
1390 throw OpenDXWriter::DXInternalError;
1392 - const int places = v.dimension(0);
1393 - const int shape = v.dimension(1);
1394 + const long places = v.dimension(0);
1395 + const long shape = v.dimension(1);
1396 os << "object " << dxobject << " class array" << endl;
1397 - os << "type int rank 1 shape " << shape << " items " << places << " ";
1398 + os << "type long rank 1 shape " << shape << " items " << places << " ";
1401 os << (mymachine_msb ? "msb ieee" : "lsb ieee") << " data follows" << endl;
1402 - os.write((char*)v.addr(), sizeof(int) * places * shape);
1403 + os.write((char*)v.addr(), sizeof(long) * places * shape);
1405 os << "ascii data follows" << endl;
1406 - for (int i=0;i<places;i++) {
1407 - for (int j=0;j<shape;j++)
1408 + for (long i=0;i<places;i++) {
1409 + for (long j=0;j<shape;j++)
1410 os << v(i, j) << " ";
1414 finish_geometry(); // reset geometry data
1417 -void OpenDXWriter::init_cout(double time, int ascii)
1418 +void OpenDXWriter::init_cout(double time, long ascii)
1421 os_->init_cout(ascii);
1423 DX_write_vect(*os_, dx_time_index_, t);
1426 -void OpenDXWriter::init_file(double time, Nom & filename_, int ascii)
1427 +void OpenDXWriter::init_file(double time, Nom & filename_, long ascii)
1430 os_->init_file(filename_, ascii);
1432 components_names_.add(n);
1435 -entier OpenDXWriter::finish(int force_group)
1436 +entier OpenDXWriter::finish(long force_group)
1438 DX_stream & os = *os_;
1440 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.h ParaView/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.h
1441 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.h 2020-03-23 22:18:49.000000000 +0100
1442 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/OpenDXWriter.h 2020-12-22 12:06:26.197148403 +0100
1447 - void init_cout(double time, int ascii = 0);
1448 - void init_file(double time, Nom & filename_, int ascii = 0);
1449 + void init_cout(double time, long ascii = 0);
1450 + void init_file(double time, Nom & filename_, long ascii = 0);
1452 void write_geometry(const Domain & dom);
1453 void write_component(const LataField_base & field);
1455 - entier finish(int force_group = 0);
1456 + entier finish(long force_group = 0);
1457 enum DXErrors { DXInternalError };
1460 void finish_geometry();
1462 - int dx_time_index_;
1463 - int index_counter_;
1464 + long dx_time_index_;
1465 + long index_counter_;
1466 // Indexes of all DXfield objects in the file (to build the final group)
1467 ArrOfInt fields_indexes_;
1468 // Names of the DXfields:
1471 // Index of the nodes array of the last geometry
1473 + long nodes_index_;
1474 // Index of the elements array of the last geometry
1475 - int elements_index_;
1476 + long elements_index_;
1477 // Index of these arrays:
1478 - int invalid_positions_;
1479 - int invalid_connections_;
1480 + long invalid_positions_;
1481 + long invalid_connections_;
1482 // Indexes of the components associated with the last geometry
1483 ArrOfInt components_indexes_;
1484 Noms components_names_;
1485 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorBoundary.C ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorBoundary.C
1486 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorBoundary.C 2020-03-23 22:18:49.000000000 +0100
1487 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorBoundary.C 2020-12-22 12:06:26.197148403 +0100
1496 ref_elem_face.resize(4,3);
1498 op.src_element_.set_smart_resize(1);
1499 op.src_face_.set_smart_resize(1);
1500 op.src_nodes_.set_smart_resize(1);
1501 - const int nb_nodes_per_face = element_faces.dimension(1);
1502 - const int nb_faces_per_element = element_faces.dimension(0);
1503 + const long nb_nodes_per_face = element_faces.dimension(1);
1504 + const long nb_faces_per_element = element_faces.dimension(0);
1506 ArrOfInt one_face(nb_nodes_per_face);
1507 ArrOfInt adjacent_elements;
1509 for (element_index = 0; element_index < nelem; element_index++) {
1510 for (local_face_index = 0; local_face_index < nb_faces_per_element; local_face_index++) {
1511 for (i = 0; i < nb_nodes_per_face; i++) {
1512 - int local_node = element_faces(local_face_index, i);
1513 - int node = src.elements_(element_index, local_node);
1514 + long local_node = element_faces(local_face_index, i);
1515 + long node = src.elements_(element_index, local_node);
1518 find_adjacent_elements(som_elem, one_face, adjacent_elements);
1519 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorDualMesh.C ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorDualMesh.C
1520 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorDualMesh.C 2020-03-23 22:18:49.000000000 +0100
1521 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorDualMesh.C 2020-12-22 12:06:26.197148403 +0100
1523 Journal() << "Error in OperatorDualMesh::build_geometry: source domain has no faces data" << endl;
1526 - const int max_nb_som_face = 3; // for tetrahedra
1527 + const long max_nb_som_face = 3; // for tetrahedra
1528 if (src.elt_type_ != Domain::triangle && src.elt_type_ != Domain::tetra) {
1529 Journal() << "Error in OperatorDualMesh::build_geometry: cannot operate on unstructured mesh with this element type" << endl;
1532 const entier nb_som_face = src.faces_.dimension(1);
1533 const entier nb_som_elem = src.elements_.dimension(1);
1534 dest.elements_.resize(nb_elem * nb_faces_elem, nb_som_elem);
1536 - for (int i = 0; i < nb_elem; i++) {
1537 - const int central_node = nb_som + i;
1538 - for (int j = 0; j < nb_faces_elem; j++) {
1539 - const int face = src.elem_faces_(i, j);
1541 + for (long i = 0; i < nb_elem; i++) {
1542 + const long central_node = nb_som + i;
1543 + for (long j = 0; j < nb_faces_elem; j++) {
1544 + const long face = src.elem_faces_(i, j);
1545 dest.elements_(index, 0) = central_node;
1546 - for (int k = 0; k < loop_max(nb_som_face, max_nb_som_face); k++) {
1547 + for (long k = 0; k < loop_max(nb_som_face, max_nb_som_face); k++) {
1548 dest.elements_(index, k+1) = src.faces_(face, k);
1549 break_loop(k, nb_som_face);
1552 const entier nb_face_elem = src_domain.elem_faces_.dimension(1);
1553 const entier nb_comp = src.data_.dimension(1);
1554 dest.data_.resize(nb_elem * nb_face_elem, nb_comp);
1556 - for (int i = 0; i < nb_elem; i++) {
1557 - for (int j = 0; j < nb_face_elem; j++) {
1558 - const int face = src_domain.elem_faces_(i, j);
1559 - for (int k = 0; k < nb_comp; k++)
1561 + for (long i = 0; i < nb_elem; i++) {
1562 + for (long j = 0; j < nb_face_elem; j++) {
1563 + const long face = src_domain.elem_faces_(i, j);
1564 + for (long k = 0; k < nb_comp; k++)
1565 dest.data_(index, k) = src.data_(face, k);
1569 for (entier i_dim = 0; i_dim < dim; i_dim++) {
1570 const ArrOfFloat & c1 = src.coord_[i_dim];
1571 ArrOfFloat & c2 = dest.coord_.add(ArrOfFloat());
1572 - const int n = c1.size_array() - 1;
1573 + const long n = c1.size_array() - 1;
1574 c2.resize_array(n*2+1);
1575 - for (int i = 0; i < n; i++) {
1576 + for (long i = 0; i < n; i++) {
1578 c2[i*2+1] = (c1[i] + c1[i+1]) * 0.5;
1580 @@ -137,20 +137,20 @@
1581 if (src.invalid_connections_.size_array() > 0) {
1582 dest.invalid_connections_.resize_array(dest.nb_elements());
1583 dest.invalid_connections_ = 0;
1587 const entier ni = dest.coord_[0].size_array()-1;
1588 const entier nj = dest.coord_[1].size_array()-1;
1589 const entier nk = (dim==3) ? (dest.coord_[2].size_array()-1) : 1;
1590 const entier ni_src = src.coord_[0].size_array() - 1;
1591 const entier nj_src = src.coord_[1].size_array() - 1;
1592 - for (int k = 0; k < nk; k++) {
1593 - const int k_src = k / 2;
1594 - for (int j = 0; j < nj; j++) {
1595 - const int j_src = j / 2;
1596 - const int idx_source = (k_src * nj_src + j_src) * ni_src;
1597 - for (int i = 0; i < ni; i++) {
1598 - const int idx = idx_source + i / 2;
1599 + for (long k = 0; k < nk; k++) {
1600 + const long k_src = k / 2;
1601 + for (long j = 0; j < nj; j++) {
1602 + const long j_src = j / 2;
1603 + const long idx_source = (k_src * nj_src + j_src) * ni_src;
1604 + for (long i = 0; i < ni; i++) {
1605 + const long idx = idx_source + i / 2;
1606 if (src.invalid_connections_[idx])
1607 dest.invalid_connections_.setbit(index);
1610 dest.localisation_ = LataField_base::ELEM;
1611 dest.nature_ = LataDBField::VECTOR;
1612 const entier dim = src_domain.dimension();
1616 // Loop on destination elements
1617 const entier ni = dest_domain.coord_[0].size_array()-1;
1618 @@ -184,15 +184,15 @@
1619 dest.data_.resize(ni*nj*nk, dim);
1620 const entier ni_src = src_domain.coord_[0].size_array();
1621 const entier nj_ni_src = src_domain.coord_[1].size_array() * ni_src;
1622 - for (int k = 0; k < nk; k++) {
1623 - const int k2 = k/2;
1624 - const int k3 = (k+1)/2;
1625 - for (int j = 0; j < nj; j++) {
1626 - const int j2 = j/2;
1627 - const int j3 = (j+1)/2;
1628 - for (int i = 0; i < ni; i++) {
1629 - const int i2 = i/2;
1630 - const int i3 = (i+1)/2;
1631 + for (long k = 0; k < nk; k++) {
1632 + const long k2 = k/2;
1633 + const long k3 = (k+1)/2;
1634 + for (long j = 0; j < nj; j++) {
1635 + const long j2 = j/2;
1636 + const long j3 = (j+1)/2;
1637 + for (long i = 0; i < ni; i++) {
1638 + const long i2 = i/2;
1639 + const long i3 = (i+1)/2;
1640 dest.data_(index, 0) = src.data_(IJK(i3,j2,k2), 0);
1641 dest.data_(index, 1) = src.data_(IJK(i2,j3,k2), 1);
1643 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorFacesMesh.C ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorFacesMesh.C
1644 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorFacesMesh.C 2020-03-23 22:18:49.000000000 +0100
1645 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorFacesMesh.C 2020-12-22 12:06:26.197148403 +0100
1647 Journal() << "Error in OperatorFacesMesh::build_geometry: source domain has no faces data" << endl;
1650 - // const int max_nb_som_face = 3; // for tetrahedra
1651 + // const long max_nb_som_face = 3; // for tetrahedra
1652 if (src.elt_type_ != Domain::triangle && src.elt_type_ != Domain::polygone && src.elt_type_ != Domain::tetra && src.elt_type_ != Domain::polyedre) {
1653 Journal() << "Error in OperatorFacesMesh::build_geometry: cannot operate on unstructured mesh with this element type" << endl;
1655 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorRegularize.C ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorRegularize.C
1656 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/OperatorRegularize.C 2020-03-23 22:18:49.000000000 +0100
1657 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/OperatorRegularize.C 2020-12-22 12:06:26.198148401 +0100
1660 #define verb_level 4
1662 -template<class T, class Tab> int search_in_ordered_vect(T x, const Tab & v, const T epsilon) {
1663 +template<class T, class Tab> long search_in_ordered_vect(T x, const Tab & v, const T epsilon) {
1664 if (!v.size_array())
1668 - int i2 = (int)v.size_array()-1;
1671 + long i2 = (long)v.size_array()-1;
1674 if (epsilon+ v[i] < x)
1676 template<class T, class Tab>
1677 static void retirer_doublons(Tab & tab, const T epsilon)
1681 - const int n = tab.size_array();
1684 + const long n = tab.size_array();
1685 T last_tab_i = -1e40;
1686 for (j = 0; j < n; j++) {
1688 @@ -124,18 +124,18 @@
1694 op.renum_nodes_.resize_array(nsom);
1695 - int nb_som_ijk = 1;
1696 + long nb_som_ijk = 1;
1697 for (i = 0; i < dim; i++)
1698 nb_som_ijk *= nb_som_dir[i];
1700 ijk_indexes.resize(nsom, dim);
1701 for (i = 0; i < nsom; i++) {
1702 entier ijk_index = 0;
1703 - for (int j = dim-1; j >= 0; j--) {
1704 + for (long j = dim-1; j >= 0; j--) {
1705 const double x = src.nodes_(i,j);
1706 - int index = search_in_ordered_vect(x, dest.coord_[j],op.tolerance_);
1707 + long index = search_in_ordered_vect(x, dest.coord_[j],op.tolerance_);
1709 Journal() << "Error: coordinate (" << i << "," << j << ") = " << x << " not found in regularize" << endl
1710 << "Try reducing regularize tolerance value (option regularize=epsilon)" << endl;
1711 @@ -148,26 +148,26 @@
1713 op.renum_nodes_[i] = ijk_index;
1715 - const int max_index = max_array(nb_som_dir);
1716 - int nb_elems_ijk = 1;
1717 + const long max_index = max_array(nb_som_dir);
1718 + long nb_elems_ijk = 1;
1719 for (i = 0; i < dim; i++)
1720 nb_elems_ijk *= nb_som_dir[i] - 1;
1721 dest.invalid_connections_.resize_array(nb_elems_ijk);
1722 dest.invalid_connections_ = 1; // Everything invalid by default
1723 - const int nelem = src.elements_.dimension(0);
1724 - const int nb_som_elem = src.elements_.dimension(1);
1725 + const long nelem = src.elements_.dimension(0);
1726 + const long nb_som_elem = src.elements_.dimension(1);
1727 op.renum_elements_.resize_array(nelem);
1728 // Pour chaque element, indice dans le maillage ijk du plus sommet le plus proche de l'origine
1729 // (pour les faces...)
1730 ArrOfInt idx_elem_som;
1731 idx_elem_som.resize_array(nelem);
1733 + long min_index[3];
1734 for (i = 0; i < nelem; i++) {
1735 min_index[0] = min_index[1] = min_index[2] = max_index;
1736 - for (int j = 0; j < nb_som_elem; j++) {
1737 - int node = src.elements_(i,j);
1738 - for (int k = 0; k < loop_max(dim, 3); k++) {
1739 - int idx = ijk_indexes(node, k);
1740 + for (long j = 0; j < nb_som_elem; j++) {
1741 + long node = src.elements_(i,j);
1742 + for (long k = 0; k < loop_max(dim, 3); k++) {
1743 + long idx = ijk_indexes(node, k);
1744 min_index[k] = (idx < min_index[k]) ? idx : min_index[k];
1747 @@ -191,10 +191,10 @@
1750 if (src.faces_ok()) {
1751 - const int nfaces = src.faces_.dimension(0);
1752 + const long nfaces = src.faces_.dimension(0);
1753 op.renum_faces_.resize_array(nfaces);
1754 op.renum_faces_ = -1;
1755 - const int nb_elem_face = src.elem_faces_.dimension(1);
1756 + const long nb_elem_face = src.elem_faces_.dimension(1);
1757 ArrOfInt delta_dir(dim);
1759 for (i = 1; i < dim; i++)
1760 diff -Nur ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/UserFields.C ParaView/Utilities/VisItBridge/databases/readers/Lata/UserFields.C
1761 --- ParaView.orig/Utilities/VisItBridge/databases/readers/Lata/UserFields.C 2020-03-23 22:18:49.000000000 +0100
1762 +++ ParaView/Utilities/VisItBridge/databases/readers/Lata/UserFields.C 2020-12-22 12:06:26.198148401 +0100
1764 const IntTab & les_elem = dom.elements_;
1765 const entier n = les_elem.dimension(0);
1766 const entier m = les_elem.dimension(1);
1769 for ( i = 0; i < n; i++) {
1770 for (j = 0; j < m; j++) {
1771 entier som = les_elem(i,j);
1772 @@ -459,17 +459,17 @@
1773 Cerr<<" cas nn prevu"<<endl;
1776 - int nb_face=coords.dimension(0);
1777 + long nb_face=coords.dimension(0);
1778 Vecteur3 normals[4];
1779 Vecteur3 edge[2],opp;
1781 - for (int n=0;n<nb_face;n++)
1782 + for (long n=0;n<nb_face;n++)
1789 - for (int s=0;s<nb_face;s++)
1791 + for (long s=0;s<nb_face;s++)
1794 if ((s!=n) && (s!=prem))
1797 // on a les 4 normals orientes vers l'interieur
1798 double max_pscal=-100;
1799 - for (int n1=0;n1<nb_face;n1++)
1800 - for (int n2=n1+1;n2<nb_face;n2++)
1801 + for (long n1=0;n1<nb_face;n1++)
1802 + for (long n2=n1+1;n2<nb_face;n2++)
1804 double pscal=Vecteur3::produit_scalaire(normals[n1],normals[n2]);
1806 @@ -539,11 +539,11 @@
1807 resu.data_.resize(n, nbcompo);
1809 const FloatTab& nodes_=dom.nodes_;
1810 - int nb_som_elem=les_elem.dimension(1);
1811 + long nb_som_elem=les_elem.dimension(1);
1812 DoubleTab coords(nb_som_elem,3);
1813 - for ( int i = 0; i < n; i++) {
1814 - for (int s=0;s<nb_som_elem;s++)
1815 - for (int d=0;d<nodes_.dimension(1);d++)
1816 + for ( long i = 0; i < n; i++) {
1817 + for (long s=0;s<nb_som_elem;s++)
1818 + for (long d=0;d<nodes_.dimension(1);d++)
1819 coords(s,d)=nodes_(les_elem(i,s),d);
1820 resu.data_(i, 0) = largest_angle_2(coords);
1822 @@ -587,16 +587,16 @@
1824 ArrOfFloat v1( nbcompo),v2(nbcompo);
1825 ArrOfDouble nor(nbcompo);
1826 - for ( int i = 0; i < n; i++) {
1827 + for ( long i = 0; i < n; i++) {
1828 // calcul de la normale
1829 entier som0 = les_elem(i,0);
1830 entier som1 = les_elem(i,1);
1831 - for (int j=0;j<nbcompo;j++)
1832 + for (long j=0;j<nbcompo;j++)
1833 v1[j]=nodes_(som1,j)-nodes_(som0,j);
1836 entier som2 = les_elem(i,2);
1837 - for (int j=0;j<nbcompo;j++)
1838 + for (long j=0;j<nbcompo;j++)
1839 v2[j]=nodes_(som2,j)-nodes_(som0,j);
1841 nor[0]=v1[1]*v2[2]-v1[2]*v2[1];
1846 - for (int k = 0; k < nbcompo; k++) {
1847 + for (long k = 0; k < nbcompo; k++) {
1848 resu.data_(i, k) = nor[k];
1851 @@ -756,11 +756,11 @@
1853 const entier nb_geometries = geoms.size();
1855 - for (int i = 0; i < nb_geometries; i++) {
1856 + for (long i = 0; i < nb_geometries; i++) {
1857 const LataGeometryMetaData data = filter.get_geometry_metadata(geoms[i]);
1859 // Si on a des faces, proposer la normale aux faces
1860 - int topo_dim=data.dimension_;
1861 + long topo_dim=data.dimension_;
1863 switch(data.element_type_) {
1864 case Domain::point: topo_dim = 0; break;
1866 // (nb_fields_debut est le nombre de champs existant avant qu'on
1867 // commence a en ajouter dans le tableau fields_data)
1869 - for (int i_in = 0; i_in < nb_fields_debut; i_in++)
1870 + for (long i_in = 0; i_in < nb_fields_debut; i_in++)
1872 // On cherche si le champ de temperature aux elements existe
1873 // sur une geometrie IJK (Motcle permet d'ignorer majuscule/minuscule)
1875 float volume() const { return dx_ * dy_ * dz_; }
1877 void init(LataFilter & lata, const Domain_Id & id, entier demi_pas);
1878 - FloatTab calculer_somme_dir(const FloatTab & src, const int dir) const;
1879 - FloatTab annu_bord(const FloatTab & input, int epaisseur) const;
1880 - int ijk_index(int i, int j, int k) const {
1881 + FloatTab calculer_somme_dir(const FloatTab & src, const long dir) const;
1882 + FloatTab annu_bord(const FloatTab & input, long epaisseur) const;
1883 + long ijk_index(long i, long j, long k) const {
1887 @@ -924,10 +924,10 @@
1888 ArrOfBit invalid_connections_;
1891 - int pbDim_; // dimension
1895 + long pbDim_; // dimension
1902 @@ -967,19 +967,19 @@
1903 lata.release_geometry(dom);
1906 -FloatTab FiltreSpatial::calculer_somme_dir(const FloatTab & src, const int dir) const
1907 +FloatTab FiltreSpatial::calculer_somme_dir(const FloatTab & src, const long dir) const
1909 - const int n = src.dimension(0);
1910 - const int nb_compo = src.dimension(1);
1911 + const long n = src.dimension(0);
1912 + const long nb_compo = src.dimension(1);
1914 tmp.resize(n, nb_compo);
1916 - int index_resu = 0;
1917 - for (int k = 0; k < nz_; k++) {
1918 - for (int j = 0; j < ny_; j++) {
1919 - for (int i = 0; i < nx_; i++) {
1920 - for (int count = -demi_pas_; count <= demi_pas_; count++) {
1922 + long index_resu = 0;
1923 + for (long k = 0; k < nz_; k++) {
1924 + for (long j = 0; j < ny_; j++) {
1925 + for (long i = 0; i < nx_; i++) {
1926 + for (long count = -demi_pas_; count <= demi_pas_; count++) {
1929 case 0: index = ijk_index(i+count, j, k); break;
1930 case 1: index = ijk_index(i, j+count, k); break;
1932 // element invalide !
1935 - for (int compo = 0; compo < nb_compo; compo++)
1936 + for (long compo = 0; compo < nb_compo; compo++)
1937 tmp(index_resu, compo) += src(index, compo);