From e417eb14540b5836898a72890f924ca575af3b3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 24 Jul 2015 18:30:49 +0200 Subject: [PATCH] [Huge] Introducing MEDCalc --- CMakeLists.txt | 42 +- SalomeMEDConfig.cmake.in | 34 +- doc/doxygen/doxfiles/gui.dox | 8 +- idl/CMakeLists.txt | 2 +- idl/MEDCalculator.idl | 10 +- idl/MEDDataManager.idl | 2 +- idl/MEDEventListener.idl | 6 +- idl/{MEDOPFactory.idl => MEDFactory.idl} | 14 +- idl/MEDPresentationManager.idl | 2 +- resources/MEDCatalog.xml.in | 18 +- resources/SalomeApp.xml.in | 4 +- src/CMakeLists.txt | 2 +- src/CTestTestfileInstallMEDCoupling.cmake | 2 +- src/{MEDOP => MEDCalc}/CMakeLists.txt | 0 src/{MEDOP => MEDCalc}/README.txt | 4 +- src/{MEDOP => MEDCalc}/cmp/CMakeLists.txt | 18 +- .../cmp/MEDOP.hxx => MEDCalc/cmp/MEDCALC.hxx} | 12 +- .../cmp/MEDCalculator_i.cxx | 68 +-- .../cmp/MEDCalculator_i.hxx | 24 +- .../cmp/MEDDataManager_i.cxx | 76 ++-- .../cmp/MEDDataManager_i.hxx | 80 ++-- .../cmp/MEDFactory_i.cxx} | 30 +- .../cmp/MEDFactory_i.hxx} | 41 +- .../cmp/MEDPresentationManager_i.cxx | 10 +- .../cmp/MEDPresentationManager_i.hxx | 13 +- .../cmp/test_medcalc_components.py} | 16 +- src/{MEDOP => MEDCalc}/doc/CMakeLists.txt | 0 .../doc/models/medcalc.xmi} | 10 +- .../doc/sphinx/CMakeLists.txt | 2 +- ...A_VBERGEAUD_GuideutilisateurMEDMEMOIRE.pdf | Bin ...es_maillages_pour_le_couplage_de_codes.pdf | Bin ...20091218_EDF_VCANO_H-I2C-2009-03595-FR.pdf | Bin .../20100129_MAN_seminaireEDF-CEA_all.pdf | Bin .../documents/20101027_MAN_revueEDF-CEA.pdf | Bin .../documents/20110309_XMED_scan_notes.pdf | Bin .../20110309_XMED_scan_remarques_ELORENTZ.pdf | Bin ...20110310_seminaireEDF-CEA_maquetteXMED.pdf | Bin .../_static/documents/xmed-develguide.pdf | Bin .../_static/documents/xmed-specifications.pdf | Bin .../_static/documents/xmed-userguide.pdf | Bin .../doc/sphinx/_static/medop.css | 0 ...0111115_JUS2011_manipulation_de_champs.pdf | Bin .../20111115_JUS2011_medop_exemple_1.ogv | Bin .../20111115_JUS2011_medop_exemple_3.ogv | Bin .../20111115_JUS2011_medop_exemple_4.ogv | Bin src/{MEDOP => MEDCalc}/doc/sphinx/conf.py.in | 14 +- .../sphinx/fr/images/xmed-gui-withframe.png | Bin .../doc/sphinx/fr/images/xmed-gui.png | Bin .../doc/sphinx/fr/index.rst | 10 +- .../doc/sphinx/fr/medcalc-definitions.rst} | 0 .../doc/sphinx/fr/medcalc-develguide.rst} | 44 +- .../doc/sphinx/fr/medcalc-references.rst} | 2 +- .../doc/sphinx/fr/medcalc-specifications.rst} | 26 +- .../doc/sphinx/fr/medcalc-userguide-gui.rst} | 90 ++-- .../sphinx/fr/medop-prototype-develguide.rst | 32 +- .../doc/sphinx/fr/medop-prototype-medmem.rst | 46 +- .../sphinx/fr/medop-prototype-overview.rst | 6 +- .../doc/sphinx/fr/medop-workingnotes-2010.rst | 0 .../doc/sphinx/fr/medop-workingnotes-2011.rst | 8 +- .../sphinx/fr}/medop-workingnotes-2012.rst | 4 +- .../doc/sphinx/images/champ_altitude_MAP.png | Bin .../doc/sphinx/images/convert.sh | 0 .../doc/sphinx/images/ico_datasource_add.png | Bin .../ico_datasource_changeUnderlyingMesh.png | Bin .../images/ico_datasource_expandfield.png | Bin .../doc/sphinx/images/ico_datasource_use.png | Bin .../doc/sphinx/images/ico_datasource_view.png | Bin .../doc/sphinx/images/ico_imagesource.png | Bin .../doc/sphinx/images/ico_workspace_save.png | Bin .../doc/sphinx/images/ico_xmed.png | Bin .../doc/sphinx/images/med-uml-main.png | Bin .../doc/sphinx/images/med-uml-main_60pc.png | Bin .../doc/sphinx/images/medlayers.png | Bin .../doc/sphinx/images/medlayers_70pc.png | Bin .../doc/sphinx/images/medmem-corba-layers.png | Bin .../doc/sphinx/images/medmem-layers.png | Bin .../sphinx/images/medop-gui-aliasfield.png | Bin .../images/medop-gui-aliasfield_scale.png | Bin .../doc/sphinx/images/medop-gui-result.png | Bin .../sphinx/images/medop-gui-result_scale.png | Bin .../sphinx/images/medop-gui-selectfield.png | Bin .../images/medop-gui-selectfield_scale.png | Bin .../doc/sphinx/images/medop-gui-visufield.png | Bin .../images/medop-gui-visufield_scale.png | Bin .../doc/sphinx/images/medop_exportparavis.png | Bin .../images/medop_exportparavis_result.png | Bin .../sphinx/images/medop_image2med_dialog.png | Bin .../images/medop_image2med_tomographie.png | Bin .../sphinx/images/medop_projection_inputs.png | Bin .../sphinx/images/medop_projection_result.png | Bin .../doc/sphinx/images/partition_mesh.png | Bin .../doc/sphinx/images/partition_skin.png | Bin .../doc/sphinx/images/xmed-architecture.png | Bin .../doc/sphinx/images/xmed-exploremed.png | Bin .../doc/sphinx/images/xmed-functions.png | Bin ...ed-gui-datasource-changeUnderlyingMesh.png | Bin ...datasource-changeUnderlyingMesh_wsview.png | Bin .../xmed-gui-datasource-contextmenu.png | Bin .../xmed-gui-datasource-contextmenu_60pc.png | Bin .../xmed-gui-datasource-contextmenu_70pc.png | Bin .../xmed-gui-datasource-contextmenu_80pc.png | Bin .../xmed-gui-datasource-expand-zoom.png | Bin .../xmed-gui-datasource-explore-zoom.png | Bin .../images/xmed-gui-datasource-explore.png | Bin ...med-gui-datasource-menucontextuel-zoom.png | Bin .../images/xmed-gui-datasource-selectfile.png | Bin ...ed-gui-datasource-useinworkspace-alias.png | Bin ...d-gui-datasource-useinworkspace-result.png | Bin ...-datasource-useinworkspace-result_70pc.png | Bin .../xmed-gui-datasource-useinworkspace.png | Bin ...med-gui-datasource-useinworkspace_70pc.png | Bin .../xmed-gui-datasource-visualize-result.png | Bin ...d-gui-datasource-visualize-result_50pc.png | Bin ...d-gui-datasource-visualize-result_70pc.png | Bin .../xmed-gui-datasource-visualize-zoom.png | Bin .../images/xmed-gui-datasource-visualize.png | Bin .../xmed-gui-datasource-visualize_50pc.png | Bin .../xmed-gui-datasource-visualize_70pc.png | Bin .../doc/sphinx/images/xmed-gui-start.png | Bin .../doc/sphinx/images/xmed-gui-withframe.png | Bin .../sphinx/images/xmed-gui-workspace-view.png | Bin .../doc/sphinx/images/xmed-gui-workspace.png | Bin .../doc/sphinx/images/xmed-gui.png | Bin .../doc/sphinx/images/xmed-gui_70pc.png | Bin .../doc/sphinx/images/xmed-implantation.png | Bin .../doc/sphinx/images/xmed-irm-diff.png | Bin .../doc/sphinx/images/xmed-irm-field.png | Bin .../doc/sphinx/images/xmed-irm.png | Bin .../xmed-userguide-example2-datasource.png | Bin ...xmed-userguide-example2-workspace-save.png | Bin .../xmed-userguide-example2-workspace.png | Bin .../images/xmed-visu-importtimestamps.png | Bin .../images/xmed-visu-scalarmaptimestamps.png | Bin src/{MEDOP => MEDCalc}/doc/sphinx/index.rst | 10 +- .../doc/sphinx/medcalc-definitions.rst} | 0 .../doc/sphinx/medcalc-develguide.rst} | 44 +- .../doc/sphinx/medcalc-references.rst} | 2 +- .../doc/sphinx/medcalc-specifications.rst} | 26 +- .../doc/sphinx/medcalc-userguide-api.rst} | 62 +-- .../doc/sphinx/medcalc-userguide-gui.rst} | 56 +-- .../doc/sphinx/medop-prototype-develguide.rst | 32 +- .../doc/sphinx/medop-prototype-medmem.rst | 46 +- .../doc/sphinx/medop-prototype-overview.rst | 6 +- .../doc/sphinx/medop-workingnotes-2010.rst | 0 .../doc/sphinx/medop-workingnotes-2011.rst | 8 +- .../doc/sphinx}/medop-workingnotes-2012.rst | 4 +- src/{MEDOP => MEDCalc}/exe/CMakeLists.txt | 0 .../exe/image2med/CMakeLists.txt | 0 .../exe/image2med/image2med.py | 0 src/{MEDOP => MEDCalc}/gui/CMakeLists.txt | 32 +- .../gui/DatasourceConstants.hxx | 0 .../gui/DatasourceController.cxx | 66 +-- .../gui/DatasourceController.hxx | 10 +- .../gui/MEDCALCGUI.hxx} | 14 +- .../gui/MEDCALC_msg_en.ts} | 0 .../gui/MEDCALC_msg_fr.ts} | 0 .../gui/MEDCALC_msg_ja.ts} | 0 .../gui/MEDEventListener_i.cxx | 4 +- .../gui/MEDEventListener_i.hxx | 15 +- .../gui/MEDFactoryClient.cxx} | 22 +- .../gui/MEDFactoryClient.hxx} | 20 +- .../gui/MEDModule.cxx} | 28 +- .../gui/MEDModule.hxx} | 12 +- src/{MEDOP => MEDCalc}/gui/MED_images.ts | 8 +- src/{MEDOP => MEDCalc}/gui/MED_msg_en.ts | 140 +++--- src/{MEDOP => MEDCalc}/gui/MED_msg_fr.ts | 140 +++--- src/{MEDOP => MEDCalc}/gui/MED_msg_ja.ts | 140 +++--- .../gui/WorkspaceController.cxx | 79 ++-- .../gui/WorkspaceController.hxx | 10 +- .../gui/XmedConsoleDriver.cxx | 15 +- .../gui/XmedConsoleDriver.hxx | 4 +- src/{MEDOP => MEDCalc}/gui/XmedDataModel.cxx | 26 +- src/{MEDOP => MEDCalc}/gui/XmedDataModel.hxx | 24 +- .../gui/dialogs/CMakeLists.txt | 18 +- .../gui/dialogs/DlgAlias.cxx | 0 .../gui/dialogs/DlgAlias.hxx | 12 +- .../gui/dialogs/DlgAlias.ui | 0 .../gui/dialogs/DlgChangeUnderlyingMesh.cxx | 0 .../gui/dialogs/DlgChangeUnderlyingMesh.hxx | 8 +- .../gui/dialogs/DlgChangeUnderlyingMesh.ui | 0 .../gui/dialogs/DlgImageToMed.cxx | 0 .../gui/dialogs/DlgImageToMed.hxx | 8 +- .../gui/dialogs/DlgImageToMed.ui | 0 .../gui/dialogs/DlgInterpolateField.cxx | 0 .../gui/dialogs/DlgInterpolateField.hxx | 4 +- .../gui/dialogs/DlgInterpolateField.ui | 0 .../gui/dialogs/DlgUseInWorkspace.cxx | 0 .../gui/dialogs/DlgUseInWorkspace.hxx | 0 .../gui/dialogs/DlgUseInWorkspace.ui | 0 .../gui/dialogs/GenericDialog.cxx | 0 .../gui/dialogs/GenericDialog.hxx | 0 .../gui/dialogs/GenericDialog.ui | 0 .../gui/dialogs/MEDCALCGUIdialogs.hxx} | 14 +- .../gui/dialogs/dlgTester.cxx | 0 src/{MEDOP => MEDCalc}/gui/factory.cxx | 16 +- src/{MEDOP => MEDCalc}/gui/test/README.txt | 0 src/{MEDOP => MEDCalc}/gui/test/guiTester.pro | 0 src/{MEDOP => MEDCalc}/res/CMakeLists.txt | 4 +- .../res/MEDOP.png => MEDCalc/res/MEDCalc.png} | Bin .../res/MEDCalc_small.png} | Bin src/{MEDOP => MEDCalc}/res/datasource.png | Bin src/{MEDOP => MEDCalc}/res/datasource_add.png | Bin .../res/datasource_changeUnderlyingMesh.png | Bin .../res/datasource_expandfield.png | Bin .../res/datasource_field.png | Bin .../res/datasource_interpolateField.png | Bin .../res/datasource_mesh.png | Bin src/{MEDOP => MEDCalc}/res/datasource_use.png | Bin .../res/datasource_view.png | Bin src/{MEDOP => MEDCalc}/res/fileimport-32.png | Bin src/{MEDOP => MEDCalc}/res/folder.png | Bin src/{MEDOP => MEDCalc}/res/image_add.png | Bin .../res/testfiles/CMakeLists.txt | 4 +- src/MEDCalc/res/testfiles/README.txt | 1 + .../res/testfiles/bigmesh.med | Bin .../res/testfiles/champ_altitude_MAP.pgm | 0 .../res/testfiles/enceinte-axis-E500000.med | Bin .../res/testfiles/enceinte-axis-E600000.med | Bin .../res/testfiles/entaille.med | Bin .../res/testfiles/fieldlena.med | Bin .../res/testfiles/irm_test1.png | Bin .../res/testfiles/irm_test2.png | Bin .../res/testfiles/padderoutput.med | Bin .../res/testfiles/parametric_01.med | Bin .../res/testfiles/parametric_02.med | Bin .../res/testfiles/smallmesh_constfield.med | Bin .../res/testfiles/smallmesh_varfield.med | Bin .../res/testfiles/smooth_surface.med | Bin .../testfiles/smooth_surface_and_field.med | Bin .../res/testfiles/testfield.med | Bin .../res/testfiles/timeseries.med | Bin .../res/workspace_clean.png | Bin src/{MEDOP => MEDCalc}/res/workspace_save.png | Bin .../tui}/CMakeLists.txt | 7 +- .../presentation => MEDCalc/tui}/__init__.py | 33 +- src/MEDCalc/tui/fieldproxy.py | 424 +++++++++++++++++ src/MEDCalc/tui/medconsole.py | 161 +++++++ src/MEDCalc/tui/medcorba.py | 49 ++ src/MEDCalc/tui/medevents.py | 114 +++++ .../presentation => MEDCalc/tui}/medimages.py | 2 +- .../tui/medio.py} | 28 +- .../tui/medpresentation.py} | 49 +- src/{MEDOP => MEDCalc}/tut/README.txt | 0 .../tut/addfields/README.txt | 0 .../tut/addfields/addition.py | 0 .../tut/addfields/operations.py | 0 .../tut/addfields/timeseries.med | Bin .../tut/medcoupling/README.txt | 0 src/{MEDOP => MEDCalc}/tut/medcoupling/env.sh | 0 .../tut/medcoupling/images/avatar.png | Bin .../tut/medcoupling/images/irm.png | Bin .../tut/medcoupling/images/lena.png | Bin .../tut/medcoupling/images/tests.pgm | 0 .../tut/medcoupling/partition.py | 0 .../tut/medcoupling/pyfunctions/__init__.py | 0 .../tut/medcoupling/pyfunctions/functions.py | 0 .../tut/medcoupling/pyfunctions/lagrange.py | 0 .../tut/medcoupling/pyfunctions/plotter.py | 0 .../tut/medcoupling/test-paravis.py | 0 .../tut/medcoupling/testmed_gendata.py | 22 +- .../tut/medcoupling/testmed_lena.py | 0 .../tut/medcoupling/testmed_simple.py | 0 .../tut/medcoupling/testpil.py | 0 src/{MEDOP => MEDCalc}/tut/medloader/Makefile | 0 src/{MEDOP => MEDCalc}/tut/medloader/cmesh.py | 0 .../tut/medloader/explore.py | 0 .../tut/medloader/madnex_field.med | Bin .../tut/medloader/madnex_grid.med | Bin .../tut/medloader/manage.py | 0 .../tut/medloader/testamel.py | 0 .../tut/medloader/timeseries.med | Bin .../tut/medloader/tutorial.py | 0 .../additionaldata/MergeFields.jpg | Bin .../additionaldata/MergeFields.png | Bin .../mergefields/additionaldata/splitdemo.vtu | 0 .../additionaldata/splitdemo_split.vtu | 0 .../tut/mergefields/simpledemo/README.txt | 0 .../tut/mergefields/simpledemo/field1.med | Bin .../tut/mergefields/simpledemo/field2.med | Bin .../tut/mergefields/simpledemo/field3.med | Bin .../tut/mergefields/simpledemo/field4.med | Bin .../tut/mergefields/simpledemo/simpledemo.py | 0 .../mergefields/splitdemo/DomainMesh_1.med | Bin .../mergefields/splitdemo/DomainMesh_2.med | Bin .../mergefields/splitdemo/DomainMesh_3.med | Bin .../mergefields/splitdemo/DomainMesh_4.med | Bin .../tut/mergefields/splitdemo/README.txt | 0 .../tut/mergefields/splitdemo/splitdemo.py | 0 .../splitdemo/splitdemo_partiel.py | 0 .../projection/additionaldata/Projection1.jpg | Bin .../projection/additionaldata/Projection1.png | Bin .../projection/additionaldata/Projection2.jpg | Bin .../projection/additionaldata/Projection2.png | Bin .../additionaldata/SRMA_Lionel.brep | 0 .../tut/projection/additionaldata/Study1.hdf | Bin .../tut/projection/demomed/README.txt | 0 .../projection/demomed/demo_createsource.py | 0 .../tut/projection/demomed/demo_loadsource.py | 0 .../tut/projection/demomed/fieldsource.med | Bin .../tut/projection/demomed/meshsource.med | Bin .../tut/projection/demomed/meshtarget.med | Bin .../tut/projection/demovtu/MeshSource.med | Bin .../tut/projection/demovtu/MeshTarget.med | Bin .../tut/projection/demovtu/README.txt | 0 .../tut/projection/demovtu/projection.py | 0 src/MEDOP/res/testfiles/README.txt | 1 - src/MEDOP/tui/CMakeLists.txt | 21 - src/MEDOP/tui/xmedpy/CMakeLists.txt | 43 -- src/MEDOP/tui/xmedpy/__init__.py | 188 -------- src/MEDOP/tui/xmedpy/cmdtools.py | 60 --- src/MEDOP/tui/xmedpy/driver_pvis.py | 107 ----- src/MEDOP/tui/xmedpy/driver_visu.py | 120 ----- src/MEDOP/tui/xmedpy/fieldguide.py | 67 --- src/MEDOP/tui/xmedpy/fieldproxy.py | 426 ------------------ src/MEDOP/tui/xmedpy/fieldtools.py | 255 ----------- src/MEDOP/tui/xmedpy/properties.py | 93 ---- .../xmedpy/tests/test_xmed_fieldOperations.py | 233 ---------- .../xmedpy/tests/test_xmed_uiEventListener.py | 66 --- .../xmedpy/tests/test_xmed_visualisation.py | 57 --- 319 files changed, 1866 insertions(+), 2786 deletions(-) rename idl/{MEDOPFactory.idl => MEDFactory.idl} (83%) rename src/{MEDOP => MEDCalc}/CMakeLists.txt (100%) rename src/{MEDOP => MEDCalc}/README.txt (91%) rename src/{MEDOP => MEDCalc}/cmp/CMakeLists.txt (74%) rename src/{MEDOP/cmp/MEDOP.hxx => MEDCalc/cmp/MEDCALC.hxx} (77%) rename src/{MEDOP => MEDCalc}/cmp/MEDCalculator_i.cxx (87%) rename src/{MEDOP => MEDCalc}/cmp/MEDCalculator_i.hxx (69%) rename src/{MEDOP => MEDCalc}/cmp/MEDDataManager_i.cxx (91%) rename src/{MEDOP => MEDCalc}/cmp/MEDDataManager_i.hxx (60%) rename src/{MEDOP/cmp/MEDOPFactory_i.cxx => MEDCalc/cmp/MEDFactory_i.cxx} (71%) rename src/{MEDOP/cmp/MEDOPFactory_i.hxx => MEDCalc/cmp/MEDFactory_i.hxx} (58%) rename src/{MEDOP => MEDCalc}/cmp/MEDPresentationManager_i.cxx (82%) rename src/{MEDOP => MEDCalc}/cmp/MEDPresentationManager_i.hxx (80%) rename src/{MEDOP/cmp/test_medop_components.py => MEDCalc/cmp/test_medcalc_components.py} (97%) rename src/{MEDOP => MEDCalc}/doc/CMakeLists.txt (100%) rename src/{MEDOP/doc/models/medop.xmi => MEDCalc/doc/models/medcalc.xmi} (97%) rename src/{MEDOP => MEDCalc}/doc/sphinx/CMakeLists.txt (97%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20070105_CEA_VBERGEAUD_GuideutilisateurMEDMEMOIRE.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20091211_CEA_AGEAY_09-017-RT-A_Normalisation_des_champs_et_des_maillages_pour_le_couplage_de_codes.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20091218_EDF_VCANO_H-I2C-2009-03595-FR.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20100129_MAN_seminaireEDF-CEA_all.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20101027_MAN_revueEDF-CEA.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20110309_XMED_scan_notes.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20110309_XMED_scan_remarques_ELORENTZ.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/20110310_seminaireEDF-CEA_maquetteXMED.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/xmed-develguide.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/xmed-specifications.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/documents/xmed-userguide.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/medop.css (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_manipulation_de_champs.pdf (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_1.ogv (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_3.ogv (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_4.ogv (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/conf.py.in (92%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/images/xmed-gui-withframe.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/images/xmed-gui.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/index.rst (88%) rename src/{MEDOP/doc/sphinx/fr/medop-definitions.rst => MEDCalc/doc/sphinx/fr/medcalc-definitions.rst} (100%) rename src/{MEDOP/doc/sphinx/fr/medop-develguide.rst => MEDCalc/doc/sphinx/fr/medcalc-develguide.rst} (88%) rename src/{MEDOP/doc/sphinx/fr/medop-references.rst => MEDCalc/doc/sphinx/fr/medcalc-references.rst} (96%) rename src/{MEDOP/doc/sphinx/medop-specifications.rst => MEDCalc/doc/sphinx/fr/medcalc-specifications.rst} (99%) rename src/{MEDOP/doc/sphinx/fr/medop-userguide-gui.rst => MEDCalc/doc/sphinx/fr/medcalc-userguide-gui.rst} (94%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/medop-prototype-develguide.rst (99%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/medop-prototype-medmem.rst (98%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/medop-prototype-overview.rst (97%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/medop-workingnotes-2010.rst (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/fr/medop-workingnotes-2011.rst (99%) rename src/{MEDOP/doc/sphinx => MEDCalc/doc/sphinx/fr}/medop-workingnotes-2012.rst (98%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/champ_altitude_MAP.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/convert.sh (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_datasource_add.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_datasource_changeUnderlyingMesh.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_datasource_expandfield.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_datasource_use.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_datasource_view.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_imagesource.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_workspace_save.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/ico_xmed.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/med-uml-main.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/med-uml-main_60pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medlayers.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medlayers_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medmem-corba-layers.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medmem-layers.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-aliasfield.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-aliasfield_scale.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-result.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-result_scale.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-selectfield.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-selectfield_scale.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-visufield.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop-gui-visufield_scale.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop_exportparavis.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop_exportparavis_result.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop_image2med_dialog.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop_image2med_tomographie.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop_projection_inputs.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/medop_projection_result.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/partition_mesh.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/partition_skin.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-architecture.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-exploremed.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-functions.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh_wsview.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-contextmenu.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-contextmenu_60pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-contextmenu_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-contextmenu_80pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-expand-zoom.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-explore-zoom.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-explore.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-menucontextuel-zoom.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-selectfile.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-useinworkspace-alias.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-useinworkspace.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-useinworkspace_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize-result.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize-result_50pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize-result_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize-zoom.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize_50pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-datasource-visualize_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-start.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-withframe.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-workspace-view.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui-workspace.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-gui_70pc.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-implantation.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-irm-diff.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-irm-field.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-irm.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-userguide-example2-datasource.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-userguide-example2-workspace-save.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-userguide-example2-workspace.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-visu-importtimestamps.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/images/xmed-visu-scalarmaptimestamps.png (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/index.rst (87%) rename src/{MEDOP/doc/sphinx/medop-definitions.rst => MEDCalc/doc/sphinx/medcalc-definitions.rst} (100%) rename src/{MEDOP/doc/sphinx/medop-develguide.rst => MEDCalc/doc/sphinx/medcalc-develguide.rst} (88%) rename src/{MEDOP/doc/sphinx/medop-references.rst => MEDCalc/doc/sphinx/medcalc-references.rst} (96%) rename src/{MEDOP/doc/sphinx/fr/medop-specifications.rst => MEDCalc/doc/sphinx/medcalc-specifications.rst} (99%) rename src/{MEDOP/doc/sphinx/medop-userguide-api.rst => MEDCalc/doc/sphinx/medcalc-userguide-api.rst} (93%) rename src/{MEDOP/doc/sphinx/medop-userguide-gui.rst => MEDCalc/doc/sphinx/medcalc-userguide-gui.rst} (94%) rename src/{MEDOP => MEDCalc}/doc/sphinx/medop-prototype-develguide.rst (99%) rename src/{MEDOP => MEDCalc}/doc/sphinx/medop-prototype-medmem.rst (98%) rename src/{MEDOP => MEDCalc}/doc/sphinx/medop-prototype-overview.rst (97%) rename src/{MEDOP => MEDCalc}/doc/sphinx/medop-workingnotes-2010.rst (100%) rename src/{MEDOP => MEDCalc}/doc/sphinx/medop-workingnotes-2011.rst (99%) rename src/{MEDOP/doc/sphinx/fr => MEDCalc/doc/sphinx}/medop-workingnotes-2012.rst (98%) rename src/{MEDOP => MEDCalc}/exe/CMakeLists.txt (100%) rename src/{MEDOP => MEDCalc}/exe/image2med/CMakeLists.txt (100%) rename src/{MEDOP => MEDCalc}/exe/image2med/image2med.py (100%) rename src/{MEDOP => MEDCalc}/gui/CMakeLists.txt (77%) rename src/{MEDOP => MEDCalc}/gui/DatasourceConstants.hxx (100%) rename src/{MEDOP => MEDCalc}/gui/DatasourceController.cxx (90%) rename src/{MEDOP => MEDCalc}/gui/DatasourceController.hxx (92%) rename src/{MEDOP/gui/MEDOPGUI.hxx => MEDCalc/gui/MEDCALCGUI.hxx} (79%) rename src/{MEDOP/gui/MEDOP_msg_en.ts => MEDCalc/gui/MEDCALC_msg_en.ts} (100%) rename src/{MEDOP/gui/MEDOP_msg_fr.ts => MEDCalc/gui/MEDCALC_msg_fr.ts} (100%) rename src/{MEDOP/gui/MEDOP_msg_ja.ts => MEDCalc/gui/MEDCALC_msg_ja.ts} (100%) rename src/{MEDOP => MEDCalc}/gui/MEDEventListener_i.cxx (93%) rename src/{MEDOP => MEDCalc}/gui/MEDEventListener_i.hxx (87%) rename src/{MEDOP/gui/MEDOPFactoryClient.cxx => MEDCalc/gui/MEDFactoryClient.cxx} (77%) rename src/{MEDOP/gui/MEDOPFactoryClient.hxx => MEDCalc/gui/MEDFactoryClient.hxx} (75%) rename src/{MEDOP/gui/MEDOPModule.cxx => MEDCalc/gui/MEDModule.cxx} (83%) rename src/{MEDOP/gui/MEDOPModule.hxx => MEDCalc/gui/MEDModule.hxx} (89%) rename src/{MEDOP => MEDCalc}/gui/MED_images.ts (92%) rename src/{MEDOP => MEDCalc}/gui/MED_msg_en.ts (62%) rename src/{MEDOP => MEDCalc}/gui/MED_msg_fr.ts (63%) rename src/{MEDOP => MEDCalc}/gui/MED_msg_ja.ts (65%) rename src/{MEDOP => MEDCalc}/gui/WorkspaceController.cxx (87%) rename src/{MEDOP => MEDCalc}/gui/WorkspaceController.hxx (90%) rename src/{MEDOP => MEDCalc}/gui/XmedConsoleDriver.cxx (84%) rename src/{MEDOP => MEDCalc}/gui/XmedConsoleDriver.hxx (95%) rename src/{MEDOP => MEDCalc}/gui/XmedDataModel.cxx (84%) rename src/{MEDOP => MEDCalc}/gui/XmedDataModel.hxx (81%) rename src/{MEDOP => MEDCalc}/gui/dialogs/CMakeLists.txt (78%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgAlias.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgAlias.hxx (73%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgAlias.ui (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgChangeUnderlyingMesh.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgChangeUnderlyingMesh.hxx (85%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgChangeUnderlyingMesh.ui (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgImageToMed.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgImageToMed.hxx (83%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgImageToMed.ui (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgInterpolateField.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgInterpolateField.hxx (88%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgInterpolateField.ui (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgUseInWorkspace.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgUseInWorkspace.hxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/DlgUseInWorkspace.ui (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/GenericDialog.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/GenericDialog.hxx (100%) rename src/{MEDOP => MEDCalc}/gui/dialogs/GenericDialog.ui (100%) rename src/{MEDOP/gui/dialogs/MEDOPGUIdialogs.hxx => MEDCalc/gui/dialogs/MEDCALCGUIdialogs.hxx} (73%) rename src/{MEDOP => MEDCalc}/gui/dialogs/dlgTester.cxx (100%) rename src/{MEDOP => MEDCalc}/gui/factory.cxx (87%) rename src/{MEDOP => MEDCalc}/gui/test/README.txt (100%) rename src/{MEDOP => MEDCalc}/gui/test/guiTester.pro (100%) rename src/{MEDOP => MEDCalc}/res/CMakeLists.txt (97%) rename src/{MEDOP/res/MEDOP.png => MEDCalc/res/MEDCalc.png} (100%) rename src/{MEDOP/res/MEDOP_small.png => MEDCalc/res/MEDCalc_small.png} (100%) rename src/{MEDOP => MEDCalc}/res/datasource.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_add.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_changeUnderlyingMesh.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_expandfield.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_field.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_interpolateField.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_mesh.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_use.png (100%) rename src/{MEDOP => MEDCalc}/res/datasource_view.png (100%) rename src/{MEDOP => MEDCalc}/res/fileimport-32.png (100%) rename src/{MEDOP => MEDCalc}/res/folder.png (100%) rename src/{MEDOP => MEDCalc}/res/image_add.png (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/CMakeLists.txt (96%) create mode 100644 src/MEDCalc/res/testfiles/README.txt rename src/{MEDOP => MEDCalc}/res/testfiles/bigmesh.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/champ_altitude_MAP.pgm (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/enceinte-axis-E500000.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/enceinte-axis-E600000.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/entaille.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/fieldlena.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/irm_test1.png (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/irm_test2.png (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/padderoutput.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/parametric_01.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/parametric_02.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/smallmesh_constfield.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/smallmesh_varfield.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/smooth_surface.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/smooth_surface_and_field.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/testfield.med (100%) rename src/{MEDOP => MEDCalc}/res/testfiles/timeseries.med (100%) rename src/{MEDOP => MEDCalc}/res/workspace_clean.png (100%) rename src/{MEDOP => MEDCalc}/res/workspace_save.png (100%) rename src/{MEDOP/tui/presentation => MEDCalc/tui}/CMakeLists.txt (93%) rename src/{MEDOP/tui/presentation => MEDCalc/tui}/__init__.py (50%) create mode 100644 src/MEDCalc/tui/fieldproxy.py create mode 100644 src/MEDCalc/tui/medconsole.py create mode 100644 src/MEDCalc/tui/medcorba.py create mode 100644 src/MEDCalc/tui/medevents.py rename src/{MEDOP/tui/presentation => MEDCalc/tui}/medimages.py (99%) rename src/{MEDOP/tui/presentation/medpresentation.py => MEDCalc/tui/medio.py} (65%) rename src/{MEDOP/tui/xmedpy/medop.py => MEDCalc/tui/medpresentation.py} (53%) rename src/{MEDOP => MEDCalc}/tut/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/addfields/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/addfields/addition.py (100%) rename src/{MEDOP => MEDCalc}/tut/addfields/operations.py (100%) rename src/{MEDOP => MEDCalc}/tut/addfields/timeseries.med (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/env.sh (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/images/avatar.png (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/images/irm.png (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/images/lena.png (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/images/tests.pgm (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/partition.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/pyfunctions/__init__.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/pyfunctions/functions.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/pyfunctions/lagrange.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/pyfunctions/plotter.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/test-paravis.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/testmed_gendata.py (98%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/testmed_lena.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/testmed_simple.py (100%) rename src/{MEDOP => MEDCalc}/tut/medcoupling/testpil.py (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/Makefile (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/cmesh.py (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/explore.py (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/madnex_field.med (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/madnex_grid.med (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/manage.py (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/testamel.py (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/timeseries.med (100%) rename src/{MEDOP => MEDCalc}/tut/medloader/tutorial.py (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/additionaldata/MergeFields.jpg (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/additionaldata/MergeFields.png (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/additionaldata/splitdemo.vtu (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/additionaldata/splitdemo_split.vtu (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/simpledemo/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/simpledemo/field1.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/simpledemo/field2.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/simpledemo/field3.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/simpledemo/field4.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/simpledemo/simpledemo.py (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/DomainMesh_1.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/DomainMesh_2.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/DomainMesh_3.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/DomainMesh_4.med (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/splitdemo.py (100%) rename src/{MEDOP => MEDCalc}/tut/mergefields/splitdemo/splitdemo_partiel.py (100%) rename src/{MEDOP => MEDCalc}/tut/projection/additionaldata/Projection1.jpg (100%) rename src/{MEDOP => MEDCalc}/tut/projection/additionaldata/Projection1.png (100%) rename src/{MEDOP => MEDCalc}/tut/projection/additionaldata/Projection2.jpg (100%) rename src/{MEDOP => MEDCalc}/tut/projection/additionaldata/Projection2.png (100%) rename src/{MEDOP => MEDCalc}/tut/projection/additionaldata/SRMA_Lionel.brep (100%) rename src/{MEDOP => MEDCalc}/tut/projection/additionaldata/Study1.hdf (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demomed/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demomed/demo_createsource.py (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demomed/demo_loadsource.py (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demomed/fieldsource.med (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demomed/meshsource.med (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demomed/meshtarget.med (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demovtu/MeshSource.med (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demovtu/MeshTarget.med (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demovtu/README.txt (100%) rename src/{MEDOP => MEDCalc}/tut/projection/demovtu/projection.py (100%) delete mode 100644 src/MEDOP/res/testfiles/README.txt delete mode 100644 src/MEDOP/tui/CMakeLists.txt delete mode 100644 src/MEDOP/tui/xmedpy/CMakeLists.txt delete mode 100644 src/MEDOP/tui/xmedpy/__init__.py delete mode 100644 src/MEDOP/tui/xmedpy/cmdtools.py delete mode 100644 src/MEDOP/tui/xmedpy/driver_pvis.py delete mode 100644 src/MEDOP/tui/xmedpy/driver_visu.py delete mode 100644 src/MEDOP/tui/xmedpy/fieldguide.py delete mode 100644 src/MEDOP/tui/xmedpy/fieldproxy.py delete mode 100644 src/MEDOP/tui/xmedpy/fieldtools.py delete mode 100644 src/MEDOP/tui/xmedpy/properties.py delete mode 100644 src/MEDOP/tui/xmedpy/tests/test_xmed_fieldOperations.py delete mode 100644 src/MEDOP/tui/xmedpy/tests/test_xmed_uiEventListener.py delete mode 100644 src/MEDOP/tui/xmedpy/tests/test_xmed_visualisation.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 51a6514c3..a79ee2d72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ IF(NOT SALOME_MED_STANDALONE) KERNEL_WITH_CORBA() #check whether KERNEL builded with CORBA ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS}) - SET(_default_MPI ${SALOME_USE_MPI}) + SET(_default_MPI ${SALOME_USE_MPI}) ELSE(EXISTS ${KERNEL_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR or turn option SALOME_MED_STANDALONE to ON !") ENDIF(EXISTS ${KERNEL_ROOT_DIR}) @@ -221,24 +221,24 @@ SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries") SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs") SET(SALOME_INSTALL_IDLS idl/salome CACHE PATH "Install path: SALOME IDL files") SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers") -SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH +SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH "Install path: SALOME scripts") -SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH +SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH "Install path: SALOME script data") -SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH +SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH "Install path: SALOME Python scripts") -SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH +SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH "Install path: SALOME application skeleton - scripts") -SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH +SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH "Install path: SALOME application skeleton - Python") SET(SALOME_INSTALL_CMAKE salome_adm/cmake_files CACHE PATH "Install path: SALOME CMake files") -SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH +SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH "Install path: local SALOME CMake files") IF(SALOME_MED_ENABLE_PYTHON) SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff") - SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH + SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH "Install path: SALOME Python shared modules") ENDIF(SALOME_MED_ENABLE_PYTHON) @@ -267,7 +267,7 @@ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOM SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) -# Sources +# Sources # ======== IF(WIN32) ADD_DEFINITIONS("-D_USE_MATH_DEFINES") @@ -323,21 +323,21 @@ IF(SALOME_USE_MPI) LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedloader) ENDIF() IF(NOT SALOME_MED_STANDALONE) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedcouplingcorba paramedmemcompo) ENDIF() IF(SALOME_BUILD_TESTS) IF(NOT SALOME_MED_MICROMED) LIST(APPEND _${PROJECT_NAME}_exposed_targets ParaMEDMEMTest) ENDIF() - ENDIF() + ENDIF() ENDIF() IF(NOT SALOME_MED_STANDALONE) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeIDLMED SalomeIDLMEDTests medcouplingcorba medcouplingclient) IF(NOT SALOME_MED_MICROMED) - LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculator MEDOPFactoryEngine) + LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculator MEDFactoryEngine) IF(SALOME_MED_ENABLE_PYTHON) LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculatorspython) ENDIF() @@ -346,8 +346,8 @@ ENDIF() IF(SALOME_BUILD_GUI) IF(NOT SALOME_MED_MICROMED) - LIST(APPEND _${PROJECT_NAME}_exposed_targets - MEDOPGUI_dialogs MEDOPGUI) + LIST(APPEND _${PROJECT_NAME}_exposed_targets + MEDCALCGUI_dialogs MEDCALCGUI) ENDIF() ENDIF() @@ -381,18 +381,18 @@ SET(SCOTCH_ROOT_DIR "${SCOTCH_ROOT_DIR}") SET(XDR_ROOT_DIR "${XDR_ROOT_DIR}") # - in the install tree: -# Get the relative path of the include directory so +# Get the relative path of the include directory so # we can register it in the generated configuration files: SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") # Build variables that will be expanded when configuring SalomeConfig.cmake: -SALOME_CONFIGURE_PREPARE(Metis ParMetis Scotch XDR CAS Qt4 CppUnit Graphviz Doxygen Sphinx MPI omniORB +SALOME_CONFIGURE_PREPARE(Metis ParMetis Scotch XDR CAS Qt4 CppUnit Graphviz Doxygen Sphinx MPI omniORB PThread Boost libXml2 Python HDF5 MEDFile) -CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in +CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}_LOCAL" - PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX + PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX KERNEL_ROOT_DIR GUI_ROOT_DIR MEDFILE_ROOT_DIR MPI_ROOT_DIR HDF5_ROOT_DIR OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR BOOST_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR @@ -401,7 +401,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} COMPATIBILITY AnyNewerVersion) - + # Install the CMake configuration files: INSTALL(FILES "${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake" @@ -409,5 +409,5 @@ INSTALL(FILES DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}") # Install the export set for use with the install-tree -INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" +INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" FILE ${PROJECT_NAME}Targets.cmake) diff --git a/SalomeMEDConfig.cmake.in b/SalomeMEDConfig.cmake.in index 626af2aa0..bf623c8c7 100644 --- a/SalomeMEDConfig.cmake.in +++ b/SalomeMEDConfig.cmake.in @@ -1,5 +1,5 @@ # - Config file for the @PROJECT_NAME@ package -# It defines the following variables. +# It defines the following variables. # Specific to the pacakge @PROJECT_NAME@ itself: # @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file # @@ -27,12 +27,12 @@ ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE: @PACKAGE_INIT@ -# Load the dependencies for the libraries of @PROJECT_NAME@ -# (contains definitions for IMPORTED targets). This is only +# Load the dependencies for the libraries of @PROJECT_NAME@ +# (contains definitions for IMPORTED targets). This is only # imported if we are not built as a subproject (in this case targets are already there) IF(NOT TARGET medcoupling AND NOT @PROJECT_NAME@_BINARY_DIR) INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake") -ENDIF() +ENDIF() # Package root dir: SET_AND_CHECK(MED_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") @@ -75,7 +75,7 @@ IF(SALOME_MED_BUILD_GUI) LIST(APPEND MED_DEFINITIONS "@GUI_DEFINITIONS@") ENDIF(SALOME_MED_BUILD_GUI) -# For all prerequisites, load the corresponding targets if the package was used +# For all prerequisites, load the corresponding targets if the package was used # in CONFIG mode. This ensures dependent projects link correctly # without having to set LD_LIBRARY_PATH: SET(_PREREQ @_PREREQ_LIST@) @@ -85,20 +85,20 @@ LIST(LENGTH _PREREQ_CONFIG_DIR _list_len) IF(NOT _list_len EQUAL 0) # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ... MATH(EXPR _range "${_list_len}-1") - FOREACH(_p RANGE ${_range}) + FOREACH(_p RANGE ${_range}) LIST(GET _PREREQ ${_p} _pkg ) LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir) LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo) MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...") IF(NOT _pkg_compo) - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - PATHS "${_pkg_dir}" + FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE + PATHS "${_pkg_dir}" NO_DEFAULT_PATH) ELSE() STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}") MESSAGE(STATUS "===> (components: ${_pkg_compo})") FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - COMPONENTS ${_compo_lst} + COMPONENTS ${_compo_lst} PATHS "${_pkg_dir}" NO_DEFAULT_PATH) ENDIF() @@ -114,25 +114,25 @@ SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@") SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@") SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@") SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@") -SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") +SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@") SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@") SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@") SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@") SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@") -IF(SALOME_MED_BUILD_GUI) +IF(SALOME_MED_BUILD_GUI) # Include GUI targets if they were not already loaded: IF(NOT (TARGET Event) AND NOT SALOME_MED_STANDALONE) INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake") ENDIF() ELSE(SALOME_MED_BUILD_GUI) - IF(NOT SALOME_MED_STANDALONE) + IF(NOT SALOME_MED_STANDALONE) # Include KERNEL targets if they were not already loaded: - IF(NOT (TARGET SALOMEBasics) AND NOT SALOME_MED_STANDALONE) + IF(NOT (TARGET SALOMEBasics) AND NOT SALOME_MED_STANDALONE) INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake") ENDIF() - ENDIF(NOT SALOME_MED_STANDALONE) + ENDIF(NOT SALOME_MED_STANDALONE) ENDIF(SALOME_MED_BUILD_GUI) # Exposed MED targets: @@ -155,6 +155,6 @@ SET(MED_medcouplingcorba medcouplingcorba) SET(MED_medcouplingclient medcouplingclient) SET(MED_medcalculator medcalculator) SET(MED_medcalculatorspython medcalculatorspython) -SET(MED_MEDOPFactoryEngine MEDOPFactoryEngine) -SET(MED_MEDOPGUI_dialogs MEDOPGUI_dialogs) -SET(MED_MEDOPGUI MEDOPGUI) +SET(MED_MEDFactoryEngine MEDFactoryEngine) +SET(MED_MEDCALCGUI_dialogs MEDCALCGUI_dialogs) +SET(MED_MEDCALCGUI MEDCALCGUI) diff --git a/doc/doxygen/doxfiles/gui.dox b/doc/doxygen/doxfiles/gui.dox index d8df24f06..6d765eb1a 100644 --- a/doc/doxygen/doxfiles/gui.dox +++ b/doc/doxygen/doxfiles/gui.dox @@ -6,11 +6,11 @@ you to deal with most standard use case of fields manipulation. The user guide can be found here: - User guide of the MED Graphical Interface + href="../../dev/MED/medcalc-userguide-gui.html">User guide of the MED Graphical Interface As a complement, a starter guide to MEDCouplig API is available: - Starter guide to MEDCoupling API for users + href="../../dev/MED/medcalc-userguide-api.html">Starter guide to MEDCoupling API for users You could also be interested to read the software specifications and @@ -18,9 +18,9 @@ requirements for this graphical module, and even the technical considerations for development: - Software + href="../../dev/MED/medcalc-specifications.html">Software specifications and requirements of the MED Graphical Interface (in french) - Developer guide of the MED Graphical Interface (in french) + href="../../dev/MED/medcalc-develguide.html">Developer guide of the MED Graphical Interface (in french) */ diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 9f47f7c2b..69c3b4a6c 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -32,7 +32,7 @@ SET(SalomeIDLMED_IDLSOURCES MEDCalculator.idl MEDEventListener.idl MEDPresentationManager.idl - MEDOPFactory.idl + MEDFactory.idl ) IF(SALOME_USE_MPI) diff --git a/idl/MEDCalculator.idl b/idl/MEDCalculator.idl index 70b7f4cb9..6e8467a6d 100644 --- a/idl/MEDCalculator.idl +++ b/idl/MEDCalculator.idl @@ -25,16 +25,16 @@ #include "SALOME_GenericObj.idl" #include "MEDDataManager.idl" -module MEDOP +module MEDCALC { - + /*! * This constants may be used for the value of an argument of a * function of the interface to specify that the function must * consider a default value. */ - typedef long medopNumber; - const medopNumber NBCOMP_DEFAULT=-1; + typedef long medcalcNumber; + const medcalcNumber NBCOMP_DEFAULT=-1; interface MEDCalculator: SALOME::GenericObj { @@ -64,7 +64,7 @@ module MEDOP /* FieldHandler ini(in double value) raises (SALOME::SALOME_Exception); */ /*! Transformation of the field f using a custom function */ - FieldHandler fct(in FieldHandler f, in string function, in medopNumber nbResComponents) + FieldHandler fct(in FieldHandler f, in string function, in medcalcNumber nbResComponents) raises (SALOME::SALOME_Exception); }; diff --git a/idl/MEDDataManager.idl b/idl/MEDDataManager.idl index a0fa2907e..06d9e4d2e 100644 --- a/idl/MEDDataManager.idl +++ b/idl/MEDDataManager.idl @@ -28,7 +28,7 @@ #include "SALOME_GenericObj.idl" #include "SALOME_Exception.idl" -module MEDOP +module MEDCALC { struct DatasourceHandler { long id; diff --git a/idl/MEDEventListener.idl b/idl/MEDEventListener.idl index 1fbf557b8..fd6fc6d33 100644 --- a/idl/MEDEventListener.idl +++ b/idl/MEDEventListener.idl @@ -25,11 +25,11 @@ #include "SALOME_GenericObj.idl" -module MEDOP +module MEDCALC { enum MedEventType { - EVENT_ADDNEW_FIELD, - EVENT_DELETE_FIELD, + EVENT_PUT_IN_WORKSPACE, + EVENT_REMOVE_FROM_WORKSPACE, EVENT_UPDATE_FIELD, EVENT_CLEAN_WORKSPACE, EVENT_ADD_DATASOURCE, diff --git a/idl/MEDOPFactory.idl b/idl/MEDFactory.idl similarity index 83% rename from idl/MEDOPFactory.idl rename to idl/MEDFactory.idl index 517a3e694..bd53af996 100644 --- a/idl/MEDOPFactory.idl +++ b/idl/MEDFactory.idl @@ -17,8 +17,8 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef __MEDOPFactory_IDL_ -#define __MEDOPFactory_IDL_ +#ifndef __MEDFactory_IDL_ +#define __MEDFactory_IDL_ #include "SALOME_Component.idl" #include "SALOME_Exception.idl" @@ -34,14 +34,14 @@ * WRN: This interface is an EngineComponent so that it could be retrieve * in the CORBA context using the LifeCycleCorba registry. */ -module MEDOP +module MEDCALC { - interface MEDOPFactory : Engines::EngineComponent + interface MEDFactory : Engines::EngineComponent { - MEDOP::MEDDataManager getDataManager(); - MEDOP::MEDCalculator getCalculator(); - MEDOP::MEDPresentationManager getPresentationManager(); + MEDCALC::MEDDataManager getDataManager(); + MEDCALC::MEDCalculator getCalculator(); + MEDCALC::MEDPresentationManager getPresentationManager(); }; }; diff --git a/idl/MEDPresentationManager.idl b/idl/MEDPresentationManager.idl index e316b2ec3..cab47d064 100644 --- a/idl/MEDPresentationManager.idl +++ b/idl/MEDPresentationManager.idl @@ -23,7 +23,7 @@ #include "SALOME_GenericObj.idl" #include "MEDDataManager.idl" -module MEDOP +module MEDCALC { enum MEDPresentationViewMode { diff --git a/resources/MEDCatalog.xml.in b/resources/MEDCatalog.xml.in index 68190be0f..4f0429fcf 100644 --- a/resources/MEDCatalog.xml.in +++ b/resources/MEDCatalog.xml.in @@ -22,7 +22,7 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --> - + @@ -72,14 +72,14 @@ - - MEDOPFactory - MEDOP Factory - MED - Guillaume Boulant - @SALOMEMED_VERSION@ - Factory of SALOME components for MED Field operations - 0 + + MEDFactory + MEDCalc Factory + MED + Guillaume Boulant + @SALOMEMED_VERSION@ + Factory of SALOME components for MED Field operations + 0 diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 770cee05f..ce9d1ca10 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -25,9 +25,9 @@
- + - +
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d3d23be80..614d48eef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,7 +66,7 @@ IF(NOT SALOME_MED_STANDALONE) ADD_SUBDIRECTORY(MEDCouplingCorba) IF(NOT SALOME_MED_MICROMED) ADD_SUBDIRECTORY(MEDCalculator) - ADD_SUBDIRECTORY(MEDOP) + ADD_SUBDIRECTORY(MEDCalc) ENDIF(NOT SALOME_MED_MICROMED) IF(SALOME_MED_ENABLE_PYTHON) ADD_SUBDIRECTORY(MEDCouplingCorba_Swig) diff --git a/src/CTestTestfileInstallMEDCoupling.cmake b/src/CTestTestfileInstallMEDCoupling.cmake index d49fd8d01..c1f24cd5b 100644 --- a/src/CTestTestfileInstallMEDCoupling.cmake +++ b/src/CTestTestfileInstallMEDCoupling.cmake @@ -27,7 +27,7 @@ ADD_SUBDIRECTORY(MEDCoupling) ADD_SUBDIRECTORY(MEDCoupling_Swig) ADD_SUBDIRECTORY(MEDLoader) ADD_SUBDIRECTORY(MEDLoader/Swig) -#ADD_SUBDIRECTORY(MEDOP) +#ADD_SUBDIRECTORY(MEDCalc) ADD_SUBDIRECTORY(MEDPartitioner) #ADD_SUBDIRECTORY(ParaMEDMEM_Swig) #ADD_SUBDIRECTORY(ParaMEDMEMTest) diff --git a/src/MEDOP/CMakeLists.txt b/src/MEDCalc/CMakeLists.txt similarity index 100% rename from src/MEDOP/CMakeLists.txt rename to src/MEDCalc/CMakeLists.txt diff --git a/src/MEDOP/README.txt b/src/MEDCalc/README.txt similarity index 91% rename from src/MEDOP/README.txt rename to src/MEDCalc/README.txt index d2bc20af8..20b05e7fb 100644 --- a/src/MEDOP/README.txt +++ b/src/MEDCalc/README.txt @@ -21,6 +21,6 @@ This folder contains the packages for the MED fields operations: - cmp: package containing the SALOME components - tui: package containing the python user interface - gui: package containing the graphical user interface (the GUI part of the MED module) -- res: resources files associated to the MEDOP package (icons, config files, data files, ...) -- exe: additional executable programs that can be launched from the MEDOP framework +- res: resources files associated to the MEDCalc package (icons, config files, data files, ...) +- exe: additional executable programs that can be launched from the MEDCalc framework - tut: folder containing a set of tutorials use cases to learn medmem usage from using the python API diff --git a/src/MEDOP/cmp/CMakeLists.txt b/src/MEDCalc/cmp/CMakeLists.txt similarity index 74% rename from src/MEDOP/cmp/CMakeLists.txt rename to src/MEDCalc/cmp/CMakeLists.txt index 8c74dbc76..5e5c8393e 100644 --- a/src/MEDOP/cmp/CMakeLists.txt +++ b/src/MEDCalc/cmp/CMakeLists.txt @@ -32,11 +32,11 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/MEDLoader ) -SET(MEDOPFactoryEngine_SOURCES +SET(MEDFactoryEngine_SOURCES MEDDataManager_i.cxx MEDCalculator_i.cxx MEDPresentationManager_i.cxx - MEDOPFactory_i.cxx + MEDFactory_i.cxx ) SET(COMMON_LIBS @@ -65,15 +65,15 @@ IF(WIN32) SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOMINMAX") ENDIF(WIN32) -ADD_LIBRARY(MEDOPFactoryEngine SHARED ${MEDOPFactoryEngine_SOURCES}) -SET_TARGET_PROPERTIES(MEDOPFactoryEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") -TARGET_LINK_LIBRARIES(MEDOPFactoryEngine SalomeIDLMED ${COMMON_LIBS}) +ADD_LIBRARY(MEDFactoryEngine SHARED ${MEDFactoryEngine_SOURCES}) +SET_TARGET_PROPERTIES(MEDFactoryEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(MEDFactoryEngine SalomeIDLMED ${COMMON_LIBS}) -INSTALL(TARGETS MEDOPFactoryEngine DESTINATION ${SALOME_INSTALL_LIBS}) +INSTALL(TARGETS MEDFactoryEngine DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB MEDOPFactoryEngine_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${MEDOPFactoryEngine_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) +FILE(GLOB MEDFactoryEngine_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${MEDFactoryEngine_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) IF(SALOME_ENABLE_PYTHON) - INSTALL(FILES test_medop_components.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed) + INSTALL(FILES test_medcalc_components.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed) ENDIF() diff --git a/src/MEDOP/cmp/MEDOP.hxx b/src/MEDCalc/cmp/MEDCALC.hxx similarity index 77% rename from src/MEDOP/cmp/MEDOP.hxx rename to src/MEDCalc/cmp/MEDCALC.hxx index 34d3bdd06..9a3ad134b 100644 --- a/src/MEDOP/cmp/MEDOP.hxx +++ b/src/MEDCalc/cmp/MEDCALC.hxx @@ -17,17 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef __MEDOP_HXX__ -#define __MEDOP_HXX__ +#ifndef __MEDCALC_HXX__ +#define __MEDCALC_HXX__ #ifdef WIN32 -# if defined medop_EXPORTS || defined MEDOPFactoryEngine_EXPORTS || defined MEDOPFACTORYENGINE_EXPORTS -# define MEDOP_EXPORT __declspec( dllexport ) +# if defined medcalc_EXPORTS || defined MEDFactoryEngine_EXPORTS || defined MEDFACTORYENGINE_EXPORTS +# define MEDCALC_EXPORT __declspec( dllexport ) # else -# define MEDOP_EXPORT __declspec( dllimport ) +# define MEDCALC_EXPORT __declspec( dllimport ) # endif #else -# define MEDOP_EXPORT +# define MEDCALC_EXPORT #endif #endif diff --git a/src/MEDOP/cmp/MEDCalculator_i.cxx b/src/MEDCalc/cmp/MEDCalculator_i.cxx similarity index 87% rename from src/MEDOP/cmp/MEDCalculator_i.cxx rename to src/MEDCalc/cmp/MEDCalculator_i.cxx index a6236a981..e0bafd7af 100644 --- a/src/MEDOP/cmp/MEDCalculator_i.cxx +++ b/src/MEDCalc/cmp/MEDCalculator_i.cxx @@ -56,15 +56,15 @@ MEDCalculator_i::~MEDCalculator_i() * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::add(const MEDOP::FieldHandler & f1_hdl, - const MEDOP::FieldHandler & f2_hdl) +MEDCALC::FieldHandler * MEDCalculator_i::add(const MEDCALC::FieldHandler & f1_hdl, + const MEDCALC::FieldHandler & f2_hdl) { // We first check that both operandes share the same mesh id. Note // that it's not strictly required because the MEDCoupling operation // would raise an exception if the fields does not share the same // mesh support. if ( f1_hdl.meshid != f2_hdl.meshid ) { - std::string message = + std::string message = std::string("ERROR: Mesh ids are different for the field operandes ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); @@ -75,7 +75,7 @@ MEDOP::FieldHandler * MEDCalculator_i::add(const MEDOP::FieldHandler & f1_hdl, MEDCouplingFieldDouble* field_result; // This operation could raise an INTERP_KERNEL exception, for - // example, if the fields are not defined on the same support. + // example, if the fields are not defined on the same support. try { field_result = (*f1) + (*f2); } @@ -98,9 +98,9 @@ MEDOP::FieldHandler * MEDCalculator_i::add(const MEDOP::FieldHandler & f1_hdl, // meshid (both have the same meshid). // long meshHandlerId = f1_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); - + // >>>>>>>>> // _GBO_ We should test here if the iteration and order of the input // files are identical for both operandes. A convention has to be @@ -121,18 +121,18 @@ MEDOP::FieldHandler * MEDCalculator_i::add(const MEDOP::FieldHandler & f1_hdl, * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::sub(const MEDOP::FieldHandler & f1_hdl, - const MEDOP::FieldHandler & f2_hdl) +MEDCALC::FieldHandler * MEDCalculator_i::sub(const MEDCALC::FieldHandler & f1_hdl, + const MEDCALC::FieldHandler & f2_hdl) { if ( f1_hdl.meshid != f2_hdl.meshid ) { - std::string message = + std::string message = std::string("ERROR: Mesh ids are different for the field operandes ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } MEDCouplingFieldDouble* f1 = _medDataManager->getFieldDouble(&f1_hdl); - MEDCouplingFieldDouble* f2 = _medDataManager->getFieldDouble(&f2_hdl); + MEDCouplingFieldDouble* f2 = _medDataManager->getFieldDouble(&f2_hdl); MEDCouplingFieldDouble* field_result; try { @@ -146,7 +146,7 @@ MEDOP::FieldHandler * MEDCalculator_i::sub(const MEDOP::FieldHandler & f1_hdl, field_result->setName(name.c_str()); long meshHandlerId = f1_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; } @@ -160,19 +160,19 @@ MEDOP::FieldHandler * MEDCalculator_i::sub(const MEDOP::FieldHandler & f1_hdl, * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::mul(const MEDOP::FieldHandler & f1_hdl, - const MEDOP::FieldHandler & f2_hdl) +MEDCALC::FieldHandler * MEDCalculator_i::mul(const MEDCALC::FieldHandler & f1_hdl, + const MEDCALC::FieldHandler & f2_hdl) { if ( f1_hdl.meshid != f2_hdl.meshid ) { - std::string message = + std::string message = std::string("ERROR: Mesh ids are different for the field operandes ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } MEDCouplingFieldDouble* f1 = _medDataManager->getFieldDouble(&f1_hdl); - MEDCouplingFieldDouble* f2 = _medDataManager->getFieldDouble(&f2_hdl); - + MEDCouplingFieldDouble* f2 = _medDataManager->getFieldDouble(&f2_hdl); + MEDCouplingFieldDouble* field_result; try { field_result = (*f1) * (*f2); @@ -184,7 +184,7 @@ MEDOP::FieldHandler * MEDCalculator_i::mul(const MEDOP::FieldHandler & f1_hdl, field_result->setName(name.c_str()); long meshHandlerId = f1_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; } @@ -198,18 +198,18 @@ MEDOP::FieldHandler * MEDCalculator_i::mul(const MEDOP::FieldHandler & f1_hdl, * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::div(const MEDOP::FieldHandler & f1_hdl, - const MEDOP::FieldHandler & f2_hdl) +MEDCALC::FieldHandler * MEDCalculator_i::div(const MEDCALC::FieldHandler & f1_hdl, + const MEDCALC::FieldHandler & f2_hdl) { if ( f1_hdl.meshid != f2_hdl.meshid ) { - std::string message = + std::string message = std::string("ERROR: Mesh ids are different for the field operandes ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } MEDCouplingFieldDouble* f1 = _medDataManager->getFieldDouble(&f1_hdl); - MEDCouplingFieldDouble* f2 = _medDataManager->getFieldDouble(&f2_hdl); + MEDCouplingFieldDouble* f2 = _medDataManager->getFieldDouble(&f2_hdl); MEDCouplingFieldDouble* field_result; try { @@ -223,7 +223,7 @@ MEDOP::FieldHandler * MEDCalculator_i::div(const MEDOP::FieldHandler & f1_hdl, field_result->setName(name.c_str()); long meshHandlerId = f1_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; } @@ -237,10 +237,10 @@ MEDOP::FieldHandler * MEDCalculator_i::div(const MEDOP::FieldHandler & f1_hdl, * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::pow(const MEDOP::FieldHandler & f_hdl, CORBA::Long power) +MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl, CORBA::Long power) { MEDCouplingFieldDouble* field = _medDataManager->getFieldDouble(&f_hdl); - + // We use the applyFunc function to execute this operation. The // applyFunc function modifies the original field (that is not what // we want). So we have first to make a deep copy. @@ -261,7 +261,7 @@ MEDOP::FieldHandler * MEDCalculator_i::pow(const MEDOP::FieldHandler & f_hdl, CO field_result->setName(name.c_str()); long meshHandlerId = f_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; } @@ -276,10 +276,10 @@ MEDOP::FieldHandler * MEDCalculator_i::pow(const MEDOP::FieldHandler & f_hdl, CO * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::lin(const MEDOP::FieldHandler & f_hdl, double factor, double offset) +MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl, double factor, double offset) { MEDCouplingFieldDouble* field = _medDataManager->getFieldDouble(&f_hdl); - + // We use the applyFunc function to execute this operation. The // applyFunc function modifies the original field (that is not what // we want). So we have first to make a deep copy. @@ -304,7 +304,7 @@ MEDOP::FieldHandler * MEDCalculator_i::lin(const MEDOP::FieldHandler & f_hdl, do field_result->setName(name.c_str()); long meshHandlerId = f_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; @@ -319,10 +319,10 @@ MEDOP::FieldHandler * MEDCalculator_i::lin(const MEDOP::FieldHandler & f_hdl, do * in the SALOME MED container and is automatically registered in the * MEDDataManager. */ -MEDOP::FieldHandler * MEDCalculator_i::dup(const MEDOP::FieldHandler & f_hdl) +MEDCALC::FieldHandler * MEDCalculator_i::dup(const MEDCALC::FieldHandler & f_hdl) { MEDCouplingFieldDouble* field = _medDataManager->getFieldDouble(&f_hdl); - + // We just make a deep copy of the input field MEDCouplingFieldDouble* field_result; try { @@ -339,7 +339,7 @@ MEDOP::FieldHandler * MEDCalculator_i::dup(const MEDOP::FieldHandler & f_hdl) field_result->setName(name.c_str()); long meshHandlerId = f_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; } @@ -355,7 +355,7 @@ MEDOP::FieldHandler * MEDCalculator_i::dup(const MEDOP::FieldHandler & f_hdl) * number of components of the specified field, then the function is * apply on the whole field (as if specified N=numberOfComponents). */ -MEDOP::FieldHandler * MEDCalculator_i::fct(const MEDOP::FieldHandler & f_hdl, +MEDCALC::FieldHandler * MEDCalculator_i::fct(const MEDCALC::FieldHandler & f_hdl, const char * function, CORBA::Long nbResComponents) { MEDCouplingFieldDouble* field = _medDataManager->getFieldDouble(&f_hdl); @@ -364,7 +364,7 @@ MEDOP::FieldHandler * MEDCalculator_i::fct(const MEDOP::FieldHandler & f_hdl, MEDCouplingFieldDouble* field_result; try { field_result = field->clone(true); - if ( (nbResComponents == MEDOP::NBCOMP_DEFAULT ) || + if ( (nbResComponents == MEDCALC::NBCOMP_DEFAULT ) || (nbResComponents < 1) || (nbResComponents > field_result->getNumberOfComponents()) ) { field_result->applyFunc(function); } @@ -382,7 +382,7 @@ MEDOP::FieldHandler * MEDCalculator_i::fct(const MEDOP::FieldHandler & f_hdl, field_result->setName(name.c_str()); long meshHandlerId = f_hdl.meshid; - MEDOP::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, + MEDCALC::FieldHandler * fieldResultHandler = _medDataManager->addField(field_result, meshHandlerId); return fieldResultHandler; } diff --git a/src/MEDOP/cmp/MEDCalculator_i.hxx b/src/MEDCalc/cmp/MEDCalculator_i.hxx similarity index 69% rename from src/MEDOP/cmp/MEDCalculator_i.hxx rename to src/MEDCalc/cmp/MEDCalculator_i.hxx index fb6b67374..0a2d8eb2b 100644 --- a/src/MEDOP/cmp/MEDCalculator_i.hxx +++ b/src/MEDCalc/cmp/MEDCalculator_i.hxx @@ -29,29 +29,29 @@ #include "MEDDataManager_i.hxx" -#include "MEDOP.hxx" -class MEDOP_EXPORT MEDCalculator_i: public POA_MEDOP::MEDCalculator, +#include "MEDCALC.hxx" +class MEDCALC_EXPORT MEDCalculator_i: public POA_MEDCALC::MEDCalculator, public SALOME::GenericObj_i { public: - // + // // =========================================================== // Functions specified in the IDL interface // =========================================================== // - MEDOP::FieldHandler * add(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl); - MEDOP::FieldHandler * sub(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl); - MEDOP::FieldHandler * mul(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl); - MEDOP::FieldHandler * div(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl); - MEDOP::FieldHandler * pow(const MEDOP::FieldHandler & f_hdl, CORBA::Long power); - MEDOP::FieldHandler * lin(const MEDOP::FieldHandler & f_hdl, double factor, double offset); - MEDOP::FieldHandler * dup(const MEDOP::FieldHandler & f_hdl); + MEDCALC::FieldHandler * add(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl); + MEDCALC::FieldHandler * sub(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl); + MEDCALC::FieldHandler * mul(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl); + MEDCALC::FieldHandler * div(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl); + MEDCALC::FieldHandler * pow(const MEDCALC::FieldHandler & f_hdl, CORBA::Long power); + MEDCALC::FieldHandler * lin(const MEDCALC::FieldHandler & f_hdl, double factor, double offset); + MEDCALC::FieldHandler * dup(const MEDCALC::FieldHandler & f_hdl); - MEDOP::FieldHandler * fct(const MEDOP::FieldHandler & f_hdl, + MEDCALC::FieldHandler * fct(const MEDCALC::FieldHandler & f_hdl, const char * function, CORBA::Long nbResComponents); - // + // // =========================================================== // Other public functions (non available via CORBA) // =========================================================== diff --git a/src/MEDOP/cmp/MEDDataManager_i.cxx b/src/MEDCalc/cmp/MEDDataManager_i.cxx similarity index 91% rename from src/MEDOP/cmp/MEDDataManager_i.cxx rename to src/MEDCalc/cmp/MEDDataManager_i.cxx index a2af2f07d..ce81c29d9 100644 --- a/src/MEDOP/cmp/MEDDataManager_i.cxx +++ b/src/MEDCalc/cmp/MEDDataManager_i.cxx @@ -77,21 +77,21 @@ std::string MEDDataManager_i::source_to_file(const char * source) * is a key to retrieve all informations concerning the data (meshes, * fields). */ -MEDOP::DatasourceHandler * MEDDataManager_i::loadDatasource(const char *filepath) { +MEDCALC::DatasourceHandler * MEDDataManager_i::loadDatasource(const char *filepath) { // We first check that this datasource is not already registered long sourceid = getDatasourceId(filepath); if ( sourceid != LONG_UNDEFINED ) { // The file is already registered under the identifier sourceid LOG("WRN: The file "<second)); + return new MEDCALC::FieldHandler(*(fieldIt->second)); } return NULL; } @@ -349,13 +349,13 @@ MEDOP::FieldHandler * MEDDataManager_i::getFieldHandler(CORBA::Long fieldHandler */ char * MEDDataManager_i::getFieldRepresentation(CORBA::Long fieldHandlerId) { LOG("getFieldRepresentation: START") - MEDOP::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); + MEDCALC::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); MEDCouplingFieldDouble* fieldDouble = getFieldDouble(fieldHandler); return CORBA::string_dup(fieldDouble->getArray()->repr().c_str()); } void MEDDataManager_i::saveFields(const char * filepath, - const MEDOP::FieldIdList & fieldIdList) + const MEDCALC::FieldIdList & fieldIdList) { LOG("saveFields to : " << filepath); @@ -376,7 +376,7 @@ void MEDDataManager_i::saveFields(const char * filepath, // Consider the first field to initiate the med file CORBA::Long fieldHandlerId = fieldIdList[0]; - MEDOP::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); + MEDCALC::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); MEDCouplingFieldDouble* fieldDouble = getFieldDouble(fieldHandler); try { @@ -429,7 +429,7 @@ void MEDDataManager_i::savePersistentFields(const char * filepath) { } } - MEDOP::FieldIdList fieldIdList; + MEDCALC::FieldIdList fieldIdList; fieldIdList.length(listId.size()); for (int i=0; iid = _fieldLastId; _fieldLastId++; fieldHandler->fieldname = fieldname; fieldHandler->meshname = meshname; @@ -483,7 +483,7 @@ MEDOP::FieldHandler * MEDDataManager_i::newFieldHandler(const char * fieldname, * model in a non-coherent state, by example if you change the mesh * name while the mesh has not been updated. */ -MEDOP::FieldHandler * MEDDataManager_i::updateFieldHandler(CORBA::Long fieldHandlerId, +MEDCALC::FieldHandler * MEDDataManager_i::updateFieldHandler(CORBA::Long fieldHandlerId, const char * fieldname, long iteration, long order, @@ -500,7 +500,7 @@ MEDOP::FieldHandler * MEDDataManager_i::updateFieldHandler(CORBA::Long fieldHand fieldIt->second->order = order; fieldIt->second->source = source; // Return a copy - return new MEDOP::FieldHandler(*fieldIt->second); + return new MEDCALC::FieldHandler(*fieldIt->second); } return NULL; } @@ -558,7 +558,7 @@ long MEDDataManager_i::getUMeshId(const MEDCouplingMesh * mesh) { * field instance. Otherwize, it just returns the MEDCoupling field * instance. */ -MEDCouplingFieldDouble * MEDDataManager_i::getFieldDouble(const MEDOP::FieldHandler * fieldHandler) +MEDCouplingFieldDouble * MEDDataManager_i::getFieldDouble(const MEDCALC::FieldHandler * fieldHandler) { LOG("getFieldDouble: START with id="<id); @@ -625,7 +625,7 @@ MEDCouplingFieldDouble * MEDDataManager_i::getFieldDouble(const MEDOP::FieldHand * @param[in] meshHandlerId the id of the meshHandler this filed is associated to. * @return a copy of the FieldHandler registered in the internal map for this field. */ -MEDOP::FieldHandler * MEDDataManager_i::addField(MEDCouplingFieldDouble * fieldDouble, +MEDCALC::FieldHandler * MEDDataManager_i::addField(MEDCouplingFieldDouble * fieldDouble, long meshHandlerId) { std::string fieldName(fieldDouble->getName()); @@ -645,7 +645,7 @@ MEDOP::FieldHandler * MEDDataManager_i::addField(MEDCouplingFieldDouble * fieldD // the fielddouble name, because this name describes the operation // the field has been created with. string * source = new string("mem://"); source->append(fieldName); - MEDOP::FieldHandler * fieldHandler = newFieldHandler(fieldName.c_str(), + MEDCALC::FieldHandler * fieldHandler = newFieldHandler(fieldName.c_str(), meshName.c_str(), type, iteration, @@ -680,7 +680,7 @@ MEDOP::FieldHandler * MEDDataManager_i::addField(MEDCouplingFieldDouble * fieldD // >>> a deep copy to avoid the destruction of the fieldHandler // >>> registered in the map (assignement acts as a destructor for // >>> CORBA struct). - return new MEDOP::FieldHandler(*fieldHandler); + return new MEDCALC::FieldHandler(*fieldHandler); } /*! @@ -695,7 +695,7 @@ void MEDDataManager_i::updateFieldMetadata(CORBA::Long fieldHandlerId, { // We have to update the field handler registered in the internal // map AND the associated fieldDouble loaded in memory. - MEDOP::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); + MEDCALC::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); updateFieldHandler(fieldHandlerId,fieldname,iteration,order,source); MEDCouplingFieldDouble* fieldDouble = getFieldDouble(fieldHandler); @@ -715,7 +715,7 @@ void MEDDataManager_i::updateFieldMetadata(CORBA::Long fieldHandlerId, */ void MEDDataManager_i::changeUnderlyingMesh(CORBA::Long fieldHandlerId, CORBA::Long meshHandlerId) { - MEDOP::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); + MEDCALC::FieldHandler * fieldHandler = getFieldHandler(fieldHandlerId); MEDCouplingFieldDouble* fieldDouble = getFieldDouble(fieldHandler); MEDCouplingMesh * newMesh = getUMesh(meshHandlerId); @@ -789,8 +789,8 @@ ParaMEDMEM::NatureOfField MEDDataManager_i::_getNatureOfField(const char* fieldN throw KERNEL::createSalomeException(message.c_str()); } -MEDOP::FieldHandler* MEDDataManager_i::interpolateField(CORBA::Long fieldHandlerId, CORBA::Long meshHandlerId, const MEDOP::InterpolationParameters& params) { - MEDOP::FieldHandler* fieldHandler = getFieldHandler(fieldHandlerId); +MEDCALC::FieldHandler* MEDDataManager_i::interpolateField(CORBA::Long fieldHandlerId, CORBA::Long meshHandlerId, const MEDCALC::InterpolationParameters& params) { + MEDCALC::FieldHandler* fieldHandler = getFieldHandler(fieldHandlerId); MEDCouplingFieldDouble* sourceField = getFieldDouble(fieldHandler); MEDCouplingMesh* sourceMesh = getUMesh(fieldHandler->meshid); MEDCouplingMesh* targetMesh = getUMesh(meshHandlerId); @@ -820,7 +820,7 @@ MEDOP::FieldHandler* MEDDataManager_i::interpolateField(CORBA::Long fieldHandler targetField->setName(targetMesh->getName() + "_field"); // 3. Create and register field handler - MEDOP::FieldHandler* fieldResultHandler = this->addField(targetField, this->getUMeshId(targetField->getMesh())); + MEDCALC::FieldHandler* fieldResultHandler = this->addField(targetField, this->getUMeshId(targetField->getMesh())); return fieldResultHandler; } diff --git a/src/MEDOP/cmp/MEDDataManager_i.hxx b/src/MEDCalc/cmp/MEDDataManager_i.hxx similarity index 60% rename from src/MEDOP/cmp/MEDDataManager_i.hxx rename to src/MEDCalc/cmp/MEDDataManager_i.hxx index 43eb0fcf0..bb20a0944 100644 --- a/src/MEDOP/cmp/MEDDataManager_i.hxx +++ b/src/MEDCalc/cmp/MEDDataManager_i.hxx @@ -36,17 +36,17 @@ using namespace ParaMEDMEM; #include using namespace std; -typedef map DatasourceHandlerMap; -typedef map::iterator DatasourceHandlerMapIterator; +typedef map DatasourceHandlerMap; +typedef map::iterator DatasourceHandlerMapIterator; -typedef map MeshHandlerMap; -typedef map::iterator MeshHandlerMapIterator; +typedef map MeshHandlerMap; +typedef map::iterator MeshHandlerMapIterator; -typedef map FieldseriesHandlerMap; -typedef map::iterator FieldseriesHandlerMapIterator; +typedef map FieldseriesHandlerMap; +typedef map::iterator FieldseriesHandlerMapIterator; -typedef map FieldHandlerMap; -typedef map::iterator FieldHandlerMapIterator; +typedef map FieldHandlerMap; +typedef map::iterator FieldHandlerMapIterator; typedef map FieldPersistencyMap; typedef map::iterator FieldPersistencyMapIterator; @@ -56,9 +56,9 @@ typedef map::iterator FieldDoubleMapIterator; typedef map MeshMap; typedef map::iterator MeshMapIterator; -#include "MEDOP.hxx" -class MEDOP_EXPORT MEDDataManager_i: public POA_MEDOP::MEDDataManager, - public SALOME::GenericObj_i +#include "MEDCALC.hxx" +class MEDCALC_EXPORT MEDDataManager_i: public POA_MEDCALC::MEDDataManager, + public SALOME::GenericObj_i { public: @@ -69,37 +69,37 @@ public: // // ----------------------------------------------------------- // Datasource management - MEDOP::DatasourceHandler * loadDatasource(const char *filepath); - MEDOP::DatasourceHandler * getDatasourceHandler(const char *filepath); + MEDCALC::DatasourceHandler * loadDatasource(const char *filepath); + MEDCALC::DatasourceHandler * getDatasourceHandler(const char *filepath); // ----------------------------------------------------------- // Mesh management - MEDOP::MeshHandlerList * getMeshList(CORBA::Long datasourceId); - MEDOP::MeshHandler * getMesh(CORBA::Long meshId); + MEDCALC::MeshHandlerList * getMeshList(CORBA::Long datasourceId); + MEDCALC::MeshHandler * getMesh(CORBA::Long meshId); // ----------------------------------------------------------- // Field management - MEDOP::FieldseriesHandlerList * getFieldseriesListOnMesh(CORBA::Long meshId); - MEDOP::FieldHandlerList * getFieldListInFieldseries(CORBA::Long fieldseriesId); + MEDCALC::FieldseriesHandlerList * getFieldseriesListOnMesh(CORBA::Long meshId); + MEDCALC::FieldHandlerList * getFieldListInFieldseries(CORBA::Long fieldseriesId); - MEDOP::FieldHandler * getFieldHandler(CORBA::Long fieldHandlerId); + MEDCALC::FieldHandler * getFieldHandler(CORBA::Long fieldHandlerId); char * getFieldRepresentation(CORBA::Long fieldHandlerId); - MEDOP::FieldHandlerList * getFieldHandlerList(); + MEDCALC::FieldHandlerList * getFieldHandlerList(); void saveFields(const char * filepath, - const MEDOP::FieldIdList & fieldIdList); + const MEDCALC::FieldIdList & fieldIdList); void markAsPersistent(CORBA::Long fieldHandlerId, bool persistent); void savePersistentFields(const char * filepath); void updateFieldMetadata(CORBA::Long fieldHandlerId, - const char * fieldname, - CORBA::Long iteration, - CORBA::Long order, - const char * source); + const char * fieldname, + CORBA::Long iteration, + CORBA::Long order, + const char * source); void changeUnderlyingMesh(CORBA::Long fieldHandlerId, CORBA::Long meshHandlerId); - MEDOP::FieldHandler* interpolateField(CORBA::Long fieldHandlerId, CORBA::Long meshHandlerId, const MEDOP::InterpolationParameters& params); + MEDCALC::FieldHandler* interpolateField(CORBA::Long fieldHandlerId, CORBA::Long meshHandlerId, const MEDCALC::InterpolationParameters& params); void setEventListenerIOR(const char * ior); char * getEventListenerIOR(); @@ -113,9 +113,9 @@ public: // static long LONG_UNDEFINED; static MEDDataManager_i * getInstance(); - MEDCouplingFieldDouble * getFieldDouble(const MEDOP::FieldHandler * fieldHandler); - MEDOP::FieldHandler * addField(MEDCouplingFieldDouble * fieldDouble, - long meshHandlerId=LONG_UNDEFINED); + MEDCouplingFieldDouble * getFieldDouble(const MEDCALC::FieldHandler * fieldHandler); + MEDCALC::FieldHandler * addField(MEDCouplingFieldDouble * fieldDouble, + long meshHandlerId=LONG_UNDEFINED); private: MEDDataManager_i(); @@ -139,18 +139,18 @@ private: string _medEventListenerIOR; - MEDOP::FieldHandler * newFieldHandler(const char * fieldname, - const char * meshname, - TypeOfField type, - long iteration, - long order, - const char * source); - - MEDOP::FieldHandler * updateFieldHandler(CORBA::Long fieldHandlerId, - const char * fieldname, - long iteration, - long order, - const char * source); + MEDCALC::FieldHandler * newFieldHandler(const char * fieldname, + const char * meshname, + TypeOfField type, + long iteration, + long order, + const char * source); + + MEDCALC::FieldHandler * updateFieldHandler(CORBA::Long fieldHandlerId, + const char * fieldname, + long iteration, + long order, + const char * source); std::string file_to_source(const char * filepath); std::string source_to_file(const char * source); diff --git a/src/MEDOP/cmp/MEDOPFactory_i.cxx b/src/MEDCalc/cmp/MEDFactory_i.cxx similarity index 71% rename from src/MEDOP/cmp/MEDOPFactory_i.cxx rename to src/MEDCalc/cmp/MEDFactory_i.cxx index f95429137..3e2982f3e 100644 --- a/src/MEDOP/cmp/MEDOPFactory_i.cxx +++ b/src/MEDCalc/cmp/MEDFactory_i.cxx @@ -19,7 +19,7 @@ // Authors : Guillaume Boulant (EDF) - 01/06/2011 -#include "MEDOPFactory_i.hxx" +#include "MEDFactory_i.hxx" #include "utilities.h" #include @@ -36,7 +36,7 @@ using namespace std; */ //============================================================================= -MEDOPFactory_i::MEDOPFactory_i(CORBA::ORB_ptr orb, +MEDFactory_i::MEDFactory_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, @@ -48,42 +48,42 @@ MEDOPFactory_i::MEDOPFactory_i(CORBA::ORB_ptr orb, _id = _poa->activate_object(_thisObj); } -MEDOPFactory_i::~MEDOPFactory_i() +MEDFactory_i::~MEDFactory_i() { } -MEDOP::MEDDataManager_ptr MEDOPFactory_i::getDataManager() { +MEDCALC::MEDDataManager_ptr MEDFactory_i::getDataManager() { MEDDataManager_i * medDataManager = MEDDataManager_i::getInstance(); - MEDOP::MEDDataManager_ptr medDataManagerPtr = medDataManager->_this(); + MEDCALC::MEDDataManager_ptr medDataManagerPtr = medDataManager->_this(); return medDataManagerPtr; } -MEDOP::MEDCalculator_ptr MEDOPFactory_i::getCalculator() { +MEDCALC::MEDCalculator_ptr MEDFactory_i::getCalculator() { MEDCalculator_i * medCalculator = MEDCalculator_i::getInstance(); - MEDOP::MEDCalculator_ptr medCalculatorPtr = medCalculator->_this(); + MEDCALC::MEDCalculator_ptr medCalculatorPtr = medCalculator->_this(); return medCalculatorPtr; } -MEDOP::MEDPresentationManager_ptr MEDOPFactory_i::getPresentationManager() { +MEDCALC::MEDPresentationManager_ptr MEDFactory_i::getPresentationManager() { MEDPresentationManager_i * manager = MEDPresentationManager_i::getInstance(); - MEDOP::MEDPresentationManager_ptr managerPtr = manager->_this(); + MEDCALC::MEDPresentationManager_ptr managerPtr = manager->_this(); return managerPtr; } extern "C" { - PortableServer::ObjectId * MEDOPFactoryEngine_factory( + PortableServer::ObjectId * MEDFactoryEngine_factory( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) + const char *interfaceName) { - MESSAGE("PortableServer::ObjectId * MEDOPEngine_factory()"); + MESSAGE("PortableServer::ObjectId * MEDEngine_factory()"); SCRUTE(interfaceName); - MEDOPFactory_i * factory = new MEDOPFactory_i(orb, poa, contId, - instanceName, - interfaceName); + MEDFactory_i * factory = new MEDFactory_i(orb, poa, contId, + instanceName, + interfaceName); return factory->getId() ; } } diff --git a/src/MEDOP/cmp/MEDOPFactory_i.hxx b/src/MEDCalc/cmp/MEDFactory_i.hxx similarity index 58% rename from src/MEDOP/cmp/MEDOPFactory_i.hxx rename to src/MEDCalc/cmp/MEDFactory_i.hxx index a724e297c..0fa3488cc 100644 --- a/src/MEDOP/cmp/MEDOPFactory_i.hxx +++ b/src/MEDCalc/cmp/MEDFactory_i.hxx @@ -19,43 +19,44 @@ // Authors : Guillaume Boulant (EDF) - 01/06/2011 -#ifndef _MEDOPFactory_HXX_ -#define _MEDOPFactory_HXX_ +#ifndef _MEDFactory_HXX_ +#define _MEDFactory_HXX_ #include -#include CORBA_SERVER_HEADER(MEDOPFactory) +#include CORBA_SERVER_HEADER(MEDFactory) #include CORBA_SERVER_HEADER(MEDDataManager) #include CORBA_SERVER_HEADER(MEDCalculator) #include CORBA_SERVER_HEADER(MEDPresentationManager) #include "SALOME_Component_i.hxx" -#include "MEDOP.hxx" -class MEDOP_EXPORT MEDOPFactory_i: public POA_MEDOP::MEDOPFactory, - public Engines_Component_i +#include "MEDCALC.hxx" +class MEDCALC_EXPORT MEDFactory_i: public POA_MEDCALC::MEDFactory, + public Engines_Component_i { public: - MEDOPFactory_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName); - virtual ~MEDOPFactory_i(); + MEDFactory_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName); + virtual ~MEDFactory_i(); /*! Returns the singleton instance of the data manager */ - MEDOP::MEDDataManager_ptr getDataManager(); + MEDCALC::MEDDataManager_ptr getDataManager(); /*! Returns the singleton instance of the calculator */ - MEDOP::MEDCalculator_ptr getCalculator(); + MEDCALC::MEDCalculator_ptr getCalculator(); /*! Returns the singleton instance of the prsentation manager */ - MEDOP::MEDPresentationManager_ptr getPresentationManager(); + MEDCALC::MEDPresentationManager_ptr getPresentationManager(); }; extern "C" -MEDOP_EXPORT PortableServer::ObjectId * MEDOPFactoryEngine_factory(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName); +MEDCALC_EXPORT PortableServer::ObjectId * +MEDFactoryEngine_factory(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName); #endif diff --git a/src/MEDOP/cmp/MEDPresentationManager_i.cxx b/src/MEDCalc/cmp/MEDPresentationManager_i.cxx similarity index 82% rename from src/MEDOP/cmp/MEDPresentationManager_i.cxx rename to src/MEDCalc/cmp/MEDPresentationManager_i.cxx index 4bcd056de..62ea2280d 100644 --- a/src/MEDOP/cmp/MEDPresentationManager_i.cxx +++ b/src/MEDCalc/cmp/MEDPresentationManager_i.cxx @@ -34,12 +34,20 @@ MEDPresentationManager_i::MEDPresentationManager_i() MEDPresentationManager_i::~MEDPresentationManager_i() { + /* + std::vector::iterator itr = this->_presentations.begin(); + for ( ; itr != this->_presentations.end(); ++itr) { + delete *itr; + *itr = NULL; + } + this->_presentations.clear(); + */ } #include void -MEDPresentationManager_i::MakeScalarMap(const MEDOP::ScalarMapParameters& params) +MEDPresentationManager_i::MakeScalarMap(const MEDCALC::ScalarMapParameters& params) { std::cout << "MEDPresentationManager_i::MakeScalarMap: Not implemented yet\n"; } diff --git a/src/MEDOP/cmp/MEDPresentationManager_i.hxx b/src/MEDCalc/cmp/MEDPresentationManager_i.hxx similarity index 80% rename from src/MEDOP/cmp/MEDPresentationManager_i.hxx rename to src/MEDCalc/cmp/MEDPresentationManager_i.hxx index b52cf558f..4d81c28e3 100644 --- a/src/MEDOP/cmp/MEDPresentationManager_i.hxx +++ b/src/MEDCalc/cmp/MEDPresentationManager_i.hxx @@ -26,16 +26,18 @@ #include "SALOME_GenericObj_i.hh" #include "MEDDataManager_i.hxx" -#include "MEDOP.hxx" +#include "MEDCALC.hxx" -class MEDOP_EXPORT MEDPresentationManager_i: public POA_MEDOP::MEDPresentationManager, - public SALOME::GenericObj_i +#include + +class MEDCALC_EXPORT MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager, + public SALOME::GenericObj_i { public: static MEDPresentationManager_i* getInstance(); - void MakeScalarMap(const MEDOP::ScalarMapParameters&); + void MakeScalarMap(const MEDCALC::ScalarMapParameters&); private: @@ -48,6 +50,9 @@ class MEDOP_EXPORT MEDPresentationManager_i: public POA_MEDOP::MEDPresentationMa // using the getInstance static method. static MEDPresentationManager_i * _instance; + // Owns a list of MEDPresentation objects + //std::vector _presentations; + }; #endif // _MED_PRESENTATION_MANAGER_I_HXX_ diff --git a/src/MEDOP/cmp/test_medop_components.py b/src/MEDCalc/cmp/test_medcalc_components.py similarity index 97% rename from src/MEDOP/cmp/test_medop_components.py rename to src/MEDCalc/cmp/test_medcalc_components.py index f332306d4..1340285c2 100644 --- a/src/MEDOP/cmp/test_medop_components.py +++ b/src/MEDCalc/cmp/test_medcalc_components.py @@ -20,15 +20,15 @@ # # This file is a set of basic use case to test (from the python -# context) the functions developped in the MEDOP engine and the -# associated MEDOP CORBA interface (MEDDataManager and +# context) the functions developped in the MEDCALC engine and the +# associated MEDCALC CORBA interface (MEDDataManager and # MEDCalaculator). # # (gboulant - 16/6/2011) # # WARN: this scripts is a unit tests runner for testing the SALOME -# MEDOP CORBA components and it should stay self-consistent. Then, +# MEDCALC CORBA components and it should stay self-consistent. Then, # it's on purpose that the script does not use the xmed python # package. Conversely, some (small) parts of this code could be # redundant with code from the xmed package. @@ -51,8 +51,8 @@ # # containerType = Name of the container factory # -componentName = "MEDOPFactory" -corbaModule = "MEDOP" +componentName = "MEDFactory" +corbaModule = "MEDCalc" containerType = "FactoryServer" import salome @@ -79,7 +79,7 @@ try: except KeyError, e: raise RuntimeError("MED_ROOT_DIR should be defined to load the test data") -RESDIR=os.path.join(MED_ROOT_DIR,"share","salome","resources","med","medop_testfiles") +RESDIR=os.path.join(MED_ROOT_DIR,"share","salome","resources","med","medcalc_testfiles") def getFilePath(filename): """ @@ -288,8 +288,8 @@ def TEST_Calculator_applyFunc(): # In this example, "u" stands for the whole field calculator = factory.getCalculator() - import MEDOP - nbResultingComponent = MEDOP.NBCOMP_DEFAULT + import MEDCALC + nbResultingComponent = MEDCALC.NBCOMP_DEFAULT res = calculator.fct(fieldHandler,"abs(u)",nbResultingComponent); print res diff --git a/src/MEDOP/doc/CMakeLists.txt b/src/MEDCalc/doc/CMakeLists.txt similarity index 100% rename from src/MEDOP/doc/CMakeLists.txt rename to src/MEDCalc/doc/CMakeLists.txt diff --git a/src/MEDOP/doc/models/medop.xmi b/src/MEDCalc/doc/models/medcalc.xmi similarity index 97% rename from src/MEDOP/doc/models/medop.xmi rename to src/MEDCalc/doc/models/medcalc.xmi index 9422c56f0..00fbdb5a4 100644 --- a/src/MEDOP/doc/models/medop.xmi +++ b/src/MEDCalc/doc/models/medcalc.xmi @@ -31,7 +31,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -289,8 +289,8 @@ - - + + diff --git a/src/MEDOP/doc/sphinx/CMakeLists.txt b/src/MEDCalc/doc/sphinx/CMakeLists.txt similarity index 97% rename from src/MEDOP/doc/sphinx/CMakeLists.txt rename to src/MEDCalc/doc/sphinx/CMakeLists.txt index 411eaefdf..af144c98b 100644 --- a/src/MEDOP/doc/sphinx/CMakeLists.txt +++ b/src/MEDCalc/doc/sphinx/CMakeLists.txt @@ -20,7 +20,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} html) -SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(html_docs COMMAND ${_cmd}) diff --git a/src/MEDOP/doc/sphinx/_static/documents/20070105_CEA_VBERGEAUD_GuideutilisateurMEDMEMOIRE.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20070105_CEA_VBERGEAUD_GuideutilisateurMEDMEMOIRE.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20070105_CEA_VBERGEAUD_GuideutilisateurMEDMEMOIRE.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20070105_CEA_VBERGEAUD_GuideutilisateurMEDMEMOIRE.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20091211_CEA_AGEAY_09-017-RT-A_Normalisation_des_champs_et_des_maillages_pour_le_couplage_de_codes.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20091211_CEA_AGEAY_09-017-RT-A_Normalisation_des_champs_et_des_maillages_pour_le_couplage_de_codes.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20091211_CEA_AGEAY_09-017-RT-A_Normalisation_des_champs_et_des_maillages_pour_le_couplage_de_codes.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20091211_CEA_AGEAY_09-017-RT-A_Normalisation_des_champs_et_des_maillages_pour_le_couplage_de_codes.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20091218_EDF_VCANO_H-I2C-2009-03595-FR.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20091218_EDF_VCANO_H-I2C-2009-03595-FR.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20091218_EDF_VCANO_H-I2C-2009-03595-FR.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20091218_EDF_VCANO_H-I2C-2009-03595-FR.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20100129_MAN_seminaireEDF-CEA_all.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20100129_MAN_seminaireEDF-CEA_all.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20100129_MAN_seminaireEDF-CEA_all.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20100129_MAN_seminaireEDF-CEA_all.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20101027_MAN_revueEDF-CEA.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20101027_MAN_revueEDF-CEA.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20101027_MAN_revueEDF-CEA.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20101027_MAN_revueEDF-CEA.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20110309_XMED_scan_notes.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20110309_XMED_scan_notes.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20110309_XMED_scan_notes.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20110309_XMED_scan_notes.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20110309_XMED_scan_remarques_ELORENTZ.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20110309_XMED_scan_remarques_ELORENTZ.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20110309_XMED_scan_remarques_ELORENTZ.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20110309_XMED_scan_remarques_ELORENTZ.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/20110310_seminaireEDF-CEA_maquetteXMED.pdf b/src/MEDCalc/doc/sphinx/_static/documents/20110310_seminaireEDF-CEA_maquetteXMED.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/20110310_seminaireEDF-CEA_maquetteXMED.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/20110310_seminaireEDF-CEA_maquetteXMED.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/xmed-develguide.pdf b/src/MEDCalc/doc/sphinx/_static/documents/xmed-develguide.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/xmed-develguide.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/xmed-develguide.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/xmed-specifications.pdf b/src/MEDCalc/doc/sphinx/_static/documents/xmed-specifications.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/xmed-specifications.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/xmed-specifications.pdf diff --git a/src/MEDOP/doc/sphinx/_static/documents/xmed-userguide.pdf b/src/MEDCalc/doc/sphinx/_static/documents/xmed-userguide.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/documents/xmed-userguide.pdf rename to src/MEDCalc/doc/sphinx/_static/documents/xmed-userguide.pdf diff --git a/src/MEDOP/doc/sphinx/_static/medop.css b/src/MEDCalc/doc/sphinx/_static/medop.css similarity index 100% rename from src/MEDOP/doc/sphinx/_static/medop.css rename to src/MEDCalc/doc/sphinx/_static/medop.css diff --git a/src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_manipulation_de_champs.pdf b/src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_manipulation_de_champs.pdf similarity index 100% rename from src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_manipulation_de_champs.pdf rename to src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_manipulation_de_champs.pdf diff --git a/src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_1.ogv b/src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_1.ogv similarity index 100% rename from src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_1.ogv rename to src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_1.ogv diff --git a/src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_3.ogv b/src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_3.ogv similarity index 100% rename from src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_3.ogv rename to src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_3.ogv diff --git a/src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_4.ogv b/src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_4.ogv similarity index 100% rename from src/MEDOP/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_4.ogv rename to src/MEDCalc/doc/sphinx/_static/presentations/20111115_JUS-2011/20111115_JUS2011_medop_exemple_4.ogv diff --git a/src/MEDOP/doc/sphinx/conf.py.in b/src/MEDCalc/doc/sphinx/conf.py.in similarity index 92% rename from src/MEDOP/doc/sphinx/conf.py.in rename to src/MEDCalc/doc/sphinx/conf.py.in index 9292409b4..bad7ac849 100644 --- a/src/MEDOP/doc/sphinx/conf.py.in +++ b/src/MEDCalc/doc/sphinx/conf.py.in @@ -132,7 +132,7 @@ html_theme_options = { # The stylecheet file will be searched within the static path, while # the layout.html file will be searched within the template path # (Note that this parameter can't be used together with html_theme. Exclusive) -html_style = 'medop.css' +html_style = 'medcalc.css' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -175,7 +175,7 @@ html_copy_source = True #html_file_suffix = '' # Output file base name for HTML help builder. -htmlhelp_basename = 'medopdoc' +htmlhelp_basename = 'medcalcdoc' # Options for LaTeX output @@ -196,11 +196,11 @@ latex_elements = { # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('index', 'medop-alldoc.tex', 'Documentation du module MED', 'G. Boulant', 'manual'), - ('medop-specifications', 'medop-specifications.tex', 'Module MED - Specifications', 'G. Boulant', 'manual'), - ('medop-develguide', 'medop-develguide.tex', 'Module MED - Guide de developpement', 'G. Boulant', 'manual'), - ('medop-userguide-gui', 'medop-userguide-gui.tex', 'Module MED - Guide d\'utilisation de l\'interface graphique', 'G. Boulant', 'howto'), - ('medop-userguide-api', 'medop-userguide-api.tex', 'MEDMEM library - Starter guide for users', 'G. Boulant', 'howto') + ('index', 'medcalc-alldoc.tex', 'Documentation du module MED', 'G. Boulant', 'manual'), + ('medcalc-specifications', 'medcalc-specifications.tex', 'Module MED - Specifications', 'G. Boulant', 'manual'), + ('medcalc-develguide', 'medcalc-develguide.tex', 'Module MED - Guide de developpement', 'G. Boulant', 'manual'), + ('medcalc-userguide-gui', 'medcalc-userguide-gui.tex', 'Module MED - Guide d\'utilisation de l\'interface graphique', 'G. Boulant', 'howto'), + ('medcalc-userguide-api', 'medcalc-userguide-api.tex', 'MEDMEM library - Starter guide for users', 'G. Boulant', 'howto') ] # The name of an image file (relative to this directory) to place at the top of diff --git a/src/MEDOP/doc/sphinx/fr/images/xmed-gui-withframe.png b/src/MEDCalc/doc/sphinx/fr/images/xmed-gui-withframe.png similarity index 100% rename from src/MEDOP/doc/sphinx/fr/images/xmed-gui-withframe.png rename to src/MEDCalc/doc/sphinx/fr/images/xmed-gui-withframe.png diff --git a/src/MEDOP/doc/sphinx/fr/images/xmed-gui.png b/src/MEDCalc/doc/sphinx/fr/images/xmed-gui.png similarity index 100% rename from src/MEDOP/doc/sphinx/fr/images/xmed-gui.png rename to src/MEDCalc/doc/sphinx/fr/images/xmed-gui.png diff --git a/src/MEDOP/doc/sphinx/fr/index.rst b/src/MEDCalc/doc/sphinx/fr/index.rst similarity index 88% rename from src/MEDOP/doc/sphinx/fr/index.rst rename to src/MEDCalc/doc/sphinx/fr/index.rst index cf3fa4b1e..8d2939d2e 100644 --- a/src/MEDOP/doc/sphinx/fr/index.rst +++ b/src/MEDCalc/doc/sphinx/fr/index.rst @@ -17,23 +17,23 @@ Documentation de référence .. toctree:: :maxdepth: 1 - medop-userguide-gui.rst - medop-userguide-api.rst + medcalc-userguide-gui.rst + medcalc-userguide-api.rst **Documentation technique** .. toctree:: :maxdepth: 1 - medop-specifications.rst - medop-develguide.rst + medcalc-specifications.rst + medcalc-develguide.rst **Documentation annexe** .. toctree:: :maxdepth: 1 - medop-references.rst + medcalc-references.rst Archives documentaires ====================== diff --git a/src/MEDOP/doc/sphinx/fr/medop-definitions.rst b/src/MEDCalc/doc/sphinx/fr/medcalc-definitions.rst similarity index 100% rename from src/MEDOP/doc/sphinx/fr/medop-definitions.rst rename to src/MEDCalc/doc/sphinx/fr/medcalc-definitions.rst diff --git a/src/MEDOP/doc/sphinx/fr/medop-develguide.rst b/src/MEDCalc/doc/sphinx/fr/medcalc-develguide.rst similarity index 88% rename from src/MEDOP/doc/sphinx/fr/medop-develguide.rst rename to src/MEDCalc/doc/sphinx/fr/medcalc-develguide.rst index 444a0a9a6..063a8e84f 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-develguide.rst +++ b/src/MEDCalc/doc/sphinx/fr/medcalc-develguide.rst @@ -2,19 +2,19 @@ :keywords: maillage, champ, manipulation, med, développement :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Module MED: Guide de développement du composant MEDOP +Module MED: Guide de développement du composant MEDCalc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Le composant logiciel MEDOP est un élément du module MED. Il fournit +Le composant logiciel MEDCalc est un élément du module MED. Il fournit une interface utilisateur pour la manipulation de maillages et de champs, composée d'une interface texte (TUI) et d'une interface graphique (GUI). L'interface graphique constitue l'interface graphique du module MED. -Ce document est la documentation technique du composant MEDOP. Il +Ce document est la documentation technique du composant MEDCalc. Il fournit les instructions à suivre pour installer le composant en vue d'un travail de développement, puis décrit les éléments de conception. @@ -25,43 +25,43 @@ d'un travail de développement, puis décrit les éléments de conception. Mise en place de l'espace de développement ========================================== -Gestion de configuration du composant MEDOP +Gestion de configuration du composant MEDCalc ------------------------------------------- -Le composant logiciel MEDOP est un package du module SALOME MED, +Le composant logiciel MEDCalc est un package du module SALOME MED, hébergé dans l'espace source au niveau du sous-répertoire -`src/MEDOP`. La gestion des fichiers sources est donc intégrée dans le +`src/MEDCalc`. La gestion des fichiers sources est donc intégrée dans le module SALOME MED. -Organisation des sources du composant MEDOP +Organisation des sources du composant MEDCalc ------------------------------------------- -Le répertoire source `src/MEDOP` distingue les sous-répertoires +Le répertoire source `src/MEDCalc` distingue les sous-répertoires suivants: * cmp: package containing the SALOME components * tui: package containing the python user interface * gui: package containing the graphical user interface (the GUI part of the MED module) -* res: resources files associated to the MEDOP package (icons, config +* res: resources files associated to the MEDCalc package (icons, config files, data files, ...) * exe: additional executable programs that can be launched from the - MEDOP framework + MEDCalc framework -Construction du composant MEDOP +Construction du composant MEDCalc ------------------------------- -Intégré à la construction du module MED. Le composant MEDOP dépend de +Intégré à la construction du module MED. Le composant MEDCalc dépend de MEDCoupling et MEDLoader uniquement. -Exécution des tests unitaires du composant MEDOP +Exécution des tests unitaires du composant MEDCalc ------------------------------------------------ Les tests unitaires peuvent être exécutés au moyen de scripts python lancés depuis une session shell SALOME. Dans un nouveau shell, taper:: $ ./appli/runSession - [NS=mars:2810]$ python appli/bin/salome/med/test_medop_components.py + [NS=mars:2810]$ python appli/bin/salome/med/test_medcalc_components.py L'exécution imprime un rapport détaillant le résultat pour chaque fonction de test:: @@ -82,7 +82,7 @@ fonction de test:: Les scripts de test sont installés dans le répertoire ``bin/med``. On trouve: -* ``test_medop_components.py``: test les composants SALOME développés pour +* ``test_medcalc_components.py``: test les composants SALOME développés pour la manipulation de champs (``MEDDataManager`` et ``MEDCalculator``). * ``test_xmed_fieldOperations.py``: test des operations de champs telles qu'elles sont mises en oeuvre depuis l'interface textuelle. @@ -161,14 +161,14 @@ Ecrire un service CORBA qui retourne une sequence de FieldHandler: .. code-block:: cpp - MEDOP::FieldHandlerList * MyFunction(...) { - vector fieldHandlerList; + MEDCALC::FieldHandlerList * MyFunction(...) { + vector fieldHandlerList; ... fieldHandlerList.push_back(fieldHandler); // Map the resulting list to a CORBA sequence for return: - MEDOP::FieldHandlerList_var fieldHandlerSeq = new MEDOP::FieldHandlerList(); + MEDCALC::FieldHandlerList_var fieldHandlerSeq = new MEDCALC::FieldHandlerList(); int nbFieldHandler = fieldHandlerList.size(); fieldHandlerSeq->length(nbFieldHandler); for (int i=0; iid] = fieldHandler; // >>> WARNING: CORBA struct specification indicates that the @@ -193,7 +193,7 @@ Ecrire un service CORBA qui retourne une structure CORBA: // copy of the structure found in the map and return the copy. The // CORBA struct specification indicates that a deep copy can be // done using the copy constructor. <<< - return new MEDOP::FieldHandler(*fieldHandler); + return new MEDCALC::FieldHandler(*fieldHandler); @@ -212,7 +212,7 @@ ANNEXE B: Traçabilité avec le module XMED ========================================= Le module SALOME de nom XMED est l'espace de développement initial du -composant logiciel MEDOP, intégré aujourd'hui au module MED. Cette +composant logiciel MEDCalc, intégré aujourd'hui au module MED. Cette annexe est la notice technique de ce module, qui reste disponible mais qui n'est plus maintenu. diff --git a/src/MEDOP/doc/sphinx/fr/medop-references.rst b/src/MEDCalc/doc/sphinx/fr/medcalc-references.rst similarity index 96% rename from src/MEDOP/doc/sphinx/fr/medop-references.rst rename to src/MEDCalc/doc/sphinx/fr/medcalc-references.rst index 9be8cdc5f..2153884c1 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-references.rst +++ b/src/MEDCalc/doc/sphinx/fr/medcalc-references.rst @@ -2,7 +2,7 @@ ANNEXE: Références documentaires %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst Documents de référence: diff --git a/src/MEDOP/doc/sphinx/medop-specifications.rst b/src/MEDCalc/doc/sphinx/fr/medcalc-specifications.rst similarity index 99% rename from src/MEDOP/doc/sphinx/medop-specifications.rst rename to src/MEDCalc/doc/sphinx/fr/medcalc-specifications.rst index 09ca88cd2..ae152232e 100644 --- a/src/MEDOP/doc/sphinx/medop-specifications.rst +++ b/src/MEDCalc/doc/sphinx/fr/medcalc-specifications.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation, med :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Module MED: Spécifications fonctionnelles et techniques @@ -123,11 +123,11 @@ supplémentaire: Par convention, on utilisera par la suite les notations: * **U(t,p,c)** pour désigner la valeur de la composante c d'un champ U - à la position p et prise à l'instant t; + à la position p et prise à l'instant t; * **U(t,p,:)** pour signifier que l'on manipule l'ensemble de toutes les composantes; * **U(t,:,c)** pour signifier que l'on manipule le domaine de - définition spatial complet. + définition spatial complet. Dans une grande majorité des cas d'usage on travaille à temps t fixé et sur un domaine spatiale prédéfini. Aussi on utilisera également la @@ -167,7 +167,7 @@ On formalise donc le concept d'opération par les propriétés suivantes: * L'opérateur est caractérisé par un domaine d'application qui spécifie la portée de l'opération. Ce domaine comporte plusieurs dimensions: - + - Un domaine temporel T qui spécifie les pas de temps sur lesquels l'opération est appliquée; - Un domaine spatial D qui spécifie la limite de portée de @@ -283,13 +283,13 @@ de changer le maillage support M1 d'un champs par un maillage M2 à partir du moment où les maillages M1 et M2 sont identiques géométriquement à une erreur près qu'il est possible de spécifier. -.. note:: +.. note:: D'autres situations limites peuvent être évoquées sous l'angle informatique. Ce sont des situations qui a priori n'ont pas de raison d'exister sur le plan conceptuel mais qui peuvent très bien survenir au niveau du module informatique compte-tenu des particularités du modèle MED. Par exemple: - + * Le nombre et la nature des composantes ne sont pas identiques pour tous les champs d'entrée. Par exemple, U défini ses composantes comme U(:,:,1)=Ux, U(:,:,2)=Uy, U(:,:,3)=Uz et V les @@ -408,14 +408,14 @@ de classer ces opérations en deux catégories: * les **opérations binaires**, qui prennent deux opérandes en argument. C'est le cas des opérations algébriques et des opérations vectorielles. - + A partir de cette classification, il convient de distinguer trois formes d'usage selon la nature des opérandes: * les opérandes sont exclusivement des scalaires (typiquement des valeurs de composantes des champs et des paramètres numériques). Par exemple:: - + W(:,:4) = 1+2xU(:,:,2)+V(:,:,3) * les opérandes sont exclusivement des champs. Par exemple:: @@ -478,7 +478,7 @@ paramètre numérique ou la composante d'un champ): .. warning:: A développer: - + * Analyse dimensionnelle du champ résultats pour adapter l'unité. Par exemple, si on fait UxV où U et V sont exprimés en [m] alors le résultat est en [m2]. @@ -676,7 +676,7 @@ l'interface textuelle: l'utilisateur à spécifier un alias pour la variable python qui va permettre la manipulation du champ dans l'interface textuelle de l'espace de travail (par défaut, le nom complet du champ est - proposé). Ici, l'utilisateur spécifie ``f4``: + proposé). Ici, l'utilisateur spécifie ``f4``: .. image:: images/xmed-gui-datasource-useinworkspace_70pc.png :align: center @@ -709,7 +709,7 @@ Dans le cadre défini ci-dessus, une session d'utilisation type est: conséquent de simplification et d'assistance en ligne). Par exemple, si ``fa`` et ``fb`` désignent deux champs définis dans l'espace de travail, alors on peut en faire la somme par la commande:: - + >>> r=fa+fb * Effectuer les contrôles visuel et les diagnostics en ligne de @@ -727,7 +727,7 @@ Sur cette base, on peut envisager une grande variété de cas d'utilisation: chargée dans le dataspace (l'étude SALOME techniquement) et peut être explorée au niveau de l'arbre d'étude. L'arbre peut faire apparaître: - + - les maillages et les groupes (qui peuvent être utilisés éventuellement pour restreindre le domaine d'application) - les champs dont on peut explorer les composantes et les itérations @@ -777,7 +777,7 @@ fonction de visualisation: choisir l'option "Visualize": .. image:: images/xmed-gui-datasource-visualize_70pc.png - :align: center + :align: center * Cette option déclenche l'affichage d'une carte de champ sur le cadre d'affichage des viewers SALOME: diff --git a/src/MEDOP/doc/sphinx/fr/medop-userguide-gui.rst b/src/MEDCalc/doc/sphinx/fr/medcalc-userguide-gui.rst similarity index 94% rename from src/MEDOP/doc/sphinx/fr/medop-userguide-gui.rst rename to src/MEDCalc/doc/sphinx/fr/medcalc-userguide-gui.rst index f09404a64..a90efde32 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-userguide-gui.rst +++ b/src/MEDCalc/doc/sphinx/fr/medcalc-userguide-gui.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation, guide utilisateur :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Module MED: Guide d'utilisation de l'interface graphique @@ -16,7 +16,7 @@ champs. .. warning:: Le document est autonome, mais il est vivement conseillé de parcourir au préalable (ou en parallèle) :doc:`le document de - spécifications`, au moins pour fixer les + spécifications`, au moins pour fixer les concepts et la terminologie. .. contents:: Sommaire @@ -331,11 +331,11 @@ champ manoeuvré. Pour cela, on tape simplement le nom de la variable puis retour:: >>> f3 - field name (id) = Pulse (3) - mesh name (id) = Grid_80x80 (0) - discretization = ON_NODES - (iter, order) = (3,-1) - data source = file:///home/gboulant/development/projets/salome/MEDOP/XMED/xmed/resources/datafiles/timeseries.med + field name (id) = Pulse (3) + mesh name (id) = Grid_80x80 (0) + discretization = ON_NODES + (iter, order) = (3,-1) + data source = file:///home/gboulant/development/projets/salome/MEDOP/XMED/xmed/resources/datafiles/timeseries.med Elle peut également être utilisée comme argument des commandes de gestion disponibles dans l'interface textuelle (dont la liste @@ -363,16 +363,16 @@ commande ``print``:: >>> print f3 Data content : - Tuple #0 : -0.6 - Tuple #1 : -0.1 - Tuple #2 : 0.4 - Tuple #3 : -0.1 - Tuple #4 : 0.4 + Tuple #0 : -0.6 + Tuple #1 : -0.1 + Tuple #2 : 0.4 + Tuple #3 : -0.1 + Tuple #4 : 0.4 ... - Tuple #6556 : 3.5 - Tuple #6557 : 3.3 - Tuple #6558 : 1.5 - Tuple #6559 : 0.3 + Tuple #6556 : 3.5 + Tuple #6557 : 3.3 + Tuple #6558 : 1.5 + Tuple #6559 : 0.3 Tuple #6560 : 0.2 Il est important de noter que les opérations entre champs ne peuvent @@ -661,25 +661,27 @@ Utilisation de l'interface textuelle du module MED (TUI) Toutes les opérations menées au moyen de l'interface graphique peuvent être réalisées (avec plus ou moins de facilité) avec l'interface textuelle. Le module de manipulation de champs peut même être utilisé -exclusivement en mode texte. Pour cela, on lance la commande:: +exclusivement en mode texte. +.. + Pour cela, on lance la commande:: $ /medop.sh - -Cette commande ouvre une console de commandes ``medop>``. Un fichier -med peut être chargé et travaillé, par exemple pour créer des champs à -partir des données du fichier. +.. + Cette commande ouvre une console de commandes ``medop>``. Un fichier + med peut être chargé et travaillé, par exemple pour créer des champs à + partir des données du fichier. Que l'on soit en mode texte pur ou en mode graphique, un séquence de travail type dans la console peut ressembler au jeu d'instructions suivantes:: - >>> load("/path/to/mydata.med") + >>> medcalc.LoadDataSource("/path/to/mydata.med") >>> la id=0 name = testfield1 id=1 name = testfield2 - >>> f1=get(0) - >>> f2=get(1) - >>> ls + >>> f1=accessField(0) + >>> f2=accessField(1) + >>> ls f1 (id=0, name=testfield1) f2 (id=1, name=testfield2) >>> r=f1+f2 @@ -692,37 +694,39 @@ suivantes:: f1 (id=0, name=testfield1) f2 (id=1, name=testfield2) r (id=2, name=toto) - >>> put(r) - >>> save("result.med") + >>> putInWorkspace(r) + >>> saveWorkspace("result.med") Les commandes principales sont: -* ``load``: charge un fichier med dans la base de données (utile +* ``LoadDataSource``: charge un fichier med dans la base de données (utile uniquement en mode texte pur):: - >>> load("/path/to/datafile.med") + >>> LoadDataSource("/path/to/datafile.med") + +* ``LoadImageAsDataSource``: load an image as a med file * ``la``: affiche la liste de tous les champs chargés en base de données ("list all") -* ``get``: définit un champ dans l'espace de travail à partir de son +* ``accessField``: définit un champ dans l'espace de travail à partir de son identifiant (utile plutôt en mode texte pur car l'interface graphique permet de faire cette opération par sélection d'un champ dans le dataspace):: - >>> f=get(fieldId) + >>> f=accessField(fieldId) * ``ls``: affiche la liste des champs présent dans l'espace de travail ("list") -* ``put``: met un champ en référence dans l'*espace de gestion*:: +* ``putInWorkspace``: met un champ en référence dans l'*espace de gestion*:: - >>> put(f) + >>> putInWorkspace(f) -* ``save``: sauvegarde tous les champs référencés dans l'espace de +* ``saveWorkspace``: sauvegarde tous les champs référencés dans l'espace de gestion dans un fichier med:: - >>> save("/path/to/resultfile.med") + >>> saveWorkspace("/path/to/resultfile.med") .. note:: On peut faire à ce stade plusieurs remarques: - * la commande ``load`` charge uniquement les méta-informations + * la commande ``LoadDataSource`` charge uniquement les méta-informations décrivant les maillage et les champs (noms, type de discrétisation, liste des pas de temps). Les maillages et les valeurs physiques des champs sont chargées ultérieurement (et @@ -730,7 +734,7 @@ Les commandes principales sont: opération. Dans tous les cas, les données med (méta-informations et valeurs) sont physiquement stockées au niveau de l'espace *base de données*. - * la commande ``get`` définit en réalité un *manipulateur de champ* + * la commande ``accessField`` définit en réalité un *manipulateur de champ* dans l'espace de travail, c'est-à-dire une variable qui fait la liaison avec le champ physique hébergé dans la base de données. Les données physiques ne circulent jamais entre les @@ -740,9 +744,9 @@ Les commandes principales sont: Les commandes TUI suivantes nécessitent de travailler dans l'environnement graphique: -* ``visu``: afficher une carte de champ pour contrôle visuel rapide - (pas de paramettrage possible) - - >>> view(f) - - +* ``medcalc.MakeDeflectionShape`` +* ``medcalc.MakeIsoSurface`` +* ``medcalc.MakePointSprite`` +* ``medcalc.MakeScalarMap`` +* ``medcalc.MakeSlices`` +* ``medcalc.MakeVectorField`` diff --git a/src/MEDOP/doc/sphinx/fr/medop-prototype-develguide.rst b/src/MEDCalc/doc/sphinx/fr/medop-prototype-develguide.rst similarity index 99% rename from src/MEDOP/doc/sphinx/fr/medop-prototype-develguide.rst rename to src/MEDCalc/doc/sphinx/fr/medop-prototype-develguide.rst index de2387b74..0bc2eae90 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-prototype-develguide.rst +++ b/src/MEDCalc/doc/sphinx/fr/medop-prototype-develguide.rst @@ -210,14 +210,14 @@ l'addition de deux champs: import salome salome.salome_init() import SALOME_MED - + medComp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") medObj = medComp.readStructFile("myfile.med",salome.myStudyName) medOp = medObj.createMedOperator() - + f1 = medObj.getField("testfield1",-1,-1) f2 = medObj.getField("testfield2",-1,-1) - + somme = medOp.add(f1,f2) Il est à noter qu'une instance de ``SALOME_MED::MEDOP`` est associé à @@ -269,7 +269,7 @@ et le numéro d'iteration: salome.salome_init() import SALOME_MED - medComp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") + medComp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") medObj = medComp.readStructFile("myfile.med",salome.myStudyName) from xmed import fieldproxy @@ -312,9 +312,9 @@ graphique en images: .. |IMG_SELECT| image:: images/medop-gui-selectfield_scale.png .. |IMG_ALIAS| image:: images/medop-gui-aliasfield_scale.png -+---------------+---------------+ ++---------------+---------------+ | |IMG_SELECT| | |IMG_ALIAS| | -+---------------+---------------+ ++---------------+---------------+ L'image de gauche montre la sélection du pas de temps, l'image de droite la boîte de dialogue qui permet la saisie de l'alias avec @@ -353,7 +353,7 @@ un objet CORBA): // We suppose here that we have a CORBA object reference (object of // type *_ptr or *_var), for example a SALOME_MED::MED object. - SALOME_MED::MED_ptr medObj = ... // anything to get this object + SALOME_MED::MED_ptr medObj = ... // anything to get this object // Get the IOR of this object QString medIOR = SalomeApp_Application::orb()->object_to_string(medObj); @@ -363,7 +363,7 @@ un objet CORBA): QStringList commands; commands+="import salome"; commands+=QString("med=salome.orb.string_to_object(\"%1\")").arg(medIOR); - + QStringListIterator it(commands); while (it.hasNext()) { pyConsole->exec(it.next()); @@ -411,9 +411,9 @@ commandes suivantes: from xmed.fieldproxy import getFieldFromMed from xmed.medproxy import getMedProxy - + med = getMedProxy("IOR:010000001700000049444c3a53414c4f4d455f4d45442f4d45443a312e300000010000000000000064000000010102000e0000003133302e39382e37372e313733009e0a0e000000feadc4ca4c00003169000000001100000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100") - + f1=getFieldFromMed(med,"testfield1",-1,-1) Ce jeu d'instructions reconstitue un pointeur vers le servant CORBA @@ -543,9 +543,9 @@ module du champ dans l'exemple implémenté par défaut): .. |IMG_VISU| image:: images/medop-gui-visufield_scale.png .. |IMG_RESULT| image:: images/medop-gui-result_scale.png -+---------------+---------------+ ++---------------+---------------+ | |IMG_VISU| | |IMG_RESULT| | -+---------------+---------------+ ++---------------+---------------+ Cette fonction répond au besoin de contrôle interactif des résultats produits par les opérations de manipulation de champs. @@ -556,7 +556,7 @@ donnée du servant ``SALOME_MED::FIELD`` qui lui est associé (représenté par la variable ``field_ptr`` dans l'exemple ci-dessous): .. code-block:: python - + import salome import VISU @@ -710,11 +710,11 @@ automatiser proprement): et fournit des fonctions de test unitaire (à exécuter ou pour s'en inspirer). Après avoir lancé SALOME via une application virtuelle, on peut taper:: - + $ /runSession [NS=venus:2810] $ python -i test_medoperation.py - >>> - + >>> + - Ceci permet de tester en particulier l'interface ``MedOp`` et son utilisation dans le module python ``fieldproxy.py``. diff --git a/src/MEDOP/doc/sphinx/fr/medop-prototype-medmem.rst b/src/MEDCalc/doc/sphinx/fr/medop-prototype-medmem.rst similarity index 98% rename from src/MEDOP/doc/sphinx/fr/medop-prototype-medmem.rst rename to src/MEDCalc/doc/sphinx/fr/medop-prototype-medmem.rst index 2302f7b70..9c29fee19 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-prototype-medmem.rst +++ b/src/MEDCalc/doc/sphinx/fr/medop-prototype-medmem.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, MED, MEDMEM :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Note de travail concernant l'utilisation de MEDMEM @@ -115,7 +115,7 @@ d'entrée/sortie branché sur le fichier (``testfilename`` dans l'exemple): .. code-block:: cpp - + MED *myMed = new MED; MED_MED_RDONLY_DRIVER *driverIn = new MED_MED_RDONLY_DRIVER(testfilename, myMed); driverIn->open(); @@ -140,7 +140,7 @@ Puis le champ qui lui est associé doit être physiquement chargé pour permettre la mise à jour du support: .. code-block:: cpp - + MESH * mesh = myMed->getMesh(field); mesh->read(); myMed->updateSupport(); @@ -148,7 +148,7 @@ permettre la mise à jour du support: Pour enfin charger les valeurs des composantes du champ: .. code-block:: cpp - + field->read(); La numérotation des éléments de maillage @@ -204,7 +204,7 @@ Pour exemple, le fragment de code ci-dessous, extrait du fichier ``MedDataManager`` dans l'interface: .. code-block:: cpp - + #include "MEDMEM_MedDataManager.hxx" class MedDataManager @@ -212,24 +212,24 @@ Pour exemple, le fragment de code ci-dessous, extrait du fichier public: ~MedDataManager(); void printFieldDouble(FIELD * field); - + %extend { MedDataManager(char * fileName) { - return new MedDataManager(string(fileName)); + return new MedDataManager(string(fileName)); } MedDataManager(MED * med) { return new MedDataManager(med); } - + %newobject getFieldDouble(const char * fieldName, const int dt, const int it); FIELD * getFieldDouble(const char * fieldName, const int dt, const int it) { - return (FIELD *) self->getFieldDouble(string(fieldName), dt, it); + return (FIELD *) self->getFieldDouble(string(fieldName), dt, it); } } - + }; @@ -380,17 +380,17 @@ utilise l'interface swig fournie par MedCorba_Swig). Après l'import d'amorce systématique: .. code-block:: python - + import salome salome.salome_init() - + import SALOME_MED from libSALOME_Swig import * On peut charger le composant SALOME MED: .. code-block:: python - + medComp=salome.lcc.FindOrLoadComponent("FactoryServer", "MED") grâce auquel les services de chargement de la structure MED peuvent @@ -398,14 +398,14 @@ grâce auquel les services de chargement de la structure MED peuvent structure MED dans l'étude salome passée en argument: .. code-block:: python - + filePathName = "myfile.med" medComp.readStructFileWithFieldType(filePathName,salome.myStudyName) Ce deuxième exemple charge la structure MED mais ne place pas le résultat dans l'étude: .. code-block:: python - + filePathName = "myfile.med" medObj = medComp.readStructFile(filePathName,salome.myStudyName) @@ -418,13 +418,13 @@ verra plus bas) à MEDMEM: fieldIdx = 1 # WRN maybe there is no field of idx=1 iterationIdx = 0 fieldName = medObj.getFieldNames()[fieldIdx] - dtitfield = medObj.getFieldIteration(fieldName,iterationIdx) + dtitfield = medObj.getFieldIteration(fieldName,iterationIdx) it = dtitfield[0] dt = dtitfield[1] fieldObj = medObj.getField(fieldName,it,dt) nbOfFields = medObj.getNumberOfFields() fieldNames = medObj.getFieldNames() - + mesh = fieldObj.getSupport().getMesh() .. note:: @@ -469,22 +469,22 @@ SALOME_MED, ...) sont supposées avoir été faites au préalable (voir les exemples précédents): .. code-block:: python - + # Load the med structure using MED medComp=salome.lcc.FindOrLoadComponent("FactoryServer", "MED") filePathName = "myfile.med" medComp.readStructFileWithFieldType(filePathName,salome.myStudyName) - + # Get the VISU component import VISU visuComp = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") visuComp.SetCurrentStudy(salome.myStudy) - + # Get the sobject associated to the med object named "Med" aSObject = salome.myStudy.FindObject("Med") isPresent, medSObj = aSObject.FindSubObject(1) - - # Finally, import the med sobject in VISU + + # Finally, import the med sobject in VISU result = visuComp.ImportMed(medSObj) Il est possible de d'aller plus loin et par exemple de déclencher @@ -503,7 +503,7 @@ Notes en vrac Questions: -* Comment obtenir le nom du fichier med à partir d'une structure med? +* Comment obtenir le nom du fichier med à partir d'une structure med? * Peut-on imaginer un moyen de fournir l'objet MEDMEM::MED à partir de la donnée de l'objet CORBA SALOME_MED::MED? diff --git a/src/MEDOP/doc/sphinx/fr/medop-prototype-overview.rst b/src/MEDCalc/doc/sphinx/fr/medop-prototype-overview.rst similarity index 97% rename from src/MEDOP/doc/sphinx/fr/medop-prototype-overview.rst rename to src/MEDCalc/doc/sphinx/fr/medop-prototype-overview.rst index c571c6e6f..5eaa00e08 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-prototype-overview.rst +++ b/src/MEDCalc/doc/sphinx/fr/medop-prototype-overview.rst @@ -56,11 +56,11 @@ images: .. |IMG_VISU| image:: images/medop-gui-visufield_scale.png .. |IMG_RESULT| image:: images/medop-gui-result_scale.png -+---------------+---------------+ ++---------------+---------------+ | |IMG_SELECT| | |IMG_ALIAS| | -+---------------+---------------+ ++---------------+---------------+ | |IMG_VISU| | |IMG_RESULT| | -+---------------+---------------+ ++---------------+---------------+ La solution technique est construite sur les principes suivants: diff --git a/src/MEDOP/doc/sphinx/fr/medop-workingnotes-2010.rst b/src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2010.rst similarity index 100% rename from src/MEDOP/doc/sphinx/fr/medop-workingnotes-2010.rst rename to src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2010.rst diff --git a/src/MEDOP/doc/sphinx/fr/medop-workingnotes-2011.rst b/src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2011.rst similarity index 99% rename from src/MEDOP/doc/sphinx/fr/medop-workingnotes-2011.rst rename to src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2011.rst index 2c38e64bb..269b63b5a 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-workingnotes-2011.rst +++ b/src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2011.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ANNEXE: Note de travail concernant le chantier XMED 2011 @@ -145,7 +145,7 @@ Nouveaux concepts à prendre en compte ------------------------------------- Au démarrage du chantier 2011, on observe que les concepts suivants -sont introduits dans le module MED: +sont introduits dans le module MED: * Le conteneur MED n'existe plus, utiliser MEDFILEBROWSER pour charger les fichiers med et obtenir les informations générales sur le @@ -469,5 +469,5 @@ Petites améliorations du DataspaceController: est posé dans le WS. On peut donc proposer en option de lui associer un alias pour manipulation dans la console - - + + diff --git a/src/MEDOP/doc/sphinx/medop-workingnotes-2012.rst b/src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2012.rst similarity index 98% rename from src/MEDOP/doc/sphinx/medop-workingnotes-2012.rst rename to src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2012.rst index b6ecb6d37..4a3e10af4 100644 --- a/src/MEDOP/doc/sphinx/medop-workingnotes-2012.rst +++ b/src/MEDCalc/doc/sphinx/fr/medop-workingnotes-2012.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ANNEXE: Note de travail concernant le chantier XMED 2012 @@ -80,5 +80,5 @@ peut procéder de la manière suivante: * Eliminer la dépendance à XSALOME * Supprimer la gestion des multiversion SALOME5/6 au niveau de l'engine -.. warning:: TODO: refaire le point sur les tâches initiées en 2011 +.. warning:: TODO: refaire le point sur les tâches initiées en 2011 diff --git a/src/MEDOP/doc/sphinx/images/champ_altitude_MAP.png b/src/MEDCalc/doc/sphinx/images/champ_altitude_MAP.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/champ_altitude_MAP.png rename to src/MEDCalc/doc/sphinx/images/champ_altitude_MAP.png diff --git a/src/MEDOP/doc/sphinx/images/convert.sh b/src/MEDCalc/doc/sphinx/images/convert.sh similarity index 100% rename from src/MEDOP/doc/sphinx/images/convert.sh rename to src/MEDCalc/doc/sphinx/images/convert.sh diff --git a/src/MEDOP/doc/sphinx/images/ico_datasource_add.png b/src/MEDCalc/doc/sphinx/images/ico_datasource_add.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_datasource_add.png rename to src/MEDCalc/doc/sphinx/images/ico_datasource_add.png diff --git a/src/MEDOP/doc/sphinx/images/ico_datasource_changeUnderlyingMesh.png b/src/MEDCalc/doc/sphinx/images/ico_datasource_changeUnderlyingMesh.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_datasource_changeUnderlyingMesh.png rename to src/MEDCalc/doc/sphinx/images/ico_datasource_changeUnderlyingMesh.png diff --git a/src/MEDOP/doc/sphinx/images/ico_datasource_expandfield.png b/src/MEDCalc/doc/sphinx/images/ico_datasource_expandfield.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_datasource_expandfield.png rename to src/MEDCalc/doc/sphinx/images/ico_datasource_expandfield.png diff --git a/src/MEDOP/doc/sphinx/images/ico_datasource_use.png b/src/MEDCalc/doc/sphinx/images/ico_datasource_use.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_datasource_use.png rename to src/MEDCalc/doc/sphinx/images/ico_datasource_use.png diff --git a/src/MEDOP/doc/sphinx/images/ico_datasource_view.png b/src/MEDCalc/doc/sphinx/images/ico_datasource_view.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_datasource_view.png rename to src/MEDCalc/doc/sphinx/images/ico_datasource_view.png diff --git a/src/MEDOP/doc/sphinx/images/ico_imagesource.png b/src/MEDCalc/doc/sphinx/images/ico_imagesource.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_imagesource.png rename to src/MEDCalc/doc/sphinx/images/ico_imagesource.png diff --git a/src/MEDOP/doc/sphinx/images/ico_workspace_save.png b/src/MEDCalc/doc/sphinx/images/ico_workspace_save.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_workspace_save.png rename to src/MEDCalc/doc/sphinx/images/ico_workspace_save.png diff --git a/src/MEDOP/doc/sphinx/images/ico_xmed.png b/src/MEDCalc/doc/sphinx/images/ico_xmed.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/ico_xmed.png rename to src/MEDCalc/doc/sphinx/images/ico_xmed.png diff --git a/src/MEDOP/doc/sphinx/images/med-uml-main.png b/src/MEDCalc/doc/sphinx/images/med-uml-main.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/med-uml-main.png rename to src/MEDCalc/doc/sphinx/images/med-uml-main.png diff --git a/src/MEDOP/doc/sphinx/images/med-uml-main_60pc.png b/src/MEDCalc/doc/sphinx/images/med-uml-main_60pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/med-uml-main_60pc.png rename to src/MEDCalc/doc/sphinx/images/med-uml-main_60pc.png diff --git a/src/MEDOP/doc/sphinx/images/medlayers.png b/src/MEDCalc/doc/sphinx/images/medlayers.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medlayers.png rename to src/MEDCalc/doc/sphinx/images/medlayers.png diff --git a/src/MEDOP/doc/sphinx/images/medlayers_70pc.png b/src/MEDCalc/doc/sphinx/images/medlayers_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medlayers_70pc.png rename to src/MEDCalc/doc/sphinx/images/medlayers_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/medmem-corba-layers.png b/src/MEDCalc/doc/sphinx/images/medmem-corba-layers.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medmem-corba-layers.png rename to src/MEDCalc/doc/sphinx/images/medmem-corba-layers.png diff --git a/src/MEDOP/doc/sphinx/images/medmem-layers.png b/src/MEDCalc/doc/sphinx/images/medmem-layers.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medmem-layers.png rename to src/MEDCalc/doc/sphinx/images/medmem-layers.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-aliasfield.png b/src/MEDCalc/doc/sphinx/images/medop-gui-aliasfield.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-aliasfield.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-aliasfield.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-aliasfield_scale.png b/src/MEDCalc/doc/sphinx/images/medop-gui-aliasfield_scale.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-aliasfield_scale.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-aliasfield_scale.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-result.png b/src/MEDCalc/doc/sphinx/images/medop-gui-result.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-result.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-result.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-result_scale.png b/src/MEDCalc/doc/sphinx/images/medop-gui-result_scale.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-result_scale.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-result_scale.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-selectfield.png b/src/MEDCalc/doc/sphinx/images/medop-gui-selectfield.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-selectfield.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-selectfield.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-selectfield_scale.png b/src/MEDCalc/doc/sphinx/images/medop-gui-selectfield_scale.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-selectfield_scale.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-selectfield_scale.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-visufield.png b/src/MEDCalc/doc/sphinx/images/medop-gui-visufield.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-visufield.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-visufield.png diff --git a/src/MEDOP/doc/sphinx/images/medop-gui-visufield_scale.png b/src/MEDCalc/doc/sphinx/images/medop-gui-visufield_scale.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop-gui-visufield_scale.png rename to src/MEDCalc/doc/sphinx/images/medop-gui-visufield_scale.png diff --git a/src/MEDOP/doc/sphinx/images/medop_exportparavis.png b/src/MEDCalc/doc/sphinx/images/medop_exportparavis.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop_exportparavis.png rename to src/MEDCalc/doc/sphinx/images/medop_exportparavis.png diff --git a/src/MEDOP/doc/sphinx/images/medop_exportparavis_result.png b/src/MEDCalc/doc/sphinx/images/medop_exportparavis_result.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop_exportparavis_result.png rename to src/MEDCalc/doc/sphinx/images/medop_exportparavis_result.png diff --git a/src/MEDOP/doc/sphinx/images/medop_image2med_dialog.png b/src/MEDCalc/doc/sphinx/images/medop_image2med_dialog.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop_image2med_dialog.png rename to src/MEDCalc/doc/sphinx/images/medop_image2med_dialog.png diff --git a/src/MEDOP/doc/sphinx/images/medop_image2med_tomographie.png b/src/MEDCalc/doc/sphinx/images/medop_image2med_tomographie.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop_image2med_tomographie.png rename to src/MEDCalc/doc/sphinx/images/medop_image2med_tomographie.png diff --git a/src/MEDOP/doc/sphinx/images/medop_projection_inputs.png b/src/MEDCalc/doc/sphinx/images/medop_projection_inputs.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop_projection_inputs.png rename to src/MEDCalc/doc/sphinx/images/medop_projection_inputs.png diff --git a/src/MEDOP/doc/sphinx/images/medop_projection_result.png b/src/MEDCalc/doc/sphinx/images/medop_projection_result.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/medop_projection_result.png rename to src/MEDCalc/doc/sphinx/images/medop_projection_result.png diff --git a/src/MEDOP/doc/sphinx/images/partition_mesh.png b/src/MEDCalc/doc/sphinx/images/partition_mesh.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/partition_mesh.png rename to src/MEDCalc/doc/sphinx/images/partition_mesh.png diff --git a/src/MEDOP/doc/sphinx/images/partition_skin.png b/src/MEDCalc/doc/sphinx/images/partition_skin.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/partition_skin.png rename to src/MEDCalc/doc/sphinx/images/partition_skin.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-architecture.png b/src/MEDCalc/doc/sphinx/images/xmed-architecture.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-architecture.png rename to src/MEDCalc/doc/sphinx/images/xmed-architecture.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-exploremed.png b/src/MEDCalc/doc/sphinx/images/xmed-exploremed.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-exploremed.png rename to src/MEDCalc/doc/sphinx/images/xmed-exploremed.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-functions.png b/src/MEDCalc/doc/sphinx/images/xmed-functions.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-functions.png rename to src/MEDCalc/doc/sphinx/images/xmed-functions.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh_wsview.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh_wsview.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh_wsview.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-changeUnderlyingMesh_wsview.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu_60pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu_60pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu_60pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu_60pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu_70pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu_70pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu_80pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu_80pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-contextmenu_80pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-contextmenu_80pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-expand-zoom.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-expand-zoom.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-expand-zoom.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-expand-zoom.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-explore-zoom.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-explore-zoom.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-explore-zoom.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-explore-zoom.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-explore.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-explore.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-explore.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-explore.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-menucontextuel-zoom.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-menucontextuel-zoom.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-menucontextuel-zoom.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-menucontextuel-zoom.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-selectfile.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-selectfile.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-selectfile.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-selectfile.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace-alias.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace-alias.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace-alias.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace-alias.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result_70pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result_70pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace-result_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace_70pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-useinworkspace_70pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-useinworkspace_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-result.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-result.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-result.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-result.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-result_50pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-result_50pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-result_50pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-result_50pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-result_70pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-result_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-result_70pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-result_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-zoom.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-zoom.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize-zoom.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize-zoom.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize_50pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize_50pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize_50pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize_50pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize_70pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-datasource-visualize_70pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-datasource-visualize_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-start.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-start.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-start.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-start.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-withframe.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-withframe.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-withframe.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-withframe.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-workspace-view.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-workspace-view.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-workspace-view.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-workspace-view.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui-workspace.png b/src/MEDCalc/doc/sphinx/images/xmed-gui-workspace.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui-workspace.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui-workspace.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui.png b/src/MEDCalc/doc/sphinx/images/xmed-gui.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-gui_70pc.png b/src/MEDCalc/doc/sphinx/images/xmed-gui_70pc.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-gui_70pc.png rename to src/MEDCalc/doc/sphinx/images/xmed-gui_70pc.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-implantation.png b/src/MEDCalc/doc/sphinx/images/xmed-implantation.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-implantation.png rename to src/MEDCalc/doc/sphinx/images/xmed-implantation.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-irm-diff.png b/src/MEDCalc/doc/sphinx/images/xmed-irm-diff.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-irm-diff.png rename to src/MEDCalc/doc/sphinx/images/xmed-irm-diff.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-irm-field.png b/src/MEDCalc/doc/sphinx/images/xmed-irm-field.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-irm-field.png rename to src/MEDCalc/doc/sphinx/images/xmed-irm-field.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-irm.png b/src/MEDCalc/doc/sphinx/images/xmed-irm.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-irm.png rename to src/MEDCalc/doc/sphinx/images/xmed-irm.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-userguide-example2-datasource.png b/src/MEDCalc/doc/sphinx/images/xmed-userguide-example2-datasource.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-userguide-example2-datasource.png rename to src/MEDCalc/doc/sphinx/images/xmed-userguide-example2-datasource.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-userguide-example2-workspace-save.png b/src/MEDCalc/doc/sphinx/images/xmed-userguide-example2-workspace-save.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-userguide-example2-workspace-save.png rename to src/MEDCalc/doc/sphinx/images/xmed-userguide-example2-workspace-save.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-userguide-example2-workspace.png b/src/MEDCalc/doc/sphinx/images/xmed-userguide-example2-workspace.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-userguide-example2-workspace.png rename to src/MEDCalc/doc/sphinx/images/xmed-userguide-example2-workspace.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-visu-importtimestamps.png b/src/MEDCalc/doc/sphinx/images/xmed-visu-importtimestamps.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-visu-importtimestamps.png rename to src/MEDCalc/doc/sphinx/images/xmed-visu-importtimestamps.png diff --git a/src/MEDOP/doc/sphinx/images/xmed-visu-scalarmaptimestamps.png b/src/MEDCalc/doc/sphinx/images/xmed-visu-scalarmaptimestamps.png similarity index 100% rename from src/MEDOP/doc/sphinx/images/xmed-visu-scalarmaptimestamps.png rename to src/MEDCalc/doc/sphinx/images/xmed-visu-scalarmaptimestamps.png diff --git a/src/MEDOP/doc/sphinx/index.rst b/src/MEDCalc/doc/sphinx/index.rst similarity index 87% rename from src/MEDOP/doc/sphinx/index.rst rename to src/MEDCalc/doc/sphinx/index.rst index e291c971c..6560ec984 100644 --- a/src/MEDOP/doc/sphinx/index.rst +++ b/src/MEDCalc/doc/sphinx/index.rst @@ -15,23 +15,23 @@ References .. toctree:: :maxdepth: 1 - medop-userguide-gui.rst - medop-userguide-api.rst + medcalc-userguide-gui.rst + medcalc-userguide-api.rst **Technical documentation** (**in french**): .. toctree:: :maxdepth: 1 - medop-specifications.rst - medop-develguide.rst + medcalc-specifications.rst + medcalc-develguide.rst **Additional documentation** .. toctree:: :maxdepth: 1 - medop-references.rst + medcalc-references.rst Document archive (in french) ============================ diff --git a/src/MEDOP/doc/sphinx/medop-definitions.rst b/src/MEDCalc/doc/sphinx/medcalc-definitions.rst similarity index 100% rename from src/MEDOP/doc/sphinx/medop-definitions.rst rename to src/MEDCalc/doc/sphinx/medcalc-definitions.rst diff --git a/src/MEDOP/doc/sphinx/medop-develguide.rst b/src/MEDCalc/doc/sphinx/medcalc-develguide.rst similarity index 88% rename from src/MEDOP/doc/sphinx/medop-develguide.rst rename to src/MEDCalc/doc/sphinx/medcalc-develguide.rst index 444a0a9a6..063a8e84f 100644 --- a/src/MEDOP/doc/sphinx/medop-develguide.rst +++ b/src/MEDCalc/doc/sphinx/medcalc-develguide.rst @@ -2,19 +2,19 @@ :keywords: maillage, champ, manipulation, med, développement :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Module MED: Guide de développement du composant MEDOP +Module MED: Guide de développement du composant MEDCalc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Le composant logiciel MEDOP est un élément du module MED. Il fournit +Le composant logiciel MEDCalc est un élément du module MED. Il fournit une interface utilisateur pour la manipulation de maillages et de champs, composée d'une interface texte (TUI) et d'une interface graphique (GUI). L'interface graphique constitue l'interface graphique du module MED. -Ce document est la documentation technique du composant MEDOP. Il +Ce document est la documentation technique du composant MEDCalc. Il fournit les instructions à suivre pour installer le composant en vue d'un travail de développement, puis décrit les éléments de conception. @@ -25,43 +25,43 @@ d'un travail de développement, puis décrit les éléments de conception. Mise en place de l'espace de développement ========================================== -Gestion de configuration du composant MEDOP +Gestion de configuration du composant MEDCalc ------------------------------------------- -Le composant logiciel MEDOP est un package du module SALOME MED, +Le composant logiciel MEDCalc est un package du module SALOME MED, hébergé dans l'espace source au niveau du sous-répertoire -`src/MEDOP`. La gestion des fichiers sources est donc intégrée dans le +`src/MEDCalc`. La gestion des fichiers sources est donc intégrée dans le module SALOME MED. -Organisation des sources du composant MEDOP +Organisation des sources du composant MEDCalc ------------------------------------------- -Le répertoire source `src/MEDOP` distingue les sous-répertoires +Le répertoire source `src/MEDCalc` distingue les sous-répertoires suivants: * cmp: package containing the SALOME components * tui: package containing the python user interface * gui: package containing the graphical user interface (the GUI part of the MED module) -* res: resources files associated to the MEDOP package (icons, config +* res: resources files associated to the MEDCalc package (icons, config files, data files, ...) * exe: additional executable programs that can be launched from the - MEDOP framework + MEDCalc framework -Construction du composant MEDOP +Construction du composant MEDCalc ------------------------------- -Intégré à la construction du module MED. Le composant MEDOP dépend de +Intégré à la construction du module MED. Le composant MEDCalc dépend de MEDCoupling et MEDLoader uniquement. -Exécution des tests unitaires du composant MEDOP +Exécution des tests unitaires du composant MEDCalc ------------------------------------------------ Les tests unitaires peuvent être exécutés au moyen de scripts python lancés depuis une session shell SALOME. Dans un nouveau shell, taper:: $ ./appli/runSession - [NS=mars:2810]$ python appli/bin/salome/med/test_medop_components.py + [NS=mars:2810]$ python appli/bin/salome/med/test_medcalc_components.py L'exécution imprime un rapport détaillant le résultat pour chaque fonction de test:: @@ -82,7 +82,7 @@ fonction de test:: Les scripts de test sont installés dans le répertoire ``bin/med``. On trouve: -* ``test_medop_components.py``: test les composants SALOME développés pour +* ``test_medcalc_components.py``: test les composants SALOME développés pour la manipulation de champs (``MEDDataManager`` et ``MEDCalculator``). * ``test_xmed_fieldOperations.py``: test des operations de champs telles qu'elles sont mises en oeuvre depuis l'interface textuelle. @@ -161,14 +161,14 @@ Ecrire un service CORBA qui retourne une sequence de FieldHandler: .. code-block:: cpp - MEDOP::FieldHandlerList * MyFunction(...) { - vector fieldHandlerList; + MEDCALC::FieldHandlerList * MyFunction(...) { + vector fieldHandlerList; ... fieldHandlerList.push_back(fieldHandler); // Map the resulting list to a CORBA sequence for return: - MEDOP::FieldHandlerList_var fieldHandlerSeq = new MEDOP::FieldHandlerList(); + MEDCALC::FieldHandlerList_var fieldHandlerSeq = new MEDCALC::FieldHandlerList(); int nbFieldHandler = fieldHandlerList.size(); fieldHandlerSeq->length(nbFieldHandler); for (int i=0; iid] = fieldHandler; // >>> WARNING: CORBA struct specification indicates that the @@ -193,7 +193,7 @@ Ecrire un service CORBA qui retourne une structure CORBA: // copy of the structure found in the map and return the copy. The // CORBA struct specification indicates that a deep copy can be // done using the copy constructor. <<< - return new MEDOP::FieldHandler(*fieldHandler); + return new MEDCALC::FieldHandler(*fieldHandler); @@ -212,7 +212,7 @@ ANNEXE B: Traçabilité avec le module XMED ========================================= Le module SALOME de nom XMED est l'espace de développement initial du -composant logiciel MEDOP, intégré aujourd'hui au module MED. Cette +composant logiciel MEDCalc, intégré aujourd'hui au module MED. Cette annexe est la notice technique de ce module, qui reste disponible mais qui n'est plus maintenu. diff --git a/src/MEDOP/doc/sphinx/medop-references.rst b/src/MEDCalc/doc/sphinx/medcalc-references.rst similarity index 96% rename from src/MEDOP/doc/sphinx/medop-references.rst rename to src/MEDCalc/doc/sphinx/medcalc-references.rst index 0cc327834..43cb54564 100644 --- a/src/MEDOP/doc/sphinx/medop-references.rst +++ b/src/MEDCalc/doc/sphinx/medcalc-references.rst @@ -2,7 +2,7 @@ Appendix: Documentation references %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst References: diff --git a/src/MEDOP/doc/sphinx/fr/medop-specifications.rst b/src/MEDCalc/doc/sphinx/medcalc-specifications.rst similarity index 99% rename from src/MEDOP/doc/sphinx/fr/medop-specifications.rst rename to src/MEDCalc/doc/sphinx/medcalc-specifications.rst index 09ca88cd2..ae152232e 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-specifications.rst +++ b/src/MEDCalc/doc/sphinx/medcalc-specifications.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation, med :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Module MED: Spécifications fonctionnelles et techniques @@ -123,11 +123,11 @@ supplémentaire: Par convention, on utilisera par la suite les notations: * **U(t,p,c)** pour désigner la valeur de la composante c d'un champ U - à la position p et prise à l'instant t; + à la position p et prise à l'instant t; * **U(t,p,:)** pour signifier que l'on manipule l'ensemble de toutes les composantes; * **U(t,:,c)** pour signifier que l'on manipule le domaine de - définition spatial complet. + définition spatial complet. Dans une grande majorité des cas d'usage on travaille à temps t fixé et sur un domaine spatiale prédéfini. Aussi on utilisera également la @@ -167,7 +167,7 @@ On formalise donc le concept d'opération par les propriétés suivantes: * L'opérateur est caractérisé par un domaine d'application qui spécifie la portée de l'opération. Ce domaine comporte plusieurs dimensions: - + - Un domaine temporel T qui spécifie les pas de temps sur lesquels l'opération est appliquée; - Un domaine spatial D qui spécifie la limite de portée de @@ -283,13 +283,13 @@ de changer le maillage support M1 d'un champs par un maillage M2 à partir du moment où les maillages M1 et M2 sont identiques géométriquement à une erreur près qu'il est possible de spécifier. -.. note:: +.. note:: D'autres situations limites peuvent être évoquées sous l'angle informatique. Ce sont des situations qui a priori n'ont pas de raison d'exister sur le plan conceptuel mais qui peuvent très bien survenir au niveau du module informatique compte-tenu des particularités du modèle MED. Par exemple: - + * Le nombre et la nature des composantes ne sont pas identiques pour tous les champs d'entrée. Par exemple, U défini ses composantes comme U(:,:,1)=Ux, U(:,:,2)=Uy, U(:,:,3)=Uz et V les @@ -408,14 +408,14 @@ de classer ces opérations en deux catégories: * les **opérations binaires**, qui prennent deux opérandes en argument. C'est le cas des opérations algébriques et des opérations vectorielles. - + A partir de cette classification, il convient de distinguer trois formes d'usage selon la nature des opérandes: * les opérandes sont exclusivement des scalaires (typiquement des valeurs de composantes des champs et des paramètres numériques). Par exemple:: - + W(:,:4) = 1+2xU(:,:,2)+V(:,:,3) * les opérandes sont exclusivement des champs. Par exemple:: @@ -478,7 +478,7 @@ paramètre numérique ou la composante d'un champ): .. warning:: A développer: - + * Analyse dimensionnelle du champ résultats pour adapter l'unité. Par exemple, si on fait UxV où U et V sont exprimés en [m] alors le résultat est en [m2]. @@ -676,7 +676,7 @@ l'interface textuelle: l'utilisateur à spécifier un alias pour la variable python qui va permettre la manipulation du champ dans l'interface textuelle de l'espace de travail (par défaut, le nom complet du champ est - proposé). Ici, l'utilisateur spécifie ``f4``: + proposé). Ici, l'utilisateur spécifie ``f4``: .. image:: images/xmed-gui-datasource-useinworkspace_70pc.png :align: center @@ -709,7 +709,7 @@ Dans le cadre défini ci-dessus, une session d'utilisation type est: conséquent de simplification et d'assistance en ligne). Par exemple, si ``fa`` et ``fb`` désignent deux champs définis dans l'espace de travail, alors on peut en faire la somme par la commande:: - + >>> r=fa+fb * Effectuer les contrôles visuel et les diagnostics en ligne de @@ -727,7 +727,7 @@ Sur cette base, on peut envisager une grande variété de cas d'utilisation: chargée dans le dataspace (l'étude SALOME techniquement) et peut être explorée au niveau de l'arbre d'étude. L'arbre peut faire apparaître: - + - les maillages et les groupes (qui peuvent être utilisés éventuellement pour restreindre le domaine d'application) - les champs dont on peut explorer les composantes et les itérations @@ -777,7 +777,7 @@ fonction de visualisation: choisir l'option "Visualize": .. image:: images/xmed-gui-datasource-visualize_70pc.png - :align: center + :align: center * Cette option déclenche l'affichage d'une carte de champ sur le cadre d'affichage des viewers SALOME: diff --git a/src/MEDOP/doc/sphinx/medop-userguide-api.rst b/src/MEDCalc/doc/sphinx/medcalc-userguide-api.rst similarity index 93% rename from src/MEDOP/doc/sphinx/medop-userguide-api.rst rename to src/MEDCalc/doc/sphinx/medcalc-userguide-api.rst index 6f230abc8..161e0551f 100644 --- a/src/MEDOP/doc/sphinx/medop-userguide-api.rst +++ b/src/MEDCalc/doc/sphinx/medcalc-userguide-api.rst @@ -1,9 +1,9 @@ .. meta:: - :description: introduction guide for users of the MEDMEM library + :description: introduction guide for users of the MEDMEM library :keywords: mesh, field, med, MEDCoupling, MEDLoader :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MEDMEM library: Starter guide for users @@ -73,11 +73,11 @@ What we call MEDMEM library in this document is represented by the orange packages on this diagram. The white packages reprensent the old deprecated MEDMEM library. The blue packages represent the aditionnal components for field manipulation througth the user interface (TUI and -GUI). +GUI). The MEDMEM library comes also with this set of atomic libraries for advanced users/programmers: - + * :tt:`medcouplingcorba`: this library is designed for cross process exchange of medcoupling objects. * :tt:`medpartitioner`: this library provides functions to split a MED @@ -88,18 +88,18 @@ modules (using the swig binding technology) so that all the data processing can be realized by scripting. .. warning:: It could happen that some parts of the C++ libraries are - not wrapped into python modules. This coverture will be - extend on demand and if the integrity of the concepts is - preserved. + not wrapped into python modules. This coverture will be + extend on demand and if the integrity of the concepts is + preserved. Main concepts of the MEDMEM library =================================== .. warning:: TODO avec Antony. Présenter les structure de données de - MEDCoupling principalement. Describe the MEDMEM data - model, the typical content of a med file, the types of - cell that compose the meshes, the types of spatial - discretization of fields, ... + MEDCoupling principalement. Describe the MEDMEM data + model, the typical content of a med file, the types of + cell that compose the meshes, the types of spatial + discretization of fields, ... Basic usages of the MEDMEM library ================================== @@ -109,9 +109,9 @@ library using python examples. The usage of python is just to have a light syntax that makes more easy the first understanding. .. note:: All code examples here after are parts of the tutorial use - cases located in the folder :tt:`src/MEDOP/tut` in the MED - source directory. These use cases are all working executable - programs and they can be used to initiate your own script. + cases located in the folder :tt:`src/MEDCalc/tut` in the MED + source directory. These use cases are all working executable + programs and they can be used to initiate your own script. Preparing the shell environment ------------------------------- @@ -129,18 +129,18 @@ with a set of instructions that looks like:: export PYTHON_INCLUDE=${PYTHONHOME}/include/python2.6 export PATH=${PYTHONHOME}/bin:${PATH} export LD_LIBRARY_PATH=${PYTHONHOME}/lib:${LD_LIBRARY_PATH} - + #------ hdf5 ------ HDF5HOME= export PATH=${HDF5HOME}/bin:$PATH export LD_LIBRARY_PATH=${HDF5HOME}/lib:${LD_LIBRARY_PATH} export HDF5_DISABLE_VERSION_CHECK=1 - + #------ med ------ MED2HOME= export PATH=${MED2HOME}/bin:${PATH} export LD_LIBRARY_PATH=${MED2HOME}/lib:${LD_LIBRARY_PATH} - + #------ medmem --- MED_ROOT_DIR= export LD_LIBRARY_PATH=${MED_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH} @@ -153,8 +153,8 @@ Example 01: Explore a med file to get information concerning meshes and fields ------------------------------------------------------------------------------ :objectives: This example illustrates how to get information - concerning meshes and fields from a med file, using the - MEDLoader library. + concerning meshes and fields from a med file, using the + MEDLoader library. The loading of meshes and fields from a med file to a MEDCoupling data structure requires first the knowledge of metadata associated to these @@ -200,7 +200,7 @@ TypeOfField that is an integer value in this list: * :tt:`3 = ON_GAUSS_NE` .. note:: This constant variables are defined by the MEDLoader module - (:tt:`from MEDLoader import ON_NODES`). + (:tt:`from MEDLoader import ON_NODES`). As a consequence, before loading the physical values of a field, we have to determine the types of spatial discretization that come with @@ -239,7 +239,7 @@ Example 02: Load a mesh and a field from a med file --------------------------------------------------- :objectives: This illustrates how to load the physical data of a - specified mesh and a specified field. + specified mesh and a specified field. The metadata read from a med file are required to identify the list of meshes and fields in the med file. We assume in this example that the @@ -277,7 +277,7 @@ Example 03: Manage the MEDCoupling data load from a med file ------------------------------------------------------------ :objectives: Some suggestions for the MEDCoupling objects management, - in a programming context. + in a programming context. In a real programming case, it could be relevant to explore first the med file to load all metadata concerning the whole set of meshes and @@ -337,9 +337,9 @@ Example 04: Simple arithmetic operations with fields ---------------------------------------------------- :objectives: This example illustrates how to load field iterations - from a med file containing a field timeseries and shows - how to use these iterations in simple arithmetic - operations. + from a med file containing a field timeseries and shows + how to use these iterations in simple arithmetic + operations. We consider a med file :tt:`timeseries.med`, containing one single mesh named :tt:`Grid_80x80` that supports a field with values defined @@ -392,7 +392,7 @@ Exemple 07: Manipulate structured mesh -------------------------------------- :objectives: Illustrates the basic usage of the advanced interface of - MEDLoader. + MEDLoader. The MEDLoader frontal interface let you load unstructured meshes: @@ -437,8 +437,8 @@ Exemple 08: Make a projection of a field ---------------------------------------- :objectives: Make the projection of a field from a source mesh to a - target meshe. The source mesh and the target mesh are - two different mesh of the same geometry. + target meshe. The source mesh and the target mesh are + two different mesh of the same geometry. The input data of this use case are: @@ -448,9 +448,9 @@ The input data of this use case are: the figure below) .. note:: The two meshes are displayed side by side on the figure for - convenience reason, but in the real use case they stand at - the same location in 3D space (they describe the same - geometry). + convenience reason, but in the real use case they stand at + the same location in 3D space (they describe the same + geometry). .. image:: images/medop_projection_inputs.png :align: center diff --git a/src/MEDOP/doc/sphinx/medop-userguide-gui.rst b/src/MEDCalc/doc/sphinx/medcalc-userguide-gui.rst similarity index 94% rename from src/MEDOP/doc/sphinx/medop-userguide-gui.rst rename to src/MEDCalc/doc/sphinx/medcalc-userguide-gui.rst index 3494402c5..7a5de95c8 100644 --- a/src/MEDOP/doc/sphinx/medop-userguide-gui.rst +++ b/src/MEDCalc/doc/sphinx/medcalc-userguide-gui.rst @@ -2,7 +2,7 @@ :keywords: mesh, field, manipulation, user guide :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MED module: User guide for graphical interface @@ -13,7 +13,7 @@ shows how to use this module on the basis of a few reference examples, built from use cases identified during requirement analysis stage. .. warning:: This document is self-contained, but it is strongly advised to - read :doc:`the specification document` (in + read :doc:`the specification document` (in french), at least to clarify concepts and terminology. .. contents:: Contents @@ -571,22 +571,23 @@ Using the textual interface (TUI) All operations driven through GUI can be done (more or less easily) using TUI. The field manipulation module can even be used exclusively in textual mode. -For this run the command:: +.. + For this run the command:: $ /medop.sh - -This command opens a command console ``medop>``. A med file can be loaded and -manipulated, for example to create fields from file data. +.. + This command opens a command console ``medop>``. A med file can be loaded and + manipulated, for example to create fields from file data. Whatever textual or graphical mode is used, a typical workflow in console looks like the following instructions:: - >>> load("/path/to/mydata.med") + >>> medcalc.LoadDataSource("/path/to/mydata.med") >>> la id=0 name = testfield1 id=1 name = testfield2 - >>> f1=get(0) - >>> f2=get(1) + >>> f1=accessField(0) + >>> f2=accessField(1) >>> ls f1 (id=0, name=testfield1) f2 (id=1, name=testfield2) @@ -600,50 +601,53 @@ looks like the following instructions:: f1 (id=0, name=testfield1) f2 (id=1, name=testfield2) r (id=2, name=toto) - >>> put(r) - >>> save("result.med") + >>> putInWorkspace(r) + >>> saveWorkspace("result.med") The main commands are: -* ``load``: load a med file in data base (useful in pure textual mode):: +* ``LoadDataSource``: load a med file in data base (useful in pure textual mode):: + + >>> LoadDataSource("/path/to/datafile.med") - >>> load("/path/to/datafile.med") +* ``LoadImageAsDataSource``: load an image as a med file * ``la``: show the list of all fields loaded in data base ("list all") -* ``get``: set a field in workspace from its identifier (useful in pure +* ``accessField``: set a field in workspace from its identifier (useful in pure textual mode ; this operation can be done in GUI selecting a field from data space).:: - >>> f=get(fieldId) + >>> f=accessField(fieldId) * ``ls``: show the list of fields available in workspace ("list") -* ``put``: put a reference to a field in *management space*:: +* ``putInWorkspace``: put a reference to a field in *management space*:: - >>> put(f) + >>> putInWorkspace(f) -* ``save``: save to a med a file all fields referenced in management space:: +* ``saveWorkspace``: save to a med a file all fields referenced in management space:: - >>> save("/path/to/resultfile.med") + >>> saveWorkspace("/path/to/resultfile.med") .. note:: - * the ``load`` command only loads metadata describing meshes and fields + * the ``LoadDataSource`` command only loads metadata describing meshes and fields (names, discretization types, list of time steps). Meshes and physical quantities on fields are loaded later (and automatically) as soon as an operation needs them. In all cases med data (mete-information and values) are physically stored in *data base* environment. - * the ``get`` command defines a *field handler* in workspace, i.e. + * the ``accessField`` command defines a *field handler* in workspace, i.e. a variable that links to the physical field hosted in data base. Physical data never transit between environments but remain centralized in data base. The following TUI commands need to work in graphical environment: -* ``visu``: display a field map for quick visual control (no parametrization - is possible) - - >>> view(f) - +* ``medcalc.MakeDeflectionShape`` +* ``medcalc.MakeIsoSurface`` +* ``medcalc.MakePointSprite`` +* ``medcalc.MakeScalarMap`` +* ``medcalc.MakeSlices`` +* ``medcalc.MakeVectorField`` .. LocalWords: softwares diff --git a/src/MEDOP/doc/sphinx/medop-prototype-develguide.rst b/src/MEDCalc/doc/sphinx/medop-prototype-develguide.rst similarity index 99% rename from src/MEDOP/doc/sphinx/medop-prototype-develguide.rst rename to src/MEDCalc/doc/sphinx/medop-prototype-develguide.rst index de2387b74..0bc2eae90 100644 --- a/src/MEDOP/doc/sphinx/medop-prototype-develguide.rst +++ b/src/MEDCalc/doc/sphinx/medop-prototype-develguide.rst @@ -210,14 +210,14 @@ l'addition de deux champs: import salome salome.salome_init() import SALOME_MED - + medComp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") medObj = medComp.readStructFile("myfile.med",salome.myStudyName) medOp = medObj.createMedOperator() - + f1 = medObj.getField("testfield1",-1,-1) f2 = medObj.getField("testfield2",-1,-1) - + somme = medOp.add(f1,f2) Il est à noter qu'une instance de ``SALOME_MED::MEDOP`` est associé à @@ -269,7 +269,7 @@ et le numéro d'iteration: salome.salome_init() import SALOME_MED - medComp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") + medComp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") medObj = medComp.readStructFile("myfile.med",salome.myStudyName) from xmed import fieldproxy @@ -312,9 +312,9 @@ graphique en images: .. |IMG_SELECT| image:: images/medop-gui-selectfield_scale.png .. |IMG_ALIAS| image:: images/medop-gui-aliasfield_scale.png -+---------------+---------------+ ++---------------+---------------+ | |IMG_SELECT| | |IMG_ALIAS| | -+---------------+---------------+ ++---------------+---------------+ L'image de gauche montre la sélection du pas de temps, l'image de droite la boîte de dialogue qui permet la saisie de l'alias avec @@ -353,7 +353,7 @@ un objet CORBA): // We suppose here that we have a CORBA object reference (object of // type *_ptr or *_var), for example a SALOME_MED::MED object. - SALOME_MED::MED_ptr medObj = ... // anything to get this object + SALOME_MED::MED_ptr medObj = ... // anything to get this object // Get the IOR of this object QString medIOR = SalomeApp_Application::orb()->object_to_string(medObj); @@ -363,7 +363,7 @@ un objet CORBA): QStringList commands; commands+="import salome"; commands+=QString("med=salome.orb.string_to_object(\"%1\")").arg(medIOR); - + QStringListIterator it(commands); while (it.hasNext()) { pyConsole->exec(it.next()); @@ -411,9 +411,9 @@ commandes suivantes: from xmed.fieldproxy import getFieldFromMed from xmed.medproxy import getMedProxy - + med = getMedProxy("IOR:010000001700000049444c3a53414c4f4d455f4d45442f4d45443a312e300000010000000000000064000000010102000e0000003133302e39382e37372e313733009e0a0e000000feadc4ca4c00003169000000001100000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100") - + f1=getFieldFromMed(med,"testfield1",-1,-1) Ce jeu d'instructions reconstitue un pointeur vers le servant CORBA @@ -543,9 +543,9 @@ module du champ dans l'exemple implémenté par défaut): .. |IMG_VISU| image:: images/medop-gui-visufield_scale.png .. |IMG_RESULT| image:: images/medop-gui-result_scale.png -+---------------+---------------+ ++---------------+---------------+ | |IMG_VISU| | |IMG_RESULT| | -+---------------+---------------+ ++---------------+---------------+ Cette fonction répond au besoin de contrôle interactif des résultats produits par les opérations de manipulation de champs. @@ -556,7 +556,7 @@ donnée du servant ``SALOME_MED::FIELD`` qui lui est associé (représenté par la variable ``field_ptr`` dans l'exemple ci-dessous): .. code-block:: python - + import salome import VISU @@ -710,11 +710,11 @@ automatiser proprement): et fournit des fonctions de test unitaire (à exécuter ou pour s'en inspirer). Après avoir lancé SALOME via une application virtuelle, on peut taper:: - + $ /runSession [NS=venus:2810] $ python -i test_medoperation.py - >>> - + >>> + - Ceci permet de tester en particulier l'interface ``MedOp`` et son utilisation dans le module python ``fieldproxy.py``. diff --git a/src/MEDOP/doc/sphinx/medop-prototype-medmem.rst b/src/MEDCalc/doc/sphinx/medop-prototype-medmem.rst similarity index 98% rename from src/MEDOP/doc/sphinx/medop-prototype-medmem.rst rename to src/MEDCalc/doc/sphinx/medop-prototype-medmem.rst index 2302f7b70..9c29fee19 100644 --- a/src/MEDOP/doc/sphinx/medop-prototype-medmem.rst +++ b/src/MEDCalc/doc/sphinx/medop-prototype-medmem.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, MED, MEDMEM :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Note de travail concernant l'utilisation de MEDMEM @@ -115,7 +115,7 @@ d'entrée/sortie branché sur le fichier (``testfilename`` dans l'exemple): .. code-block:: cpp - + MED *myMed = new MED; MED_MED_RDONLY_DRIVER *driverIn = new MED_MED_RDONLY_DRIVER(testfilename, myMed); driverIn->open(); @@ -140,7 +140,7 @@ Puis le champ qui lui est associé doit être physiquement chargé pour permettre la mise à jour du support: .. code-block:: cpp - + MESH * mesh = myMed->getMesh(field); mesh->read(); myMed->updateSupport(); @@ -148,7 +148,7 @@ permettre la mise à jour du support: Pour enfin charger les valeurs des composantes du champ: .. code-block:: cpp - + field->read(); La numérotation des éléments de maillage @@ -204,7 +204,7 @@ Pour exemple, le fragment de code ci-dessous, extrait du fichier ``MedDataManager`` dans l'interface: .. code-block:: cpp - + #include "MEDMEM_MedDataManager.hxx" class MedDataManager @@ -212,24 +212,24 @@ Pour exemple, le fragment de code ci-dessous, extrait du fichier public: ~MedDataManager(); void printFieldDouble(FIELD * field); - + %extend { MedDataManager(char * fileName) { - return new MedDataManager(string(fileName)); + return new MedDataManager(string(fileName)); } MedDataManager(MED * med) { return new MedDataManager(med); } - + %newobject getFieldDouble(const char * fieldName, const int dt, const int it); FIELD * getFieldDouble(const char * fieldName, const int dt, const int it) { - return (FIELD *) self->getFieldDouble(string(fieldName), dt, it); + return (FIELD *) self->getFieldDouble(string(fieldName), dt, it); } } - + }; @@ -380,17 +380,17 @@ utilise l'interface swig fournie par MedCorba_Swig). Après l'import d'amorce systématique: .. code-block:: python - + import salome salome.salome_init() - + import SALOME_MED from libSALOME_Swig import * On peut charger le composant SALOME MED: .. code-block:: python - + medComp=salome.lcc.FindOrLoadComponent("FactoryServer", "MED") grâce auquel les services de chargement de la structure MED peuvent @@ -398,14 +398,14 @@ grâce auquel les services de chargement de la structure MED peuvent structure MED dans l'étude salome passée en argument: .. code-block:: python - + filePathName = "myfile.med" medComp.readStructFileWithFieldType(filePathName,salome.myStudyName) Ce deuxième exemple charge la structure MED mais ne place pas le résultat dans l'étude: .. code-block:: python - + filePathName = "myfile.med" medObj = medComp.readStructFile(filePathName,salome.myStudyName) @@ -418,13 +418,13 @@ verra plus bas) à MEDMEM: fieldIdx = 1 # WRN maybe there is no field of idx=1 iterationIdx = 0 fieldName = medObj.getFieldNames()[fieldIdx] - dtitfield = medObj.getFieldIteration(fieldName,iterationIdx) + dtitfield = medObj.getFieldIteration(fieldName,iterationIdx) it = dtitfield[0] dt = dtitfield[1] fieldObj = medObj.getField(fieldName,it,dt) nbOfFields = medObj.getNumberOfFields() fieldNames = medObj.getFieldNames() - + mesh = fieldObj.getSupport().getMesh() .. note:: @@ -469,22 +469,22 @@ SALOME_MED, ...) sont supposées avoir été faites au préalable (voir les exemples précédents): .. code-block:: python - + # Load the med structure using MED medComp=salome.lcc.FindOrLoadComponent("FactoryServer", "MED") filePathName = "myfile.med" medComp.readStructFileWithFieldType(filePathName,salome.myStudyName) - + # Get the VISU component import VISU visuComp = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") visuComp.SetCurrentStudy(salome.myStudy) - + # Get the sobject associated to the med object named "Med" aSObject = salome.myStudy.FindObject("Med") isPresent, medSObj = aSObject.FindSubObject(1) - - # Finally, import the med sobject in VISU + + # Finally, import the med sobject in VISU result = visuComp.ImportMed(medSObj) Il est possible de d'aller plus loin et par exemple de déclencher @@ -503,7 +503,7 @@ Notes en vrac Questions: -* Comment obtenir le nom du fichier med à partir d'une structure med? +* Comment obtenir le nom du fichier med à partir d'une structure med? * Peut-on imaginer un moyen de fournir l'objet MEDMEM::MED à partir de la donnée de l'objet CORBA SALOME_MED::MED? diff --git a/src/MEDOP/doc/sphinx/medop-prototype-overview.rst b/src/MEDCalc/doc/sphinx/medop-prototype-overview.rst similarity index 97% rename from src/MEDOP/doc/sphinx/medop-prototype-overview.rst rename to src/MEDCalc/doc/sphinx/medop-prototype-overview.rst index c571c6e6f..5eaa00e08 100644 --- a/src/MEDOP/doc/sphinx/medop-prototype-overview.rst +++ b/src/MEDCalc/doc/sphinx/medop-prototype-overview.rst @@ -56,11 +56,11 @@ images: .. |IMG_VISU| image:: images/medop-gui-visufield_scale.png .. |IMG_RESULT| image:: images/medop-gui-result_scale.png -+---------------+---------------+ ++---------------+---------------+ | |IMG_SELECT| | |IMG_ALIAS| | -+---------------+---------------+ ++---------------+---------------+ | |IMG_VISU| | |IMG_RESULT| | -+---------------+---------------+ ++---------------+---------------+ La solution technique est construite sur les principes suivants: diff --git a/src/MEDOP/doc/sphinx/medop-workingnotes-2010.rst b/src/MEDCalc/doc/sphinx/medop-workingnotes-2010.rst similarity index 100% rename from src/MEDOP/doc/sphinx/medop-workingnotes-2010.rst rename to src/MEDCalc/doc/sphinx/medop-workingnotes-2010.rst diff --git a/src/MEDOP/doc/sphinx/medop-workingnotes-2011.rst b/src/MEDCalc/doc/sphinx/medop-workingnotes-2011.rst similarity index 99% rename from src/MEDOP/doc/sphinx/medop-workingnotes-2011.rst rename to src/MEDCalc/doc/sphinx/medop-workingnotes-2011.rst index 2c38e64bb..269b63b5a 100644 --- a/src/MEDOP/doc/sphinx/medop-workingnotes-2011.rst +++ b/src/MEDCalc/doc/sphinx/medop-workingnotes-2011.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ANNEXE: Note de travail concernant le chantier XMED 2011 @@ -145,7 +145,7 @@ Nouveaux concepts à prendre en compte ------------------------------------- Au démarrage du chantier 2011, on observe que les concepts suivants -sont introduits dans le module MED: +sont introduits dans le module MED: * Le conteneur MED n'existe plus, utiliser MEDFILEBROWSER pour charger les fichiers med et obtenir les informations générales sur le @@ -469,5 +469,5 @@ Petites améliorations du DataspaceController: est posé dans le WS. On peut donc proposer en option de lui associer un alias pour manipulation dans la console - - + + diff --git a/src/MEDOP/doc/sphinx/fr/medop-workingnotes-2012.rst b/src/MEDCalc/doc/sphinx/medop-workingnotes-2012.rst similarity index 98% rename from src/MEDOP/doc/sphinx/fr/medop-workingnotes-2012.rst rename to src/MEDCalc/doc/sphinx/medop-workingnotes-2012.rst index b6ecb6d37..4a3e10af4 100644 --- a/src/MEDOP/doc/sphinx/fr/medop-workingnotes-2012.rst +++ b/src/MEDCalc/doc/sphinx/medop-workingnotes-2012.rst @@ -2,7 +2,7 @@ :keywords: maillage, champ, manipulation :author: Guillaume Boulant -.. include:: medop-definitions.rst +.. include:: medcalc-definitions.rst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ANNEXE: Note de travail concernant le chantier XMED 2012 @@ -80,5 +80,5 @@ peut procéder de la manière suivante: * Eliminer la dépendance à XSALOME * Supprimer la gestion des multiversion SALOME5/6 au niveau de l'engine -.. warning:: TODO: refaire le point sur les tâches initiées en 2011 +.. warning:: TODO: refaire le point sur les tâches initiées en 2011 diff --git a/src/MEDOP/exe/CMakeLists.txt b/src/MEDCalc/exe/CMakeLists.txt similarity index 100% rename from src/MEDOP/exe/CMakeLists.txt rename to src/MEDCalc/exe/CMakeLists.txt diff --git a/src/MEDOP/exe/image2med/CMakeLists.txt b/src/MEDCalc/exe/image2med/CMakeLists.txt similarity index 100% rename from src/MEDOP/exe/image2med/CMakeLists.txt rename to src/MEDCalc/exe/image2med/CMakeLists.txt diff --git a/src/MEDOP/exe/image2med/image2med.py b/src/MEDCalc/exe/image2med/image2med.py similarity index 100% rename from src/MEDOP/exe/image2med/image2med.py rename to src/MEDCalc/exe/image2med/image2med.py diff --git a/src/MEDOP/gui/CMakeLists.txt b/src/MEDCalc/gui/CMakeLists.txt similarity index 77% rename from src/MEDOP/gui/CMakeLists.txt rename to src/MEDCalc/gui/CMakeLists.txt index 43faacf4d..953911727 100644 --- a/src/MEDOP/gui/CMakeLists.txt +++ b/src/MEDCalc/gui/CMakeLists.txt @@ -25,20 +25,20 @@ INCLUDE(UseQt4Ext) ADD_SUBDIRECTORY(dialogs) -SET(MEDOPGUI_SOURCES - MEDOPFactoryClient.cxx +SET(MEDCALCGUI_SOURCES + MEDFactoryClient.cxx XmedConsoleDriver.cxx WorkspaceController.cxx XmedDataModel.cxx MEDEventListener_i.cxx - MEDOPModule.cxx + MEDModule.cxx DatasourceController.cxx factory.cxx ) -SET(MEDOPGUI_HEADERS MEDOPModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx) +SET(MEDCALCGUI_HEADERS MEDModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx) -QT4_WRAP_CPP(MEDOPGUI_HEADERS_MOC ${MEDOPGUI_HEADERS}) +QT4_WRAP_CPP(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS}) INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS} @@ -55,14 +55,14 @@ INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR} ) -SET(MEDOPGUITS_SOURCES +SET(MEDCALCGUITS_SOURCES MED_images.ts MED_msg_en.ts MED_msg_fr.ts MED_msg_ja.ts - MEDOP_msg_en.ts - MEDOP_msg_fr.ts - MEDOP_msg_ja.ts + MEDCALC_msg_en.ts + MEDCALC_msg_fr.ts + MEDCALC_msg_ja.ts ) SET(COMMON_FLAGS @@ -72,8 +72,8 @@ SET(COMMON_FLAGS ${PLATFORM_LIBRARIES} ${BOOST_LIBRARIES} SalomeIDLMED - MEDOPGUI_dialogs - MEDOPFactoryEngine + MEDCALCGUI_dialogs + MEDFactoryEngine ${GUI_qtx} ${GUI_suit} ${GUI_SalomeObject} @@ -88,14 +88,14 @@ SET(COMMON_FLAGS ${GUI_PyConsole} ) -ADD_LIBRARY(MEDOPGUI SHARED ${MEDOPGUI_SOURCES} ${MEDOPGUI_HEADERS_MOC}) +ADD_LIBRARY(MEDCALCGUI SHARED ${MEDCALCGUI_SOURCES} ${MEDCALCGUI_HEADERS_MOC}) IF(WITH_MEDMEMGUI) - SET_TARGET_PROPERTIES(MEDOPGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__") + SET_TARGET_PROPERTIES(MEDCALCGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__") ENDIF(WITH_MEDMEMGUI) -TARGET_LINK_LIBRARIES(MEDOPGUI ${COMMON_FLAGS}) +TARGET_LINK_LIBRARIES(MEDCALCGUI ${COMMON_FLAGS}) -INSTALL(TARGETS MEDOPGUI DESTINATION ${SALOME_INSTALL_LIBS}) -QT4_INSTALL_TS_RESOURCES("${MEDOPGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}") +INSTALL(TARGETS MEDCALCGUI DESTINATION ${SALOME_INSTALL_LIBS}) +QT4_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}") FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/MEDOP/gui/DatasourceConstants.hxx b/src/MEDCalc/gui/DatasourceConstants.hxx similarity index 100% rename from src/MEDOP/gui/DatasourceConstants.hxx rename to src/MEDCalc/gui/DatasourceConstants.hxx diff --git a/src/MEDOP/gui/DatasourceController.cxx b/src/MEDCalc/gui/DatasourceController.cxx similarity index 90% rename from src/MEDOP/gui/DatasourceController.cxx rename to src/MEDCalc/gui/DatasourceController.cxx index e4d2c57cc..0cde0a66b 100644 --- a/src/MEDOP/gui/DatasourceController.cxx +++ b/src/MEDCalc/gui/DatasourceController.cxx @@ -22,7 +22,7 @@ #include "DatasourceController.hxx" #include "DatasourceConstants.hxx" -#include "MEDOPFactoryClient.hxx" +#include "MEDFactoryClient.hxx" #include "QtHelper.hxx" #include CORBA_CLIENT_HEADER(SALOMEDS) @@ -134,7 +134,7 @@ DatasourceController::addDatasource(const char* filename) } // After above data source creation, python console emits a signal, forwarded by workspace, to update the GUI void -DatasourceController::updateTreeViewWithNewDatasource(const MEDOP::DatasourceHandler* datasourceHandler) +DatasourceController::updateTreeViewWithNewDatasource(const MEDCALC::DatasourceHandler* datasourceHandler) { if (!datasourceHandler) { return; @@ -152,11 +152,11 @@ DatasourceController::updateTreeViewWithNewDatasource(const MEDOP::DatasourceHan // We can add the meshes as children of the datasource - MEDOP::MeshHandlerList * meshHandlerList = - MEDOPFactoryClient::getDataManager()->getMeshList(datasourceHandler->id); + MEDCALC::MeshHandlerList * meshHandlerList = + MEDFactoryClient::getDataManager()->getMeshList(datasourceHandler->id); for(CORBA::ULong iMesh=0; iMeshlength(); iMesh++) { - MEDOP::MeshHandler meshHandler = (*meshHandlerList)[iMesh]; + MEDCALC::MeshHandler meshHandler = (*meshHandlerList)[iMesh]; SALOMEDS::SObject_var soMesh = _studyEditor->newObject(soDatasource); _studyEditor->setName(soMesh,meshHandler.name); _studyEditor->setIcon(soMesh,tr("ICO_DATASOURCE_MESH").toStdString().c_str()); @@ -165,11 +165,11 @@ DatasourceController::updateTreeViewWithNewDatasource(const MEDOP::DatasourceHan // We add the field timeseries defined on this mesh, as children // of the mesh SObject - MEDOP::FieldseriesHandlerList * fieldseriesHandlerList = - MEDOPFactoryClient::getDataManager()->getFieldseriesListOnMesh(meshHandler.id); + MEDCALC::FieldseriesHandlerList * fieldseriesHandlerList = + MEDFactoryClient::getDataManager()->getFieldseriesListOnMesh(meshHandler.id); for(CORBA::ULong iFieldseries=0; iFieldserieslength(); iFieldseries++) { - MEDOP::FieldseriesHandler fieldseriesHandler = (*fieldseriesHandlerList)[iFieldseries]; + MEDCALC::FieldseriesHandler fieldseriesHandler = (*fieldseriesHandlerList)[iFieldseries]; SALOMEDS::SObject_var soFieldseries = _studyEditor->newObject(soMesh); std::string label(fieldseriesHandler.name); @@ -273,12 +273,12 @@ void DatasourceController::OnExpandField() // contextual menu if the selected object is not conform // Then retrieve the list of fields in this timeseries - MEDOP::FieldHandlerList * fieldHandlerList = - MEDOPFactoryClient::getDataManager()->getFieldListInFieldseries(fieldseriesId); + MEDCALC::FieldHandlerList * fieldHandlerList = + MEDFactoryClient::getDataManager()->getFieldListInFieldseries(fieldseriesId); // Finally, create an entry for each of the field for(CORBA::ULong iField=0; iFieldlength(); iField++) { - MEDOP::FieldHandler fieldHandler = (*fieldHandlerList)[iField]; + MEDCALC::FieldHandler fieldHandler = (*fieldHandlerList)[iField]; SALOMEDS::SObject_var soField = _studyEditor->newObject(soFieldseries); std::string label("it="); label += ToString(fieldHandler.iteration); _studyEditor->setName(soField,label.c_str()); @@ -307,7 +307,7 @@ void DatasourceController::visualize(DatasourceEvent::EventType eventType) { if ( fieldId < 0 ) continue; - MEDOP::FieldHandler * fieldHandler = MEDOPFactoryClient::getDataManager()->getFieldHandler(fieldId); + MEDCALC::FieldHandler * fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); if (! fieldHandler) { QMessageBox::warning(_salomeModule->getApp()->desktop(), tr("Operation not allowed"), @@ -366,8 +366,8 @@ void DatasourceController::OnUseInWorkspace() { return; } - MEDOP::FieldHandler * fieldHandler = - MEDOPFactoryClient::getDataManager()->getFieldHandler(fieldId); + MEDCALC::FieldHandler * fieldHandler = + MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); if (! fieldHandler) { QMessageBox::warning(_salomeModule->getApp()->desktop(), @@ -398,7 +398,7 @@ void DatasourceController::OnUseInWorkspace() { // Tag the field as persistent on the server. It means that a // saving of the workspace will save at least this field (maybe it // should be an option?) - MEDOPFactoryClient::getDataManager()->markAsPersistent(fieldId, true); + MEDFactoryClient::getDataManager()->markAsPersistent(fieldId, true); } else { // In this case, we don't ask the user to specify an alias for @@ -409,8 +409,8 @@ void DatasourceController::OnUseInWorkspace() { bool isInWorkspace = _studyEditor->getParameterBool(soField,OBJECT_IS_IN_WORKSPACE); if ( !isInWorkspace ) { int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID); - MEDOP::FieldHandler * fieldHandler = - MEDOPFactoryClient::getDataManager()->getFieldHandler(fieldId); + MEDCALC::FieldHandler * fieldHandler = + MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); DatasourceEvent * event = new DatasourceEvent(); event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT; XmedDataObject * dataObject = new XmedDataObject(); @@ -424,7 +424,7 @@ void DatasourceController::OnUseInWorkspace() { // Tag the field as persistent on the server. It means that a // saving of the workspace will save at least this field (maybe it // should be an option?) - MEDOPFactoryClient::getDataManager()->markAsPersistent(fieldId, true); + MEDFactoryClient::getDataManager()->markAsPersistent(fieldId, true); } else { STDLOG("The field "<<_studyEditor->getName(soField)<< @@ -459,16 +459,16 @@ void DatasourceController::OnChangeUnderlyingMeshInputValidated() { int meshId = _dlgChangeUnderlyingMesh->getMeshId(); STDLOG("meshId = " << ToString(meshId)); int fieldId = _dlgChangeUnderlyingMesh->getFieldId(); - MEDOP::FieldHandler * fieldHandler = - MEDOPFactoryClient::getDataManager()->getFieldHandler(fieldId); + MEDCALC::FieldHandler * fieldHandler = + MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); // We don't modify the original field but create first a duplicate - MEDOP::FieldHandler * duplicate = MEDOPFactoryClient::getCalculator()->dup(*fieldHandler); - MEDOPFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId); + MEDCALC::FieldHandler * duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler); + MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId); // Request once more the duplicate to update the meta-data on this // client side - duplicate = MEDOPFactoryClient::getDataManager()->getFieldHandler(duplicate->id); + duplicate = MEDFactoryClient::getDataManager()->getFieldHandler(duplicate->id); // >>> // WARN: the following is a temporary code for test purpose @@ -507,7 +507,7 @@ void DatasourceController::OnInterpolateField() { } void DatasourceController::OnInterpolateFieldInputValidated() { - MEDOP::InterpolationParameters params; + MEDCALC::InterpolationParameters params; params.precision = _dlgInterpolateField->getPrecision(); STDLOG("precision = " << params.precision); params.defaultValue = _dlgInterpolateField->getDefaultValue(); @@ -524,14 +524,14 @@ void DatasourceController::OnInterpolateFieldInputValidated() { int meshId = _dlgInterpolateField->getMeshId(); STDLOG("meshId = " << ToString(meshId)); int fieldId = _dlgInterpolateField->getFieldId(); - MEDOP::FieldHandler* fieldHandler = MEDOPFactoryClient::getDataManager()->getFieldHandler(fieldId); + MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); // We don't modify the original field but create first a duplicate - // MEDOP::FieldHandler* duplicate = MEDOPFactoryClient::getCalculator()->dup(*fieldHandler); - //MEDOPFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId); - MEDOP::FieldHandler* result = NULL; + // MEDCALC::FieldHandler* duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler); + //MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId); + MEDCALC::FieldHandler* result = NULL; try { - result = MEDOPFactoryClient::getDataManager()->interpolateField(fieldId, meshId, params); + result = MEDFactoryClient::getDataManager()->interpolateField(fieldId, meshId, params); } catch(...) { STDLOG("Unable to process field interpolation; please check interpolation parameters"); @@ -543,7 +543,7 @@ void DatasourceController::OnInterpolateFieldInputValidated() { // Request once more the duplicate to update the meta-data on this // client side - // duplicate = MEDOPFactoryClient::getDataManager()->getFieldHandler(duplicate->id); + // duplicate = MEDFactoryClient::getDataManager()->getFieldHandler(duplicate->id); // >>> // WARN: the following is a temporary code for test purpose @@ -561,10 +561,10 @@ void DatasourceController::OnInterpolateFieldInputValidated() { } void -DatasourceController::processWorkspaceEvent(const MEDOP::MedEvent* event) +DatasourceController::processWorkspaceEvent(const MEDCALC::MedEvent* event) { - if ( event->type == MEDOP::EVENT_ADD_DATASOURCE ) { - MEDOP::DatasourceHandler* datasourceHandler = MEDOPFactoryClient::getDataManager()->getDatasourceHandler(event->filename); + if ( event->type == MEDCALC::EVENT_ADD_DATASOURCE ) { + MEDCALC::DatasourceHandler* datasourceHandler = MEDFactoryClient::getDataManager()->getDatasourceHandler(event->filename); this->updateTreeViewWithNewDatasource(datasourceHandler); _salomeModule->updateObjBrowser(true); } diff --git a/src/MEDOP/gui/DatasourceController.hxx b/src/MEDCalc/gui/DatasourceController.hxx similarity index 92% rename from src/MEDOP/gui/DatasourceController.hxx rename to src/MEDCalc/gui/DatasourceController.hxx index bc1732758..a1f0b6fdf 100644 --- a/src/MEDOP/gui/DatasourceController.hxx +++ b/src/MEDCalc/gui/DatasourceController.hxx @@ -33,7 +33,7 @@ #include "XmedDataModel.hxx" #include "DlgChangeUnderlyingMesh.hxx" #include "DlgInterpolateField.hxx" -#include "MEDOPGUI.hxx" +#include "MEDCALCGUI.hxx" // // The DatasourceController defines data structures and classes to // manage the usage of objects in the data space. The data space is @@ -43,7 +43,7 @@ // A datasource event is used by the DatasourceController to notify a // job to the Workspace controller (Qt signal/slot pattern connected -// by the main controller MEDOPModule). The setting of attributes and +// by the main controller MEDModule). The setting of attributes and // usage of these attributes in the WorkspaceController depends on the // event type. For example, in the case of a IMPORT event, we just // have to transmit the object, while in the USE event we have to @@ -69,7 +69,7 @@ typedef struct { // Datasource controller // ============================================================== // -class MEDOPGUI_EXPORT DatasourceController: public QObject { +class MEDCALCGUI_EXPORT DatasourceController: public QObject { Q_OBJECT public: @@ -82,7 +82,7 @@ public slots: // Callback connected to dialog box validation signals void OnChangeUnderlyingMeshInputValidated(); void OnInterpolateFieldInputValidated(); - void processWorkspaceEvent(const MEDOP::MedEvent * event); + void processWorkspaceEvent(const MEDCALC::MedEvent * event); signals: void datasourceSignal(const DatasourceEvent * event); @@ -99,7 +99,7 @@ protected slots: private: void visualize(DatasourceEvent::EventType); void addDatasource(const char* filename); - void updateTreeViewWithNewDatasource(const MEDOP::DatasourceHandler*); + void updateTreeViewWithNewDatasource(const MEDCALC::DatasourceHandler*); private: StandardApp_Module * _salomeModule; diff --git a/src/MEDOP/gui/MEDOPGUI.hxx b/src/MEDCalc/gui/MEDCALCGUI.hxx similarity index 79% rename from src/MEDOP/gui/MEDOPGUI.hxx rename to src/MEDCalc/gui/MEDCALCGUI.hxx index 2631c2137..0514d799c 100755 --- a/src/MEDOP/gui/MEDOPGUI.hxx +++ b/src/MEDCalc/gui/MEDCALCGUI.hxx @@ -17,17 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef MEDOPGUI_HXX_ -#define MEDOPGUI_HXX_ +#ifndef MEDCALCGUI_HXX_ +#define MEDCALCGUI_HXX_ #ifdef WIN32 -# if defined MEDOPGUI_EXPORTS -# define MEDOPGUI_EXPORT __declspec( dllexport ) +# if defined MEDCALCGUI_EXPORTS +# define MEDCALCGUI_EXPORT __declspec( dllexport ) # else -# define MEDOPGUI_EXPORT __declspec( dllimport ) +# define MEDCALCGUI_EXPORT __declspec( dllimport ) # endif #else -# define MEDOPGUI_EXPORT +# define MEDCALCGUI_EXPORT #endif -#endif //MEDOPGUI_HXX_ +#endif //MEDCALCGUI_HXX_ diff --git a/src/MEDOP/gui/MEDOP_msg_en.ts b/src/MEDCalc/gui/MEDCALC_msg_en.ts similarity index 100% rename from src/MEDOP/gui/MEDOP_msg_en.ts rename to src/MEDCalc/gui/MEDCALC_msg_en.ts diff --git a/src/MEDOP/gui/MEDOP_msg_fr.ts b/src/MEDCalc/gui/MEDCALC_msg_fr.ts similarity index 100% rename from src/MEDOP/gui/MEDOP_msg_fr.ts rename to src/MEDCalc/gui/MEDCALC_msg_fr.ts diff --git a/src/MEDOP/gui/MEDOP_msg_ja.ts b/src/MEDCalc/gui/MEDCALC_msg_ja.ts similarity index 100% rename from src/MEDOP/gui/MEDOP_msg_ja.ts rename to src/MEDCalc/gui/MEDCALC_msg_ja.ts diff --git a/src/MEDOP/gui/MEDEventListener_i.cxx b/src/MEDCalc/gui/MEDEventListener_i.cxx similarity index 93% rename from src/MEDOP/gui/MEDEventListener_i.cxx rename to src/MEDCalc/gui/MEDEventListener_i.cxx index 5acb73efe..ae9291e04 100644 --- a/src/MEDOP/gui/MEDEventListener_i.cxx +++ b/src/MEDCalc/gui/MEDEventListener_i.cxx @@ -46,7 +46,7 @@ MEDEventListener_i::~MEDEventListener_i() LOG("Deleting MEDEventListener_i instance"); } -void MEDEventListener_i::processMedEvent(const MEDOP::MedEvent & event) { +void MEDEventListener_i::processMedEvent(const MEDCALC::MedEvent & event) { LOG("Start processing event for field id="< // Multiple inheritance requires QObject to be first -class MEDOPGUI_EXPORT MEDEventListener_i: public QObject, - public POA_MEDOP::MEDEventListener, +class MEDCALCGUI_EXPORT MEDEventListener_i: public QObject, + public POA_MEDCALC::MEDEventListener, public SALOME::GenericObj_i { @@ -40,14 +40,14 @@ class MEDOPGUI_EXPORT MEDEventListener_i: public QObject, public: - // + // // =========================================================== // Functions specified in the IDL interface // =========================================================== // - void processMedEvent(const MEDOP::MedEvent & event); + void processMedEvent(const MEDCALC::MedEvent & event); - // + // // =========================================================== // Other public functions (non available via CORBA) // =========================================================== @@ -57,7 +57,7 @@ public: signals: //void medEventSignal(); - void medEventSignal(const MEDOP::MedEvent * event); + void medEventSignal(const MEDCALC::MedEvent * event); private: @@ -69,4 +69,3 @@ private: }; #endif // _MED_EVENTLISTENER_I_HXX_ - diff --git a/src/MEDOP/gui/MEDOPFactoryClient.cxx b/src/MEDCalc/gui/MEDFactoryClient.cxx similarity index 77% rename from src/MEDOP/gui/MEDOPFactoryClient.cxx rename to src/MEDCalc/gui/MEDFactoryClient.cxx index e8df5ccc2..d417e5936 100644 --- a/src/MEDOP/gui/MEDOPFactoryClient.cxx +++ b/src/MEDCalc/gui/MEDFactoryClient.cxx @@ -17,22 +17,22 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// Author : Guillaume Boulant (EDF) +// Author : Guillaume Boulant (EDF) -#include "MEDOPFactoryClient.hxx" +#include "MEDFactoryClient.hxx" #include "SALOME_KernelServices.hxx" -namespace MEDOPFactoryClient { +namespace MEDFactoryClient { /*! * This returns a singleton (static) instance of the XMED engine. */ - MEDOP::MEDOPFactory_ptr getFactory() { - static MEDOP::MEDOPFactory_ptr engine; + MEDCALC::MEDFactory_ptr getFactory() { + static MEDCALC::MEDFactory_ptr engine; if(CORBA::is_nil(engine)){ Engines::EngineComponent_var component = - KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","MEDOPFactory" ); - engine = MEDOP::MEDOPFactory::_narrow(component); + KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","MEDFactory" ); + engine = MEDCALC::MEDFactory::_narrow(component); } return engine; } @@ -40,8 +40,8 @@ namespace MEDOPFactoryClient { /*! * This returns a singleton (static) instance of the XMED data manager. */ - MEDOP::MEDDataManager_ptr getDataManager() { - static MEDOP::MEDDataManager_ptr dataManager; + MEDCALC::MEDDataManager_ptr getDataManager() { + static MEDCALC::MEDDataManager_ptr dataManager; if(CORBA::is_nil(dataManager)){ dataManager = getFactory()->getDataManager(); } @@ -51,8 +51,8 @@ namespace MEDOPFactoryClient { /*! * This returns a singleton (static) instance of the XMED calculator. */ - MEDOP::MEDCalculator_ptr getCalculator() { - static MEDOP::MEDCalculator_ptr calculator; + MEDCALC::MEDCalculator_ptr getCalculator() { + static MEDCALC::MEDCalculator_ptr calculator; if(CORBA::is_nil(calculator)){ calculator = getFactory()->getCalculator(); } diff --git a/src/MEDOP/gui/MEDOPFactoryClient.hxx b/src/MEDCalc/gui/MEDFactoryClient.hxx similarity index 75% rename from src/MEDOP/gui/MEDOPFactoryClient.hxx rename to src/MEDCalc/gui/MEDFactoryClient.hxx index 8ded40b47..62a6de5fb 100644 --- a/src/MEDOP/gui/MEDOPFactoryClient.hxx +++ b/src/MEDCalc/gui/MEDFactoryClient.hxx @@ -17,28 +17,28 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// Author : Guillaume Boulant (EDF) +// Author : Guillaume Boulant (EDF) -#ifndef _MEDOPFACTORY_CLIENT_HXX_ -#define _MEDOPFACTORY_CLIENT_HXX_ +#ifndef _MEDFACTORY_CLIENT_HXX_ +#define _MEDFACTORY_CLIENT_HXX_ #include -#include CORBA_CLIENT_HEADER(MEDOPFactory) +#include CORBA_CLIENT_HEADER(MEDFactory) #include CORBA_CLIENT_HEADER(MEDDataManager) #include CORBA_CLIENT_HEADER(MEDCalculator) -#include "MEDOPGUI.hxx" +#include "MEDCALCGUI.hxx" // This helper manages static variables binded on main objects of the // XMED context, so that they could be initialized once and shared in // the whole gui context. It prevents to defined an attribute in each // class while this instance are singleton instances. -namespace MEDOPFactoryClient { - MEDOPGUI_EXPORT MEDOP::MEDOPFactory_ptr getFactory(); - MEDOPGUI_EXPORT MEDOP::MEDDataManager_ptr getDataManager(); - MEDOPGUI_EXPORT MEDOP::MEDCalculator_ptr getCalculator(); +namespace MEDFactoryClient { + MEDCALCGUI_EXPORT MEDCALC::MEDFactory_ptr getFactory(); + MEDCALCGUI_EXPORT MEDCALC::MEDDataManager_ptr getDataManager(); + MEDCALCGUI_EXPORT MEDCALC::MEDCalculator_ptr getCalculator(); } -#endif // _MEDOPFACTORY_CLIENT_HXX_ +#endif // _MEDFACTORY_CLIENT_HXX_ diff --git a/src/MEDOP/gui/MEDOPModule.cxx b/src/MEDCalc/gui/MEDModule.cxx similarity index 83% rename from src/MEDOP/gui/MEDOPModule.cxx rename to src/MEDCalc/gui/MEDModule.cxx index e3fb1716e..0f255328e 100644 --- a/src/MEDOP/gui/MEDOPModule.cxx +++ b/src/MEDCalc/gui/MEDModule.cxx @@ -19,18 +19,18 @@ // Author : Guillaume Boulant (EDF) -#include "MEDOPModule.hxx" +#include "MEDModule.hxx" #include "QtHelper.hxx" #include #include CORBA_CLIENT_HEADER(SALOMEDS) -#include "MEDOPFactoryClient.hxx" +#include "MEDFactoryClient.hxx" #ifndef DISABLE_PVVIEWER #include "PVViewer_ViewModel.h" #endif -MEDOPModule::MEDOPModule() : +MEDModule::MEDModule() : StandardApp_Module() { // Note also that we can't use the getApp() function here because @@ -49,8 +49,8 @@ MEDOPModule::MEDOPModule() : * Returns the engine of the XMED module, i.e. the SALOME component * associated to the study root of the module. */ -Engines::EngineComponent_ptr MEDOPModule::getEngine() const { - return MEDOPFactoryClient::getFactory(); +Engines::EngineComponent_ptr MEDModule::getEngine() const { + return MEDFactoryClient::getFactory(); } /*! @@ -58,8 +58,8 @@ Engines::EngineComponent_ptr MEDOPModule::getEngine() const { * module. The file is supposed to be located in the resource * directory of the module. */ -QString MEDOPModule::studyIconName() { - return tr("ICO_MEDOP_SMALL"); +QString MEDModule::studyIconName() { + return tr("ICO_MED_SMALL"); } // @@ -75,7 +75,7 @@ QString MEDOPModule::studyIconName() { * creates the widgets specific for this module, in particular the * workspace widget and the dataspace widget. */ -void MEDOPModule::createModuleWidgets() { +void MEDModule::createModuleWidgets() { _datasourceController = new DatasourceController(this); _workspaceController = new WorkspaceController(this); _xmedDataModel = new XmedDataModel(); @@ -84,32 +84,32 @@ void MEDOPModule::createModuleWidgets() { connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent *)), _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent *))); - connect(_workspaceController, SIGNAL(workspaceSignal(const MEDOP::MedEvent *)), - _datasourceController, SLOT(processWorkspaceEvent(const MEDOP::MedEvent *))); + connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent *)), + _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent *))); } -bool MEDOPModule::activateModule( SUIT_Study* theStudy ) +bool MEDModule::activateModule( SUIT_Study* theStudy ) { bool bOk = StandardApp_Module::activateModule( theStudy ); _workspaceController->showDockWidgets(true); this->setDockLayout(StandardApp_Module::DOCKLAYOUT_LEFT_VLARGE); return bOk; } -bool MEDOPModule::deactivateModule( SUIT_Study* theStudy ) +bool MEDModule::deactivateModule( SUIT_Study* theStudy ) { _workspaceController->showDockWidgets(false); this->unsetDockLayout(); return StandardApp_Module::deactivateModule( theStudy ); } -void MEDOPModule::createModuleActions() { +void MEDModule::createModuleActions() { // Creating actions concerning the dataspace _datasourceController->createActions(); // Creating actions concerning the workspace _workspaceController->createActions(); } -void MEDOPModule::viewManagers( QStringList& list ) const +void MEDModule::viewManagers( QStringList& list ) const { #ifndef DISABLE_PVVIEWER list.append( PVViewer_Viewer::Type() ); diff --git a/src/MEDOP/gui/MEDOPModule.hxx b/src/MEDCalc/gui/MEDModule.hxx similarity index 89% rename from src/MEDOP/gui/MEDOPModule.hxx rename to src/MEDCalc/gui/MEDModule.hxx index e6859b999..a34a508a1 100644 --- a/src/MEDOP/gui/MEDOPModule.hxx +++ b/src/MEDCalc/gui/MEDModule.hxx @@ -19,8 +19,8 @@ // Author : Guillaume Boulant (EDF) -#ifndef _MEDOP_MODULE_HXX_ -#define _MEDOP_MODULE_HXX_ +#ifndef _MED_MODULE_HXX_ +#define _MED_MODULE_HXX_ #include "StandardApp_Module.hxx" @@ -31,12 +31,12 @@ #include #include CORBA_SERVER_HEADER(SALOME_Component) -#include "MEDOPGUI.hxx" +#include "MEDCALCGUI.hxx" /*! - * This class defines the gui of the MEDOP module. + * This class defines the gui of the MED module. */ -class MEDOPGUI_EXPORT MEDOPModule: public StandardApp_Module +class MEDCALCGUI_EXPORT MEDModule: public StandardApp_Module { Q_OBJECT @@ -45,7 +45,7 @@ class MEDOPGUI_EXPORT MEDOPModule: public StandardApp_Module // =========================================================== public: - MEDOPModule(); + MEDModule(); void viewManagers( QStringList& ) const; protected: diff --git a/src/MEDOP/gui/MED_images.ts b/src/MEDCalc/gui/MED_images.ts similarity index 92% rename from src/MEDOP/gui/MED_images.ts rename to src/MEDCalc/gui/MED_images.ts index 62a6afbc5..95df2d88e 100644 --- a/src/MEDOP/gui/MED_images.ts +++ b/src/MEDCalc/gui/MED_images.ts @@ -52,12 +52,12 @@ image_add.png - ICO_MEDOP - MEDOP.png + ICO_MED + MEDCalc.png - ICO_MEDOP_SMALL - MEDOP_small.png + ICO_MED_SMALL + MEDCalc_small.png ICO_WORKSPACE_CLEAN diff --git a/src/MEDOP/gui/MED_msg_en.ts b/src/MEDCalc/gui/MED_msg_en.ts similarity index 62% rename from src/MEDOP/gui/MED_msg_en.ts rename to src/MEDCalc/gui/MED_msg_en.ts index 0689fc4f9..bb06235c7 100644 --- a/src/MEDOP/gui/MED_msg_en.ts +++ b/src/MEDCalc/gui/MED_msg_en.ts @@ -4,27 +4,27 @@ DatasourceController - + LAB_ADD_DATA_SOURCE Add Data Source - + TIP_ADD_DATA_SOURCE Add a file data source (file providing med data) - + LAB_ADD_IMAGE_SOURCE Add Image Source - + TIP_ADD_IMAGE_SOURCE Create a Data Source from an image file - + LAB_EXPAND_FIELD Expand field timeseries @@ -33,47 +33,47 @@ Scalar map - + LAB_VISUALIZE Visualize - + LAB_USE_IN_WORKSPACE Use in workspace - + LAB_CHANGE_MESH Change underlying mesh - + LAB_INTERPOLATE_FIELD Interpolate field - + IMPORT_MED_FIELDS Import MED fields - + OPERATION_FAILED Operation failed - + CREATION_FAILED The creation of med data from the image file failed - + OPERATION_NOT_ALLOWED Operation not allowed - + FIELD_ALREADY_DEFINED This field is already defined in the workspace @@ -81,22 +81,22 @@ DlgAlias - + SELECT_AN_ALIAS_FOR_THE_FIELD Select an alias for the field - + DEFINE_AN_ALIAS You can define an alias to manipulate the field in console: - + ALIAS Alias - + MSG_OPERATION_DEFINES_VARIABLE (this operation defines a variable named <alias> in TUI console. Enter "<alias>.help()" to see available functions, or simply "doc") @@ -104,28 +104,28 @@ DlgChangeUnderlyingMesh - + FORM Form - + MESH_GT Mesh -> - + MSG_EXPLORER (Explorer provides a view on MED data sources (mesh and fields) referenced in data space) - + DATA_VERIFICATION Data verification - - + + SELECT_MESH You must select a mesh in the explorer and clic the button Mesh @@ -133,47 +133,47 @@ DlgInterpolateField - + SELECT_MESH You must select a mesh in the explorer and clic the button Mesh - + TARGET_MESH_GT Target mesh -> - + MSG_EXPLORER (Explorer provides a view on MED data sources (mesh and fields) referenced in data space) - + LABEL_PRECISION Interpolator precision - + LABEL_INTERSECTION_TYPE Intersection type - + LABEL_METHOD Interpolation method - + LABEL_DEFAULT_VALUE Default value of resulting field - + LABEL_REVERSE Reverse interpolation ? - + LABEL_NATURE Field nature @@ -181,32 +181,32 @@ DlgImageToMed - + FORM Form - + IMAGE_FILE Image file: - + MED_FILE MED file: - + SELECT_IMAGE_FILE Select image file - + SPECIFY_MED_FILE Specify a MED file - + LOAD_AUTOMATICALLY Load automatically @@ -214,17 +214,17 @@ DlgUseInWorkspace - + FORM Form - + PRESSURE Pressure: - + TEMPERATURE Temperature: @@ -232,26 +232,26 @@ GenericDialog - + DIALOG Dialog - MEDOPModule + MEDModule - - + + IMPORT_FROM_FILE Import from File - + IMPORT_MED_FILE Import MED file - + MEN_FILE &File @@ -259,67 +259,67 @@ WorkspaceController - + VISUALIZE_SCALAR_MAP Visualize (scalar map) - + USE_IN_CONSOLE Use (in console) - + EXPORT_TO_PARAVIS Export (to PARAVIS) - + SAVE_AS_MED Save (as MED file) - + REMOVE_FROM_WORKSPACE Remove (from workspace) - + LAB_SAVE_WORKSPACE Save workspace - + TIP_SAVE_WORKSPACE Save the workspace (fields and meshes) in a MED file - + LAB_CLEAN_WORKSPACE Clean workspace - + TIP_CLEAN_WORKSPACE Clean all data in the workspace - + SAVE_SELECTED_FIELDS Save selected fields - + SAVE_WORKSPACE_DATA Save workspace data - + NOT_IMPLEMENTED_YET Not implemented yet - + FUNCTION_NOT_IMPLEMENTED This function is not implemented yet @@ -327,31 +327,31 @@ @default - - - - - + + + + + FILE_FILTER_MED MED files (*.med) - + FILE_FILTER_PNG PNG image (*.png) - + FILE_FILTER_JPG JPG image (*.jpg) - + FILE_FILTER_PGM PGM image (*.jpg) - + FILE_FILTER_ALL All files (*.*) diff --git a/src/MEDOP/gui/MED_msg_fr.ts b/src/MEDCalc/gui/MED_msg_fr.ts similarity index 63% rename from src/MEDOP/gui/MED_msg_fr.ts rename to src/MEDCalc/gui/MED_msg_fr.ts index d918d3010..7ff258e34 100644 --- a/src/MEDOP/gui/MED_msg_fr.ts +++ b/src/MEDCalc/gui/MED_msg_fr.ts @@ -4,27 +4,27 @@ DatasourceController - + LAB_ADD_DATA_SOURCE Importer des données MED - + TIP_ADD_DATA_SOURCE Ajouter des données par import de fichiers MED - + LAB_ADD_IMAGE_SOURCE Ajouter une image - + TIP_ADD_IMAGE_SOURCE Ajouter des données par import d'un fichier image - + LAB_EXPAND_FIELD Étendre les series temporelles du champ @@ -33,47 +33,47 @@ Carte scalaire - + LAB_VISUALIZE Visualiser - + LAB_USE_IN_WORKSPACE Utiliser dans l'espace de travail - + LAB_CHANGE_MESH Changer le maillage sous-jacent - + LAB_INTERPOLATE_FIELD Interpoler le champ - + IMPORT_MED_FIELDS Importer des champs (format MED) - + OPERATION_FAILED L'opération a échoué - + CREATION_FAILED La création des données MED à partir d'un fichier image a échoué - + OPERATION_NOT_ALLOWED Opération non autorisée - + FIELD_ALREADY_DEFINED Ce champ est déjà défini dans l'espace de travail @@ -81,22 +81,22 @@ DlgAlias - + SELECT_AN_ALIAS_FOR_THE_FIELD Selectionner un alias pour ce champ - + DEFINE_AN_ALIAS Vous pouvez définir un alias pour manipuler le champs dans la console: - + ALIAS Alias - + MSG_OPERATION_DEFINES_VARIABLE (cette opération définit une variable nommée <alias> dans la console texte. Tapez "<alias>.help()" pour voir les fonctions disponibles, ou simplement "doc") @@ -104,28 +104,28 @@ DlgChangeUnderlyingMesh - + FORM Formulaire - + MESH_GT Maillage -> - + MSG_EXPLORER (L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données) - + DATA_VERIFICATION Vérification des données - - + + SELECT_MESH Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage @@ -133,47 +133,47 @@ DlgInterpolateField - + SELECT_MESH Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage - + TARGET_MESH_GT Maillage cible -> - + MSG_EXPLORER (L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données) - + LABEL_PRECISION Précision de l'interpolateur - + LABEL_INTERSECTION_TYPE Type d'intersection - + LABEL_METHOD Méthode d'interpolation - + LABEL_DEFAULT_VALUE Valeur par défaut du champ résultant - + LABEL_REVERSE Interpolation inverse ? - + LABEL_NATURE Nature du champ @@ -181,32 +181,32 @@ DlgImageToMed - + FORM Formulaire - + IMAGE_FILE Fichier image : - + MED_FILE Fichier MED : - + SELECT_IMAGE_FILE Selectionner un fichier image - + SPECIFY_MED_FILE Spécifier un fichier MED - + LOAD_AUTOMATICALLY Charger automatiquement @@ -214,17 +214,17 @@ DlgUseInWorkspace - + FORM Formulaire - + PRESSURE Pression : - + TEMPERATURE Température : @@ -232,26 +232,26 @@ GenericDialog - + DIALOG Dialogue - MEDOPModule + MEDModule - - + + IMPORT_FROM_FILE Importer depuis un fichier - + IMPORT_MED_FILE Importer un fichier MED - + MEN_FILE &Fichier @@ -259,67 +259,67 @@ WorkspaceController - + VISUALIZE_SCALAR_MAP Visualiser (carte scalaire) - + USE_IN_CONSOLE Utiliser (dans la console) - + EXPORT_TO_PARAVIS Exporter (vers PARAVIS) - + SAVE_AS_MED Sauvegarder (dans un fichier MED) - + REMOVE_FROM_WORKSPACE Supprimer (de l'espace de travail) - + LAB_SAVE_WORKSPACE Sauvegarder l'espace de travail - + TIP_SAVE_WORKSPACE Sauvegarder l'espace de travail (champs et maillages) dans un fichier MED - + LAB_CLEAN_WORKSPACE Nettoyer l'espace de travail - + TIP_CLEAN_WORKSPACE Effacer toute les données de l'espace de travail - + SAVE_SELECTED_FIELDS Sauvegarder les champs sélectionnés - + SAVE_WORKSPACE_DATA Sauvegarder les données de l'espace de travail - + NOT_IMPLEMENTED_YET Non implémenté - + FUNCTION_NOT_IMPLEMENTED Cette function n'est pas encore implémentée @@ -327,31 +327,31 @@ @default - - - - - + + + + + FILE_FILTER_MED Fichiers MED (*.med) - + FILE_FILTER_PNG Image PNG (*.png) - + FILE_FILTER_JPG Image JPG (*.jpg) - + FILE_FILTER_PGM Image PGM (*.jpg) - + FILE_FILTER_ALL Tous les fichiers (*.*) diff --git a/src/MEDOP/gui/MED_msg_ja.ts b/src/MEDCalc/gui/MED_msg_ja.ts similarity index 65% rename from src/MEDOP/gui/MED_msg_ja.ts rename to src/MEDCalc/gui/MED_msg_ja.ts index 9da2bfe05..7c3defc1d 100644 --- a/src/MEDOP/gui/MED_msg_ja.ts +++ b/src/MEDCalc/gui/MED_msg_ja.ts @@ -4,72 +4,72 @@ DatasourceController - + LAB_ADD_DATA_SOURCE データのインポート MED - + TIP_ADD_DATA_SOURCE MED のファイルをインポートしたデータを追加します。 - + LAB_ADD_IMAGE_SOURCE 画像を追加します。 - + TIP_ADD_IMAGE_SOURCE イメージ ファイルのインポートを使用してデータを追加します。 - + LAB_EXPAND_FIELD 拡張フィールドの時系列 - + LAB_VISUALIZE ビュー - + LAB_USE_IN_WORKSPACE ワークスペースを使用します。 - + LAB_CHANGE_MESH 基になるメッシュを変更します。 - + LAB_INTERPOLATE_FIELD 挿入フィールド - + IMPORT_MED_FIELDS (MED のサイズ) フィールドをインポートします。 - + OPERATION_FAILED 操作が失敗しました - + CREATION_FAILED イメージ ファイルの作成からの医学データに失敗しました - + OPERATION_NOT_ALLOWED 許可されていない操作 - + FIELD_ALREADY_DEFINED このフィールドは、ワークスペースで既に定義されて @@ -77,22 +77,22 @@ DlgAlias - + SELECT_AN_ALIAS_FOR_THE_FIELD このフィールドのエイリアスを選択します - + DEFINE_AN_ALIAS コンソールでフィールドを操作するエイリアスを設定できます。 - + ALIAS エイリアス - + MSG_OPERATION_DEFINES_VARIABLE (この操作はテキスト コンソールに<alias>という名前の変数を定義します。型 '<alias>. help()"利用可能な機能または単に「doc」参照する)</alias> </alias> @@ -100,28 +100,28 @@ DlgChangeUnderlyingMesh - + FORM フォーム - + MESH_GT -> メッシュします。 - + MSG_EXPLORER (エクスプ ローラー データ空間で参照される MED (メッシュとフィールド) のデータのビューを提供します) - + DATA_VERIFICATION データの検証 - - + + SELECT_MESH エクスプ ローラーでメッシュを選択し、メッシュをクリックする必要があります。 @@ -129,47 +129,47 @@ DlgInterpolateField - + SELECT_MESH エクスプローラ内のメッシュを選択し、メッシュボタンをクリックする必要があります。 - + TARGET_MESH_GT Target mesh -> - + MSG_EXPLORER エクスプローラによってデータスペース内で参照されたMEDデータソース(メッシュおよびフィールド)上に表示します。 - + LABEL_PRECISION 挿入精度 - + LABEL_INTERSECTION_TYPE 交点タイプ - + LABEL_METHOD 挿入方法 - + LABEL_DEFAULT_VALUE 結果フィールドのデフォルト値 - + LABEL_REVERSE 挿入を反転しますか? - + LABEL_NATURE フィールド性質 @@ -177,32 +177,32 @@ DlgImageToMed - + FORM フォーム - + IMAGE_FILE 画像ファイル: - + MED_FILE MED ファイル: - + SELECT_IMAGE_FILE イメージ ファイルを選択します。 - + SPECIFY_MED_FILE MED ファイルを指定します。 - + LOAD_AUTOMATICALLY 自動的に読み込む @@ -210,17 +210,17 @@ DlgUseInWorkspace - + FORM フォーム - + PRESSURE 圧力: - + TEMPERATURE 温度: @@ -228,26 +228,26 @@ GenericDialog - + DIALOG ダイアログ - MEDOPModule + MEDModule - - + + IMPORT_FROM_FILE ファイルからのインポートします。 - + IMPORT_MED_FILE MEDファイルをインポート - + MEN_FILE ファイル(&F) @@ -255,67 +255,67 @@ WorkspaceController - + VISUALIZE_SCALAR_MAP ビュー (マップ スカラー) - + USE_IN_CONSOLE (コンソール) を使用してください。 - + EXPORT_TO_PARAVIS エクスポート (にそこに) - + SAVE_AS_MED (MED ファイル) に保存します。 - + REMOVE_FROM_WORKSPACE (ワークスペース) の削除します。 - + LAB_SAVE_WORKSPACE ワークスペースを保存します。 - + TIP_SAVE_WORKSPACE MED ファイル (フィールドおよびメッシュ) ワークスペースを保存します。 - + LAB_CLEAN_WORKSPACE 作業領域をきれいに - + TIP_CLEAN_WORKSPACE ワークスペースからすべてのデータを消去します。 - + SAVE_SELECTED_FIELDS 選択したフィールドを保存します。 - + SAVE_WORKSPACE_DATA ワークスペースからデータを保存します。 - + NOT_IMPLEMENTED_YET 実装されていません - + FUNCTION_NOT_IMPLEMENTED この機能はまだ実装されていません @@ -323,31 +323,31 @@ @default - - - - - + + + + + FILE_FILTER_MED 音楽配信マック & ファイル (* .med) - + FILE_FILTER_PNG イメージ PNG (*.png) - + FILE_FILTER_JPG 画像 JPG (*.jpg) - + FILE_FILTER_PGM イメージ PGM (*.jpg) - + FILE_FILTER_ALL すべてのファイル (*. *) diff --git a/src/MEDOP/gui/WorkspaceController.cxx b/src/MEDCalc/gui/WorkspaceController.cxx similarity index 87% rename from src/MEDOP/gui/WorkspaceController.cxx rename to src/MEDCalc/gui/WorkspaceController.cxx index 36e620667..153a30785 100644 --- a/src/MEDOP/gui/WorkspaceController.cxx +++ b/src/MEDCalc/gui/WorkspaceController.cxx @@ -21,7 +21,7 @@ #include "WorkspaceController.hxx" #include "QtHelper.hxx" -#include "MEDOPFactoryClient.hxx" +#include "MEDFactoryClient.hxx" #include "XmedDataModel.hxx" #include "DlgAlias.hxx" @@ -58,7 +58,7 @@ WorkspaceController::WorkspaceController(StandardApp_Module * salomeModule) // GUI of something to update for example (using signals and slots // of course). _medEventListener = MEDEventListener_i::getInstance(); - MEDOP::MEDEventListener_ptr medEventListenerServant = _medEventListener->_this(); + MEDCALC::MEDEventListener_ptr medEventListenerServant = _medEventListener->_this(); // We store the IOR inside the MEDDataManager to share this data // with other parts of the application, in particular the python @@ -67,12 +67,12 @@ WorkspaceController::WorkspaceController(StandardApp_Module * salomeModule) SalomeApp_Application * salomeApp = salomeModule->getApp(); const char * medEventListenerIOR = salomeApp->orb()->object_to_string(medEventListenerServant); - MEDOPFactoryClient::getDataManager()->setEventListenerIOR(medEventListenerIOR); + MEDFactoryClient::getDataManager()->setEventListenerIOR(medEventListenerIOR); // Connect the signals emitted from the MEDEventListener to slot of // this class. - connect(_medEventListener, SIGNAL(medEventSignal(const MEDOP::MedEvent*)), - this, SLOT(processMedEvent(const MEDOP::MedEvent*))); + connect(_medEventListener, SIGNAL(medEventSignal(const MEDCALC::MedEvent*)), + this, SLOT(processMedEvent(const MEDCALC::MedEvent*))); // >>> WARN: // Note that this class must be mocked (Q_OBJECT + moc file // generated from header file) so that to be able to connect a @@ -187,7 +187,7 @@ void WorkspaceController::_importItem(QString itemNameId) { // Then, we can request this data object to obtain the associated // FieldHandler. - MEDOP::FieldHandler * fieldHandler = dataObject->getFieldHandler(); + MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler(); STDLOG("Field: mesh="<meshname<<" name="<fieldname); // Finally, we can import the field @@ -202,7 +202,7 @@ void WorkspaceController::_importItem(QString itemNameId) { * options or simply specify the alias (i.e. the name of the python * variable). */ -void WorkspaceController::_importFieldIntoConsole(MEDOP::FieldHandler * fieldHandler, +void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler, bool askForOptions, const char * alias) { @@ -239,7 +239,7 @@ void WorkspaceController::_importFieldIntoConsole(MEDOP::FieldHandler * fieldHan // define the field in the console // QStringList commands; - commands+=QString("%1=xmed.fieldproxy.newFieldProxy(fieldHandlerId=%2)") + commands+=QString("%1=medcalc.newFieldProxy(fieldHandlerId=%2)") .arg(*effectiveAlias) .arg(fieldHandler->id); @@ -251,7 +251,7 @@ void WorkspaceController::_importFieldIntoConsole(MEDOP::FieldHandler * fieldHan * emitted from the MEDEventListener. It processes events coming from * the python console. */ -void WorkspaceController::processMedEvent(const MEDOP::MedEvent * event) { +void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) { STDLOG("WorkspaceController::processMedEvent"); STDLOG("fieldid :"<fieldid); @@ -261,16 +261,19 @@ void WorkspaceController::processMedEvent(const MEDOP::MedEvent * event) { return; } - if ( event->type == MEDOP::EVENT_ADDNEW_FIELD ) { + if ( event->type == MEDCALC::EVENT_UPDATE_FIELD ) { + std::cout << "WorkspaceController::processMedEvent[MEDCALC::EVENT_UPDATE_FIELD]: Not implemented yet"; + } + else if ( event->type == MEDCALC::EVENT_PUT_IN_WORKSPACE ) { STDLOG("add new field"); - MEDOP::FieldHandler * fieldHandler = - MEDOPFactoryClient::getDataManager()->getFieldHandler(event->fieldid); + MEDCALC::FieldHandler * fieldHandler = + MEDFactoryClient::getDataManager()->getFieldHandler(event->fieldid); XmedDataObject * dataObject = (XmedDataObject *)dataModel->newDataObject(); dataObject->setFieldHandler(*fieldHandler); this->getDataTreeModel()->addData(dataObject); } - else if ( event->type == MEDOP::EVENT_DELETE_FIELD ) { + else if ( event->type == MEDCALC::EVENT_REMOVE_FROM_WORKSPACE ) { STDLOG("remove field"); std::map::iterator itr = dataModel->begin(); for ( ; itr != dataModel->end(); ++itr) { @@ -283,7 +286,7 @@ void WorkspaceController::processMedEvent(const MEDOP::MedEvent * event) { } } } - else if ( event->type == MEDOP::EVENT_CLEAN_WORKSPACE ) { + else if ( event->type == MEDCALC::EVENT_CLEAN_WORKSPACE ) { STDLOG("clean workspace"); std::map::iterator itr = dataModel->begin(); for ( ; itr != dataModel->end(); ++itr) { @@ -293,7 +296,7 @@ void WorkspaceController::processMedEvent(const MEDOP::MedEvent * event) { dataModel->removeDataObject(itemNameId); } } - else if ( event->type == MEDOP::EVENT_ADD_DATASOURCE ) { + else if ( event->type == MEDCALC::EVENT_ADD_DATASOURCE ) { emit workspaceSignal(event); // forward to DatasourceController } @@ -306,7 +309,7 @@ void WorkspaceController::processMedEvent(const MEDOP::MedEvent * event) { void WorkspaceController::_saveItemList(QStringList itemNameIdList) { XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel()); dataProcessor->process(itemNameIdList); - MEDOP::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList(); + MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList(); delete dataProcessor; QStringList filter; @@ -319,7 +322,7 @@ void WorkspaceController::_saveItemList(QStringList itemNameIdList) { if ( filename.isEmpty() ) return; - MEDOPFactoryClient::getDataManager()->saveFields(QCHARSTAR(filename), fieldIdList); + MEDFactoryClient::getDataManager()->saveFields(QCHARSTAR(filename), fieldIdList); } /*! @@ -347,12 +350,12 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) { // Then, we can request this data object to obtain the associated // FieldHandler. - MEDOP::FieldHandler * fieldHandler = dataObject->getFieldHandler(); + MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler(); STDLOG("Field: mesh="<meshname<<" name="<fieldname); // Remove the field variable from console QStringList commands; - commands+=QString("remove(get(%1))").arg(fieldHandler->id); + commands+=QString("removeFromWorkspace(accessField(%1))").arg(fieldHandler->id); _consoleDriver->exec(commands); // Finally, we can remove the field from tree data model and tree view @@ -369,14 +372,14 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) { void WorkspaceController::_exportItemList(QStringList itemNameIdList) { XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel()); dataProcessor->process(itemNameIdList); - MEDOP::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList(); + MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList(); delete dataProcessor; // _GBO_ We use a temporary file to proceed with this export to // paravis. I'm sure it could be better in a futur version or when I // will get a better understanding of paravis API. - const char * tmpfilename = "/tmp/medop_export2paravis.med"; - MEDOPFactoryClient::getDataManager()->saveFields(tmpfilename, fieldIdList); + const char * tmpfilename = "/tmp/medcalc_export2paravis.med"; + MEDFactoryClient::getDataManager()->saveFields(tmpfilename, fieldIdList); // We import the whole file but create a scalar map for the first // selected field only (it's just an export to continue the job in @@ -392,8 +395,9 @@ void WorkspaceController::_exportItemList(QStringList itemNameIdList) { LOG("WorkspaceController: WARN! No data object associated to the item "<getFieldHandler(); + MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler(); QStringList commands; + /* commands+=QString("from xmed.driver_pvis import pvis_scalarmap"); commands+=QString("pvis_scalarmap('%1','%2','%3',%4,%5)") .arg(tmpfilename) @@ -401,6 +405,8 @@ void WorkspaceController::_exportItemList(QStringList itemNameIdList) { .arg(QString(fieldHandler->fieldname)) .arg(fieldHandler->type) .arg(fieldHandler->iteration); + */ + commands += "print 'Not implemented yet'"; _consoleDriver->exec(commands); } @@ -433,19 +439,20 @@ void WorkspaceController::_viewItemList(QStringList itemNameIdList) { // Then, we can request this data object to obtain the associated // FieldHandler. - MEDOP::FieldHandler * fieldHandler = dataObject->getFieldHandler(); + MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler(); - // And finally, we can create the set of medop instructions to + // And finally, we can create the set of medcalc instructions to // generate the scalar map on this field. QStringList commands; - commands+=QString("view(get(%1))").arg(fieldHandler->id); + //commands+=QString("view(accessField(%1))").arg(fieldHandler->id); + commands += "print 'Not implemented yet'"; _consoleDriver->exec(commands); } /** * This slot can process the event coming from the * DatasourceController. The connection between the datasource signal - * and this slot is realized by the main class MEDOPModule. + * and this slot is realized by the main class MEDModule. */ void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) { XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); @@ -487,27 +494,23 @@ void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) } else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) { QStringList commands; - commands += QString("from medcalc import MakeScalarMap"); - commands += QString("import MEDOP"); #define stringify( name ) # name - QString viewMode = stringify(MEDOP::VIEW_MODE_NEW_LAYOUT); // :TODO: change this (get value from dedicated dialog) + QString viewMode = stringify(MEDCALC::VIEW_MODE_NEW_LAYOUT); // :TODO: change this (get value from dedicated dialog) viewMode.replace("::", "."); - MEDOP::FieldHandler* fieldHandler = dataObject->getFieldHandler(); - commands += QString("MakeScalarMap(get(%1), %2)").arg(fieldHandler->id).arg(viewMode); + MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); + commands += QString("medcalc.MakeScalarMap(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) { QStringList commands; - commands += QString("from medcalc import LoadDataSource"); - commands += QString("LoadDataSource('%1')").arg(event->objectalias); + commands += QString("medcalc.LoadDataSource('%1')").arg(event->objectalias); _consoleDriver->exec(commands); } else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) { QStringList commands; - commands += QString("from medcalc import LoadImageAsDataSource"); - commands += QString("LoadImageAsDataSource('%1')").arg(event->objectalias); + commands += QString("medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias); _consoleDriver->exec(commands); } else { @@ -532,7 +535,7 @@ void WorkspaceController::OnSaveWorkspace() { STDLOG("OnWorkspaceSave: save the workspace in the file " << QCHARSTAR(filename)); QStringList commands; - commands+=QString("save('%1')").arg(filename); + commands+=QString("saveWorkspace('%1')").arg(filename); _consoleDriver->exec(commands); } @@ -540,6 +543,6 @@ void WorkspaceController::OnSaveWorkspace() { void WorkspaceController::OnCleanWorkspace() { // Remove field from console QStringList commands; - commands += QString("clean()"); + commands += QString("cleanWorkspace()"); _consoleDriver->exec(commands); } diff --git a/src/MEDOP/gui/WorkspaceController.hxx b/src/MEDCalc/gui/WorkspaceController.hxx similarity index 90% rename from src/MEDOP/gui/WorkspaceController.hxx rename to src/MEDCalc/gui/WorkspaceController.hxx index 410e52809..45bc32927 100644 --- a/src/MEDOP/gui/WorkspaceController.hxx +++ b/src/MEDCalc/gui/WorkspaceController.hxx @@ -26,7 +26,7 @@ #include "MEDEventListener_i.hxx" #include "XmedConsoleDriver.hxx" #include "DatasourceController.hxx" -#include "MEDOPGUI.hxx" +#include "MEDCALCGUI.hxx" #include #include CORBA_CLIENT_HEADER(MEDDataManager) @@ -39,7 +39,7 @@ * and containing a tree view for rendering a hierarchical data * model. This datamodel contains the objects used in the workspace. */ -class MEDOPGUI_EXPORT WorkspaceController: public TreeGuiManager { +class MEDCALCGUI_EXPORT WorkspaceController: public TreeGuiManager { Q_OBJECT @@ -54,20 +54,20 @@ public slots: void processItemList(QStringList itemNameIdList, int actionId); // Internal slots - void processMedEvent(const MEDOP::MedEvent * event); + void processMedEvent(const MEDCALC::MedEvent * event); void processDatasourceEvent(const DatasourceEvent * event); void OnSaveWorkspace(); void OnCleanWorkspace(); signals: - void workspaceSignal(const MEDOP::MedEvent * event); + void workspaceSignal(const MEDCALC::MedEvent * event); private: XmedConsoleDriver * _consoleDriver; StandardApp_Module * _salomeModule; void _importItem(QString itemNameId); void _importItemList(QStringList itemNameIdList); - void _importFieldIntoConsole(MEDOP::FieldHandler * fieldHandler, + void _importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler, bool askForOptions, const char * alias=NULL); diff --git a/src/MEDOP/gui/XmedConsoleDriver.cxx b/src/MEDCalc/gui/XmedConsoleDriver.cxx similarity index 84% rename from src/MEDOP/gui/XmedConsoleDriver.cxx rename to src/MEDCalc/gui/XmedConsoleDriver.cxx index c98767915..bef4ef375 100644 --- a/src/MEDOP/gui/XmedConsoleDriver.cxx +++ b/src/MEDCalc/gui/XmedConsoleDriver.cxx @@ -34,7 +34,7 @@ XmedConsoleDriver::XmedConsoleDriver(SalomeApp_Application * application) { /*! * This function sends instructions to the python console to setup the - * environment for med operations (in particular, it imports the medop + * environment for med operations (in particular, it imports the medcalc * commands). Even if the function is called twice, then the * instructions are sent once. */ @@ -42,6 +42,7 @@ void XmedConsoleDriver::setup() { if ( !_importXmedDone ) { QStringList commands; + /* // First import xmed to initialize the main objects, in particular // the corba pointer to the event listener. commands+="import xmed"; @@ -51,14 +52,22 @@ void XmedConsoleDriver::setup() { commands+="from xmed import load, get, put, dup, ls, la, save, view, doc, wipe, remove, clean"; // A last one to clear the console screen //commands+="wipe"; - + */ #ifndef DISABLE_PVVIEWER // start PVServer and show render view commands+="import pvsimple as pvs"; commands+=""; //commands+="pvs.ShowParaviewView()"; #endif - + commands += "import medcalc"; + commands += "medcalc.medconsole.setConsoleGlobals(globals())"; + commands += "import MEDCALC"; + commands += ""; + commands += "from medcalc.medconsole import saveWorkspace, cleanWorkspace"; + commands += "from medcalc.medconsole import putInWorkspace, removeFromWorkspace"; + commands += "from medcalc.medconsole import accessField"; + commands += "from medcalc.medconsole import getEnvironment, ls, la"; + commands += ""; this->exec(commands); _importXmedDone = true; } diff --git a/src/MEDOP/gui/XmedConsoleDriver.hxx b/src/MEDCalc/gui/XmedConsoleDriver.hxx similarity index 95% rename from src/MEDOP/gui/XmedConsoleDriver.hxx rename to src/MEDCalc/gui/XmedConsoleDriver.hxx index 365a8e224..4aca66a18 100644 --- a/src/MEDOP/gui/XmedConsoleDriver.hxx +++ b/src/MEDCalc/gui/XmedConsoleDriver.hxx @@ -26,11 +26,11 @@ #include -#include "MEDOPGUI.hxx" +#include "MEDCALCGUI.hxx" typedef QList CommandsHistory; -class MEDOPGUI_EXPORT XmedConsoleDriver { +class MEDCALCGUI_EXPORT XmedConsoleDriver { public: XmedConsoleDriver(SalomeApp_Application * application); diff --git a/src/MEDOP/gui/XmedDataModel.cxx b/src/MEDCalc/gui/XmedDataModel.cxx similarity index 84% rename from src/MEDOP/gui/XmedDataModel.cxx rename to src/MEDCalc/gui/XmedDataModel.cxx index 1e5fc4864..5118ba5b5 100644 --- a/src/MEDOP/gui/XmedDataModel.cxx +++ b/src/MEDCalc/gui/XmedDataModel.cxx @@ -33,21 +33,21 @@ XmedDataObject::XmedDataObject() : DataObject() { * hierarchical organization */ string XmedDataObject::getPath() { - string path = + string path = string(_fieldHandler.meshname) + pathsep + _getTypedFieldLabel(); return path; } -void XmedDataObject::setFieldHandler(MEDOP::FieldHandler fieldHandler) { +void XmedDataObject::setFieldHandler(MEDCALC::FieldHandler fieldHandler) { _fieldHandler = fieldHandler; this->setLabel(string("it = ")+ToString(_fieldHandler.iteration)); } -MEDOP::FieldHandler * XmedDataObject::getFieldHandler() { +MEDCALC::FieldHandler * XmedDataObject::getFieldHandler() { return &_fieldHandler; } -const char * XmedDataObject::mapTypeOfFieldLabel[XmedDataObject::NB_TYPE_OF_FIELDS] = +const char * XmedDataObject::mapTypeOfFieldLabel[XmedDataObject::NB_TYPE_OF_FIELDS] = {"ON_CELLS", "ON_NODES", "ON_GAUSS_PT", "ON_GAUSS_NE" }; /*! * This function implements the convention for displaying a fieldname @@ -63,7 +63,7 @@ string XmedDataObject::_getTypedFieldLabel() { // 1 = ON_NODES // 2 = ON_GAUSS_PT // 3 = ON_GAUSS_NE - if ( _fieldHandler.type < 0 || + if ( _fieldHandler.type < 0 || _fieldHandler.type >= XmedDataObject::NB_TYPE_OF_FIELDS ) { return string("UNKNOWN"); } @@ -95,22 +95,22 @@ DataObject * XmedDataModel::newDataObject() { // void XmedDataProcessor::preprocess(QStringList itemNameIdList) { int maxsize = itemNameIdList.size(); - _resultingFieldHandlerList = new MEDOP::FieldHandlerList(maxsize); - _resultingFieldIdList = new MEDOP::FieldIdList(maxsize); + _resultingFieldHandlerList = new MEDCALC::FieldHandlerList(maxsize); + _resultingFieldIdList = new MEDCALC::FieldIdList(maxsize); _objectIndex = 0; } -MEDOP::FieldHandlerList * XmedDataProcessor::getResultingFieldHandlerList() { +MEDCALC::FieldHandlerList * XmedDataProcessor::getResultingFieldHandlerList() { return _resultingFieldHandlerList._retn(); } -MEDOP::FieldIdList * XmedDataProcessor::getResultingFieldIdList() { +MEDCALC::FieldIdList * XmedDataProcessor::getResultingFieldIdList() { return _resultingFieldIdList._retn(); } void XmedDataProcessor::processDataObject(DataObject * dataObject) { XmedDataObject * xmedDataObject = (XmedDataObject *)dataObject; - MEDOP::FieldHandler fieldHandler = *(xmedDataObject->getFieldHandler()); + MEDCALC::FieldHandler fieldHandler = *(xmedDataObject->getFieldHandler()); int fieldId = fieldHandler.id; int newsize = _objectIndex+1; @@ -122,12 +122,12 @@ void XmedDataProcessor::processDataObject(DataObject * dataObject) { _objectIndex++; // >>>>> - // Example (if needed) for creating the list of id from the lsite of handler + // Example (if needed) for creating the list of id from the lsite of handler /* - MEDOP::FieldIdList_var fieldIdList = new MEDOP::FieldIdList(); + MEDCALC::FieldIdList_var fieldIdList = new MEDCALC::FieldIdList(); fieldIdList->length(fieldHandlerList->length()); for (int i=0; ilength(); i++) { - MEDOP::FieldHandler fieldHandler = (*fieldHandlerList)[i]; + MEDCALC::FieldHandler fieldHandler = (*fieldHandlerList)[i]; fieldIdList[i] = fieldHandler.id; } */ diff --git a/src/MEDOP/gui/XmedDataModel.hxx b/src/MEDCalc/gui/XmedDataModel.hxx similarity index 81% rename from src/MEDOP/gui/XmedDataModel.hxx rename to src/MEDCalc/gui/XmedDataModel.hxx index 0decb889f..fa2f6c1c6 100644 --- a/src/MEDOP/gui/XmedDataModel.hxx +++ b/src/MEDCalc/gui/XmedDataModel.hxx @@ -23,7 +23,7 @@ #include #include CORBA_CLIENT_HEADER(MEDDataManager) -#include "MEDOPGUI.hxx" +#include "MEDCALCGUI.hxx" // // ================================================================= @@ -32,19 +32,19 @@ // ================================================================= // #include "DataObject.hxx" -class MEDOPGUI_EXPORT XmedDataObject: public DataObject { +class MEDCALCGUI_EXPORT XmedDataObject: public DataObject { public: XmedDataObject(); virtual string getPath(); - void setFieldHandler(MEDOP::FieldHandler fieldHandler); - MEDOP::FieldHandler * getFieldHandler(); + void setFieldHandler(MEDCALC::FieldHandler fieldHandler); + MEDCALC::FieldHandler * getFieldHandler(); static const int NB_TYPE_OF_FIELDS = 4; static const char * mapTypeOfFieldLabel[NB_TYPE_OF_FIELDS]; private: - MEDOP::FieldHandler _fieldHandler; + MEDCALC::FieldHandler _fieldHandler; string _getTypedFieldLabel(); }; @@ -55,7 +55,7 @@ private: // ================================================================= // #include "DataModel.hxx" -class MEDOPGUI_EXPORT XmedDataModel: public DataModel { +class MEDCALCGUI_EXPORT XmedDataModel: public DataModel { public: XmedDataModel():DataModel() {}; virtual DataObject * newDataObject(); @@ -65,7 +65,7 @@ public: // ================================================================= // Base class for data processing // ================================================================= -// Howto use it? +// Howto use it? // // 1) Create an instance, call the "process" function, // then get the result you are interested in, using the corresponding @@ -77,20 +77,20 @@ public: // #include "DataProcessor.hxx" -class MEDOPGUI_EXPORT XmedDataProcessor : public DataProcessor { +class MEDCALCGUI_EXPORT XmedDataProcessor : public DataProcessor { public: XmedDataProcessor(DataModel * dataModel):DataProcessor(dataModel) {}; - MEDOP::FieldHandlerList * getResultingFieldHandlerList(); - MEDOP::FieldIdList * getResultingFieldIdList(); + MEDCALC::FieldHandlerList * getResultingFieldHandlerList(); + MEDCALC::FieldIdList * getResultingFieldIdList(); protected: virtual void preprocess(QStringList itemNameIdList); virtual void processDataObject(DataObject * dataObject); private: - MEDOP::FieldHandlerList_var _resultingFieldHandlerList; - MEDOP::FieldIdList_var _resultingFieldIdList; + MEDCALC::FieldHandlerList_var _resultingFieldHandlerList; + MEDCALC::FieldIdList_var _resultingFieldIdList; int _objectIndex; }; diff --git a/src/MEDOP/gui/dialogs/CMakeLists.txt b/src/MEDCalc/gui/dialogs/CMakeLists.txt similarity index 78% rename from src/MEDOP/gui/dialogs/CMakeLists.txt rename to src/MEDCalc/gui/dialogs/CMakeLists.txt index 574c12c27..f3aa8cbfc 100644 --- a/src/MEDOP/gui/dialogs/CMakeLists.txt +++ b/src/MEDCalc/gui/dialogs/CMakeLists.txt @@ -21,7 +21,7 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) INCLUDE(UseQt4Ext) -SET(MEDOPGUI_dialogs_FORMS +SET(MEDCALCGUI_dialogs_FORMS GenericDialog.ui DlgAlias.ui DlgUseInWorkspace.ui @@ -29,9 +29,9 @@ SET(MEDOPGUI_dialogs_FORMS DlgInterpolateField.ui DlgImageToMed.ui ) -QT4_WRAP_UI(MEDOPGUI_dialogs_FORMS_HEADERS ${MEDOPGUI_dialogs_FORMS}) +QT4_WRAP_UI(MEDCALCGUI_dialogs_FORMS_HEADERS ${MEDCALCGUI_dialogs_FORMS}) -SET(MEDOPGUI_dialogs_FILES +SET(MEDCALCGUI_dialogs_FILES GenericDialog.hxx DlgAlias.hxx DlgUseInWorkspace.hxx @@ -39,7 +39,7 @@ SET(MEDOPGUI_dialogs_FILES DlgInterpolateField.hxx DlgImageToMed.hxx ) -QT4_WRAP_CPP(MEDOPGUI_dialogs_HEADERS_MOC ${MEDOPGUI_dialogs_FILES}) +QT4_WRAP_CPP(MEDCALCGUI_dialogs_HEADERS_MOC ${MEDCALCGUI_dialogs_FILES}) INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS} @@ -52,7 +52,7 @@ INCLUDE_DIRECTORIES( ${QT4_INCLUDE_DIRECTORY} ) -SET(MEDOPGUI_dialogs_SOURCES +SET(MEDCALCGUI_dialogs_SOURCES GenericDialog.cxx DlgAlias.cxx DlgUseInWorkspace.cxx @@ -61,11 +61,11 @@ SET(MEDOPGUI_dialogs_SOURCES DlgImageToMed.cxx ) -ADD_LIBRARY(MEDOPGUI_dialogs SHARED ${MEDOPGUI_dialogs_SOURCES} ${MEDOPGUI_dialogs_HEADERS_MOC} ${MEDOPGUI_dialogs_FORMS_HEADERS}) -TARGET_LINK_LIBRARIES(MEDOPGUI_dialogs ${CAS_KERNEL} ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel} +ADD_LIBRARY(MEDCALCGUI_dialogs SHARED ${MEDCALCGUI_dialogs_SOURCES} ${MEDCALCGUI_dialogs_HEADERS_MOC} ${MEDCALCGUI_dialogs_FORMS_HEADERS}) +TARGET_LINK_LIBRARIES(MEDCALCGUI_dialogs ${CAS_KERNEL} ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel} ${GUI_SalomeGuiHelpers} ${OMNIORB_LIBRARIES} ${GUI_qtx} ${GUI_suit} ${PLATFORM_LIBRARIES} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} ${GUI_SalomeGuiHelpers}) -INSTALL(TARGETS MEDOPGUI_dialogs DESTINATION ${SALOME_INSTALL_LIBS}) +INSTALL(TARGETS MEDCALCGUI_dialogs DESTINATION ${SALOME_INSTALL_LIBS}) # # --------------------------------------------------------- @@ -73,7 +73,7 @@ INSTALL(TARGETS MEDOPGUI_dialogs DESTINATION ${SALOME_INSTALL_LIBS}) # --------------------------------------------------------- # ADD_EXECUTABLE(dlgTester dlgTester.cxx) -TARGET_LINK_LIBRARIES(dlgTester MEDOPGUI_dialogs ${QT_LIBS} ${PLATFORM_LIBS}) +TARGET_LINK_LIBRARIES(dlgTester MEDCALCGUI_dialogs ${QT_LIBS} ${PLATFORM_LIBS}) INSTALL(TARGETS dlgTester DESTINATION ${SALOME_INSTALL_BINS}) #ADD_TEST(dlgTester dlgTester) diff --git a/src/MEDOP/gui/dialogs/DlgAlias.cxx b/src/MEDCalc/gui/dialogs/DlgAlias.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/DlgAlias.cxx rename to src/MEDCalc/gui/dialogs/DlgAlias.cxx diff --git a/src/MEDOP/gui/dialogs/DlgAlias.hxx b/src/MEDCalc/gui/dialogs/DlgAlias.hxx similarity index 73% rename from src/MEDOP/gui/dialogs/DlgAlias.hxx rename to src/MEDCalc/gui/dialogs/DlgAlias.hxx index c96a27f56..8efdfbdaf 100644 --- a/src/MEDOP/gui/dialogs/DlgAlias.hxx +++ b/src/MEDCalc/gui/dialogs/DlgAlias.hxx @@ -3,22 +3,22 @@ #include #include "ui_DlgAlias.h" -#include "MEDOPGUIdialogs.hxx" +#include "MEDCALCGUIdialogs.hxx" -class MEDOPGUI_DIALOGS_EXPORT DlgAlias : public QDialog +class MEDCALCGUI_DIALOGS_EXPORT DlgAlias : public QDialog { Q_OBJECT - + public: DlgAlias(QDialog *parent = 0); void setAlias(QString alias); QString getAlias(); - - private slots: + + private slots: void accept(); //void reject(); - + private: Ui_DlgAlias ui; // instance of the class defined in ui_DlgAlias.h }; diff --git a/src/MEDOP/gui/dialogs/DlgAlias.ui b/src/MEDCalc/gui/dialogs/DlgAlias.ui similarity index 100% rename from src/MEDOP/gui/dialogs/DlgAlias.ui rename to src/MEDCalc/gui/dialogs/DlgAlias.ui diff --git a/src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.cxx b/src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.cxx rename to src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.cxx diff --git a/src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.hxx b/src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.hxx similarity index 85% rename from src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.hxx rename to src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.hxx index 914e10be0..219a19d37 100644 --- a/src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.hxx +++ b/src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.hxx @@ -6,15 +6,15 @@ #include "GenericDialog.hxx" #include -#include "MEDOPGUIdialogs.hxx" +#include "MEDCALCGUIdialogs.hxx" -class MEDOPGUI_DIALOGS_EXPORT DlgChangeUnderlyingMesh : public GenericDialog +class MEDCALCGUI_DIALOGS_EXPORT DlgChangeUnderlyingMesh : public GenericDialog { Q_OBJECT - + public: DlgChangeUnderlyingMesh(SALOME_AppStudyEditor * studyEditor, QDialog *parent = 0); - + void setFieldId(int fieldId); int getFieldId(); int getMeshId(); diff --git a/src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui b/src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.ui similarity index 100% rename from src/MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui rename to src/MEDCalc/gui/dialogs/DlgChangeUnderlyingMesh.ui diff --git a/src/MEDOP/gui/dialogs/DlgImageToMed.cxx b/src/MEDCalc/gui/dialogs/DlgImageToMed.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/DlgImageToMed.cxx rename to src/MEDCalc/gui/dialogs/DlgImageToMed.cxx diff --git a/src/MEDOP/gui/dialogs/DlgImageToMed.hxx b/src/MEDCalc/gui/dialogs/DlgImageToMed.hxx similarity index 83% rename from src/MEDOP/gui/dialogs/DlgImageToMed.hxx rename to src/MEDCalc/gui/dialogs/DlgImageToMed.hxx index 1f5561db0..436d90747 100644 --- a/src/MEDOP/gui/dialogs/DlgImageToMed.hxx +++ b/src/MEDCalc/gui/dialogs/DlgImageToMed.hxx @@ -5,15 +5,15 @@ #include "ui_DlgImageToMed.h" #include "GenericDialog.hxx" -#include "MEDOPGUIdialogs.hxx" +#include "MEDCALCGUIdialogs.hxx" -class MEDOPGUI_DIALOGS_EXPORT DlgImageToMed : public GenericDialog +class MEDCALCGUI_DIALOGS_EXPORT DlgImageToMed : public GenericDialog { Q_OBJECT - + public: DlgImageToMed(QDialog *parent = 0); - + QString getImageFilepath(); QString getMedFilepath(); bool isAutoLoaded(); diff --git a/src/MEDOP/gui/dialogs/DlgImageToMed.ui b/src/MEDCalc/gui/dialogs/DlgImageToMed.ui similarity index 100% rename from src/MEDOP/gui/dialogs/DlgImageToMed.ui rename to src/MEDCalc/gui/dialogs/DlgImageToMed.ui diff --git a/src/MEDOP/gui/dialogs/DlgInterpolateField.cxx b/src/MEDCalc/gui/dialogs/DlgInterpolateField.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/DlgInterpolateField.cxx rename to src/MEDCalc/gui/dialogs/DlgInterpolateField.cxx diff --git a/src/MEDOP/gui/dialogs/DlgInterpolateField.hxx b/src/MEDCalc/gui/dialogs/DlgInterpolateField.hxx similarity index 88% rename from src/MEDOP/gui/dialogs/DlgInterpolateField.hxx rename to src/MEDCalc/gui/dialogs/DlgInterpolateField.hxx index b4220997c..749dcabb3 100644 --- a/src/MEDOP/gui/dialogs/DlgInterpolateField.hxx +++ b/src/MEDCalc/gui/dialogs/DlgInterpolateField.hxx @@ -6,9 +6,9 @@ #include "GenericDialog.hxx" #include -#include "MEDOPGUIdialogs.hxx" +#include "MEDCALCGUIdialogs.hxx" -class MEDOPGUI_DIALOGS_EXPORT DlgInterpolateField : public GenericDialog +class MEDCALCGUI_DIALOGS_EXPORT DlgInterpolateField : public GenericDialog { Q_OBJECT diff --git a/src/MEDOP/gui/dialogs/DlgInterpolateField.ui b/src/MEDCalc/gui/dialogs/DlgInterpolateField.ui similarity index 100% rename from src/MEDOP/gui/dialogs/DlgInterpolateField.ui rename to src/MEDCalc/gui/dialogs/DlgInterpolateField.ui diff --git a/src/MEDOP/gui/dialogs/DlgUseInWorkspace.cxx b/src/MEDCalc/gui/dialogs/DlgUseInWorkspace.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/DlgUseInWorkspace.cxx rename to src/MEDCalc/gui/dialogs/DlgUseInWorkspace.cxx diff --git a/src/MEDOP/gui/dialogs/DlgUseInWorkspace.hxx b/src/MEDCalc/gui/dialogs/DlgUseInWorkspace.hxx similarity index 100% rename from src/MEDOP/gui/dialogs/DlgUseInWorkspace.hxx rename to src/MEDCalc/gui/dialogs/DlgUseInWorkspace.hxx diff --git a/src/MEDOP/gui/dialogs/DlgUseInWorkspace.ui b/src/MEDCalc/gui/dialogs/DlgUseInWorkspace.ui similarity index 100% rename from src/MEDOP/gui/dialogs/DlgUseInWorkspace.ui rename to src/MEDCalc/gui/dialogs/DlgUseInWorkspace.ui diff --git a/src/MEDOP/gui/dialogs/GenericDialog.cxx b/src/MEDCalc/gui/dialogs/GenericDialog.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/GenericDialog.cxx rename to src/MEDCalc/gui/dialogs/GenericDialog.cxx diff --git a/src/MEDOP/gui/dialogs/GenericDialog.hxx b/src/MEDCalc/gui/dialogs/GenericDialog.hxx similarity index 100% rename from src/MEDOP/gui/dialogs/GenericDialog.hxx rename to src/MEDCalc/gui/dialogs/GenericDialog.hxx diff --git a/src/MEDOP/gui/dialogs/GenericDialog.ui b/src/MEDCalc/gui/dialogs/GenericDialog.ui similarity index 100% rename from src/MEDOP/gui/dialogs/GenericDialog.ui rename to src/MEDCalc/gui/dialogs/GenericDialog.ui diff --git a/src/MEDOP/gui/dialogs/MEDOPGUIdialogs.hxx b/src/MEDCalc/gui/dialogs/MEDCALCGUIdialogs.hxx similarity index 73% rename from src/MEDOP/gui/dialogs/MEDOPGUIdialogs.hxx rename to src/MEDCalc/gui/dialogs/MEDCALCGUIdialogs.hxx index cebff3552..6edc012dd 100755 --- a/src/MEDOP/gui/dialogs/MEDOPGUIdialogs.hxx +++ b/src/MEDCalc/gui/dialogs/MEDCALCGUIdialogs.hxx @@ -17,17 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef MEDOPGUIDIALOGS_HXX_ -#define MEDOPGUIDIALOGS_HXX_ +#ifndef MEDCALCGUIDIALOGS_HXX_ +#define MEDCALCGUIDIALOGS_HXX_ #ifdef WIN32 -# if defined MEDOPGUI_DIALOGS_EXPORTS || defined MEDOPGUI_dialogs_EXPORTS -# define MEDOPGUI_DIALOGS_EXPORT __declspec( dllexport ) +# if defined MEDCALCGUI_DIALOGS_EXPORTS || defined MEDCALCGUI_dialogs_EXPORTS +# define MEDCALCGUI_DIALOGS_EXPORT __declspec( dllexport ) # else -# define MEDOPGUI_DIALOGS_EXPORT __declspec( dllimport ) +# define MEDCALCGUI_DIALOGS_EXPORT __declspec( dllimport ) # endif #else -# define MEDOPGUI_DIALOGS_EXPORT +# define MEDCALCGUI_DIALOGS_EXPORT #endif -#endif //MEDOPGUIDIALOGS_HXX_ +#endif //MEDCALCGUIDIALOGS_HXX_ diff --git a/src/MEDOP/gui/dialogs/dlgTester.cxx b/src/MEDCalc/gui/dialogs/dlgTester.cxx similarity index 100% rename from src/MEDOP/gui/dialogs/dlgTester.cxx rename to src/MEDCalc/gui/dialogs/dlgTester.cxx diff --git a/src/MEDOP/gui/factory.cxx b/src/MEDCalc/gui/factory.cxx similarity index 87% rename from src/MEDOP/gui/factory.cxx rename to src/MEDCalc/gui/factory.cxx index 460241a92..8919192f0 100644 --- a/src/MEDOP/gui/factory.cxx +++ b/src/MEDCalc/gui/factory.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// Author : Guillaume Boulant (EDF) +// Author : Guillaume Boulant (EDF) /*! * IMPORTANT NOTE: this file implements the factory interface required @@ -30,12 +30,12 @@ * The function createModule can be designed to switch between several * configurations, but generally the configuration is statically * defined (at build step). The default configuration could be DefaultGui. The - * configuration below is MEDOPModule. + * configuration below is MEDModule. */ #include -#include "MEDOPModule.hxx" -#include "MEDOPGUI.hxx" +#include "MEDModule.hxx" +#include "MEDCALCGUI.hxx" #ifdef __WITH_MEDMEMGUI__ #include "MEDGUI.h" @@ -44,21 +44,21 @@ extern "C" { /*! This function is the factory for the GUI Module */ - MEDOPGUI_EXPORT CAM_Module* createModule() + MEDCALCGUI_EXPORT CAM_Module* createModule() { CAM_Module * medModule; #ifdef __WITH_MEDMEMGUI__ medModule = new MedGUI(); -#else - medModule = new MEDOPModule(); +#else + medModule = new MEDModule(); #endif return medModule; } /*! This function specifies the version of the module to be displayed in the about dialog box */ - MEDOPGUI_EXPORT char* getModuleVersion() { + MEDCALCGUI_EXPORT char* getModuleVersion() { return (char*)SALOMEMED_VERSION_STR; } diff --git a/src/MEDOP/gui/test/README.txt b/src/MEDCalc/gui/test/README.txt similarity index 100% rename from src/MEDOP/gui/test/README.txt rename to src/MEDCalc/gui/test/README.txt diff --git a/src/MEDOP/gui/test/guiTester.pro b/src/MEDCalc/gui/test/guiTester.pro similarity index 100% rename from src/MEDOP/gui/test/guiTester.pro rename to src/MEDCalc/gui/test/guiTester.pro diff --git a/src/MEDOP/res/CMakeLists.txt b/src/MEDCalc/res/CMakeLists.txt similarity index 97% rename from src/MEDOP/res/CMakeLists.txt rename to src/MEDCalc/res/CMakeLists.txt index f1f1f5236..87f6ab69f 100644 --- a/src/MEDOP/res/CMakeLists.txt +++ b/src/MEDCalc/res/CMakeLists.txt @@ -32,8 +32,8 @@ SET(MED_RESOURCES_FILES fileimport-32.png folder.png image_add.png - MEDOP.png - MEDOP_small.png + MEDCalc.png + MEDCalc_small.png workspace_clean.png workspace_save.png ) diff --git a/src/MEDOP/res/MEDOP.png b/src/MEDCalc/res/MEDCalc.png similarity index 100% rename from src/MEDOP/res/MEDOP.png rename to src/MEDCalc/res/MEDCalc.png diff --git a/src/MEDOP/res/MEDOP_small.png b/src/MEDCalc/res/MEDCalc_small.png similarity index 100% rename from src/MEDOP/res/MEDOP_small.png rename to src/MEDCalc/res/MEDCalc_small.png diff --git a/src/MEDOP/res/datasource.png b/src/MEDCalc/res/datasource.png similarity index 100% rename from src/MEDOP/res/datasource.png rename to src/MEDCalc/res/datasource.png diff --git a/src/MEDOP/res/datasource_add.png b/src/MEDCalc/res/datasource_add.png similarity index 100% rename from src/MEDOP/res/datasource_add.png rename to src/MEDCalc/res/datasource_add.png diff --git a/src/MEDOP/res/datasource_changeUnderlyingMesh.png b/src/MEDCalc/res/datasource_changeUnderlyingMesh.png similarity index 100% rename from src/MEDOP/res/datasource_changeUnderlyingMesh.png rename to src/MEDCalc/res/datasource_changeUnderlyingMesh.png diff --git a/src/MEDOP/res/datasource_expandfield.png b/src/MEDCalc/res/datasource_expandfield.png similarity index 100% rename from src/MEDOP/res/datasource_expandfield.png rename to src/MEDCalc/res/datasource_expandfield.png diff --git a/src/MEDOP/res/datasource_field.png b/src/MEDCalc/res/datasource_field.png similarity index 100% rename from src/MEDOP/res/datasource_field.png rename to src/MEDCalc/res/datasource_field.png diff --git a/src/MEDOP/res/datasource_interpolateField.png b/src/MEDCalc/res/datasource_interpolateField.png similarity index 100% rename from src/MEDOP/res/datasource_interpolateField.png rename to src/MEDCalc/res/datasource_interpolateField.png diff --git a/src/MEDOP/res/datasource_mesh.png b/src/MEDCalc/res/datasource_mesh.png similarity index 100% rename from src/MEDOP/res/datasource_mesh.png rename to src/MEDCalc/res/datasource_mesh.png diff --git a/src/MEDOP/res/datasource_use.png b/src/MEDCalc/res/datasource_use.png similarity index 100% rename from src/MEDOP/res/datasource_use.png rename to src/MEDCalc/res/datasource_use.png diff --git a/src/MEDOP/res/datasource_view.png b/src/MEDCalc/res/datasource_view.png similarity index 100% rename from src/MEDOP/res/datasource_view.png rename to src/MEDCalc/res/datasource_view.png diff --git a/src/MEDOP/res/fileimport-32.png b/src/MEDCalc/res/fileimport-32.png similarity index 100% rename from src/MEDOP/res/fileimport-32.png rename to src/MEDCalc/res/fileimport-32.png diff --git a/src/MEDOP/res/folder.png b/src/MEDCalc/res/folder.png similarity index 100% rename from src/MEDOP/res/folder.png rename to src/MEDCalc/res/folder.png diff --git a/src/MEDOP/res/image_add.png b/src/MEDCalc/res/image_add.png similarity index 100% rename from src/MEDOP/res/image_add.png rename to src/MEDCalc/res/image_add.png diff --git a/src/MEDOP/res/testfiles/CMakeLists.txt b/src/MEDCalc/res/testfiles/CMakeLists.txt similarity index 96% rename from src/MEDOP/res/testfiles/CMakeLists.txt rename to src/MEDCalc/res/testfiles/CMakeLists.txt index c101b35fc..4bdb0232b 100644 --- a/src/MEDOP/res/testfiles/CMakeLists.txt +++ b/src/MEDCalc/res/testfiles/CMakeLists.txt @@ -32,7 +32,7 @@ SET(MED_FILES padderoutput.med ) -INSTALL(FILES ${MED_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/medop_testfiles) +INSTALL(FILES ${MED_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/medcalc_testfiles) SET(MED_IMG_FILES irm_test1.png @@ -42,4 +42,4 @@ SET(MED_IMG_FILES champ_altitude_MAP.pgm ) -INSTALL(FILES ${MED_IMG_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/medop_testfiles) +INSTALL(FILES ${MED_IMG_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/medcalc_testfiles) diff --git a/src/MEDCalc/res/testfiles/README.txt b/src/MEDCalc/res/testfiles/README.txt new file mode 100644 index 000000000..3775db130 --- /dev/null +++ b/src/MEDCalc/res/testfiles/README.txt @@ -0,0 +1 @@ +This folder contains data files for testing the MEDCalc functions diff --git a/src/MEDOP/res/testfiles/bigmesh.med b/src/MEDCalc/res/testfiles/bigmesh.med similarity index 100% rename from src/MEDOP/res/testfiles/bigmesh.med rename to src/MEDCalc/res/testfiles/bigmesh.med diff --git a/src/MEDOP/res/testfiles/champ_altitude_MAP.pgm b/src/MEDCalc/res/testfiles/champ_altitude_MAP.pgm similarity index 100% rename from src/MEDOP/res/testfiles/champ_altitude_MAP.pgm rename to src/MEDCalc/res/testfiles/champ_altitude_MAP.pgm diff --git a/src/MEDOP/res/testfiles/enceinte-axis-E500000.med b/src/MEDCalc/res/testfiles/enceinte-axis-E500000.med similarity index 100% rename from src/MEDOP/res/testfiles/enceinte-axis-E500000.med rename to src/MEDCalc/res/testfiles/enceinte-axis-E500000.med diff --git a/src/MEDOP/res/testfiles/enceinte-axis-E600000.med b/src/MEDCalc/res/testfiles/enceinte-axis-E600000.med similarity index 100% rename from src/MEDOP/res/testfiles/enceinte-axis-E600000.med rename to src/MEDCalc/res/testfiles/enceinte-axis-E600000.med diff --git a/src/MEDOP/res/testfiles/entaille.med b/src/MEDCalc/res/testfiles/entaille.med similarity index 100% rename from src/MEDOP/res/testfiles/entaille.med rename to src/MEDCalc/res/testfiles/entaille.med diff --git a/src/MEDOP/res/testfiles/fieldlena.med b/src/MEDCalc/res/testfiles/fieldlena.med similarity index 100% rename from src/MEDOP/res/testfiles/fieldlena.med rename to src/MEDCalc/res/testfiles/fieldlena.med diff --git a/src/MEDOP/res/testfiles/irm_test1.png b/src/MEDCalc/res/testfiles/irm_test1.png similarity index 100% rename from src/MEDOP/res/testfiles/irm_test1.png rename to src/MEDCalc/res/testfiles/irm_test1.png diff --git a/src/MEDOP/res/testfiles/irm_test2.png b/src/MEDCalc/res/testfiles/irm_test2.png similarity index 100% rename from src/MEDOP/res/testfiles/irm_test2.png rename to src/MEDCalc/res/testfiles/irm_test2.png diff --git a/src/MEDOP/res/testfiles/padderoutput.med b/src/MEDCalc/res/testfiles/padderoutput.med similarity index 100% rename from src/MEDOP/res/testfiles/padderoutput.med rename to src/MEDCalc/res/testfiles/padderoutput.med diff --git a/src/MEDOP/res/testfiles/parametric_01.med b/src/MEDCalc/res/testfiles/parametric_01.med similarity index 100% rename from src/MEDOP/res/testfiles/parametric_01.med rename to src/MEDCalc/res/testfiles/parametric_01.med diff --git a/src/MEDOP/res/testfiles/parametric_02.med b/src/MEDCalc/res/testfiles/parametric_02.med similarity index 100% rename from src/MEDOP/res/testfiles/parametric_02.med rename to src/MEDCalc/res/testfiles/parametric_02.med diff --git a/src/MEDOP/res/testfiles/smallmesh_constfield.med b/src/MEDCalc/res/testfiles/smallmesh_constfield.med similarity index 100% rename from src/MEDOP/res/testfiles/smallmesh_constfield.med rename to src/MEDCalc/res/testfiles/smallmesh_constfield.med diff --git a/src/MEDOP/res/testfiles/smallmesh_varfield.med b/src/MEDCalc/res/testfiles/smallmesh_varfield.med similarity index 100% rename from src/MEDOP/res/testfiles/smallmesh_varfield.med rename to src/MEDCalc/res/testfiles/smallmesh_varfield.med diff --git a/src/MEDOP/res/testfiles/smooth_surface.med b/src/MEDCalc/res/testfiles/smooth_surface.med similarity index 100% rename from src/MEDOP/res/testfiles/smooth_surface.med rename to src/MEDCalc/res/testfiles/smooth_surface.med diff --git a/src/MEDOP/res/testfiles/smooth_surface_and_field.med b/src/MEDCalc/res/testfiles/smooth_surface_and_field.med similarity index 100% rename from src/MEDOP/res/testfiles/smooth_surface_and_field.med rename to src/MEDCalc/res/testfiles/smooth_surface_and_field.med diff --git a/src/MEDOP/res/testfiles/testfield.med b/src/MEDCalc/res/testfiles/testfield.med similarity index 100% rename from src/MEDOP/res/testfiles/testfield.med rename to src/MEDCalc/res/testfiles/testfield.med diff --git a/src/MEDOP/res/testfiles/timeseries.med b/src/MEDCalc/res/testfiles/timeseries.med similarity index 100% rename from src/MEDOP/res/testfiles/timeseries.med rename to src/MEDCalc/res/testfiles/timeseries.med diff --git a/src/MEDOP/res/workspace_clean.png b/src/MEDCalc/res/workspace_clean.png similarity index 100% rename from src/MEDOP/res/workspace_clean.png rename to src/MEDCalc/res/workspace_clean.png diff --git a/src/MEDOP/res/workspace_save.png b/src/MEDCalc/res/workspace_save.png similarity index 100% rename from src/MEDOP/res/workspace_save.png rename to src/MEDCalc/res/workspace_save.png diff --git a/src/MEDOP/tui/presentation/CMakeLists.txt b/src/MEDCalc/tui/CMakeLists.txt similarity index 93% rename from src/MEDOP/tui/presentation/CMakeLists.txt rename to src/MEDCalc/tui/CMakeLists.txt index 6aba267cf..8e0d77052 100644 --- a/src/MEDOP/tui/presentation/CMakeLists.txt +++ b/src/MEDCalc/tui/CMakeLists.txt @@ -19,8 +19,13 @@ SET(PYFILES_TO_INSTALL __init__.py - medpresentation.py + fieldproxy.py + medconsole.py + medcorba.py + medevents.py medimages.py + medio.py + medpresentation.py ) SALOME_INSTALL_SCRIPTS("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON}/medcalc) diff --git a/src/MEDOP/tui/presentation/__init__.py b/src/MEDCalc/tui/__init__.py similarity index 50% rename from src/MEDOP/tui/presentation/__init__.py rename to src/MEDCalc/tui/__init__.py index 6f4106b15..49ba85461 100644 --- a/src/MEDOP/tui/presentation/__init__.py +++ b/src/MEDCalc/tui/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D +# Copyright (C) 2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,7 +17,34 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from medpresentation import LoadDataSource -from medpresentation import LoadImageAsDataSource +# This functions are to be used to notify the USER of some events +# arising on the field operation. It is NOT to be used for logging +# purpose +def inf(msg): print "INF: "+str(msg) +def wrn(msg): print "WRN: "+str(msg) +def err(msg): print "ERR: "+str(msg) +def dbg(msg): print "DBG: "+str(msg) +# Initialize CORBA stuff +import medcorba + +# Connect event listener +import medevents + +# Fields utilities +from fieldproxy import newFieldProxy, FieldProxy + +# Input/Output +from medio import LoadDataSource +from medio import LoadImageAsDataSource + +# Presentations from medpresentation import MakeScalarMap +from medpresentation import MakeIsoSurface +from medpresentation import MakeVectorField +from medpresentation import MakeSlices +from medpresentation import MakeDeflectionShape +from medpresentation import MakePointSprite + +# Console commands +import medconsole diff --git a/src/MEDCalc/tui/fieldproxy.py b/src/MEDCalc/tui/fieldproxy.py new file mode 100644 index 000000000..f74f97d52 --- /dev/null +++ b/src/MEDCalc/tui/fieldproxy.py @@ -0,0 +1,424 @@ +# Copyright (C) 2011-2015 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author : Guillaume Boulant (EDF) + +import medcalc +import MEDCALC +import SALOME + +from medcalc.medcorba import factory +dataManager = factory.getDataManager() +calculator = factory.getCalculator() + +# Some helper functions to deal with the fields and meshes +import MEDCoupling +__mapTypeOfFieldLabel = { + MEDCoupling.ON_CELLS: "ON_CELLS", + MEDCoupling.ON_NODES: "ON_NODES", + MEDCoupling.ON_GAUSS_PT: "ON_GAUSS_PT", + MEDCoupling.ON_GAUSS_NE: "ON_GAUSS_NE" + } +# +def _typeOfFieldLabel(typeOfField): + # A field name could identify several MEDCoupling fields, that + # differ by their spatial discretization on the mesh (values on + # cells, values on nodes, ...). This spatial discretization is + # specified (at least) by the TypeOfField that is an integer value + # in this list: + # 0 = ON_CELLS + # 1 = ON_NODES + # 2 = ON_GAUSS_PT + # 3 = ON_GAUSS_NE + try: + return __mapTypeOfFieldLabel[typeOfField] + except IndexError, e: + return "UNCKNOWN" +# + +def newFieldProxy(fieldHandlerId): + ''' + This creates a new FieldProxy wrapping the field whose + fieldHandlerId is passed in argument. The function requests the + DataManager to get the fieldHandler from its id. + ''' + fieldHandler = dataManager.getFieldHandler(fieldHandlerId) + return FieldProxy(fieldHandler) +# + +# This define the map between attributes of a FieldProxy and those of +# the associated FieldHandler +PROXY_ATTRIBUTES_MAP = {"id":None, + "fieldseriesId":None, + "fieldname":"name", + "meshname":None, + "meshid":None, + "type":None, + "iteration":"iteration", + "order":"order", + "source":"source"} + +class FieldProxy: + """ + This object is a proxy to manipulate a remote MEDCoupling field + from within the SALOME python interpreter. Remote means that the + MEDCoupling field is in the SALOME container and not in the + client. See UserGuide class for detailed documentation of what can + be done with a field proxy. + """ + def __init__( self, fieldHandler ): + """ + This defines the wrapping on the field specified by its + fieldHandler id. + """ + self.__fieldHandler = fieldHandler + self.__restriction = None + print self.__repr__() + # + def __getattr__(self, name ): + """ + This method realizes the read proxy pattern toward the field + handler. + """ + # WRN: Note that the modification of this function can lead to + # coercion problem. Modify this function with extrem care. + return getattr( self.__fieldHandler, name ) + # + def __setattr__(self, name, value): + """ + This method realizes the write proxy pattern toward the field + handler. Only some attributes are writable. The list is + specified in the PROXY_ATTRIBUTES_MAP table. + """ + if name in PROXY_ATTRIBUTES_MAP.keys(): + if PROXY_ATTRIBUTES_MAP[name] is not None: + medcalc.wrn("The modification of this attribute can't be done that way") + msg="Use f.update(%s=\"%s\") instead to ensure synchronisation of data." + medcalc.inf(msg%(PROXY_ATTRIBUTES_MAP[name],value)) + else: + medcalc.err("The modification of the attribute %s is not possible"%name) + else: + self.__dict__[name] = value + # + def __repr__(self): + """ + Return a string containing a printable representation of this + object (what is displayed when typing the variable name and + carriage return). + """ + # We need first to update the handler because some data can + # have changed (the meshid for example in case of change of + # underlying mesh). + # __GBO__ : TODO check the performance + self.__fieldHandler = dataManager.getFieldHandler(self.id) + text = "field name (id)\t = %s (%s)\n"%(self.fieldname, self.id) + text+= "mesh name (id) \t = %s (%s)\n"%(self.meshname,self.meshid) + text+= "discretization \t = %s\n"%_typeOfFieldLabel(self.type) + text+= "(iter, order) \t = (%s,%s)\n"%(str(self.iteration),str(self.order)) + text+= "data source \t = %s"%self.source + return text + # + def __str__(self): + """ + This is what is displayed when you type 'print myField'. Note + that this function prints the values of the field and then you + must be aware that a huge amount of data could be + displayed. Moreover, it means that this operation triggers the + loading of the associated MEDCouplingFied data in the SALOME + container. + """ + text = dataManager.getFieldRepresentation(self.id) + return text + # + def __add__(self, operande): + """ + This makes the addition of two fields or the addition of a + scalar to a field. It depends weither the operande is a + FieldProxy or a simple scalar numerical value. + """ + # The medcalc calculator could raise exceptions coming from + # MEDCoupling. Note that the fieldproxy instances are used + # from within the python console, and for ergonomic reason, we + # choose to not raise the possible exceptions to the console + # by a clear message. Keep this in mind for unit test. You + # have to test the return value, which should not be + # null. This principle is applyed for all operations. + try: + if isinstance(operande, FieldProxy): + # The operande is an other field + medcalc.inf("Addition of %s and %s"%(self.fieldname, operande.fieldname)) + rfieldHandler = calculator.add(self.__fieldHandler, operande.__fieldHandler) + else: + # The operande is a scalar numerical value that must be + # considered as an offset in a linear transformation + factor = 1 + offset = operande + medcalc.inf("Application of the offset %s to %s" % (offset, self.fieldname)) + rfieldHandler = calculator.lin(self.__fieldHandler, factor, offset) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __radd__(self, operande): + """ + The user typed 'operande+self', we replace by 'self+operande' + to automatically activate the __add__ method of fieldpoxy. + """ + return self+operande + # + def __iadd__(self, operande): + """ + These methods implements the augmented arithmetic assignments (+=) + """ + medcalc.wrn("NOT IMPLEMENTED YET") + # + def __sub__(self,operande): + """ + This makes the substraction of two fields or the substraction + of a scalar to a field. It depends weither the operande is a + FieldProxy or a simple scalar numerical value. + """ + try: + if isinstance(operande, FieldProxy): + # The operande is an other field + medcalc.inf("Substraction of %s by %s"%(self.fieldname, operande.fieldname)) + rfieldHandler = calculator.sub(self.__fieldHandler, operande.__fieldHandler) + else: + # The operande is a scalar numerical value that must be + # considered as an offset in a linear transformation + factor = 1 + offset = -operande + medcalc.inf("Application of the offset %s to %s" % (offset, self.fieldname)) + rfieldHandler = calculator.lin(self.__fieldHandler, factor, offset) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __rsub__(self, operande): + """ + The user typed 'operande-self' where operande is not a field + proxy. This function process the situation. + """ + # The operande is a numerical value (because otherwise, the + # "sub" method would have been called instead). We may apply + # the command '(self-operande)*(-1)' to activate the __sub__ + # method of fieldpoxy. + # + #return (self-operande)*(-1) + # + # We prefer to apply a linear transformation because it can be + # done in one single request to the med calculator. + + factor = -1 + offset = operande + medcalc.inf("Linear transformation %s%s*%s" % (offset, factor, self.fieldname)) + try: + rfieldHandler = calculator.lin(self.__fieldHandler, factor, offset) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __mul__(self, operande): + """ + This makes the multiplication of two fields or the + multiplication of a scalar to a field. It depends weither the + operande is a FieldProxy or a simple scalar numerical value. + """ + try: + if isinstance(operande, FieldProxy): + # The operande is an other field + medcalc.inf("Multiplication of %s by %s"%(self.fieldname, operande.fieldname)) + rfieldHandler = calculator.mul(self.__fieldHandler, operande.__fieldHandler) + else: + # The operande is a scalar numerical value that must be + # considered as an offset in a linear transformation + factor = operande + offset = 0 + medcalc.inf("Scaling %s by factor %s" % (self.fieldname, factor)) + rfieldHandler = calculator.lin(self.__fieldHandler, factor, offset) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __rmul__(self, operande): + """ + The user typed 'operande*self', we want to execute + 'self*operande' to activate the __mul__ method of fieldpoxy. + """ + return self*operande + # + def __div__(self, operande): + """ + This makes the division of two fields or the division of field + by a scalar. It depends weither the operande is a FieldProxy + or a simple scalar numerical value. + """ + try: + if isinstance(operande, FieldProxy): + # The operande is an other field + medcalc.inf("Division of %s by %s"%(self.fieldname, operande.fieldname)) + rfieldHandler = calculator.div(self.__fieldHandler, operande.__fieldHandler) + else: + # The operande is a scalar numerical value that must be + # considered as an offset in a linear transformation + factor = 1./operande + offset = 0 + medcalc.inf("Scaling %s by factor 1/%s" % (self.fieldname, operande)) + rfieldHandler = calculator.lin(self.__fieldHandler, factor, offset) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __rdiv__(self, operande): + """ + The user typed 'operande/self', we want to execute for each + value of the field the operation 'operande/value'. + """ + medcalc.inf("Division of %s by %s" % (operande, self.fieldname)) + function = "%s/u"%operande + nbResComp = MEDCALC.NBCOMP_DEFAULT + try: + rfieldHandler = calculator.fct(self.__fieldHandler,function,nbResComp) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __pow__(self, power): + """ + This compute the power of the field to the specified value. + """ + function = "abs(u)^%s"%power + return self.ope(function,duplicate=True) + # + def __abs__(self): + """ + This compute the absolute value of the field. We use here + """ + return self.ope(function="abs(u)",duplicate=True) + # + def __neg__(self): + """ + This computes the negative of this field (when you type -f) + """ + return -1*self + # + def dup(self): + """ + This creates a duplicate of the field. The whole data are + duplicated. + """ + medcalc.inf("Duplication of %s"%self.fieldname) + try: + rfieldHandler = calculator.dup(self.__fieldHandler) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def ope(self, function, duplicate=True): + """ + This can be used to apply a transformation function to this + field. The transformation is specified using a literal + equation given as a string where u stands for the field. + """ + # _GBO_ TO BE IMPLEMENTED: the case where duplicate = False + # must modify the object itself and not create a new field + medcalc.inf("Operate the equation \"%s\" to %s"%(function,self.fieldname)) + try: + rfieldHandler = calculator.fct(self.__fieldHandler, + function, + MEDCALC.NBCOMP_DEFAULT) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) + return None + + return FieldProxy(rfieldHandler) + # + def __call__(self, restriction=None): + """ + This could be used to return a fieldproxy binded on the same + fieldHandler than self, but with options that restrict the + usage to a domain specified by the given arguments (restricted + to a component, to a part of the mesh, ...). + """ + medcalc.wrn("Not implemented yet. Return the field itself") + self.__restriction = restriction + return self + # + def update(self,name=None,iteration=None,order=None,source=None): + """ + This function can be used to update the meta-data associated + to this field. It can modify the name, the iteration, the + order and the source. + """ + if name is None: + name = self.fieldname + if iteration is None: + iteration = self.iteration + if order is None: + order = self.order + if source is None: + source = self.source + + dataManager.updateFieldMetadata(self.id,name,iteration,order,source) + self.__fieldHandler.fieldname = name + self.__fieldHandler.iteration = iteration + self.__fieldHandler.order = order + self.__fieldHandler.source = source + # WARN: Note that you have to update directly the fieldHandler + # object because of the presence of the method __setattr__ + # that make the proxy to this update method + + # Finally, we have to notify the GUI for update of field prestations + #self.__notifyGui_update() + from medcalc.medevents import notifyGui_updateField + notifyGui_updateField(self.id) + + # Print for visual control + print self.__repr__() + # +# + +# +# =================================================================== +# unit test functions +# =================================================================== +# + +def TEST_typeOfFieldLabel(): + print typeOfFieldLabel(0) + print typeOfFieldLabel(5) +# + +# =================================================================== +if __name__ == "__main__": + TEST_typeOfFieldLabel() +# diff --git a/src/MEDCalc/tui/medconsole.py b/src/MEDCalc/tui/medconsole.py new file mode 100644 index 000000000..c61942d4b --- /dev/null +++ b/src/MEDCalc/tui/medconsole.py @@ -0,0 +1,161 @@ +# Copyright (C) 2012-2015 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import medcalc + +dataManager = medcalc.medcorba.factory.getDataManager() + +# IMPORTANT NOTE: +# the pyConsoleGlobals variable should hold the globals() dictionnary of +# the python console context +pyConsoleGlobals = None + +#----- +# This function is to be called from the working python console to +# specify the globals() dictionnary (used in fieldtools for stat analysis) +# +# >>> medcalc.setConsoleGlobals(globals()) +# +def setConsoleGlobals(pyconsole_globals): + global pyConsoleGlobals + pyConsoleGlobals = pyconsole_globals +# + +import SALOME +def saveWorkspace(filename): + """ + Dump your job in a med file. Only the fields marked as persistent + are saved in the specified file. + """ + try: + dataManager.savePersistentFields(filename) + except SALOME.SALOME_Exception, ex: + medcalc.err(ex.details.text) +# + +# Clean workspace +from medevents import notifyGui_cleanWorkspace +def cleanWorkspace(): + dvars = pyConsoleGlobals + if dvars is None: + return + all_keys = [] + for varkey, var in dvars.items(): + if isinstance(var, medcalc.FieldProxy): + all_keys.append("%s"%varkey) + if len(all_keys) > 0: + exec "del "+",".join(all_keys) in pyConsoleGlobals + notifyGui_cleanWorkspace() +# + +# Remove variable from console +from medevents import notifyGui_removeFromWorkspace +def removeFromWorkspace(fieldProxy): + dvars = pyConsoleGlobals + if dvars is None: + return + for varkey, var in dvars.items(): + if isinstance(var, medcalc.FieldProxy) and var.id == fieldProxy.id: + exec("del %s"%varkey) in pyConsoleGlobals + notifyGui_removeFromWorkspace(fieldProxy.id) +# + +# Get list a field with information using the commands ls and/or la +def getEnvironment(local=True, remote=False): + """ + This function return the status of the medcalc context, i.e. the + list of fields defined in this python session. + """ + status="" + if local is True: + dvars = pyConsoleGlobals + if dvars is None: + medcalc.wrn("The stat function required the specification of the python context") + medcalc.inf("Type this command \"import medcalc; medcalc.setConsoleGlobals(globals())") + if remote is True: + status="========= Fields used in the current context ===\n" + for varkey in dvars.keys(): + var = dvars[varkey] + if isinstance(var, medcalc.FieldProxy): + status+="%s \t(id=%s, name=%s)\n"%(varkey,var.id,var.fieldname) + + if remote is True: + if local is True: + status+="\n========= Fields available in the data manager ===\n" + fieldHandlerList = dataManager.getFieldHandlerList() + for fieldHandler in fieldHandlerList: + status+="id=%s\tname\t= %s\n\tmesh\t= %s\n\t(it,dt)\t= (%s,%s)\n\tsource\t= %s\n"%( + fieldHandler.id, + fieldHandler.fieldname, + fieldHandler.meshname, + fieldHandler.iteration, + fieldHandler.order, + fieldHandler.source) + status+="---------\n" + + if len(fieldHandlerList) > 0: + status+="(use 'f=accessField(id)' to get a field in the current context)" + + return status +# + +# For simpler typing, one can create a python command for status +# (avoid to type "print getEnvironment()") +class ListFields(object): + """ + A stat object displays the status of the med operating context, i.e. the + list of fields defined in this python session. + """ + def __init__(self, all=False): + self.__local = True + self.__remote = all + # all = True means that the local metadata (fieldproxy) and the + # remote metadata on the engine (MEDCouplingFieldDouble) are + # displayed by the stat command. Otherwise, only the local + # metadata are displayed. + # + def __repr__(self): + return getEnvironment(self.__local, self.__remote) + # +# +# Creating the commands list (ls) and list all (la) +ls = ListFields(all=False) +la = ListFields(all=True) + +# +# Add variable to workspace +from medevents import notifyGui_putInWorkspace +def putInWorkspace(fieldProxy): + """ + This function puts a reference to this field in the GUI data + model. When a field is referenced in the GUI data model, then it + belongs to the workspace. When the workspace is saved, all the + field that belongs to the workspace are saved. + """ + dataManager.markAsPersistent(fieldProxy.id, True) + notifyGui_putInWorkspace(fieldProxy.id) +# + +def accessField(fieldHandlerId): + """ + This return a field proxy on the field identified by the specified + field handler id. + """ + return medcalc.newFieldProxy(fieldHandlerId) +# diff --git a/src/MEDCalc/tui/medcorba.py b/src/MEDCalc/tui/medcorba.py new file mode 100644 index 000000000..19fbc3b21 --- /dev/null +++ b/src/MEDCalc/tui/medcorba.py @@ -0,0 +1,49 @@ +# Copyright (C) 2015 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# Initializing some CORBA stuff + +# Remember SALOME definitions: +# --------------------------- +# +# componentName = Name of the component (a library libEngine +# should exist with a C function named Engine_factory, and the +# component should be registered in the catalog MEDCatalog.xml). +# +# corbaModule = Name of the corba module that contains the IDL +# specifications of the component (name as defined in the idl file) +# +# containerType = Name of the container factory +# +componentName = "MEDFactory" +corbaModule = "MEDCALC" +containerType = "FactoryServer" + +import salome +if salome.lcc is None: + salome.salome_init() + pass +__import__(corbaModule) +factory = salome.lcc.FindOrLoadComponent(containerType,componentName) +# The factory is not the main CORBA component of the SALOME module MED +# (i.e. the engine associated to the active study), but the CORBA +# entry point for MED fields operations (i.e. a CORBA component +# reachable throught the LifeCycleCORBA). This entry point is used to +# get the other SALOME CORBA components required for MED field +# operations, in particular the dataManager and the calculator diff --git a/src/MEDCalc/tui/medevents.py b/src/MEDCalc/tui/medevents.py new file mode 100644 index 000000000..d5e0f212c --- /dev/null +++ b/src/MEDCalc/tui/medevents.py @@ -0,0 +1,114 @@ +# Copyright (C) 2015 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import medcalc +import SALOME +import salome + +dataManager = medcalc.medcorba.factory.getDataManager() + +# Initializing the notification system (events from components to GUI) + +# The MEDEventListener is created in the GUI (WorkspaceController) and +# a reference is transmitted to the python context throw its IOR. The +# transmission consists in initializing the variable below from the +# GUI (who knows the IOR) when importing medcalc in the python console +# (see WorkspaceController) +__eventListener = None +def connectEventListener(): + global __eventListener + try: + eventListenerIOR = dataManager.getEventListenerIOR() + __eventListener = salome.orb.string_to_object(eventListenerIOR) + except SALOME.SALOME_Exception, e: + medcalc.wrn("The event listener is not running yet") + medcalc.msg ="When you'll have loaded the MED GUI, " + medcalc.msg+="call explicitely \"medcalc.medevents.connectEventListener()\" " + medcalc.msg+="to connect the GUI event listener" + medcalc.inf(msg) + __eventListener = None + except Exception, e: + medcalc.err("An unknown error occurs. Check if this ior=%s is valid."%eventListenerIOR) + print e +# + +def eventListenerIsRunning(): + global __eventListener + if __eventListener is not None: + return True + + # Try to define the event listener + connectEventListener() + if __eventListener is None: + # it definitly does not work + medcalc.wrn("the GUI is not loaded yet and will not be notified of the modification") + return False + + return True +# + +def processMedEvent(event): + __eventListener.processMedEvent(event) +# + +# One can try to connect to the eventListener, but it will fail if the +# MED GUI is not loaded. That does not matter, because the event +# listener is used only to notify the GUI of some event. If the GUI is +# not loaded, there is no use of notification. +connectEventListener() + + +# +# =================================================================== +# Functions for events notification +# =================================================================== +# +# Note that these functions are not part of the class FieldProxy so +# that they could be used in another context than the FieldProxy instances +import MEDCALC + +def __notifyGui(type, fieldId=-1, filename=""): + medEvent = MEDCALC.MedEvent(type, fieldId, filename) + if not eventListenerIsRunning(): return + + # Notify the GUI of the update event + processMedEvent(medEvent) +# + +def notifyGui_updateField(fieldId): + """ + This function must be used to notify the GUI that the field + meta-data have changed so it could update the gui + presentations of this field. + """ + __notifyGui(MEDCALC.EVENT_UPDATE_FIELD,fieldId) +# + +def notifyGui_putInWorkspace(fieldId): + __notifyGui(MEDCALC.EVENT_PUT_IN_WORKSPACE,fieldId) +# +def notifyGui_removeFromWorkspace(fieldId): + __notifyGui(MEDCALC.EVENT_REMOVE_FROM_WORKSPACE, fieldId) + +def notifyGui_cleanWorkspace(): + __notifyGui(MEDCALC.EVENT_CLEAN_WORKSPACE) +# +def notifyGui_addDatasource(filename): + __notifyGui(MEDCALC.EVENT_ADD_DATASOURCE, -1, filename) +# diff --git a/src/MEDOP/tui/presentation/medimages.py b/src/MEDCalc/tui/medimages.py similarity index 99% rename from src/MEDOP/tui/presentation/medimages.py rename to src/MEDCalc/tui/medimages.py index a08d6adc3..d6f113399 100644 --- a/src/MEDOP/tui/presentation/medimages.py +++ b/src/MEDCalc/tui/medimages.py @@ -126,7 +126,7 @@ class FieldBuilder: def getTestImagePath(): import os MED_ROOT_DIR=os.environ["MED_ROOT_DIR"] - RESDIR=os.path.join(MED_ROOT_DIR, "share", "salome", "resources", "med", "medop_testfiles") + RESDIR=os.path.join(MED_ROOT_DIR, "share", "salome", "resources", "med", "medcalc_testfiles") imgFileName="irm_test1.png" imgFilePath=os.path.join(RESDIR,imgFileName) return imgFilePath diff --git a/src/MEDOP/tui/presentation/medpresentation.py b/src/MEDCalc/tui/medio.py similarity index 65% rename from src/MEDOP/tui/presentation/medpresentation.py rename to src/MEDCalc/tui/medio.py index 6be27d541..14fbfceb3 100644 --- a/src/MEDOP/tui/presentation/medpresentation.py +++ b/src/MEDCalc/tui/medio.py @@ -17,22 +17,19 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -import xmed -import MEDOP -import SALOME - -__manager = xmed.factory.getPresentationManager() +import medcalc def LoadDataSource(filename): - xmed.dataManager.loadDatasource(filename) - from xmed.fieldproxy import notifyGui_addsource - notifyGui_addsource(filename) + dataManager = medcalc.medcorba.factory.getDataManager() + dataManager.loadDatasource(filename) + from medcalc.medevents import notifyGui_addDatasource + notifyGui_addDatasource(filename) # def LoadImageAsDataSource(filename): # get temp file name to generate med file from image import tempfile - temp = tempfile.NamedTemporaryFile(suffix='.cfg') + temp = tempfile.NamedTemporaryFile(suffix='.med') medfilename = temp.name temp.close() @@ -41,16 +38,3 @@ def LoadImageAsDataSource(filename): builder.image2med(filename, medfilename) LoadDataSource(medfilename) # - -def MakeScalarMap(proxy, viewMode=MEDOP.VIEW_MODE_REPLACE): - # Create the presentation instance in CORBA engine - # The engine in turn creates the ParaView pipeline elements - - print "In MakeScalarMap (Python)" - - print "viewMode:", viewMode, " [", type(viewMode), "]" - - params = MEDOP.ScalarMapParameters(proxy.id, viewMode) - __manager.MakeScalarMap(params) - -# diff --git a/src/MEDOP/tui/xmedpy/medop.py b/src/MEDCalc/tui/medpresentation.py similarity index 53% rename from src/MEDOP/tui/xmedpy/medop.py rename to src/MEDCalc/tui/medpresentation.py index c095ac9b5..5e4945ca3 100644 --- a/src/MEDOP/tui/xmedpy/medop.py +++ b/src/MEDCalc/tui/medpresentation.py @@ -1,4 +1,3 @@ -# -*- coding: iso-8859-1 -*- # Copyright (C) 2011-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or @@ -17,21 +16,41 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# Author : Guillaume Boulant (EDF) +import medcalc +import MEDCALC + +__manager = medcalc.medcorba.factory.getPresentationManager() + +def MakeScalarMap(proxy, viewMode=MEDCALC.VIEW_MODE_REPLACE): + # Create the presentation instance in CORBA engine + # The engine in turn creates the ParaView pipeline elements + + print "In MakeScalarMap (Python)" + + print "viewMode:", viewMode, " [", type(viewMode), "]" + + params = MEDCALC.ScalarMapParameters(proxy.id, viewMode) + __manager.MakeScalarMap(params) + +# + +def MakeIsoSurface(): + print "Not implemented yet" +# + +def MakeVectorField(): + print "Not implemented yet" # -# =================================================================== -# medop.py is a tools to initialize a python console outside of the -# GUI for field operations. A salome session must be running -# first. For example: -# $ ./runAppli -t -# $ ./runSession -# $ python -i path/to/medop.py -# =================================================================== + +def MakeSlices(): + print "Not implemented yet" # -import xmed -# Set the globals dictionnary so that the fields tools work properly. -xmed.setConsoleGlobals(globals()) -# Import the tools required for field operations -from xmed import load, get, put, dup, ls, la, save, view, doc, wipe +def MakeDeflectionShape(): + print "Not implemented yet" +# + +def MakePointSprite(): + print "Not implemented yet" +# diff --git a/src/MEDOP/tut/README.txt b/src/MEDCalc/tut/README.txt similarity index 100% rename from src/MEDOP/tut/README.txt rename to src/MEDCalc/tut/README.txt diff --git a/src/MEDOP/tut/addfields/README.txt b/src/MEDCalc/tut/addfields/README.txt similarity index 100% rename from src/MEDOP/tut/addfields/README.txt rename to src/MEDCalc/tut/addfields/README.txt diff --git a/src/MEDOP/tut/addfields/addition.py b/src/MEDCalc/tut/addfields/addition.py similarity index 100% rename from src/MEDOP/tut/addfields/addition.py rename to src/MEDCalc/tut/addfields/addition.py diff --git a/src/MEDOP/tut/addfields/operations.py b/src/MEDCalc/tut/addfields/operations.py similarity index 100% rename from src/MEDOP/tut/addfields/operations.py rename to src/MEDCalc/tut/addfields/operations.py diff --git a/src/MEDOP/tut/addfields/timeseries.med b/src/MEDCalc/tut/addfields/timeseries.med similarity index 100% rename from src/MEDOP/tut/addfields/timeseries.med rename to src/MEDCalc/tut/addfields/timeseries.med diff --git a/src/MEDOP/tut/medcoupling/README.txt b/src/MEDCalc/tut/medcoupling/README.txt similarity index 100% rename from src/MEDOP/tut/medcoupling/README.txt rename to src/MEDCalc/tut/medcoupling/README.txt diff --git a/src/MEDOP/tut/medcoupling/env.sh b/src/MEDCalc/tut/medcoupling/env.sh similarity index 100% rename from src/MEDOP/tut/medcoupling/env.sh rename to src/MEDCalc/tut/medcoupling/env.sh diff --git a/src/MEDOP/tut/medcoupling/images/avatar.png b/src/MEDCalc/tut/medcoupling/images/avatar.png similarity index 100% rename from src/MEDOP/tut/medcoupling/images/avatar.png rename to src/MEDCalc/tut/medcoupling/images/avatar.png diff --git a/src/MEDOP/tut/medcoupling/images/irm.png b/src/MEDCalc/tut/medcoupling/images/irm.png similarity index 100% rename from src/MEDOP/tut/medcoupling/images/irm.png rename to src/MEDCalc/tut/medcoupling/images/irm.png diff --git a/src/MEDOP/tut/medcoupling/images/lena.png b/src/MEDCalc/tut/medcoupling/images/lena.png similarity index 100% rename from src/MEDOP/tut/medcoupling/images/lena.png rename to src/MEDCalc/tut/medcoupling/images/lena.png diff --git a/src/MEDOP/tut/medcoupling/images/tests.pgm b/src/MEDCalc/tut/medcoupling/images/tests.pgm similarity index 100% rename from src/MEDOP/tut/medcoupling/images/tests.pgm rename to src/MEDCalc/tut/medcoupling/images/tests.pgm diff --git a/src/MEDOP/tut/medcoupling/partition.py b/src/MEDCalc/tut/medcoupling/partition.py similarity index 100% rename from src/MEDOP/tut/medcoupling/partition.py rename to src/MEDCalc/tut/medcoupling/partition.py diff --git a/src/MEDOP/tut/medcoupling/pyfunctions/__init__.py b/src/MEDCalc/tut/medcoupling/pyfunctions/__init__.py similarity index 100% rename from src/MEDOP/tut/medcoupling/pyfunctions/__init__.py rename to src/MEDCalc/tut/medcoupling/pyfunctions/__init__.py diff --git a/src/MEDOP/tut/medcoupling/pyfunctions/functions.py b/src/MEDCalc/tut/medcoupling/pyfunctions/functions.py similarity index 100% rename from src/MEDOP/tut/medcoupling/pyfunctions/functions.py rename to src/MEDCalc/tut/medcoupling/pyfunctions/functions.py diff --git a/src/MEDOP/tut/medcoupling/pyfunctions/lagrange.py b/src/MEDCalc/tut/medcoupling/pyfunctions/lagrange.py similarity index 100% rename from src/MEDOP/tut/medcoupling/pyfunctions/lagrange.py rename to src/MEDCalc/tut/medcoupling/pyfunctions/lagrange.py diff --git a/src/MEDOP/tut/medcoupling/pyfunctions/plotter.py b/src/MEDCalc/tut/medcoupling/pyfunctions/plotter.py similarity index 100% rename from src/MEDOP/tut/medcoupling/pyfunctions/plotter.py rename to src/MEDCalc/tut/medcoupling/pyfunctions/plotter.py diff --git a/src/MEDOP/tut/medcoupling/test-paravis.py b/src/MEDCalc/tut/medcoupling/test-paravis.py similarity index 100% rename from src/MEDOP/tut/medcoupling/test-paravis.py rename to src/MEDCalc/tut/medcoupling/test-paravis.py diff --git a/src/MEDOP/tut/medcoupling/testmed_gendata.py b/src/MEDCalc/tut/medcoupling/testmed_gendata.py similarity index 98% rename from src/MEDOP/tut/medcoupling/testmed_gendata.py rename to src/MEDCalc/tut/medcoupling/testmed_gendata.py index 67c726d0b..26a930837 100755 --- a/src/MEDOP/tut/medcoupling/testmed_gendata.py +++ b/src/MEDCalc/tut/medcoupling/testmed_gendata.py @@ -48,7 +48,7 @@ def createGridMesh(meshName, nbCellsX, nbCellsY): # Create X coordinates nbNodesX = nbCellsX+1 stepX = 0.1 - arrX = [float(i * stepX) for i in range(nbNodesX)] + arrX = [float(i * stepX) for i in range(nbNodesX)] coordsX=MC.DataArrayDouble.New() coordsX.setValues(arrX,nbNodesX,1) @@ -135,14 +135,14 @@ def createField(fieldName,gridMesh, # DataArrayDouble. Note also the usage of float type because # MEDCoupling works only with real numbers listdata=list(data) - + # Create the field using the list obtained from the numpy array field = MC.MEDCouplingFieldDouble.New(typeOfField,MC.ONE_TIME); field.setName(fieldName); field.setMesh(gridMesh); field.setIteration(iteration) field.setTimeValue(float(iteration)) - + nbComponents=1 # Only one single component for a scalar field nbCells=sizeX*sizeY dataArray=MC.DataArrayDouble.New(); @@ -159,7 +159,7 @@ def writeField(fieldName, numpy2Darray, typeOfField, iteration) createFromScratch=False ML.MEDLoader.WriteField(medFileName,field,createFromScratch) - + def createTestNumpy2DArray(sizeX, sizeY): """ @@ -176,7 +176,7 @@ def createTestNumpy2DArray(sizeX, sizeY): numpy2Darray = numpy.vstack(rows) return numpy2Darray - + def createTestFieldOnCells(): # Test field on cells numpy2Darray = createTestNumpy2DArray(sizeX=nbCellsX, sizeY=nbCellsY) @@ -188,7 +188,7 @@ def createTestFieldOnNodes(): numpy2Darray = createTestNumpy2DArray(sizeX=nbNodesX, sizeY=nbNodesY) writeField("FieldOnNodes", numpy2Darray, typeOfField=MC.ON_NODES) - + # # ================================================= @@ -277,7 +277,7 @@ from pyfunctions.functions import FuncStiffPulse def createNumpy2DArrayWithFuncStiff(sizeX, sizeY): f=FuncStiffPulse(xlimit=0.3,stiffness=30,nbPeriods=10) return createNumpy2DArrayWithFunc(sizeX, sizeY, f) - + def createFunctionField_02(): sizeX=nbCellsX sizeY=nbCellsY @@ -293,7 +293,7 @@ def createFunctionField_02(): # # ================================================= -# Functions to create custom fields for MEDOP tests +# Functions to create custom fields for MEDCalc tests # ================================================= # def createTimeSeries(): @@ -330,7 +330,7 @@ def createParametrics(): meshName = "Grid_%sx%s_01"%(nbCellsX, nbCellsY) cmesh = createGridMesh(meshName, nbCellsX, nbCellsY) umesh = unstructuredMesh(cmesh) - + sizeX=nbNodesX sizeY=nbNodesY typeOfField=MC.ON_NODES @@ -360,7 +360,7 @@ def createParametrics_demo(): meshName = "mesh1" cmesh = createGridMesh(meshName, nbCellsX, nbCellsY) umesh = unstructuredMesh(cmesh) - + sizeX=nbNodesX sizeY=nbNodesY typeOfField=MC.ON_NODES @@ -376,7 +376,7 @@ def createParametrics_demo(): numpy2Darray = createNumpy2DArrayWithFunc(sizeX,sizeY,f) field = createField(fieldName,umesh, numpy2Darray,typeOfField,iteration) ML.MEDLoader.WriteField(medFileName,field,False) - + medFileName="parametric_02.med" umesh.setName("mesh2") ML.MEDLoader.WriteUMesh(medFileName,umesh,True); diff --git a/src/MEDOP/tut/medcoupling/testmed_lena.py b/src/MEDCalc/tut/medcoupling/testmed_lena.py similarity index 100% rename from src/MEDOP/tut/medcoupling/testmed_lena.py rename to src/MEDCalc/tut/medcoupling/testmed_lena.py diff --git a/src/MEDOP/tut/medcoupling/testmed_simple.py b/src/MEDCalc/tut/medcoupling/testmed_simple.py similarity index 100% rename from src/MEDOP/tut/medcoupling/testmed_simple.py rename to src/MEDCalc/tut/medcoupling/testmed_simple.py diff --git a/src/MEDOP/tut/medcoupling/testpil.py b/src/MEDCalc/tut/medcoupling/testpil.py similarity index 100% rename from src/MEDOP/tut/medcoupling/testpil.py rename to src/MEDCalc/tut/medcoupling/testpil.py diff --git a/src/MEDOP/tut/medloader/Makefile b/src/MEDCalc/tut/medloader/Makefile similarity index 100% rename from src/MEDOP/tut/medloader/Makefile rename to src/MEDCalc/tut/medloader/Makefile diff --git a/src/MEDOP/tut/medloader/cmesh.py b/src/MEDCalc/tut/medloader/cmesh.py similarity index 100% rename from src/MEDOP/tut/medloader/cmesh.py rename to src/MEDCalc/tut/medloader/cmesh.py diff --git a/src/MEDOP/tut/medloader/explore.py b/src/MEDCalc/tut/medloader/explore.py similarity index 100% rename from src/MEDOP/tut/medloader/explore.py rename to src/MEDCalc/tut/medloader/explore.py diff --git a/src/MEDOP/tut/medloader/madnex_field.med b/src/MEDCalc/tut/medloader/madnex_field.med similarity index 100% rename from src/MEDOP/tut/medloader/madnex_field.med rename to src/MEDCalc/tut/medloader/madnex_field.med diff --git a/src/MEDOP/tut/medloader/madnex_grid.med b/src/MEDCalc/tut/medloader/madnex_grid.med similarity index 100% rename from src/MEDOP/tut/medloader/madnex_grid.med rename to src/MEDCalc/tut/medloader/madnex_grid.med diff --git a/src/MEDOP/tut/medloader/manage.py b/src/MEDCalc/tut/medloader/manage.py similarity index 100% rename from src/MEDOP/tut/medloader/manage.py rename to src/MEDCalc/tut/medloader/manage.py diff --git a/src/MEDOP/tut/medloader/testamel.py b/src/MEDCalc/tut/medloader/testamel.py similarity index 100% rename from src/MEDOP/tut/medloader/testamel.py rename to src/MEDCalc/tut/medloader/testamel.py diff --git a/src/MEDOP/tut/medloader/timeseries.med b/src/MEDCalc/tut/medloader/timeseries.med similarity index 100% rename from src/MEDOP/tut/medloader/timeseries.med rename to src/MEDCalc/tut/medloader/timeseries.med diff --git a/src/MEDOP/tut/medloader/tutorial.py b/src/MEDCalc/tut/medloader/tutorial.py similarity index 100% rename from src/MEDOP/tut/medloader/tutorial.py rename to src/MEDCalc/tut/medloader/tutorial.py diff --git a/src/MEDOP/tut/mergefields/additionaldata/MergeFields.jpg b/src/MEDCalc/tut/mergefields/additionaldata/MergeFields.jpg similarity index 100% rename from src/MEDOP/tut/mergefields/additionaldata/MergeFields.jpg rename to src/MEDCalc/tut/mergefields/additionaldata/MergeFields.jpg diff --git a/src/MEDOP/tut/mergefields/additionaldata/MergeFields.png b/src/MEDCalc/tut/mergefields/additionaldata/MergeFields.png similarity index 100% rename from src/MEDOP/tut/mergefields/additionaldata/MergeFields.png rename to src/MEDCalc/tut/mergefields/additionaldata/MergeFields.png diff --git a/src/MEDOP/tut/mergefields/additionaldata/splitdemo.vtu b/src/MEDCalc/tut/mergefields/additionaldata/splitdemo.vtu similarity index 100% rename from src/MEDOP/tut/mergefields/additionaldata/splitdemo.vtu rename to src/MEDCalc/tut/mergefields/additionaldata/splitdemo.vtu diff --git a/src/MEDOP/tut/mergefields/additionaldata/splitdemo_split.vtu b/src/MEDCalc/tut/mergefields/additionaldata/splitdemo_split.vtu similarity index 100% rename from src/MEDOP/tut/mergefields/additionaldata/splitdemo_split.vtu rename to src/MEDCalc/tut/mergefields/additionaldata/splitdemo_split.vtu diff --git a/src/MEDOP/tut/mergefields/simpledemo/README.txt b/src/MEDCalc/tut/mergefields/simpledemo/README.txt similarity index 100% rename from src/MEDOP/tut/mergefields/simpledemo/README.txt rename to src/MEDCalc/tut/mergefields/simpledemo/README.txt diff --git a/src/MEDOP/tut/mergefields/simpledemo/field1.med b/src/MEDCalc/tut/mergefields/simpledemo/field1.med similarity index 100% rename from src/MEDOP/tut/mergefields/simpledemo/field1.med rename to src/MEDCalc/tut/mergefields/simpledemo/field1.med diff --git a/src/MEDOP/tut/mergefields/simpledemo/field2.med b/src/MEDCalc/tut/mergefields/simpledemo/field2.med similarity index 100% rename from src/MEDOP/tut/mergefields/simpledemo/field2.med rename to src/MEDCalc/tut/mergefields/simpledemo/field2.med diff --git a/src/MEDOP/tut/mergefields/simpledemo/field3.med b/src/MEDCalc/tut/mergefields/simpledemo/field3.med similarity index 100% rename from src/MEDOP/tut/mergefields/simpledemo/field3.med rename to src/MEDCalc/tut/mergefields/simpledemo/field3.med diff --git a/src/MEDOP/tut/mergefields/simpledemo/field4.med b/src/MEDCalc/tut/mergefields/simpledemo/field4.med similarity index 100% rename from src/MEDOP/tut/mergefields/simpledemo/field4.med rename to src/MEDCalc/tut/mergefields/simpledemo/field4.med diff --git a/src/MEDOP/tut/mergefields/simpledemo/simpledemo.py b/src/MEDCalc/tut/mergefields/simpledemo/simpledemo.py similarity index 100% rename from src/MEDOP/tut/mergefields/simpledemo/simpledemo.py rename to src/MEDCalc/tut/mergefields/simpledemo/simpledemo.py diff --git a/src/MEDOP/tut/mergefields/splitdemo/DomainMesh_1.med b/src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_1.med similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/DomainMesh_1.med rename to src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_1.med diff --git a/src/MEDOP/tut/mergefields/splitdemo/DomainMesh_2.med b/src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_2.med similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/DomainMesh_2.med rename to src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_2.med diff --git a/src/MEDOP/tut/mergefields/splitdemo/DomainMesh_3.med b/src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_3.med similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/DomainMesh_3.med rename to src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_3.med diff --git a/src/MEDOP/tut/mergefields/splitdemo/DomainMesh_4.med b/src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_4.med similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/DomainMesh_4.med rename to src/MEDCalc/tut/mergefields/splitdemo/DomainMesh_4.med diff --git a/src/MEDOP/tut/mergefields/splitdemo/README.txt b/src/MEDCalc/tut/mergefields/splitdemo/README.txt similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/README.txt rename to src/MEDCalc/tut/mergefields/splitdemo/README.txt diff --git a/src/MEDOP/tut/mergefields/splitdemo/splitdemo.py b/src/MEDCalc/tut/mergefields/splitdemo/splitdemo.py similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/splitdemo.py rename to src/MEDCalc/tut/mergefields/splitdemo/splitdemo.py diff --git a/src/MEDOP/tut/mergefields/splitdemo/splitdemo_partiel.py b/src/MEDCalc/tut/mergefields/splitdemo/splitdemo_partiel.py similarity index 100% rename from src/MEDOP/tut/mergefields/splitdemo/splitdemo_partiel.py rename to src/MEDCalc/tut/mergefields/splitdemo/splitdemo_partiel.py diff --git a/src/MEDOP/tut/projection/additionaldata/Projection1.jpg b/src/MEDCalc/tut/projection/additionaldata/Projection1.jpg similarity index 100% rename from src/MEDOP/tut/projection/additionaldata/Projection1.jpg rename to src/MEDCalc/tut/projection/additionaldata/Projection1.jpg diff --git a/src/MEDOP/tut/projection/additionaldata/Projection1.png b/src/MEDCalc/tut/projection/additionaldata/Projection1.png similarity index 100% rename from src/MEDOP/tut/projection/additionaldata/Projection1.png rename to src/MEDCalc/tut/projection/additionaldata/Projection1.png diff --git a/src/MEDOP/tut/projection/additionaldata/Projection2.jpg b/src/MEDCalc/tut/projection/additionaldata/Projection2.jpg similarity index 100% rename from src/MEDOP/tut/projection/additionaldata/Projection2.jpg rename to src/MEDCalc/tut/projection/additionaldata/Projection2.jpg diff --git a/src/MEDOP/tut/projection/additionaldata/Projection2.png b/src/MEDCalc/tut/projection/additionaldata/Projection2.png similarity index 100% rename from src/MEDOP/tut/projection/additionaldata/Projection2.png rename to src/MEDCalc/tut/projection/additionaldata/Projection2.png diff --git a/src/MEDOP/tut/projection/additionaldata/SRMA_Lionel.brep b/src/MEDCalc/tut/projection/additionaldata/SRMA_Lionel.brep similarity index 100% rename from src/MEDOP/tut/projection/additionaldata/SRMA_Lionel.brep rename to src/MEDCalc/tut/projection/additionaldata/SRMA_Lionel.brep diff --git a/src/MEDOP/tut/projection/additionaldata/Study1.hdf b/src/MEDCalc/tut/projection/additionaldata/Study1.hdf similarity index 100% rename from src/MEDOP/tut/projection/additionaldata/Study1.hdf rename to src/MEDCalc/tut/projection/additionaldata/Study1.hdf diff --git a/src/MEDOP/tut/projection/demomed/README.txt b/src/MEDCalc/tut/projection/demomed/README.txt similarity index 100% rename from src/MEDOP/tut/projection/demomed/README.txt rename to src/MEDCalc/tut/projection/demomed/README.txt diff --git a/src/MEDOP/tut/projection/demomed/demo_createsource.py b/src/MEDCalc/tut/projection/demomed/demo_createsource.py similarity index 100% rename from src/MEDOP/tut/projection/demomed/demo_createsource.py rename to src/MEDCalc/tut/projection/demomed/demo_createsource.py diff --git a/src/MEDOP/tut/projection/demomed/demo_loadsource.py b/src/MEDCalc/tut/projection/demomed/demo_loadsource.py similarity index 100% rename from src/MEDOP/tut/projection/demomed/demo_loadsource.py rename to src/MEDCalc/tut/projection/demomed/demo_loadsource.py diff --git a/src/MEDOP/tut/projection/demomed/fieldsource.med b/src/MEDCalc/tut/projection/demomed/fieldsource.med similarity index 100% rename from src/MEDOP/tut/projection/demomed/fieldsource.med rename to src/MEDCalc/tut/projection/demomed/fieldsource.med diff --git a/src/MEDOP/tut/projection/demomed/meshsource.med b/src/MEDCalc/tut/projection/demomed/meshsource.med similarity index 100% rename from src/MEDOP/tut/projection/demomed/meshsource.med rename to src/MEDCalc/tut/projection/demomed/meshsource.med diff --git a/src/MEDOP/tut/projection/demomed/meshtarget.med b/src/MEDCalc/tut/projection/demomed/meshtarget.med similarity index 100% rename from src/MEDOP/tut/projection/demomed/meshtarget.med rename to src/MEDCalc/tut/projection/demomed/meshtarget.med diff --git a/src/MEDOP/tut/projection/demovtu/MeshSource.med b/src/MEDCalc/tut/projection/demovtu/MeshSource.med similarity index 100% rename from src/MEDOP/tut/projection/demovtu/MeshSource.med rename to src/MEDCalc/tut/projection/demovtu/MeshSource.med diff --git a/src/MEDOP/tut/projection/demovtu/MeshTarget.med b/src/MEDCalc/tut/projection/demovtu/MeshTarget.med similarity index 100% rename from src/MEDOP/tut/projection/demovtu/MeshTarget.med rename to src/MEDCalc/tut/projection/demovtu/MeshTarget.med diff --git a/src/MEDOP/tut/projection/demovtu/README.txt b/src/MEDCalc/tut/projection/demovtu/README.txt similarity index 100% rename from src/MEDOP/tut/projection/demovtu/README.txt rename to src/MEDCalc/tut/projection/demovtu/README.txt diff --git a/src/MEDOP/tut/projection/demovtu/projection.py b/src/MEDCalc/tut/projection/demovtu/projection.py similarity index 100% rename from src/MEDOP/tut/projection/demovtu/projection.py rename to src/MEDCalc/tut/projection/demovtu/projection.py diff --git a/src/MEDOP/res/testfiles/README.txt b/src/MEDOP/res/testfiles/README.txt deleted file mode 100644 index b9db2b87f..000000000 --- a/src/MEDOP/res/testfiles/README.txt +++ /dev/null @@ -1 +0,0 @@ -This folder contains data files for testing the MEDOP functions diff --git a/src/MEDOP/tui/CMakeLists.txt b/src/MEDOP/tui/CMakeLists.txt deleted file mode 100644 index 734da38ad..000000000 --- a/src/MEDOP/tui/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -ADD_SUBDIRECTORY(xmedpy) -ADD_SUBDIRECTORY(presentation) diff --git a/src/MEDOP/tui/xmedpy/CMakeLists.txt b/src/MEDOP/tui/xmedpy/CMakeLists.txt deleted file mode 100644 index bbc6e70c4..000000000 --- a/src/MEDOP/tui/xmedpy/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -SET(PYFILES_TO_INSTALL - __init__.py - fieldproxy.py - fieldtools.py - fieldguide.py - cmdtools.py -# For the control of PARAVIS and VISU - driver_pvis.py - driver_visu.py -# For the medop.sh executable program - medop.py -# Modules that are required for test or tutorial purposes only: - properties.py - ) - -SALOME_INSTALL_SCRIPTS("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON}/xmed) - -SET(TEST_SCRIPTS_XMED - tests/test_xmed_fieldOperations.py - tests/test_xmed_uiEventListener.py - tests/test_xmed_visualisation.py - ) - -INSTALL(FILES ${TEST_SCRIPTS_XMED} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed) \ No newline at end of file diff --git a/src/MEDOP/tui/xmedpy/__init__.py b/src/MEDOP/tui/xmedpy/__init__.py deleted file mode 100644 index 526c5cf6a..000000000 --- a/src/MEDOP/tui/xmedpy/__init__.py +++ /dev/null @@ -1,188 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -# -# =============================================================== -# This functions are to be used to notify the USER of some events -# arising on the field operation. It is NOT to be used for logging -# purpose -# =============================================================== -# -def inf(msg): - print "INF: "+str(msg) - -def wrn(msg): - print "WRN: "+str(msg) - -def err(msg): - print "ERR: "+str(msg) - -def dbg(msg): - print "DBG: "+str(msg) - -# -# =============================================================== -# Initializing some CORBA stuff -# =============================================================== -# - -# Remember SALOME definitions: -# --------------------------- -# -# componentName = Name of the component (a library libEngine -# should exist with a C function named Engine_factory, and the -# component should be registered in the catalog MEDCatalog.xml). -# -# corbaModule = Name of the corba module that contains the IDL -# specifications of the component (name as defined in the idl file) -# -# containerType = Name of the container factory -# -componentName = "MEDOPFactory" -corbaModule = "MEDOP" -containerType = "FactoryServer" - -import salome -if salome.lcc is None: - salome.salome_init() -__import__(corbaModule) -factory = salome.lcc.FindOrLoadComponent(containerType,componentName) -# The factory is not the main CORBA component of the SALOME module MED -# (i.e. the engine associated to the active study), but the CORBA -# entry point for MED fields operations (i.e. a CORBA component -# reachable throught the LifeCycleCORBA). This entry point is used to -# get the other SALOME CORBA components required for MED field -# operations, in particular the dataManager and the calculator - -# -# =============================================================== -# Initializing the MED components required for MED fields operations -# =============================================================== -# -dataManager = factory.getDataManager() -calculator = factory.getCalculator() - -# -# =============================================================== -# Initializing the notification system (events from components to GUI) -# =============================================================== -# - -# The MEDEventListener is created in the GUI (WorkspaceController) and -# a reference is transmitted to the python context throw its IOR. The -# transmission consists in initializing the variable below from the -# GUI (who knows the IOR) when importing xmed in the python console -# (see WorkspaceController) -eventListener = None -import SALOME -def connectEventListener(): - global eventListener - try: - eventListenerIOR = dataManager.getEventListenerIOR() - eventListener = salome.orb.string_to_object(eventListenerIOR) - except SALOME.SALOME_Exception, e: - wrn("The event listener is not running yet") - msg ="When you'll have loaded the MED GUI, " - msg+="call explicitely \"xmed.connectEventListener()\" " - msg+="to connect the GUI event listener" - inf(msg) - eventListener = None - except Exception, e: - err("An unknown error occurs. Check if this ior=%s is valid."%eventListenerIOR) - -def eventListenerIsRunning(): - global eventListener - if eventListener is not None: - return True - - # Try to define the event listener - connectEventListener() - if eventListener is None: - # it definitly does not work - wrn("the GUI is not loaded yet and will not be notified of the modification") - return False - - return True - -# One can try to connect to the eventListener, but it will fail if the -# MED GUI is not loaded. That does not matter, because the event -# listener is used only to notify the GUI of some event. If the GUI is -# not loaded, there is no use of notification. -connectEventListener() - -# -# =============================================================== -# Automatic import of some elements of the package -# =============================================================== -# -from fieldtools import load, get, put, dup, ls, la, save, view, remove, clean -from fieldguide import doc -from cmdtools import cls, wipe - -# -# =============================================================== -# Some helper functions to deal with the fields and meshes -# =============================================================== -# -import MEDCoupling -__mapTypeOfFieldLabel={ - MEDCoupling.ON_CELLS:"ON_CELLS", - MEDCoupling.ON_NODES:"ON_NODES", - MEDCoupling.ON_GAUSS_PT:"ON_GAUSS_PT", - MEDCoupling.ON_GAUSS_NE:"ON_GAUSS_NE"} - -def typeOfFieldLabel(typeOfField): - # A field name could identify several MEDCoupling fields, that - # differ by their spatial discretization on the mesh (values on - # cells, values on nodes, ...). This spatial discretization is - # specified (at least) by the TypeOfField that is an integer value - # in this list: - # 0 = ON_CELLS - # 1 = ON_NODES - # 2 = ON_GAUSS_PT - # 3 = ON_GAUSS_NE - try: - return __mapTypeOfFieldLabel[typeOfField] - except IndexError, e: - return "UNCKNOWN" - -#----- -# This function is to be called from the working python console to -# specify the globals() dictionnary (used in fieldtools for stat analysis) -# -# >>> xmed.setConsoleGlobals(globals()) -# -import fieldtools -def setConsoleGlobals(pyConsoleGlobals): - fieldtools.pyConsoleGlobals = pyConsoleGlobals - -# -# =================================================================== -# unit test functions -# =================================================================== -# -def TEST_typeOfFieldLabel(): - print typeOfFieldLabel(0) - print typeOfFieldLabel(5) - -# =================================================================== -if __name__ == "__main__": - TEST_typeOfFieldLabel() diff --git a/src/MEDOP/tui/xmedpy/cmdtools.py b/src/MEDOP/tui/xmedpy/cmdtools.py deleted file mode 100644 index 293facd30..000000000 --- a/src/MEDOP/tui/xmedpy/cmdtools.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -# -# =================================================================== -# The functions of this module must be imported as global functions in -# the SALOME python console. It provides the console context with -# general purpose python commands. -# =================================================================== -# -# add something to clear the screen -class Cls(object): - """ - This class can be used to create a command that clear the shell - screen running this python interpreter. - """ - def __repr__(self): - import os - os.system('cls' if os.name == 'nt' else 'clear') - return '' - -cls = Cls() - -class Prompt: - """ - This class can be used to create a special prompt - """ - def __str__(self): - import os - return 'medop> ' - -import sys -sys.ps1 = Prompt() -del sys -del Prompt - -class Wipe(object): - def __repr__(self): - return '>>>\n'*40 - -wipe = Wipe() - diff --git a/src/MEDOP/tui/xmedpy/driver_pvis.py b/src/MEDOP/tui/xmedpy/driver_pvis.py deleted file mode 100644 index e3143c6ce..000000000 --- a/src/MEDOP/tui/xmedpy/driver_pvis.py +++ /dev/null @@ -1,107 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -import MEDCoupling -__mapTypeOfField2ParavisLabel={ - MEDCoupling.ON_CELLS:"OnCell", - MEDCoupling.ON_NODES:"OnPoint", - MEDCoupling.ON_GAUSS_PT:"ON_GAUSS_PT", - MEDCoupling.ON_GAUSS_NE:"ON_GAUSS_NE"} - -def pvis_typeOfFieldLabel(typeOfField): - # A field name could identify several MEDCoupling fields, that - # differ by their spatial discretization on the mesh (values on - # cells, values on nodes, ...). This spatial discretization is - # specified (at least) by the TypeOfField that is an integer value - # in this list: - # 0 = ON_CELLS = OnCell - # 1 = ON_NODES = OnPoint - # 2 = ON_GAUSS_PT - # 3 = ON_GAUSS_NE - try: - return __mapTypeOfField2ParavisLabel[typeOfField] - except IndexError, e: - return "UNKNOWN" - -def pvis_scalarmap(filename,meshname,fieldname,typeOfField,iteration=-1): - """ - This is the minimalist function to render a scalar map on a field - load from a med file using the PARAVIS module. - """ - import pvsimple - - reader = pvsimple.MEDReader( FileName=filename ) - - representation = pvsimple.Show() - if typeOfField == MEDCoupling.ON_CELLS: - representation.ColorArrayName = ("CELLS", fieldname) - data = reader.CellData - else: - representation.ColorArrayName = ("POINTS", fieldname) - data = reader.PointData - - # :TODO: Determine nb components - nb_cmp = 1 - mode = "Magnitude" # "Component" if nb_cmp > 1 - - # Get data range (mini/maxi) - for n in range(data.GetNumberOfArrays()): - if data.GetArray(n).GetName() == fieldname: - mini,maxi = data.GetArray(n).GetRange() - - stepvalue = (maxi-mini)/100. # 100 steps - - # Build Lookup table - RGBPoints = [mini, 0.0, 0.0, 1.0, maxi, 1.0, 0.0, 0.0] - nb = int((maxi-mini)/stepvalue)-1 - Table = pvsimple.GetLookupTableForArray("", nb_cmp, VectorMode=mode, ColorSpace='HSV') - Table.Discretize = 1 - Table.NumberOfTableValues = nb - Table.RGBPoints = RGBPoints - - representation.Representation = 'Surface' - representation.LookupTable = Table - - # Build scalar bar - scalarbar = pvsimple.CreateScalarBar(LabelFormat = '%.1f',Title= "",LabelFontSize=12,Enabled=1,LookupTable=Table,TitleFontSize=12,LabelColor=[0.0, 0.0, 0.0],TitleColor=[0.0, 0.0, 0.0],) - pvsimple.SetActiveSource(reader) - pvsimple.GetRenderView().Representations.append(scalarbar) - pvsimple.SetActiveSource(reader) - pvsimple.Render() - - return True - - -def TEST_scalarmap(): - import os - from xmed import properties - #properties.setup(properties.testdata_02) # test with nodes - properties.setup(properties.testdata_03) # test with cells - pvis_scalarmap(properties.testFilePath, - properties.testMeshName, - properties.testFieldName, - properties.testTypeOfField, - properties.testFieldIt) - -if __name__ == "__main__": - TEST_scalarmap() - - diff --git a/src/MEDOP/tui/xmedpy/driver_visu.py b/src/MEDOP/tui/xmedpy/driver_visu.py deleted file mode 100644 index e74a5e1c5..000000000 --- a/src/MEDOP/tui/xmedpy/driver_visu.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -import VISU -import MEDCoupling -__mapMedType2VisuType={ - MEDCoupling.ON_CELLS:VISU.CELL, - MEDCoupling.ON_NODES:VISU.NODE, - MEDCoupling.ON_GAUSS_PT:VISU.TGAUSSPOINTS - } - -def visu_typeOfField(medTypeOfField): - """ - This function gives the visu type corresponding to the specified - med type. - """ - try: - return __mapMedType2VisuType[medTypeOfField] - except IndexError, e: - return "UNCKNOWN" - - -import salome -from libSALOME_Swig import SALOMEGUI_Swig - -def visu_scalarmap(filename,meshname,fieldname,typeOfField,iteration=-1): - """ - This is the minimalist function to render a scalar map on a field - load from a med file using the VISU module. - """ - - # We first have to prepare a pointer to the VISU component engine. - visuComp = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") - visuComp.SetCurrentStudy(salome.myStudy) - - visumed = visuComp.CreateResult(filename) - visumed.SetBuildGroups(True) - visumed.SetBuildFields(True, True) - visumed.Build(False, True) - if not visumed.IsDone() : - print "ERR: can't create a representation of med data" - return False - - visuComp.RenameEntityInStudy(visumed, meshname, VISU.NODE, 'onNodes') - visuComp.RenameEntityInStudy(visumed, meshname, VISU.CELL, 'onCells') - - visuType = visu_typeOfField(typeOfField) - scalarmap = visuComp.ScalarMapOnField(visumed, - meshname, - visuType, - fieldname, - iteration) - if scalarmap is None: - print "ERR: can't create a scalar map" - return False - - # __GBO__ maybe it could be appreciated to select the component to - # display. In this interface, the modulus of the field is - # considered. - component = 1 - scalarmap.SetScalarMode(component) - scalarmap.SetSourceRange() - scalarmap.SetScaling(VISU.LINEAR) - scalarmap.SetTitle(fieldname) - - # This final part is to automatically display the scalar map in a - # VISU viewer. - sg = SALOMEGUI_Swig() - sg.updateObjBrowser(1) - - # Display the scalar map in the viewer - myViewManager = visuComp.GetViewManager() - myView = myViewManager.Create3DView() - myView.Maximize() - myView.Display(scalarmap); - myView.SetFocalPoint([0,0,0]); - myView.FitAll(); - - return True - - -def TEST_scalarmap(): - import os - from xmed import properties - #properties.setup(properties.testdata_02) # test with nodes - properties.setup(properties.testdata_03) # test with cells - - # __GBO__: WARN due to a specific feature of VISU, when only one - # field timestamps exists in the med file, we have to specify an - # iteration number of 1, whatever the iteration value is in the - # med file. - #iteration = properties.testFieldIt - iteration = 1 - - visu_scalarmap(properties.testFilePath, - properties.testMeshName, - properties.testFieldName, - properties.testTypeOfField, - iteration) - -if __name__ == "__main__": - TEST_scalarmap() diff --git a/src/MEDOP/tui/xmedpy/fieldguide.py b/src/MEDOP/tui/xmedpy/fieldguide.py deleted file mode 100644 index afa218019..000000000 --- a/src/MEDOP/tui/xmedpy/fieldguide.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -# -# =================================================================== -# Th module must be imported as global in the SALOME python console to -# provide the user with documentation on fields operations. -# =================================================================== -# - -class UserGuide: - """ - In this python console, you manipulate variables that identifies - field objects. These variables are proxy objects towards the real - MED fields stored as MEDCoupling instances in the SALOME - container. - - What you can do with this proxy object: - - - you can manipulate this object in algebric operations (+,-,*,/): - >>> add = f1 + f2 - >>> dif = f1 - f2 - >>> mul = f1 * f2 - >>> div = f1 / f2 (an exception is raised in case of division by 0) - >>> square = pow(f1, 2) - - - the operande could be a scalar numerical value: - >>> offset = f1 + 4.2 - >>> scaling = 3.8 * f1 - - - any combination of this operations can be done on a single instruction: - >>> x = f1 + pow(f2) - >>> y = f1 + x - f2 - - - you can request some helper functions on this object: - >>> doc : print the user documentation for field operations - >>> print f : print the main properties of the field f (name, values, ...) - >>> f.dup() : create a dublicate of the field f - >>> dup(f) : do the same thing - >>> f.visu() : display the modulus of this field using VISU post-processor. - """ - - def __repr__(self): - return UserGuide.__doc__ - - def __call__(self, command): - print "help on command %s"%command - -doc=UserGuide() diff --git a/src/MEDOP/tui/xmedpy/fieldproxy.py b/src/MEDOP/tui/xmedpy/fieldproxy.py deleted file mode 100644 index 687f11e21..000000000 --- a/src/MEDOP/tui/xmedpy/fieldproxy.py +++ /dev/null @@ -1,426 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -import xmed -import MEDOP -import SALOME - -def newFieldProxy(fieldHandlerId): - ''' - This creates a new FieldProxy wrapping the field whose - fieldHandlerId is passed in argument. The function requests the - xmedDataManager to get the fieldHandler from its id. - ''' - fieldHandler = xmed.dataManager.getFieldHandler(fieldHandlerId) - return FieldProxy(fieldHandler) - -# This define the map between attributes of a FieldProxy and those of -# the associated FieldHandler -PROXY_ATTRIBUTES_MAP = {"id":None, - "fieldseriesId":None, - "fieldname":"name", - "meshname":None, - "meshid":None, - "type":None, - "iteration":"iteration", - "order":"order", - "source":"source"} - -class FieldProxy: - """ - This object is a proxy to manipulate a remote MEDCoupling field - from within the SALOME python interpreter. Remote means that the - MEDCoupling field is in the SALOME container and not in the - client. See UserGuide class for detailed documentation of what can - be done with a field proxy. - """ - def __init__( self, fieldHandler ): - """ - This defines the wrapping on the field specified by its - fieldHandler id. - """ - self.__fieldHandler = fieldHandler - self.__restriction = None - print self.__repr__() - - def __getattr__(self, name ): - """ - This method realizes the read proxy pattern toward the field - handler. - """ - # WRN: Note that the modification of this function can lead to - # coercion problem. Modify this function with extrem care. - return getattr( self.__fieldHandler, name ) - - def __setattr__(self, name, value): - """ - This method realizes the write proxy pattern toward the field - handler. Only some attributes are writable. The list is - specified in the PROXY_ATTRIBUTES_MAP table. - """ - if name in PROXY_ATTRIBUTES_MAP.keys(): - if PROXY_ATTRIBUTES_MAP[name] is not None: - xmed.wrn("The modification of this attribute can't be done that way") - msg="Use f.update(%s=\"%s\") instead to ensure synchronisation of data." - xmed.inf(msg%(PROXY_ATTRIBUTES_MAP[name],value)) - else: - xmed.err("The modification of the attribute %s is not possible"%name) - else: - self.__dict__[name] = value - - def __repr__(self): - """ - Return a string containing a printable representation of this - object (what is displayed when typing the variable name and - carriage return). - """ - # We need first to update the handler because some data can - # have changed (the meshid for example in case of change of - # underlying mesh). - # __GBO__ : TODO check the performance - self.__fieldHandler = xmed.dataManager.getFieldHandler(self.id) - text = "field name (id)\t = %s (%s)\n"%(self.fieldname, self.id) - text+= "mesh name (id) \t = %s (%s)\n"%(self.meshname,self.meshid) - text+= "discretization \t = %s\n"%xmed.typeOfFieldLabel(self.type) - text+= "(iter, order) \t = (%s,%s)\n"%(str(self.iteration),str(self.order)) - text+= "data source \t = %s"%self.source - return text - - def __str__(self): - """ - This is what is displayed when you type 'print myField'. Note - that this function prints the values of the field and then you - must be aware that a huge amount of data could be - displayed. Moreover, it means that this operation triggers the - loading of the associated MEDCouplingFied data in the SALOME - container. - """ - text = xmed.dataManager.getFieldRepresentation(self.id) - return text - - def __add__(self, operande): - """ - This makes the addition of two fields or the addition of a - scalar to a field. It depends weither the operande is a - FieldProxy or a simple scalar numerical value. - """ - # The xmed calculator could raise exceptions coming from - # MEDCoupling. Note that the fieldproxy instances are used - # from within the python console, and for ergonomic reason, we - # choose to not raise the possible exceptions to the console - # by a clear message. Keep this in mind for unit test. You - # have to test the return value, which should not be - # null. This principle is applyed for all operations. - try: - if isinstance(operande, FieldProxy): - # The operande is an other field - xmed.inf("Addition of %s and %s"%(self.fieldname, operande.fieldname)) - rfieldHandler = xmed.calculator.add(self.__fieldHandler, operande.__fieldHandler) - else: - # The operande is a scalar numerical value that must be - # considered as an offset in a linear transformation - factor = 1 - offset = operande - xmed.inf("Application of the offset %s to %s" % (offset, self.fieldname)) - rfieldHandler = xmed.calculator.lin(self.__fieldHandler, factor, offset) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def __radd__(self, operande): - """ - The user typed 'operande+self', we replace by 'self+operande' - to automatically activate the __add__ method of fieldpoxy. - """ - return self+operande - - def __iadd__(self, operande): - """ - These methods implements the augmented arithmetic assignments (+=) - """ - xmed.wrn("NOT IMPLEMENTED YET") - - def __sub__(self,operande): - """ - This makes the substraction of two fields or the substraction - of a scalar to a field. It depends weither the operande is a - FieldProxy or a simple scalar numerical value. - """ - try: - if isinstance(operande, FieldProxy): - # The operande is an other field - xmed.inf("Substraction of %s by %s"%(self.fieldname, operande.fieldname)) - rfieldHandler = xmed.calculator.sub(self.__fieldHandler, operande.__fieldHandler) - else: - # The operande is a scalar numerical value that must be - # considered as an offset in a linear transformation - factor = 1 - offset = -operande - xmed.inf("Application of the offset %s to %s" % (offset, self.fieldname)) - rfieldHandler = xmed.calculator.lin(self.__fieldHandler, factor, offset) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def __rsub__(self, operande): - """ - The user typed 'operande-self' where operande is not a field - proxy. This function process the situation. - """ - # The operande is a numerical value (because otherwise, the - # "sub" method would have been called instead). We may apply - # the command '(self-operande)*(-1)' to activate the __sub__ - # method of fieldpoxy. - # - #return (self-operande)*(-1) - # - # We prefer to apply a linear transformation because it can be - # done in one single request to the med calculator. - - factor = -1 - offset = operande - xmed.inf("Linear transformation %s%s*%s" % (offset, factor, self.fieldname)) - try: - rfieldHandler = xmed.calculator.lin(self.__fieldHandler, factor, offset) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def __mul__(self, operande): - """ - This makes the multiplication of two fields or the - multiplication of a scalar to a field. It depends weither the - operande is a FieldProxy or a simple scalar numerical value. - """ - try: - if isinstance(operande, FieldProxy): - # The operande is an other field - xmed.inf("Multiplication of %s by %s"%(self.fieldname, operande.fieldname)) - rfieldHandler = xmed.calculator.mul(self.__fieldHandler, operande.__fieldHandler) - else: - # The operande is a scalar numerical value that must be - # considered as an offset in a linear transformation - factor = operande - offset = 0 - xmed.inf("Scaling %s by factor %s" % (self.fieldname, factor)) - rfieldHandler = xmed.calculator.lin(self.__fieldHandler, factor, offset) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def __rmul__(self, operande): - """ - The user typed 'operande*self', we want to execute - 'self*operande' to activate the __mul__ method of fieldpoxy. - """ - return self*operande - - def __div__(self, operande): - """ - This makes the division of two fields or the division of field - by a scalar. It depends weither the operande is a FieldProxy - or a simple scalar numerical value. - """ - try: - if isinstance(operande, FieldProxy): - # The operande is an other field - xmed.inf("Division of %s by %s"%(self.fieldname, operande.fieldname)) - rfieldHandler = xmed.calculator.div(self.__fieldHandler, operande.__fieldHandler) - else: - # The operande is a scalar numerical value that must be - # considered as an offset in a linear transformation - factor = 1./operande - offset = 0 - xmed.inf("Scaling %s by factor 1/%s" % (self.fieldname, operande)) - rfieldHandler = xmed.calculator.lin(self.__fieldHandler, factor, offset) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def __rdiv__(self, operande): - """ - The user typed 'operande/self', we want to execute for each - value of the field the operation 'operande/value'. - """ - xmed.inf("Division of %s by %s" % (operande, self.fieldname)) - function = "%s/u"%operande - nbResComp = MEDOP.NBCOMP_DEFAULT - try: - rfieldHandler = xmed.calculator.fct(self.__fieldHandler,function,nbResComp) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def __pow__(self, power): - """ - This compute the power of the field to the specified value. - """ - function = "abs(u)^%s"%power - return self.ope(function,duplicate=True) - - def __abs__(self): - """ - This compute the absolute value of the field. We use here - """ - return self.ope(function="abs(u)",duplicate=True) - - def __neg__(self): - """ - This computes the negative of this field (when you type -f) - """ - return -1*self - - def dup(self): - """ - This creates a duplicate of the field. The whole data are - duplicated. - """ - xmed.inf("Duplication of %s"%self.fieldname) - try: - rfieldHandler = xmed.calculator.dup(self.__fieldHandler) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - def ope(self, function, duplicate=True): - """ - This can be used to apply a transformation function to this - field. The transformation is specified using a literal - equation given as a string where u stands for the field. - """ - # _GBO_ TO BE IMPLEMENTED: the case where duplicate = False - # must modify the object itself and not create a new field - xmed.inf("Operate the equation \"%s\" to %s"%(function,self.fieldname)) - try: - rfieldHandler = xmed.calculator.fct(self.__fieldHandler, - function, - MEDOP.NBCOMP_DEFAULT) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - return None - - return FieldProxy(rfieldHandler) - - - def __call__(self, restriction=None): - """ - This could be used to return a fieldproxy binded on the same - fieldHandler than self, but with options that restrict the - usage to a domain specified by the given arguments (restricted - to a component, to a part of the mesh, ...). - """ - xmed.wrn("Not implemented yet. Return the field itself") - self.__restriction = restriction - return self - - def update(self,name=None,iteration=None,order=None,source=None): - """ - This function can be used to update the meta-data associated - to this field. It can modify the name, the iteration, the - order and the source. - """ - if name is None: - name = self.fieldname - if iteration is None: - iteration = self.iteration - if order is None: - order = self.order - if source is None: - source = self.source - - xmed.dataManager.updateFieldMetadata(self.id,name,iteration,order,source) - self.__fieldHandler.fieldname = name - self.__fieldHandler.iteration = iteration - self.__fieldHandler.order = order - self.__fieldHandler.source = source - # WARN: Note that you have to update directly the fieldHandler - # object because of the presence of the method __setattr__ - # that make the proxy to this update method - - # Finally, we have to notify the GUI for update of field prestations - #self.__notifyGui_update() - notifyGui_update(self.id) - - # Print for visual control - print self.__repr__() - -# -# =================================================================== -# Functions for events notification -# =================================================================== -# -# Note that these functions are not part of the class FieldProxy so -# that they could be used in another context than the FieldProxy instances -import MEDOP - -def __notifyGui(type, fieldId=-1, filename=""): - medEvent = MEDOP.MedEvent(type, fieldId, filename) - - if not xmed.eventListenerIsRunning(): return - - # Notify the GUI of the update event - xmed.eventListener.processMedEvent(medEvent) - - -def notifyGui_update(fieldId): - """ - This function must be used to notify the GUI that the field - meta-data have changed so it could update the gui - presentations of this field. - """ - __notifyGui(MEDOP.EVENT_UPDATE_FIELD,fieldId) - -def notifyGui_add(fieldId): - __notifyGui(MEDOP.EVENT_ADDNEW_FIELD,fieldId) - -def notifyGui_remove(fieldId): - __notifyGui(MEDOP.EVENT_DELETE_FIELD,fieldId) - -def notifyGui_clean(): - __notifyGui(MEDOP.EVENT_CLEAN_WORKSPACE) - -def notifyGui_addsource(filename): - __notifyGui(MEDOP.EVENT_ADD_DATASOURCE,-1,filename) - -# -# =================================================================== -# use case functions -# =================================================================== -# - -# =================================================================== -if __name__ == "__main__": - # See test_medoperation.py - pass diff --git a/src/MEDOP/tui/xmedpy/fieldtools.py b/src/MEDOP/tui/xmedpy/fieldtools.py deleted file mode 100644 index 13effcd80..000000000 --- a/src/MEDOP/tui/xmedpy/fieldtools.py +++ /dev/null @@ -1,255 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -# -# =================================================================== -# The functions of this module must be imported as global functions in -# the SALOME python console. It provides the console context with Tool -# functions to manipulate field throw there fieldproxy. -# =================================================================== -# - -import xmed -from xmed.fieldproxy import FieldProxy, newFieldProxy - -# =================================================================== -# Operations on fields - -def dup(aFieldProxy): - """ - This function returns a duplicate of the specified field. - It's equivalent to the call '>>> copy = f.dup()'. - """ - try: - clone = aFieldProxy.dup() - except Exception: - print "ERR: the argument can't be duplicated as a field object" - return None - return clone - -# =================================================================== -# Get list a field with information using the commands ls and/or la - -# IMPORTANT NOTE: -# the pyConsoleGlobals variable should holds the globals() dictionnary of -# the python console context -pyConsoleGlobals=None - -def status(local=True,remote=False): - """ - This function return the status of the medop context, i.e. the - list of fields defined in this python session. - """ - status="" - if local is True: - dvars = pyConsoleGlobals - if dvars is None: - xmed.wrn("The stat function required the specification of the python context") - xmed.inf("Type this command \"import xmed; xmed.setConsoleGlobals(globals())") - if remote is True: - status="========= Fields used in the current context ===\n" - for varkey in dvars.keys(): - var = dvars[varkey] - if isinstance(var, FieldProxy): - status+="%s \t(id=%s, name=%s)\n"%(varkey,var.id,var.fieldname) - - if remote is True: - if local is True: - status+="\n========= Fields available in the data manager ===\n" - fieldHandlerList = xmed.dataManager.getFieldHandlerList() - for fieldHandler in fieldHandlerList: - status+="id=%s\tname\t= %s\n\tmesh\t= %s\n\t(it,dt)\t= (%s,%s)\n\tsource\t= %s\n"%( - fieldHandler.id, - fieldHandler.fieldname, - fieldHandler.meshname, - fieldHandler.iteration, - fieldHandler.order, - fieldHandler.source) - status+="---------\n" - - if len(fieldHandlerList) > 0: - status+="(use 'f=get(id)' to get a field in the current context)" - - return status - -# For simpler typing, one can create a python command for status -# (avoid to type "print status()") -class ListFields(object): - """ - A stat object displays the status of the med operating context, i.e. the - list of fields defined in this python session. - """ - def __init__(self,all=False): - self.__local = True - self.__remote = all - # all = True means that the local metadata (fieldproxy) and the - # remote metadata on the engine (MEDCouplingFieldDouble) are - # displayed by the stat command. Otherwise, only the local - # metadata are displayed. - - def __repr__(self): - return status(self.__local, self.__remote) - -# Creating the commands list (ls) and list all (la) -ls=ListFields(all=False) -la=ListFields(all=True) - -# =================================================================== -# Remove variable from console -from xmed.fieldproxy import notifyGui_remove -def remove(aFieldProxy): - dvars = pyConsoleGlobals - if dvars is None: - return - for varkey, var in dvars.items(): - if isinstance(var, FieldProxy) and var.id == aFieldProxy.id: - exec("del %s"%varkey) in pyConsoleGlobals - notifyGui_remove(aFieldProxy.id) -# - -# Clean workspace -from xmed.fieldproxy import notifyGui_clean -def clean(): - dvars = pyConsoleGlobals - if dvars is None: - return - all_keys = [] - for varkey, var in dvars.items(): - if isinstance(var, FieldProxy): - all_keys.append("%s"%varkey) - if len(all_keys) > 0: - exec "del "+",".join(all_keys) in pyConsoleGlobals - notifyGui_clean() -# - -# =================================================================== -# Field Data Management -from xmed import properties -filepath = properties.testFilePath - -def load(medFileName=filepath): - """ - This function indicates that we want to use the fields from the - specified med file. The fields meta-data are loaded in the engine - part of the module. To get a fieldproxy on a field, call the get - function with the id of the required field. To display the whole - list of fields loaded in the engine, type 'ls' (la verbose). - """ - xmed.dataManager.addDatasource(filepath) - print status(local=False,remote=True) - from xmed.fieldproxy import notifyGui_addsource - notifyGui_addsource(filename) - -def get(fieldHandlerId): - """ - This return a field proxy on the field identified by the specified - field handler id. - """ - return newFieldProxy(fieldHandlerId) - -from xmed.fieldproxy import notifyGui_add -def put(aFieldProxy): - """ - This function puts a reference to this field in the GUI data - model. When a field is referenced in the GUI data model, then it - belongs to the workspace. When the workspace is saved, all the - field that belongs to the workspace are saved. - """ - xmed.dataManager.markAsPersistent(aFieldProxy.id, True) - notifyGui_add(aFieldProxy.id) - -import SALOME -def save(filename): - """ - Dump your job in a med file. Only the fields marked as persistent - are saved in the specified file. - """ - try: - xmed.dataManager.savePersistentFields(filename) - except SALOME.SALOME_Exception, ex: - xmed.err(ex.details.text) - -# =================================================================== -# Field Data visualization -VIEWER_VISU = "VISU" -VIEWER_PARAVIS = "PARAVIS" -VIEWER_DEFAULT = VIEWER_PARAVIS - -import tempfile - -def view_using_paravis(aFieldProxy): - temp = tempfile.NamedTemporaryFile(prefix="medop_viewer", suffix='.med', delete=False) - - # __GBO__ TO BE IMPROVED: we used a tmp file in this first step of - # development, but we should used at last a MEDCoupling corba - # object (see how to use the stuff in PARAVIS/src/Plugins) - xmed.dataManager.saveFields(temp.name, [aFieldProxy.id]) - - from xmed.driver_pvis import pvis_scalarmap - pvis_scalarmap(temp.name, - aFieldProxy.meshname, - aFieldProxy.fieldname, - aFieldProxy.type, - aFieldProxy.iteration) - temp.close() -# - -def view_using_visu(aFieldProxy): - # No more used - raise Exception("view_using_visu: No more used") - - VIEWER_TMP_FILE = "/tmp/medop_viewer.med" - - # __GBO__ TO BE IMPROVED: we used a tmp file in this first step of - # development, but we should used at last a MEDCoupling corba - # object (see how to use the stuff in PARAVIS/src/Plugins) - xmed.dataManager.saveFields(VIEWER_TMP_FILE, [aFieldProxy.id]) - - # __GBO__: WARN due to a specific feature of VISU, when only one - # field timestamps exists in the med file, we have to specify an - # iteration number of 1, whatever the iteration value is in the - # med file. - iteration = 1 # __GBO__ for bug VISU - # instead of: - # iteration = aFieldProxy.iteration - - from xmed.driver_visu import visu_scalarmap - result = visu_scalarmap(VIEWER_TMP_FILE, - aFieldProxy.meshname, - aFieldProxy.fieldname, - aFieldProxy.type, - iteration) - if result is False: - xmed.err("the field can't be displayed") - -def view(aFieldProxy, using=VIEWER_DEFAULT): - """ - This displays a 3D view of the field using VISU or PARAVIS, - depending on the configuration. This view is for quick visual - control of a field and is not intended to be parametrizable. For - custom display, you should import the fields in VISU or PARAVIS - and continue the job in one of this SALOME module. - """ - if using == VIEWER_PARAVIS: - view_using_paravis(aFieldProxy) - else: - view_using_visu(aFieldProxy) - diff --git a/src/MEDOP/tui/xmedpy/properties.py b/src/MEDOP/tui/xmedpy/properties.py deleted file mode 100644 index 5cde84d57..000000000 --- a/src/MEDOP/tui/xmedpy/properties.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# This file defines some properties for test purposes - -import os - -try: - MED_ROOT_DIR=os.environ["MED_ROOT_DIR"] -except KeyError, e: - raise RuntimeError("MED_ROOT_DIR should be defined to load the test data") - -RESDIR=os.path.join(MED_ROOT_DIR,"share","salome","resources","med","medop_testfiles") - -def testdata_01(): - testFileName = "testfield.med" - testMeshName = "Mesh" - testFieldName= "testfield1" - testFieldIt = -1 - testFieldDt = -1 - testTypeOfField = 0 # On cells - return testFileName, testMeshName, testFieldName, testTypeOfField, testFieldIt, testFieldDt - -def testdata_02(): - testFileName = "smallmesh_varfield.med" - testMeshName = "My2DMesh" - testFieldName= "testfield2" - testFieldIt = 1 - testFieldDt = 1 - testTypeOfField = 1 # On nodes - return testFileName, testMeshName, testFieldName, testTypeOfField, testFieldIt, testFieldDt - -def testdata_03(): - testFileName = "fieldlena.med" - testMeshName = "lenamesh" - testFieldName= "lenafield" - testFieldIt = 3 - testFieldDt = 0 - testTypeOfField = 0 # On cells - return testFileName, testMeshName, testFieldName, testTypeOfField, testFieldIt, testFieldDt - -# Default values -testdata=testdata_02 -testFileName, testMeshName, testFieldName, testTypeOfField, testFieldIt, testFieldDt = testdata() -testFilePath = os.path.join(RESDIR,testFileName) - -# Setup test values -def setup(testdata=testdata_02): - global testFileName, testMeshName, testFieldName - global testFieldIt, testFieldDt, testFilePath, testTypeOfField - testFileName, testMeshName, testFieldName, testTypeOfField, testFieldIt, testFieldDt = testdata() - testFilePath = os.path.join(RESDIR,testFileName) - -def display(): - """ - Displays the properties values defined in this script. - """ - print 60*"=" + " Properties values - START" - print "MED_ROOT_DIR = ",MED_ROOT_DIR - print "RESDIR = ",RESDIR - print "testFileName = ",testFileName - print "testFilePath = ",testFilePath - print 60*"=" + " Properties values - END" - -#display() - -def getFilePath(filename): - """ - Returns the absolute path for a given file base name. The base - name must match with a file contained in the test files directory. - """ - filepath = os.path.join(RESDIR,filename) - if not os.path.exists(filepath): - raise RuntimeError("The file %s does not exists"%filepath) - return filepath diff --git a/src/MEDOP/tui/xmedpy/tests/test_xmed_fieldOperations.py b/src/MEDOP/tui/xmedpy/tests/test_xmed_fieldOperations.py deleted file mode 100644 index 4f7daab0f..000000000 --- a/src/MEDOP/tui/xmedpy/tests/test_xmed_fieldOperations.py +++ /dev/null @@ -1,233 +0,0 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# This file is a set of basic use case to test (from the python -# context) the functions developped in MED modules for the field -# operations. -# -# (gboulant - 16/6/2011) -# -import xmed -from xmed import properties -from xmed import fieldproxy -from xmed.fieldproxy import FieldProxy -#from xmed.fieldtools import dup, stat, get, save -#from xmed.fieldguide import doc - -# Don't forget to set the globals dictionnary for the fields tools to -# work properly -xmed.setConsoleGlobals(globals()) - -# Load some test data in the MedDataManager -filepath = properties.testFilePath -xmed.dataManager.loadDatasource(filepath) -fieldHandlerList = xmed.dataManager.getFieldHandlerList() - -def setup(): - """ - This function defines a set of field variable for quick tests in - the python console. You just have to execute the function to get - the variables defined in the global context. - """ - fh1=fieldHandlerList[0] - fh2=fieldHandlerList[1] - f1 = FieldProxy(fh1) - f2 = FieldProxy(fh2) - return fh1, fh2, f1, f2 - -# Setup for quick tests in the python console -fh1, fh2, f1, f2 = setup() - -def TEST_addition(): - fieldHandler0 = fieldHandlerList[0] - fieldHandler1 = fieldHandlerList[1] - - # The addition can be done using field handler directly - addFieldHandler = xmed.calculator.add(fieldHandler0, fieldHandler1) - print addFieldHandler - - # Or with a field proxy that ease the writing of operations - fieldProxy0 = FieldProxy(fieldHandler0) - fieldProxy1 = FieldProxy(fieldHandler1) - - res = fieldProxy0 + fieldProxy1 - if res is None: return False - - return True - -def TEST_arithmetics(): - fieldProxy0 = FieldProxy(fieldHandlerList[0]) - fieldProxy1 = FieldProxy(fieldHandlerList[1]) - - # Standard operations where operandes are fields - res = fieldProxy0 + fieldProxy1 - if res is None: return False - res = fieldProxy0 - fieldProxy1 - if res is None: return False - res = fieldProxy0 * fieldProxy1 - if res is None: return False - res = fieldProxy0 / fieldProxy1 - - # Standard operations with scalar operandes - res = fieldProxy0 + 3.4 - if res is None: return False - res = 3.4 + fieldProxy0 - if res is None: return False - res = fieldProxy0 - 3.4 - if res is None: return False - res = 3.4 - fieldProxy0 - if res is None: return False - res = fieldProxy0 * 3.4 - if res is None: return False - res = 3.4 * fieldProxy0 - if res is None: return False - res = fieldProxy0 / 3.4 - if res is None: return False - res = 3.4 / fieldProxy0 - if res is None: return False - - return True - -def TEST_unary_operations(): - fieldProxy0 = FieldProxy(fieldHandlerList[0]) - - res = fieldProxy0.dup() - if res is None: return False - res = xmed.dup(fieldProxy0) - if res is None: return False - res = pow(fieldProxy0,2) - if res is None: return False - - return True - -def TEST_composition(): - # In this test, we combine operandes that are supposed - # to be compatible. We expect that no error occur. - fieldProxy0 = FieldProxy(fieldHandlerList[0]) - fieldProxy1 = FieldProxy(fieldHandlerList[1]) - - res = pow(fieldProxy0,2) + fieldProxy1 - if res is None: return False - - return True - -def TEST_litteral_equation(): - fieldProxy0 = FieldProxy(fieldHandlerList[0]) - res = fieldProxy0.ope("abs(u)^2") - if res is None: return False - return True - -def TEST_use_restriction(): - fieldProxy0 = FieldProxy(fieldHandlerList[0]) - res = fieldProxy0("c=1;g='toto'") - if res is None: return False - return True - -def TEST_modification_of_attributes(): - fieldProxy0 = FieldProxy(fieldHandlerList[0]) - id_ref = fieldProxy0.id - fieldname_ref = fieldProxy0.fieldname - meshname_ref = fieldProxy0.meshname - - # - # This operations are not allowed, or not that way - # - # This should print that it is not allowed: - fieldProxy0.id = id_ref+3 - if fieldProxy0.id != id_ref: - print "ERR: the id should be %d (%d found)"%(id_ref,fieldProxy0.id) - return False - # This should print that it must be done using the command update - fieldProxy0.fieldname = fieldname_ref+"toto" - if fieldProxy0.fieldname != fieldname_ref: - print "ERR: the fieldname should be %s (%s found)"%(fieldname_ref,fieldProxy0.fieldname) - return False - # This should print that it is not allowed: - fieldProxy0.meshname = meshname_ref+"titi" - if fieldProxy0.meshname != meshname_ref: - print "ERR: the meshname should be %s (%s found)"%(meshname_ref,fieldProxy0.meshname) - return False - - return True - -def TEST_update_metadata(): - fieldProxyRef = FieldProxy(fieldHandlerList[0]) - id = fieldProxyRef.id - - name_ref = "toto" - fieldProxyRef.update(name=name_ref) - - fieldProxyRes = xmed.get(id) - name_res = fieldProxyRes.fieldname - if name_res != name_ref: - print "ERR: the fieldname should be %s (%s found)"%(name_ref,name_res) - return False - return True - -# -# ============================================================= -# Unit tests -# ============================================================= -# -import unittest -from salome.kernel import pyunittester -class MyTestSuite(unittest.TestCase): - def test_addition(self): - result = pyunittester.execAndConvertExceptionToBoolean(TEST_addition) - self.assertTrue(result) - - def test_arithmetics(self): - result = pyunittester.execAndConvertExceptionToBoolean(TEST_arithmetics) - self.assertTrue(result) - - def test_unary_operations(self): - result = pyunittester.execAndConvertExceptionToBoolean(TEST_unary_operations) - self.assertTrue(result) - - def test_composition(self): - result = pyunittester.execAndConvertExceptionToBoolean(TEST_composition) - self.assertTrue(result) - - def test_litteral_equation(self): - result = pyunittester.execAndConvertExceptionToBoolean(TEST_litteral_equation) - self.assertTrue(result) - - def test_modification_of_attributes(self): - self.assertTrue(TEST_modification_of_attributes()) - - def test_update_metadata(self): - self.assertTrue(TEST_update_metadata()) - -def myunittests(): - pyunittester.run(MyTestSuite) - -def myusecases(): - TEST_addition() - #TEST_arithmetics() - #TEST_unary_operations() - #TEST_update_metadata() - #TEST_composition() - -if __name__ == "__main__": - #myusecases() - myunittests() - pass - diff --git a/src/MEDOP/tui/xmedpy/tests/test_xmed_uiEventListener.py b/src/MEDOP/tui/xmedpy/tests/test_xmed_uiEventListener.py deleted file mode 100644 index 751281f55..000000000 --- a/src/MEDOP/tui/xmedpy/tests/test_xmed_uiEventListener.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author : Guillaume Boulant (EDF) - -# This script can be used to test the event listener. Note that the -# event listener is a CORBA object created inside the XMED GUI and -# that it could be reached if and only if the XMED GUI is loaded -# first. -# -# Then two tests are defined: -# - First you can try to import and use this script in the python -# console while the XMED GUI is NOT loaded. Then you will check that -# the script detects that the event listener is not available. -# - Second you can try to import this script AFTER having load the -# XMED GUI. Then the test will be completed. -# - -import xmed -xmed.connectEventListener() - -if xmed.eventListener is None: - raise RuntimeError("The test must stop because the event listener is not defined") - -import MEDOP - -# We can first try to retrieve the IOR using the data manager (just -# for internal test because it's not required in the use cases) -print xmed.dataManager.getEventListenerIOR() -print xmed.dataManager.getEventListenerIOR() -print xmed.dataManager.getEventListenerIOR() -# Make it several time to check the memory releases. - -# We can then test the standard use case of the event listener -fieldHandler = MEDOP.FieldHandler(id = 0, - fieldname = "testfield", - meshname = "testmesh", - type = 0, - iteration = 0, - order = 0, - source = "test//:test_medEventListener.py") - -medEvent = MEDOP.MedEvent(type = MEDOP.EVENT_UPDATE_FIELD, - fieldid = fieldHandler.id) - -print fieldHandler -print medEvent - -xmed.eventListener.processMedEvent(medEvent) -print "Test completed" diff --git a/src/MEDOP/tui/xmedpy/tests/test_xmed_visualisation.py b/src/MEDOP/tui/xmedpy/tests/test_xmed_visualisation.py deleted file mode 100644 index 7789c48b3..000000000 --- a/src/MEDOP/tui/xmedpy/tests/test_xmed_visualisation.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# This file is a set of basic use case to test (from the python -# context) the functions developped in XMED and MED modules for the -# visualization of fields using VISU or PARAVIS. -# -# (gboulant - 6/7/2011) -# - -import xmed -from xmed import properties -from xmed.fieldproxy import FieldProxy - -# Load some test data in the MedDataManager -filepath = properties.testFilePath -fieldHandlerList = xmed.dataManager.addFieldsFromFile(filepath) - -def setup(): - """ - This function defines a set of field variable for quick tests in - the python console. You just have to execute the function to get - the variables defined in the global context. - """ - fh1=fieldHandlerList[0] - fh2=fieldHandlerList[1] - f1 = FieldProxy(fh1) - f2 = FieldProxy(fh2) - return fh1, fh2, f1, f2 - -# Setup for quick tests in the python console -fh1, fh2, f1, f2 = setup() - -def TEST_driver_visu(): - from xmed import fieldtools - fieldtools.view_using_visu(f1) - -if __name__ == "__main__": - TEST_driver_visu() -- 2.30.2