Sprout from master 2005-10-19 14:12:09 UTC mzn <mzn@opencascade.com> 'Movement of examples to CVS EXAMPLES SAMPLES_SRC.'
Cherrypick from IMPORT 2003-07-10 14:48:40 UTC nri <nri@opencascade.com> 'sources v1.2':
resources/Data.png
resources/Infos.png
resources/ModuleMed.png
resources/Structure.png
resources/config
src/MEDMEM/DataTest/Data/maill.0.med
src/MEDMEM/DataTest/Data/mesh.med
src/MEDMEM/DataTest/Data/pointe.med
src/MEDMEM/DataTest/Data/zzzz121b.med
src/MEDMEM/DataTest/Maillages.txt
src/MEDMEM/DataTest/README
src/MEDMEM/DataTest/Ref/RtestUCellModel
src/MEDMEM/DataTest/Ref/RtestUGeoNameMeshEntities
src/MEDMEM/DataTest/constituedump.sh
src/MEDMEM/DataTest/testreadCoordinate.sh
src/MEDMEM/DataTest/testreadEntete.sh
src/MEDMEM/DataTest/tous.sh
Delete:
INSTALL
bin/VERSION
doc/MEDMEM/FIELDcreate.cxx
doc/MEDMEM/FIELDgeneral.cxx
doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx
doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx
doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx
doc/MEDMEM/MEDMEM_MedAddingAnExistingObject.cxx
doc/MEDMEM/MESHINGexample.cxx
doc/MEDMEM/MESHconnectivities.cxx
doc/MEDMEM/MESHcoordinates.cxx
doc/MEDMEM/MESHgeneral.cxx
doc/salome/MED_index.html
idl/Compo1Py.idl
idl/MED.idl
idl/MED_Gen.idl
resources/MEDCatalog.xml
src/INTERPOLATION/MEDMEM_Interpolation.hxx
src/INTERPOLATION/MEDMEM_InterpolationHighLevelObjects.hxx
src/INTERPOLATION/MEDMEM_InterpolationTools.hxx
src/INTERPOLATION/MEDMEM_Mapping.hxx
src/INTERPOLATION/MEDMEM_MappingTools.hxx
src/INTERPOLATION/MEDMEM_WrapperCells.hxx
src/INTERPOLATION/MEDMEM_WrapperConnectivity.hxx
src/INTERPOLATION/MEDMEM_WrapperField.hxx
src/INTERPOLATION/MEDMEM_WrapperMesh.hxx
src/INTERPOLATION/MEDMEM_WrapperNodes.hxx
src/INTERPOLATION/MEDMEM_dTree.hxx
src/INTERPOLATION/MEDMEM_dTreeSommet.hxx
src/INTERPOLATION/UseCaseInterpolationts.cxx
src/INTERPOLATION/UseCaseInterpolationwots.cxx
src/INTERPOLATION/UseCaseMapping.cxx
src/INTERPOLATION/UseCaseWrapper_Maillage.cxx
src/INTERPOLATION/UseCasedTree.cxx
src/INTERPOLATION/test_MEDMEM_Interpolation.cxx
src/INTERPOLATION/test_MEDMEM_InterpolationFlipBack.cxx
src/INTERPOLATION/test_MEDMEM_InterpolationFromMesh_toMesh.cxx
src/INTERPOLATION/test_MEDMEM_InterpolationRecopieMaillage.cxx
src/INTERPOLATION/test_MEDMEM_InterpolationSansRecopieMaillage.cxx
src/INTERPOLATION/test_MEDMEM_InterpolationTimeStep.cxx
src/MED/Med_Gen_i.cxx
src/MED/Med_Gen_i.hxx
src/MEDGUI/MedGUI.cxx
src/MEDGUI/MedGUI_Selection.cxx
src/MEDGUI/MedGUI_Selection.h
src/MEDMEM/MEDMEM_Array.hxx
src/MEDMEM/MEDMEM_AsciiFieldDriver.hxx
src/MEDMEM/MEDMEM_CellModel.cxx
src/MEDMEM/MEDMEM_CellModel.hxx
src/MEDMEM/MEDMEM_Compatibility21_22.hxx
src/MEDMEM/MEDMEM_Connectivity.cxx
src/MEDMEM/MEDMEM_Connectivity.hxx
src/MEDMEM/MEDMEM_Coordinate.cxx
src/MEDMEM/MEDMEM_Coordinate.hxx
src/MEDMEM/MEDMEM_DriverFactory.cxx
src/MEDMEM/MEDMEM_DriverFactory.hxx
src/MEDMEM/MEDMEM_DriverTools.cxx
src/MEDMEM/MEDMEM_DriverTools.hxx
src/MEDMEM/MEDMEM_DriversDef.cxx
src/MEDMEM/MEDMEM_DriversDef.hxx
src/MEDMEM/MEDMEM_Exception.cxx
src/MEDMEM/MEDMEM_Exception.hxx
src/MEDMEM/MEDMEM_Family.cxx
src/MEDMEM/MEDMEM_Family.hxx
src/MEDMEM/MEDMEM_Field.cxx
src/MEDMEM/MEDMEM_Field.hxx
src/MEDMEM/MEDMEM_Formulae.hxx
src/MEDMEM/MEDMEM_GenDriver.cxx
src/MEDMEM/MEDMEM_GenDriver.hxx
src/MEDMEM/MEDMEM_GibiMeshDriver.cxx
src/MEDMEM/MEDMEM_GibiMeshDriver.hxx
src/MEDMEM/MEDMEM_Grid.cxx
src/MEDMEM/MEDMEM_Grid.hxx
src/MEDMEM/MEDMEM_Group.cxx
src/MEDMEM/MEDMEM_Group.hxx
src/MEDMEM/MEDMEM_Init.cxx
src/MEDMEM/MEDMEM_Med.cxx
src/MEDMEM/MEDMEM_Med.hxx
src/MEDMEM/MEDMEM_MedFieldDriver.hxx
src/MEDMEM/MEDMEM_MedFieldDriver21.hxx
src/MEDMEM/MEDMEM_MedFieldDriver22.hxx
src/MEDMEM/MEDMEM_MedMedDriver.cxx
src/MEDMEM/MEDMEM_MedMedDriver.hxx
src/MEDMEM/MEDMEM_MedMedDriver21.cxx
src/MEDMEM/MEDMEM_MedMedDriver21.hxx
src/MEDMEM/MEDMEM_MedMedDriver22.cxx
src/MEDMEM/MEDMEM_MedMedDriver22.hxx
src/MEDMEM/MEDMEM_MedMeshDriver.cxx
src/MEDMEM/MEDMEM_MedMeshDriver.hxx
src/MEDMEM/MEDMEM_MedMeshDriver21.cxx
src/MEDMEM/MEDMEM_MedMeshDriver21.hxx
src/MEDMEM/MEDMEM_MedMeshDriver22.cxx
src/MEDMEM/MEDMEM_MedMeshDriver22.hxx
src/MEDMEM/MEDMEM_MedVersion.cxx
src/MEDMEM/MEDMEM_MedVersion.hxx
src/MEDMEM/MEDMEM_Mesh.cxx
src/MEDMEM/MEDMEM_Mesh.hxx
src/MEDMEM/MEDMEM_Meshing.cxx
src/MEDMEM/MEDMEM_Meshing.hxx
src/MEDMEM/MEDMEM_ModulusArray.hxx
src/MEDMEM/MEDMEM_PointerOf.hxx
src/MEDMEM/MEDMEM_PolyhedronArray.cxx
src/MEDMEM/MEDMEM_PolyhedronArray.hxx
src/MEDMEM/MEDMEM_PorflowMeshDriver.cxx
src/MEDMEM/MEDMEM_PorflowMeshDriver.hxx
src/MEDMEM/MEDMEM_RCBase.hxx
src/MEDMEM/MEDMEM_STRING.hxx
src/MEDMEM/MEDMEM_SkyLineArray.cxx
src/MEDMEM/MEDMEM_SkyLineArray.hxx
src/MEDMEM/MEDMEM_Support.cxx
src/MEDMEM/MEDMEM_Support.hxx
src/MEDMEM/MEDMEM_TypeMeshDriver.cxx
src/MEDMEM/MEDMEM_TypeMeshDriver.hxx
src/MEDMEM/MEDMEM_Unit.cxx
src/MEDMEM/MEDMEM_Unit.hxx
src/MEDMEM/MEDMEM_Utilities.hxx
src/MEDMEM/MEDMEM_VtkFieldDriver.hxx
src/MEDMEM/MEDMEM_VtkMedDriver.cxx
src/MEDMEM/MEDMEM_VtkMedDriver.hxx
src/MEDMEM/MEDMEM_VtkMeshDriver.cxx
src/MEDMEM/MEDMEM_VtkMeshDriver.hxx
src/MEDMEM/MEDMEM_define.hxx
src/MEDMEM/MEDMEM_medimport_src.cxx
src/MEDMEM/MEDMEM_medimport_src.hxx
src/MEDMEM/duplicateMED.cxx
src/MEDMEM/duplicateMEDMESH.cxx
src/MEDMEM/med2_1_To_med2_2.cxx
src/MEDMEM/med2vtk.cxx
src/MEDMEM/med_test.cxx
src/MEDMEM/test_MEDMEM_Array.cxx
src/MEDMEM/test_MEDMEM_CellModel.cxx
src/MEDMEM/test_MEDMEM_Meshing.cxx
src/MEDMEM/test_MEDMEM_MeshingPoly.cxx
src/MEDMEM/test_MEDMEM_Meshing_poly.cxx
src/MEDMEM/test_MEDMEM_ModulusArray.cxx
src/MEDMEM/test_MEDMEM_PolyConnectivity.cxx
src/MEDMEM/test_MEDMEM_PolyDriverMedMeshRead.cxx
src/MEDMEM/test_MEDMEM_PolyDriverMedMeshWrite.cxx
src/MEDMEM/test_MEDMEM_PolyhedronArray.cxx
src/MEDMEM/test_MEDMEM_SkyLineArray.cxx
src/MEDMEM/test_MEDMEM_poly3D.cxx
src/MEDMEM/test_affect_medarray.cxx
src/MEDMEM/test_copie_connectivity.cxx
src/MEDMEM/test_copie_coordinate.cxx
src/MEDMEM/test_copie_family.cxx
src/MEDMEM/test_copie_fieldT.cxx
src/MEDMEM/test_copie_field_.cxx
src/MEDMEM/test_copie_group.cxx
src/MEDMEM/test_copie_medarray.cxx
src/MEDMEM/test_copie_mesh.cxx
src/MEDMEM/test_copie_support.cxx
src/MEDMEM/test_gibi_driver.cxx
src/MEDMEM/test_grid.cxx
src/MEDMEM/test_operation_fielddouble.cxx
src/MEDMEM/test_operation_fieldint.cxx
src/MEDMEM/test_porflow_driver.cxx
src/MEDMEM_I/MEDMEM_Family_i.cxx
src/MEDMEM_I/MEDMEM_Family_i.hxx
src/MEDMEM_I/MEDMEM_FieldDouble_i.cxx
src/MEDMEM_I/MEDMEM_FieldDouble_i.hxx
src/MEDMEM_I/MEDMEM_FieldInt_i.cxx
src/MEDMEM_I/MEDMEM_FieldInt_i.hxx
src/MEDMEM_I/MEDMEM_Field_i.cxx
src/MEDMEM_I/MEDMEM_Field_i.hxx
src/MEDMEM_I/MEDMEM_Group_i.cxx
src/MEDMEM_I/MEDMEM_Group_i.hxx
src/MEDMEM_I/MEDMEM_Med_i.cxx
src/MEDMEM_I/MEDMEM_Med_i.hxx
src/MEDMEM_I/MEDMEM_Mesh_i.cxx
src/MEDMEM_I/MEDMEM_Mesh_i.hxx
src/MEDMEM_I/MEDMEM_Support_i.cxx
src/MEDMEM_I/MEDMEM_Support_i.hxx
src/MEDMEM_I/MEDMEM_convert.cxx
src/MEDMEM_I/MEDMEM_convert.hxx
src/MEDMEM_SWIG/MEDMEM_SWIG_Templates.hxx
src/MEDMEM_SWIG/libMEDMEM_Swig.i
src/MEDMEM_SWIG/my_typemap.i
src/MedClient/src/CONNECTIVITYClient.cxx
src/MedClient/src/CONNECTIVITYClient.hxx
src/MedClient/src/COORDINATEClient.cxx
src/MedClient/src/COORDINATEClient.hxx
src/MedClient/src/FAMILYClient.cxx
src/MedClient/src/FAMILYClient.hxx
src/MedClient/src/FIELDClient.cxx
src/MedClient/src/FIELDClient.hxx
src/MedClient/src/FIELDDOUBLEClient.cxx
src/MedClient/src/FIELDDOUBLEClient.hxx
src/MedClient/src/FIELDINTClient.cxx
src/MedClient/src/FIELDINTClient.hxx
src/MedClient/src/GROUPClient.cxx
src/MedClient/src/GROUPClient.hxx
src/MedClient/src/MESHClient.cxx
src/MedClient/src/MESHClient.hxx
src/MedClient/src/MemorySpy.cxx
src/MedClient/src/MemorySpy.hxx
src/MedClient/src/SUPPORTClient.cxx
src/MedClient/src/SUPPORTClient.hxx
src/MedClient/src/TESTMEDCLIENT_Gen.idl
src/MedClient/src/TESTMEDCLIENT_Gen_i.cxx
src/MedClient/src/TESTMEDCLIENT_Gen_i.hxx
src/MedClient/src/UtilClient.hxx
src/MedClient/src/libMEDClient.i
src/MedClient/test/test1/Compo1Py.idl
src/MedClient/test/test2/Compo2.cxx
src/MedClient/test/test2/Compo2.hxx
src/MedClient/test/test2/libCompo2.i
src/MedCorba_Swig/batchmode_medcorba_test1.py
src/MedCorba_Swig/libMedCorba_Swig.i
+++ /dev/null
-using namespace std;
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_Field.hxx"
-
-using namespace MEDMEM;
-using namespace MED_EN ;
-
-int main (int argc, char ** argv) {
-
- const string MedFile = "pointe.med" ;
- const string MeshName = "maa1" ;
-
- /* read MESH */
- MESH * myMesh = new MESH(MED_DRIVER,MedFile,MeshName) ;
- // myMesh->read() ;
-
- // we need a support :
- SUPPORT * mySupport = new SUPPORT(myMesh,"Support on all CELLs",MED_CELL);
-
- /* create FIELD on mySupport, with 3 components */
- int NumberOfCompoennts = 3 ;
- FIELD<double> myField(mySupport,NumberOfCompoennts) ;
- const string FieldName = "fieldcelldouble" ;
- myField.setName(FieldName) ;
-
- // Components information
- string * ComponentsNames = new string[NumberOfCompoennts] ;
- ComponentsNames[0] = "Vx" ;
- ComponentsNames[1] = "Vy" ;
- ComponentsNames[2] = "Vz" ;
- myField.setComponentsNames(ComponentsNames) ;
-
- string * ComponentsDescriptions = new string[NumberOfCompoennts] ;
- ComponentsDescriptions[0] = "vitesse selon x" ;
- ComponentsDescriptions[1] = "vitesse selon y" ;
- ComponentsDescriptions[2] = "vitesse selon z" ;
- myField.setComponentsDescriptions(ComponentsDescriptions) ;
-
- string * ComponentsUnits = new string[NumberOfCompoennts] ;
- ComponentsUnits[0] = "m.s-1" ;
- ComponentsUnits[1] = "m.s-1" ;
- ComponentsUnits[2] = "m.s-1" ;
- myField.setMEDComponentsUnits(ComponentsUnits) ;
-
- // Iteration information :
- int IterationNumber = 10 ; // set value to MED_NOPDT if undefined (default)
- myField.setIterationNumber(IterationNumber) ;
-
- int OrderNumber = 1 ; // set value to MED_NONOR if undefined (default)
- myField.setOrderNumber(OrderNumber) ;
-
- double Time = 3.435678 ; // in second
- myField.setTime(Time) ;
-
- // Value :
- int NumberOfValue = mySupport->getNumberOfElements(MED_ALL_ELEMENTS);
- for(int i=1; i<=NumberOfValue; i++) // i^th element
- for (int j=1; j<=NumberOfCompoennts; j++) { // j^th component
- double myValue = (i+j) * 0.1 ;
- myField.setValueIJ(i,j,myValue);
- }
-
- // save this new field
- int id = myField.addDriver(MED_DRIVER) ;
-
- return 0 ;
-}
+++ /dev/null
-using namespace std;
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_Field.hxx"
-
-using namespace MEDMEM;
-using namespace MED_EN ;
-
-int main (int argc, char ** argv) {
-
- const string MedFile = "pointe.med" ;
- const string MeshName = "maa1" ;
- const string FieldName = "fieldcelldoublevector" ;
-
- /* read MESH */
- MESH * myMesh = new MESH(MED_DRIVER,MedFile,MeshName) ;
- // myMesh->read() ;
-
- /* read FIELD */
- // we need a support :
- SUPPORT * mySupport = new SUPPORT(myMesh,"Support on all Cells",MED_CELL);
- FIELD<double> myField(mySupport,MED_DRIVER,MedFile,FieldName) ;
- // myField.read() ;
-
- /* what in Field ? */
- // How many components
- int NumberOfCompoennts = myField.getNumberOfComponents() ;
-
- const string * ComponentsNames = myField.getComponentsNames();
- const string * ComponentsDescriptions = myField.getComponentsDescriptions();
- const string * ComponentsUnits = myField.getMEDComponentsUnits();
-
- for(int i=0;i<NumberOfCompoennts; i++) {
- cout << "Component " << i << " :" <<endl ;
- cout << " - name : " << ComponentsNames[i] << endl ;
- cout << " - description : " << ComponentsDescriptions[i] << endl ;
- cout << " - unit : " << ComponentsUnits[i] << endl ;
- }
-
- // Which iteration :
- int IterationNumber = myField.getIterationNumber() ; // negative mean undefined
- int OrderNumber = myField.getOrderNumber() ;
- // internal iteration at this time iteration, negative mean undefined
- double Time = myField.getTime() ;
-
- cout << "Iteration " << IterationNumber << " at time " << Time <<
- " (and order number " << OrderNumber << ")" << endl ;
-
- // How many Value :
- int NumberOfValue = mySupport->getNumberOfElements(MED_ALL_ELEMENTS);
- // Value
- const double * Value = myField.getValue(MED_FULL_INTERLACE);
- for(int i=0; i<NumberOfValue; i++) {
- for(int j=0; j<NumberOfCompoennts; j++)
- cout << Value[i*NumberOfCompoennts+j] << " " ;
- cout << endl ;
- }
-
- delete mySupport;
- delete myMesh;
-
- return 0 ;
-}
+++ /dev/null
-#include "MEDMEM_Exception.hxx"
-#include "MEDMEM_define.hxx"
-
-#include "MEDMEM_Field.hxx"
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_Med.hxx"
-
-using namespace MEDMEM ;
-using namespace MED_EN ;
-
-main () {
-
- const char * fileName = "pointe.med";
- const char * fieldName = "fieldcelldouble";
- const char * meshName = "maa1";
-
- try {
-
- // Test creation of drivers at object Creation time
-
- //This test failed due to inadequate Support implementation
- // FIELD<double> myField (MED_DRIVER,fileName,fieldName);
- MESH myMesh (MED_DRIVER,fileName,meshName);
- MED myMed (MED_DRIVER,fileName);
-
- // Test removal of drivers
- //myField.rmDriver();
- myMesh.rmDriver ();
- myMed.rmDriver ();
-
- } catch (MEDEXCEPTION& ex){
- MESSAGE(ex.what()) ;
- }
-}
+++ /dev/null
-#include "MEDMEM_Exception.hxx"
-#include "MEDMEM_define.hxx"
-
-#include "MEDMEM_Field.hxx"
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_Med.hxx"
-#include "MEDMEM_MedMedDriver.hxx"
-#include "MEDMEM_MedMeshDriver.hxx"
-
-using namespace MEDMEM ;
-using namespace MED_EN ;
-
-main () {
-
- const char * fileName = "pointe.med";
- const char * fileName2 = "Field&MeshGeneratedPointe.med";
- const char * fileName3 = "MedGeneratedPointe.med";
- const char * fieldName = "fieldcelldouble";
- const char * meshName = "maa1";
-
- try {
- // Test creation of drivers from the standard driver method of an object
- {
- FIELD<double> * myField = new FIELD<double>();
- MED_FIELD_RDONLY_DRIVER<double> myRdOnlyDriver(fileName,myField);
- myRdOnlyDriver.setFieldName(fieldName);
- myRdOnlyDriver.open();
- //This test failed due to inadequate Support implementation
- // myRdOnlyDriver.read();
- // try { myRdOnlyDriver.write(); } catch (MEDEXCEPTION& ex)
- // { MESSAGE(ex.what()); }
- MED_FIELD_WRONLY_DRIVER<double> myWrOnlyDriver(fileName2,myField);
- myWrOnlyDriver.open();
- //This test failed due to inadequate Support implementation
- // myWrOnlyDriver.write();
- // try myWrOnlyDriver.read(); catch (MEDEXCEPTION& ex)
- // { MESSAGE(ex.what()); }
- myRdOnlyDriver.close();
- myWrOnlyDriver.close();
- delete myField;
- }
-
- {
- MESH * myMesh = new MESH();
- MED_MESH_RDONLY_DRIVER myRdOnlyDriver(fileName,myMesh);
- myRdOnlyDriver.setMeshName(meshName);
- myRdOnlyDriver.open();
- myRdOnlyDriver.read();
- myRdOnlyDriver.close();
- // try { myRdOnlyDriver.write(); } catch (MEDEXCEPTION& ex)
- // { MESSAGE(ex.what()); }
- MED_MESH_WRONLY_DRIVER myWrOnlyDriver(fileName2,myMesh);
- myWrOnlyDriver.setMeshName(meshName);
- myWrOnlyDriver.open();
- myWrOnlyDriver.write();
- // try myWrOnlyDriver.read(); catch (MEDEXCEPTION& ex)
- // { MESSAGE(ex.what()); }
- // myRdOnlyDriver.close();
- //While we use H5close() in the MESH/FIELD drivers, the next
- //line will fail, because all files are previously closed !
- myWrOnlyDriver.close();
- delete myMesh;
- }
-
- {
- MED * myMed = new MED();
- MED_MED_RDONLY_DRIVER myRdOnlyDriver(fileName,myMed);
- myRdOnlyDriver.open();
- myRdOnlyDriver.readFileStruct();
- myRdOnlyDriver.close();
- myMed->updateSupport(); // DOIT ETRE SUPPRIMEE
- // myRdOnlyDriver.read();
- // try { myRdOnlyDriver.write(); } catch (MEDEXCEPTION& ex)
- // { MESSAGE(ex.what()); }
- //MED_MED_WRONLY_DRIVER myWrOnlyDriver(fileName3,myMed);
- //myWrOnlyDriver.open();
- //myWrOnlyDriver.write(); // Not implemented yet.
- //myWrOnlyDriver.close();
- delete myMed;
- }
-
- } catch (MEDEXCEPTION& ex){
- cout << "MAIN BLOCK EXCEPTION" << endl;
- MESSAGE(ex.what()) ;
- }
-}
+++ /dev/null
-#include "MEDMEM_Exception.hxx"
-#include "MEDMEM_define.hxx"
-
-#include "MEDMEM_Field.hxx"
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_Med.hxx"
-
-using namespace MEDMEM ;
-using namespace MED_EN ;
-
-main () {
-
- const char * fileName = "pointe.med";
- const char * fileName2 = "fieldCellDoubleOfpointe.med";
- const char * fieldName = "fieldcelldouble";
- const char * meshName = "maa1";
-
- try {
- // Test creation of drivers from the standard driver method of an object
- FIELD<double> * myField = new FIELD<double>();
- int myDriver1 = myField->addDriver(MED_DRIVER, fileName, fieldName);
- //myField->read();
- //This test failed due to inadequate Support implementation
- myField->rmDriver(); // TESTER LA VALIDITE DE myDriver2 !!!!
-
- int myDriver2 = myField->addDriver(MED_DRIVER, fileName2, fieldName);
- //myField->write(myDriver2);
- //This test failed due to inadequate Support implementation
- myField->rmDriver(myDriver2);
-
- MESH * myMesh = new MESH();
- int myDriver3 = myMesh->addDriver(MED_DRIVER, fileName, meshName);
- myMesh->read();
- myMesh->rmDriver();
-
- MED * myMed = new MED();
- int myDriver4 = myMed->addDriver(MED_DRIVER, fileName);
- myMed->readFileStruct();
- myMed->rmDriver();
-
- delete myField;
- delete myMesh;
- delete myMed;
-
- } catch (MEDEXCEPTION& ex){
- MESSAGE(ex.what()) ;
- }
-}
+++ /dev/null
-#include "MEDMEM_Exception.hxx"
-#include "MEDMEM_define.hxx"
-
-#include "MEDMEM_Field.hxx"
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_Med.hxx"
-
-main () {
-
- const char * fileName = "pointe.med";
- const char * fileName2 = "Field&MeshGeneratedPointe.med";
- const char * fileName3 = "MedGeneratedPointe.med";
- const char * fieldName1 = "fieldcelldouble";
- const char * fieldName2 = "fieldcelldoublebis";
- const char * meshName1 = "maa1";
- const char * meshName2 = "maa1bis";
-
- try {
-
- // FAIRE LE TEST AVEC LES CHAMPS AUSSI !.
-
- MESH myMesh(MED_DRIVER,fileName,meshName1);
- myMesh.setName(meshName2);
- myMesh.rmDriver();
-
- MED myMed(MED_DRIVER,fileName);
- myMed.read();
- myMed.addMesh(&myMesh);
- int myMedDriver = myMed.addDriver(MED_DRIVER,fileName3);
- myMed.write(myMedDriver);
-
- // FAIRE LE TEST AVEC LES CHAMPS AUSSI !.
-
- } catch (MEDEXCEPTION& ex){
- MESSAGE(ex.what()) ;
- }
-}
+++ /dev/null
-#include "MEDMEM_Meshing.hxx"
-#include "MEDMEM_Group.hxx"
-
-using namespace MEDMEM ;
-using namespace MED_EN ;
-
-using namespace std;
-
-int main (int argc, char ** argv) {
-
- // filename to save the generated MESH
- string filename = "meshing.med" ;
-
- MESHING myMeshing ;
- myMeshing.setName("meshing") ;
-
- // define coordinates
-
- int SpaceDimension = 3 ;
- int NumberOfNodes = 19 ;
- double Coordinates[57] = {
- 0.0, 0.0, 0.0,
- 0.0, 0.0, 1.0,
- 2.0, 0.0, 1.0,
- 0.0, 2.0, 1.0,
- -2.0, 0.0, 1.0,
- 0.0, -2.0, 1.0,
- 1.0, 1.0, 2.0,
- -1.0, 1.0, 2.0,
- -1.0, -1.0, 2.0,
- 1.0, -1.0, 2.0,
- 1.0, 1.0, 3.0,
- -1.0, 1.0, 3.0,
- -1.0, -1.0, 3.0,
- 1.0, -1.0, 3.0,
- 1.0, 1.0, 4.0,
- -1.0, 1.0, 4.0,
- -1.0, -1.0, 4.0,
- 1.0, -1.0, 4.0,
- 0.0, 0.0, 5.0
- };
-
- myMeshing.setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,"CARTESIAN",MED_FULL_INTERLACE);
-
- string Names[3] = { "X","Y","Z" } ;
- myMeshing.setCoordinatesNames(Names);
-
- string Units[3] = { "cm","cm","cm" } ;
- myMeshing.setCoordinatesUnits(Units) ;
-
- // define conectivities
-
- // cell part
-
- const int NumberOfTypes = 3 ;
- medGeometryElement Types[NumberOfTypes] = {MED_TETRA4,MED_PYRA5,MED_HEXA8} ;
- const int NumberOfElements[NumberOfTypes] = {12,2,2} ;
-
- myMeshing.setNumberOfTypes(NumberOfTypes,MED_CELL);
- myMeshing.setTypes(Types,MED_CELL);
- myMeshing.setNumberOfElements(NumberOfElements,MED_CELL);
-
- const int sizeTetra = 12*4 ;
- int ConnectivityTetra[sizeTetra]=
- {
- 1,2,3,6,
- 1,2,4,3,
- 1,2,5,4,
- 1,2,6,5,
- 2,7,4,3,
- 2,8,5,4,
- 2,9,6,5,
- 2,10,3,6,
- 2,7,3,10,
- 2,8,4,7,
- 2,9,5,8,
- 2,10,6,9
- };
-
- myMeshing.setConnectivity(ConnectivityTetra,MED_CELL,MED_TETRA4);
-
- int ConnectivityPyra[2*5]=
- {
- 7,8,9,10,2,
- 15,18,17,16,19
- };
-
- myMeshing.setConnectivity(ConnectivityPyra,MED_CELL,MED_PYRA5);
-
- int ConnectivityHexa[2*8]=
- {
- 11,12,13,14,7,8,9,10,
- 15,16,17,18,11,12,13,14
- };
-
- myMeshing.setConnectivity(ConnectivityHexa,MED_CELL,MED_HEXA8);
-
- // face part
-
- const int NumberOfFacesTypes = 2 ;
- medGeometryElement FacesTypes[NumberOfFacesTypes] = {MED_TRIA3,MED_QUAD4} ;
- const int NumberOfFacesElements[NumberOfFacesTypes] = {4,4} ;
-
- myMeshing.setNumberOfTypes(NumberOfFacesTypes,MED_FACE);
- myMeshing.setTypes(FacesTypes,MED_FACE);
- myMeshing.setNumberOfElements(NumberOfFacesElements,MED_FACE);
-
- const int sizeTria = 3*4 ;
- int ConnectivityTria[sizeTria]=
- {
- 1,4,3,
- 1,5,4,
- 1,6,5,
- 1,3,6
- };
-
- myMeshing.setConnectivity(ConnectivityTria,MED_FACE,MED_TRIA3);
-
- int ConnectivityQua[4*4]=
- {
- 7,8,9,10,
- 11,12,13,14,
- 11,7,8,12,
- 12,8,9,13
- };
-
- myMeshing.setConnectivity(ConnectivityQua,MED_FACE,MED_QUAD4);
-
- // edge part
-
- // not yet implemented : if set, results are unpredictable.
-
- // Some groups :
-
- // Node :
- {
- GROUP myGroup ;
- myGroup.setName("SomeNodes");
- myGroup.setMesh(&myMeshing);
- myGroup.setEntity(MED_NODE);
- myGroup.setNumberOfGeometricType(1);
- medGeometryElement myTypes[1] = {MED_NONE};
- myGroup.setGeometricType(myTypes);
- const int myNumberOfElements[1] = {4} ;
- myGroup.setNumberOfElements(myNumberOfElements);
- const int index[1+1] = {1,5} ;
- const int value[4]= { 1,4,5,7} ;
- myGroup.setNumber(index,value);
-
- myMeshing.addGroup(myGroup);
- }
- {
- GROUP myGroup ;
- myGroup.setName("OtherNodes");
- myGroup.setMesh(&myMeshing);
- myGroup.setEntity(MED_NODE);
- myGroup.setNumberOfGeometricType(1);
- medGeometryElement myTypes[1] = {MED_NONE};
- myGroup.setGeometricType(myTypes);
- const int myNumberOfElements[1] = {3} ;
- myGroup.setNumberOfElements(myNumberOfElements);
- const int index[1+1] = {1,4} ;
- const int value[3]= { 2,3,6} ;
- myGroup.setNumber(index,value);
-
- myMeshing.addGroup(myGroup);
- }
-
- // Cell :
- {
- GROUP myGroup ;
- myGroup.setName("SomeCells");
- myGroup.setMesh(&myMeshing);
- myGroup.setEntity(MED_CELL);
- myGroup.setNumberOfGeometricType(3);
- medGeometryElement myTypes[3] = {MED_TETRA4,MED_PYRA5,MED_HEXA8};
- myGroup.setGeometricType(myTypes);
- const int myNumberOfElements[3] = {4,1,2} ;
- myGroup.setNumberOfElements(myNumberOfElements);
- const int index[3+1] = {1,5,6,8} ;
- const int value[4+1+2]=
- {
- 2,7,8,12,
- 13,
- 15,16
- };
- myGroup.setNumber(index,value);
-
- myMeshing.addGroup(myGroup);
- }
- {
- GROUP myGroup ;
- myGroup.setName("OtherCells");
- myGroup.setMesh(&myMeshing);
- myGroup.setEntity(MED_CELL);
- myGroup.setNumberOfGeometricType(2);
- medGeometryElement myTypes[] = {MED_TETRA4,MED_PYRA5};
- myGroup.setGeometricType(myTypes);
- const int myNumberOfElements[] = {4,1} ;
- myGroup.setNumberOfElements(myNumberOfElements);
- const int index[3+1] = {1,5,6} ;
- const int value[4+1]=
- {
- 3,4,5,9,
- 14
- };
- myGroup.setNumber(index,value);
-
- myMeshing.addGroup(myGroup);
- }
-
- // Face :
- {
- GROUP myGroup ;
- myGroup.setName("SomeFaces");
- myGroup.setMesh(&myMeshing);
- myGroup.setEntity(MED_FACE);
- myGroup.setNumberOfGeometricType(2);
- medGeometryElement myTypes[2] = {MED_TRIA3,MED_QUAD4};
- myGroup.setGeometricType(myTypes);
- const int myNumberOfElements[2] = {2,3} ;
- myGroup.setNumberOfElements(myNumberOfElements);
- const int index[2+1] = {1,3,6} ;
- const int value[2+3]=
- {
- 2,4,
- 5,6,8
- } ;
- myGroup.setNumber(index,value);
-
- myMeshing.addGroup(myGroup);
- }
- {
- GROUP myGroup ;
- myGroup.setName("OtherFaces");
- myGroup.setMesh(&myMeshing);
- myGroup.setEntity(MED_FACE);
- myGroup.setNumberOfGeometricType(1);
- medGeometryElement myTypes[1] = {MED_TRIA3};
- myGroup.setGeometricType(myTypes);
- const int myNumberOfElements[1] = {2} ;
- myGroup.setNumberOfElements(myNumberOfElements);
- const int index[1+1] = {1,3} ;
- const int value[2]=
- {
- 1,3
- } ;
- myGroup.setNumber(index,value);
-
- myMeshing.addGroup(myGroup);
- }
-
- // all rigtht, we save it !
-
- int id = myMeshing.addDriver(MED_DRIVER,filename,myMeshing.getName());
- myMeshing.write(id) ;
-
-}
+++ /dev/null
-#include "MEDMEM_Mesh.hxx"
-#include "MEDMEM_CellModel.hxx"
-
-using namespace MEDMEM ;
-using namespace MED_EN ;
-
-int main (int argc, char ** argv) {
-
- const string MedFile = "pointe.med" ;
- const string MeshName = "maa1" ;
- MESH myMesh(MED_DRIVER,MedFile,MeshName) ;
- myMesh.read() ;
-
- cout << "Mesh name : " << myMesh.getName() << endl << endl ;
-
- // we get all type for cell entity :
- int NumberOfTypes = myMesh.getNumberOfTypes(MED_CELL) ;
- const CELLMODEL * Types = myMesh.getCellsTypes(MED_CELL) ;
-
- cout << "Show Connectivity (Nodal) :" << endl ;
- // this example use access with a specified medGeometryElement through
- // CELLMODEL class
- for (int i=0; i<NumberOfTypes; i++) {
- cout << "For type " << Types[i].getName() << " : " << endl ;
- medGeometryElement myType = Types[i].getType() ;
- int NumberOfElements = myMesh.getNumberOfElements(MED_CELL,myType);
- int NomberOfNodesPerCell = Types[i].getNumberOfNodes() ;
- const int * Connectivity =
- myMesh.getConnectivity(MED_FULL_INTERLACE,
- MED_NODAL,
- MED_CELL,
- myType);
- for (int j=0; j<NumberOfElements; j++){
- cout << "Element "<< j+1 <<" : " ;
- for (int k=0; k<NomberOfNodesPerCell; k++)
- cout << Connectivity[j*NomberOfNodesPerCell+k]<<" ";
- cout << endl ;
- }
- }
- cout << "Show Reverse Nodal Connectivity :" << endl ;
- // this example use global access with index array
- int NumberOfNodes = myMesh.getNumberOfNodes() ;
- const int * ReverseNodalConnectivity =
- myMesh.getReverseConnectivity(MED_NODAL) ;
- const int * ReverseNodalConnectivityIndex =
- myMesh.getReverseConnectivityIndex(MED_NODAL) ;
- for (int i=0; i<NumberOfNodes; i++) {
- cout << "Node "<<i+1<<" : " ;
- int IndexBegin = ReverseNodalConnectivityIndex[i] ;
- int IndexEnd = ReverseNodalConnectivityIndex[i+1] ;
- for (int j=IndexBegin; j<IndexEnd; j++)
- // Index value begin at 1 so use j-1
- cout << ReverseNodalConnectivity[j-1] << " " ;
- cout << endl ;
- }
-
- cout << "Show Connectivity (Descending) :" << endl ;
- // this example use global access with index array
- int NumberOfElements = myMesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS);
- const int * DescendingConnectivity =
- myMesh.getConnectivity(MED_FULL_INTERLACE,
- MED_DESCENDING,
- MED_CELL,
- MED_ALL_ELEMENTS);
- const int * DescendingConnectivityIndex =
- myMesh.getConnectivityIndex(MED_DESCENDING,MED_CELL);
- for (int i=0; i<NumberOfElements; i++) {
- cout << "Element "<<i+1<<" : " ;
- int IndexBegin = DescendingConnectivityIndex[i] ;
- int IndexEnd = DescendingConnectivityIndex[i+1] ;
- for (int j=IndexBegin; j<IndexEnd; j++)
- // Index value begin at 1 so use j-1
- cout << DescendingConnectivity[j-1] << " " ;
- cout << endl ;
- }
-
- cout << "Show Reverse Descending Connectivity :" << endl ;
- // this example use global access with Index array
- const int * ReverseDescendingConnectivity =
- myMesh.getReverseConnectivity(MED_DESCENDING) ;
- const int * ReverseDescendingConnectivityIndex =
- myMesh.getReverseConnectivityIndex(MED_DESCENDING) ;
-
- int MeshDimension = myMesh.getMeshDimension() ;
- int NumberOfConstituents = 0;
- string Constituent ;
- medEntityMesh ConstituentEntity ;
- // test if we have face (3D) or edge (2D)
- if (MeshDimension==3) {
- Constituent = "Face" ;
- ConstituentEntity = MED_FACE ;
- }
- if (MeshDimension==2) {
- Constituent = "Edge" ;
- ConstituentEntity = MED_EDGE ;
- }
-
- NumberOfConstituents =
- myMesh.getNumberOfElements(ConstituentEntity,MED_ALL_ELEMENTS);
-
- if (MeshDimension==1) {
- MESSAGE("ERROR : MeshDimension = 1 !");
- MESSAGE("We could not see Reverse Descending Connectivity.") ;
- } else {
- for (int i=0; i<NumberOfConstituents; i++) {
- cout << Constituent << " " << i+1 << " : " ;
- int IndexBegin = ReverseDescendingConnectivityIndex[i] ;
- int IndexEnd = ReverseDescendingConnectivityIndex[i+1] ;
- for (int j=IndexBegin;j<IndexEnd;j++)
- // Index value begin at 1 so use j-1
- cout << ReverseDescendingConnectivity[j-1] << " " ;
- cout << endl ;
- }
- }
- cout << "Show "<< Constituent <<" Connectivity (Nodal) :" << endl ;
- // this example use global access with index array
- const int * ConstituentConnectivity =
- myMesh.getConnectivity(MED_FULL_INTERLACE,
- MED_NODAL,
- ConstituentEntity,
- MED_ALL_ELEMENTS);
- const int * ConstituentConnectivityIndex =
- myMesh.getConnectivityIndex(MED_NODAL,ConstituentEntity);
- for (int i=0; i<NumberOfConstituents; i++) {
- cout << Constituent << " " << i+1 << " : " ;
- int IndexBegin = ConstituentConnectivityIndex[i] ;
- int IndexEnd = ConstituentConnectivityIndex[i+1] ;
- for (int j=IndexBegin; j<IndexEnd; j++)
- // Index value begin at 1 so use j-1
- cout << ConstituentConnectivity[j-1]<<" ";
- cout << endl ;
- }
-
- return 0 ;
-}
+++ /dev/null
-#include "MEDMEM_Mesh.hxx"
-
-using namespace MEDMEM ;
-using namespace MED_EN ;
-
-int main (int argc, char ** argv) {
-
- const string MedFile = "pointe.med" ;
- const string MeshName = "maa1" ;
- MESH myMesh(MED_DRIVER,MedFile,MeshName) ;
-
- cout << "Mesh name : " << myMesh.getName() << endl << endl ;
-
- int SpaceDimension = myMesh.getSpaceDimension() ;
- int NumberOfNodes = myMesh.getNumberOfNodes() ;
- cout << "Space dimension : " << SpaceDimension << endl << endl ;
- cout << "Number of nodes : " << NumberOfNodes << endl << endl ;
-
- cout << "Show Nodes Coordinates : " << endl ;
-
- // coordinates names :
- cout << "Name :" << endl ;
- const string * CoordinatesNames = myMesh.getCoordinatesNames() ;
- for(int i=0; i<SpaceDimension ; i++) {
- cout << " - " << CoordinatesNames[i] << endl ;
- }
- // coordinates unit :
- cout << "Unit :" << endl ;
- const string * CoordinatesUnits = myMesh.getCoordinatesUnits() ;
- for(int i=0; i<SpaceDimension ; i++) {
- cout << " - " << CoordinatesUnits[i] << endl ;
- }
- // coordinates value
- const double * Coordinates =
- myMesh.getCoordinates(MED_FULL_INTERLACE) ;
- for(int i=0; i<NumberOfNodes ; i++) {
- cout << "Nodes " << i+1 << " : " ;
- for (int j=0; j<SpaceDimension ; j++)
- cout << Coordinates[i*SpaceDimension+j] << " " ;
- cout << endl ;
- }
-
- return 0 ;
-}
+++ /dev/null
-using namespace std;
-#include "MEDMEM_Mesh.hxx"
-
-using namespace MEDMEM ;
-
-int main (int argc, char ** argv) {
-
- const string MedFile = "pointe.med" ;
- const string MeshName = "maa1" ;
-
- // create a MESH object by reading it on file :
- MESH myMesh(MED_DRIVER,MedFile,MeshName) ;
-
- string Name = myMesh.getName() ;
- if (Name != MeshName) {
- cout << "Error when reading mesh name : We ask for mesh #"
- << MeshName <<"# and we get mesh #"<< Name <<"#"<< endl << endl ;
- return -1;
- }
-
- cout << "Mesh name : " << Name << endl << endl ;
-
- int SpaceDimension = myMesh.getSpaceDimension() ;
- int MeshDimension = myMesh.getMeshDimension() ;
-
- cout << "Space Dimension : " << SpaceDimension << endl << endl ;
- cout << "Mesh Dimension : " << MeshDimension << endl << endl ;
-
- return 0 ;
-}
+++ /dev/null
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
-
- <meta name="GENERATOR"
- content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
- <title>Med Module Documentation</title>
-</head>
- <body bgcolor="#cccccc" text="#000000" link="#0000ee" alink="#0000ee"
- vlink="#551a8b">
-
-<div align="center">
-<center>
-<center>
- </center>
-
-<table width="96%" align="center">
- <tbody>
- <tr>
- <td><a href="http://www.opencascade.com"><img
- src="tui/MED/sources/logocorp.gif" border="0" height="46" width="122">
- </a></td>
- <td>
-
- <div align="right"><a href="http://www.opencascade.org/SALOME/"><img
- src="tui/MED/sources/application.gif" border="0" height="46"
- width="108">
- </a></div>
- </td>
- </tr>
-
- </tbody>
-</table>
-
-<div align="center">
-<center>
-<hr width="100%" size="2">
-<h1>Med MODULE Documentation</h1>
- </center>
- </div>
-
-<table width="96%">
- <tbody>
-
- </tbody>
-</table>
- </center>
-
-<div align="center">
-<p> <img src="tui/MED/sources/Application-About.png"
- alt="Application-About.png" width="30%" height="20%">
- </p>
- </div>
-
-<center>
-<table width="96%">
- <tbody>
-
- </tbody>
-</table>
- <br>
- </center>
-
-<address> </address>
- <br>
-
-<address> </address>
-
-<center></center>
-
-<center><br>
- </center>
-
-<address> </address>
-
-<center><big><a href="tui/MED/index.html">TUI Documentation</a></big></center>
-
-<address> </address>
-
-<center></center>
-
-<center><br>
- <br>
- </center>
- </div>
- <br>
- <br>
- <br>
- <br>
-</body>
-</html>