// read of new mesh in ensight file
MESH* myMesh = new MESH();
ENSIGHT_MESH_RDONLY_DRIVER myEnsightMeshDriver("/tmp/output.case", myMesh) ;
- myMesh->addDriver(ENSIGHT_DRIVER,"/tmp/output.case","myMesh",MED_EN::MED_LECT);
- myMesh->read() ;
+ myMesh->addDriver(ENSIGHT_DRIVER,"/tmp/output.case","myMesh",MED_EN::RDONLY);
+ myMesh->read();
// have to call ensight driver MED to generate output MED file from filtoo output
_newMed = new ::MED();
int id;
MESSAGE("Create MED mesh: "<<outMedFile);
- id = _newMed->addDriver(MED_DRIVER,outMedFile,MED_EN::MED_ECRI);
+ id = _newMed->addDriver(MED_DRIVER,outMedFile,MED_EN::WRONLY);
_newMed->write(id);
}
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() ;
}
}
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;
}
}
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;
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;