Salome HOME
Fix compilation errors (in accordance with latest MED changes)
[modules/filter.git] / src / FILTER / field2nodes.cxx
index 95f206f900d219d8b7c44f0bc1614356b0fed7ee..bef48f009c5ffa76b5c348c126ef7c70e5e0714b 100644 (file)
@@ -49,25 +49,25 @@ int main (int argc, char ** argv) {
   if ( argc == 3 ) {
     filenameIN  = argv[1] ;
     filenameOUT = argv[2] ;
-    cout << "-> reading all into the Med file " << filenameIN << " and writing all into the Ensight file " << filenameOUT <<  endl ;
+    cout << "-> reading all into the Med file " << filenameIN << " and writing all into the Ensight file " << filenameOUT << endl;
 
-    MED myMed(MED_DRIVER,filenameIN) ;
+    MED myMed(MED_DRIVER,filenameIN);
 
-    cout << "-> Read all meshes "  ;
-    int NumberOfMeshes = myMed.getNumberOfMeshes() ;
-    cout << "( "<<NumberOfMeshes << " ) :" << endl ;
+    cout << "-> Read all meshes ";
+    int NumberOfMeshes = myMed.getNumberOfMeshes();
+    cout << "( "<<NumberOfMeshes << " ) :" << endl;
     FIELD<double> **volume = new FIELD<double>*[NumberOfMeshes];
-    deque<string> MeshName = myMed.getMeshNames() ;
+    deque<string> MeshName = myMed.getMeshNames();
     for (int i=0; i<NumberOfMeshes; i++) {
       volume[i] = NULL;
-      myMed.getMesh(MeshName[i])->read() ;
+      myMed.getMesh(MeshName[i])->read();
       cout << "-> Mesh "<<i+1<<", named "<<MeshName[i]<<" is read !" << endl;
-      int id = myMed.getMesh(MeshName[i])->addDriver(MED_DRIVER,filenameOUT,MeshName[i],MED_EN::MED_ECRI);
+      int id = myMed.getMesh(MeshName[i])->addDriver(MED_DRIVER,filenameOUT,MeshName[i],MED_EN::WRONLY);
       myMed.getMesh(MeshName[i])->write(id);
       cout << "-> Mesh "<<i+1<<", named "<<MeshName[i]<<" is written !" << endl;
     }
 
-    myMed.updateSupport() ;
+    myMed.updateSupport();
     
     cout << "-> Read all fields " ;
     int NumberOfFields = myMed.getNumberOfFields() ;
@@ -186,7 +186,7 @@ int main (int argc, char ** argv) {
                 }
               }
               delete [] val;
-              int id = newDField->addDriver(MED_DRIVER,filenameOUT,FieldName[i],MED_EN::MED_ECRI);
+              int id = newDField->addDriver(MED_DRIVER,filenameOUT,FieldName[i],MED_EN::WRONLY);
               newDField->write(id);
               delete newSup;
               delete newDField;
@@ -260,7 +260,7 @@ int main (int argc, char ** argv) {
                 }
               }
               delete [] val;
-              int id = newIField->addDriver(MED_DRIVER,filenameOUT,FieldName[i],MED_EN::MED_ECRI);
+              int id = newIField->addDriver(MED_DRIVER,filenameOUT,FieldName[i],MED_EN::WRONLY);
               newIField->write(id);
               delete newSup;
               delete newIField;
@@ -276,7 +276,7 @@ int main (int argc, char ** argv) {
          break;
        case MED_NODE:
          cout << "*************************** CHAMP AUX NOEUDS" << endl;
-         int id = myField->addDriver(MED_DRIVER,filenameOUT,FieldName[i],MED_EN::MED_ECRI);
+         int id = myField->addDriver(MED_DRIVER,filenameOUT,FieldName[i],MED_EN::WRONLY);
          myField->write(id);
          cout << "    * Iteration "<<FieldIteration[j].dt<<" and  order number "<<FieldIteration[j].it<<" ) is written !" << endl;
          break;