From 119972d3b17e16d0ab8d2431589597dc133dbd94 Mon Sep 17 00:00:00 2001 From: nadir Date: Fri, 3 Feb 2006 14:26:39 +0000 Subject: [PATCH] update with the version in the OCC branch OCC_development_generic_2006. --- adm_local/unix/make_commence.in | 1 + .../unix/config_files/check_boost.m4 | 22 +- doc/salome/tui/MED/doxyfile | 96 +- src/INTERPOLATION/Makefile.in | 4 +- src/MEDGUI/Makefile.in | 3 +- src/MEDMEM/Makefile.in | 4 +- src/MEDWrapper/Base/MED_Algorithm.cxx | 288 ++-- src/MEDWrapper/Base/MED_Algorithm.hxx | 99 +- src/MEDWrapper/Base/MED_Common.hxx | 176 +- src/MEDWrapper/Base/MED_CoordUtils.cxx | 160 ++ src/MEDWrapper/Base/MED_CoordUtils.hxx | 60 + src/MEDWrapper/Base/MED_GaussUtils.cxx | 1364 ++++++++++++++++ src/MEDWrapper/Base/MED_GaussUtils.hxx | 119 ++ src/MEDWrapper/Base/MED_SharedPtr.hxx | 102 ++ src/MEDWrapper/Base/MED_SliceArray.hxx | 136 ++ src/MEDWrapper/Base/MED_Structures.cxx | 491 ++++-- src/MEDWrapper/Base/MED_Structures.hxx | 517 ++++-- src/MEDWrapper/Base/MED_TStructures.hxx | 733 +++++---- src/MEDWrapper/Base/MED_TWrapper.hxx | 230 +-- src/MEDWrapper/Base/MED_Utilities.cxx | 10 +- src/MEDWrapper/Base/MED_Utilities.hxx | 5 +- src/MEDWrapper/Base/MED_Vector.hxx | 125 ++ src/MEDWrapper/Base/MED_Wrapper.cxx | 303 ++-- src/MEDWrapper/Base/MED_Wrapper.hxx | 436 ++++- src/MEDWrapper/Base/Makefile.in | 17 +- src/MEDWrapper/Factory/MED_Test.cxx | 210 +-- src/MEDWrapper/Factory/Makefile.in | 2 +- .../V2_1/{ => Core}/MED1cstring.cxx | 19 - .../V2_1/{ => Core}/MED2cstring.cxx | 19 - .../V2_1/{ => Core}/MEDGeometrieElement.cxx | 19 - .../V2_1/{ => Core}/MEDattrFermer.cxx | 19 - .../V2_1/{ => Core}/MEDattrNumEcrire.cxx | 19 - .../V2_1/{ => Core}/MEDattrNumLire.cxx | 19 - .../V2_1/{ => Core}/MEDattrOuvrir.cxx | 19 - .../V2_1/{ => Core}/MEDattrStringEcrire.cxx | 19 - .../V2_1/{ => Core}/MEDattrStringLire.cxx | 19 - .../V2_1/{ => Core}/MEDbodyFittedEcr.cxx | 19 - .../V2_1/{ => Core}/MEDbodyFittedLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDchampCr.cxx | 19 - .../V2_1/{ => Core}/MEDchampEcr.cxx | 19 - .../V2_1/{ => Core}/MEDchampInfo.cxx | 19 - .../V2_1/{ => Core}/MEDchampLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDconnEcr.cxx | 19 - .../V2_1/{ => Core}/MEDconnLire.cxx | 19 - .../V2_1/{ => Core}/MEDcoordEcr.cxx | 19 - .../V2_1/{ => Core}/MEDcoordLire.cxx | 19 - .../V2_1/{ => Core}/MEDcstringFree.cxx | 19 - .../V2_1/{ => Core}/MEDdatagroupCreer.cxx | 19 - .../V2_1/{ => Core}/MEDdatagroupFermer.cxx | 19 - .../V2_1/{ => Core}/MEDdatagroupOuvrir.cxx | 19 - .../V2_1/{ => Core}/MEDdatasetFermer.cxx | 19 - .../V2_1/{ => Core}/MEDdatasetNumEcrire.cxx | 51 +- .../V2_1/{ => Core}/MEDdatasetNumLire.cxx | 47 + .../V2_1/{ => Core}/MEDdatasetOuvrir.cxx | 19 - .../{ => Core}/MEDdatasetStringEcrire.cxx | 19 - .../V2_1/{ => Core}/MEDdatasetStringLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDdimLire.cxx | 19 - .../V2_1/{ => Core}/MEDelementsEcr.cxx | 19 - .../V2_1/{ => Core}/MEDelementsLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDequivCr.cxx | 19 - .../V2_1/{ => Core}/MEDequivEcr.cxx | 19 - .../V2_1/{ => Core}/MEDequivInfo.cxx | 19 - .../V2_1/{ => Core}/MEDequivLire.cxx | 19 - .../V2_1/{ => Core}/MEDfam2groA.cxx | 19 - .../V2_1/{ => Core}/MEDfam2groB.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDfamCr.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDfamEcr.cxx | 19 - .../V2_1/{ => Core}/MEDfamGridEcr.cxx | 19 - .../V2_1/{ => Core}/MEDfamGridLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDfamInfo.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDfamLire.cxx | 19 - .../V2_1/{ => Core}/MEDfamMaaCr.cxx | 19 - .../V2_1/{ => Core}/MEDfamMaaInfo.cxx | 19 - .../V2_1/{ => Core}/MEDfamMaaLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDfermer.cxx | 19 - .../V2_1/{ => Core}/MEDfichDesEcr.cxx | 19 - .../V2_1/{ => Core}/MEDfichEntete.cxx | 19 - .../V2_1/{ => Core}/MEDfichierCreer.cxx | 19 - .../V2_1/{ => Core}/MEDfichierFermer.cxx | 19 - .../V2_1/{ => Core}/MEDfichierOuvrir.cxx | 19 - .../V2_1/{ => Core}/MEDformatConforme.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDfstring.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDgridCr.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDgridEcr.cxx | 19 - .../V2_1/{ => Core}/MEDgridInfo.cxx | 19 - .../V2_1/{ => Core}/MEDgridLire.cxx | 19 - .../V2_1/{ => Core}/MEDgro2famA.cxx | 19 - .../V2_1/{ => Core}/MEDgro2famB.cxx | 19 - .../V2_1/{ => Core}/MEDindiceInfo.cxx | 19 - .../V2_1/{ => Core}/MEDindiceNum.cxx | 19 - .../V2_1/{ => Core}/MEDlFichDes.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDmaaCr.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDmaaInfo.cxx | 19 - .../{ => Core}/MEDmodeErreurVerrouiller.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnChamp.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnCorres.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnEntMaa.cxx | 19 - .../V2_1/{ => Core}/MEDnEntites.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnEquiv.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnFam.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnGrid.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnMaa.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnObjets.cxx | 19 - .../V2_1/{ => Core}/MEDnPasdetemps.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnProfil.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnVal.cxx | 19 - .../V2_1/{ => Core}/MEDnValProfil.cxx | 19 - .../V2_1/{ => Core}/MEDnbnoisEcr.cxx | 19 - .../V2_1/{ => Core}/MEDnbnoisLire.cxx | 19 - .../V2_1/{ => Core}/MEDnbnomaEcr.cxx | 19 - .../V2_1/{ => Core}/MEDnbnomaLire.cxx | 19 - .../V2_1/{ => Core}/MEDnbnosoEcr.cxx | 19 - .../V2_1/{ => Core}/MEDnbnosoLire.cxx | 19 - .../V2_1/{ => Core}/MEDnoeudsEcr.cxx | 19 - .../V2_1/{ => Core}/MEDnoeudsLire.cxx | 19 - .../V2_1/{ => Core}/MEDnomDataset.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnomEcr.cxx | 19 - .../V2_1/{ => Core}/MEDnomEntite.cxx | 19 - .../V2_1/{ => Core}/MEDnomGeometrie.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnomLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnumEcr.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDnumLire.cxx | 19 - .../V2_1/{ => Core}/MEDobjetIdentifer.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDouvrir.cxx | 19 - .../{ => Core}/MEDparametresGeometrie.cxx | 19 - .../V2_1/{ => Core}/MEDpasdetempsInfo.cxx | 19 - .../V2_1/{ => Core}/MEDprofilEcr.cxx | 19 - .../V2_1/{ => Core}/MEDprofilInfo.cxx | 19 - .../V2_1/{ => Core}/MEDprofilLire.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDunvCr.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/MEDunvLire.cxx | 19 - .../V2_1/{ => Core}/MEDversionConforme.cxx | 19 - .../V2_1/{ => Core}/MEDversionDonner.cxx | 19 - .../V2_1/{ => Core}/MEDversionLire.cxx | 19 - src/MEDWrapper/V2_1/Core/Makefile.in | 169 ++ src/MEDWrapper/V2_1/Core/hdf5_version2api.hxx | 45 + src/MEDWrapper/V2_1/{ => Core}/mdump_V2_1.cxx | 19 - src/MEDWrapper/V2_1/{ => Core}/med.hxx | 19 - src/MEDWrapper/V2_1/{ => Core}/med_hdfi.hxx | 19 - src/MEDWrapper/V2_1/{ => Core}/med_misc.hxx | 19 - src/MEDWrapper/V2_1/{ => Core}/med_outils.hxx | 19 - src/MEDWrapper/V2_1/{ => Core}/med_proto.hxx | 19 - src/MEDWrapper/V2_1/{ => Core}/med_utils.hxx | 19 - src/MEDWrapper/V2_1/{ => Core}/test1_V2_1.cxx | 19 - src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx | 947 ----------- src/MEDWrapper/V2_1/MED_V2_1_Wrapper.hxx | 188 --- src/MEDWrapper/V2_1/Makefile.in | 135 +- .../V2_1/Wrapper/MED_V2_1_Wrapper.cxx | 1211 ++++++++++++++ .../V2_1/Wrapper/MED_V2_1_Wrapper.hxx | 284 ++++ src/MEDWrapper/V2_1/Wrapper/Makefile.in | 56 + src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx | 1420 +++++++++++------ src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx | 151 +- 152 files changed, 7347 insertions(+), 5217 deletions(-) create mode 100644 src/MEDWrapper/Base/MED_CoordUtils.cxx create mode 100644 src/MEDWrapper/Base/MED_CoordUtils.hxx create mode 100644 src/MEDWrapper/Base/MED_GaussUtils.cxx create mode 100644 src/MEDWrapper/Base/MED_GaussUtils.hxx create mode 100644 src/MEDWrapper/Base/MED_SharedPtr.hxx create mode 100644 src/MEDWrapper/Base/MED_SliceArray.hxx create mode 100644 src/MEDWrapper/Base/MED_Vector.hxx rename src/MEDWrapper/V2_1/{ => Core}/MED1cstring.cxx (69%) rename src/MEDWrapper/V2_1/{ => Core}/MED2cstring.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDGeometrieElement.cxx (69%) rename src/MEDWrapper/V2_1/{ => Core}/MEDattrFermer.cxx (61%) rename src/MEDWrapper/V2_1/{ => Core}/MEDattrNumEcrire.cxx (80%) rename src/MEDWrapper/V2_1/{ => Core}/MEDattrNumLire.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDattrOuvrir.cxx (62%) rename src/MEDWrapper/V2_1/{ => Core}/MEDattrStringEcrire.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDattrStringLire.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDbodyFittedEcr.cxx (83%) rename src/MEDWrapper/V2_1/{ => Core}/MEDbodyFittedLire.cxx (76%) rename src/MEDWrapper/V2_1/{ => Core}/MEDchampCr.cxx (73%) rename src/MEDWrapper/V2_1/{ => Core}/MEDchampEcr.cxx (90%) rename src/MEDWrapper/V2_1/{ => Core}/MEDchampInfo.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDchampLire.cxx (86%) rename src/MEDWrapper/V2_1/{ => Core}/MEDconnEcr.cxx (82%) rename src/MEDWrapper/V2_1/{ => Core}/MEDconnLire.cxx (82%) rename src/MEDWrapper/V2_1/{ => Core}/MEDcoordEcr.cxx (77%) rename src/MEDWrapper/V2_1/{ => Core}/MEDcoordLire.cxx (78%) rename src/MEDWrapper/V2_1/{ => Core}/MEDcstringFree.cxx (60%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatagroupCreer.cxx (61%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatagroupFermer.cxx (60%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatagroupOuvrir.cxx (61%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatasetFermer.cxx (60%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatasetNumEcrire.cxx (88%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatasetNumLire.cxx (88%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatasetOuvrir.cxx (61%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatasetStringEcrire.cxx (74%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdatasetStringLire.cxx (67%) rename src/MEDWrapper/V2_1/{ => Core}/MEDdimLire.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDelementsEcr.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDelementsLire.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDequivCr.cxx (71%) rename src/MEDWrapper/V2_1/{ => Core}/MEDequivEcr.cxx (79%) rename src/MEDWrapper/V2_1/{ => Core}/MEDequivInfo.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDequivLire.cxx (76%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfam2groA.cxx (89%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfam2groB.cxx (89%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamCr.cxx (84%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamEcr.cxx (80%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamGridEcr.cxx (67%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamGridLire.cxx (67%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamInfo.cxx (82%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamLire.cxx (77%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamMaaCr.cxx (71%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamMaaInfo.cxx (64%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfamMaaLire.cxx (65%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfermer.cxx (58%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfichDesEcr.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfichEntete.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfichierCreer.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfichierFermer.cxx (59%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfichierOuvrir.cxx (65%) rename src/MEDWrapper/V2_1/{ => Core}/MEDformatConforme.cxx (57%) rename src/MEDWrapper/V2_1/{ => Core}/MEDfstring.cxx (62%) rename src/MEDWrapper/V2_1/{ => Core}/MEDgridCr.cxx (71%) rename src/MEDWrapper/V2_1/{ => Core}/MEDgridEcr.cxx (79%) rename src/MEDWrapper/V2_1/{ => Core}/MEDgridInfo.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDgridLire.cxx (71%) rename src/MEDWrapper/V2_1/{ => Core}/MEDgro2famA.cxx (90%) rename src/MEDWrapper/V2_1/{ => Core}/MEDgro2famB.cxx (92%) rename src/MEDWrapper/V2_1/{ => Core}/MEDindiceInfo.cxx (64%) rename src/MEDWrapper/V2_1/{ => Core}/MEDindiceNum.cxx (64%) rename src/MEDWrapper/V2_1/{ => Core}/MEDlFichDes.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDmaaCr.cxx (70%) rename src/MEDWrapper/V2_1/{ => Core}/MEDmaaInfo.cxx (67%) rename src/MEDWrapper/V2_1/{ => Core}/MEDmodeErreurVerrouiller.cxx (57%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnChamp.cxx (71%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnCorres.cxx (73%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnEntMaa.cxx (78%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnEntites.cxx (75%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnEquiv.cxx (61%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnFam.cxx (75%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnGrid.cxx (82%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnMaa.cxx (56%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnObjets.cxx (63%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnPasdetemps.cxx (69%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnProfil.cxx (56%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnVal.cxx (73%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnValProfil.cxx (65%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnbnoisEcr.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnbnoisLire.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnbnomaEcr.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnbnomaLire.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnbnosoEcr.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnbnosoLire.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnoeudsEcr.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnoeudsLire.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnomDataset.cxx (69%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnomEcr.cxx (78%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnomEntite.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnomGeometrie.cxx (75%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnomLire.cxx (75%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnumEcr.cxx (80%) rename src/MEDWrapper/V2_1/{ => Core}/MEDnumLire.cxx (77%) rename src/MEDWrapper/V2_1/{ => Core}/MEDobjetIdentifer.cxx (65%) rename src/MEDWrapper/V2_1/{ => Core}/MEDouvrir.cxx (67%) rename src/MEDWrapper/V2_1/{ => Core}/MEDparametresGeometrie.cxx (78%) rename src/MEDWrapper/V2_1/{ => Core}/MEDpasdetempsInfo.cxx (77%) rename src/MEDWrapper/V2_1/{ => Core}/MEDprofilEcr.cxx (74%) rename src/MEDWrapper/V2_1/{ => Core}/MEDprofilInfo.cxx (67%) rename src/MEDWrapper/V2_1/{ => Core}/MEDprofilLire.cxx (69%) rename src/MEDWrapper/V2_1/{ => Core}/MEDunvCr.cxx (75%) rename src/MEDWrapper/V2_1/{ => Core}/MEDunvLire.cxx (66%) rename src/MEDWrapper/V2_1/{ => Core}/MEDversionConforme.cxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/MEDversionDonner.cxx (56%) rename src/MEDWrapper/V2_1/{ => Core}/MEDversionLire.cxx (65%) create mode 100644 src/MEDWrapper/V2_1/Core/Makefile.in create mode 100644 src/MEDWrapper/V2_1/Core/hdf5_version2api.hxx rename src/MEDWrapper/V2_1/{ => Core}/mdump_V2_1.cxx (98%) rename src/MEDWrapper/V2_1/{ => Core}/med.hxx (85%) rename src/MEDWrapper/V2_1/{ => Core}/med_hdfi.hxx (80%) rename src/MEDWrapper/V2_1/{ => Core}/med_misc.hxx (68%) rename src/MEDWrapper/V2_1/{ => Core}/med_outils.hxx (80%) rename src/MEDWrapper/V2_1/{ => Core}/med_proto.hxx (92%) rename src/MEDWrapper/V2_1/{ => Core}/med_utils.hxx (86%) rename src/MEDWrapper/V2_1/{ => Core}/test1_V2_1.cxx (72%) delete mode 100644 src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx delete mode 100644 src/MEDWrapper/V2_1/MED_V2_1_Wrapper.hxx create mode 100644 src/MEDWrapper/V2_1/Wrapper/MED_V2_1_Wrapper.cxx create mode 100644 src/MEDWrapper/V2_1/Wrapper/MED_V2_1_Wrapper.hxx create mode 100644 src/MEDWrapper/V2_1/Wrapper/Makefile.in diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 5b55b4a9e..292633657 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -41,6 +41,7 @@ CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@ # BOOST Library BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ # JAVA diff --git a/adm_local_without_kernel/unix/config_files/check_boost.m4 b/adm_local_without_kernel/unix/config_files/check_boost.m4 index 215ce8cf5..c77edba5d 100644 --- a/adm_local_without_kernel/unix/config_files/check_boost.m4 +++ b/adm_local_without_kernel/unix/config_files/check_boost.m4 @@ -28,6 +28,10 @@ AC_LANG_CPLUSPLUS AC_SUBST(BOOST_CPPFLAGS) BOOST_CPPFLAGS="" + +AC_SUBST(BOOST_LIBS) +BOOST_LIBS="" + boost_ok=no if test -z ${BOOSTDIR}; then @@ -37,17 +41,31 @@ if test -z ${BOOSTDIR}; then fi else AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR}) - AC_CHECKING(for boost/shared_ptr.hpp header file) + dnl BOOST headers + AC_CHECKING(for boost/shared_ptr.hpp header file) CPPFLAGS_old="${CPPFLAGS}" - BOOST_CPPFLAGS="-I${BOOSTDIR}" + BOOST_CPPFLAGS="-I${BOOSTDIR}/include" CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}" AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no) CPPFLAGS="${CPPFLAGS_old}" + + if test "x${boost_ok}" = "xyes" ; then + AC_MSG_RESULT(\$BOOST_CPPFLAGS = ${BOOST_CPPFLAGS}) + dnl BOOST libs + AC_CHECKING(for libboost_thread-mt.so library file) + AC_CHECK_FILE(${BOOSTDIR}/lib/libboost_thread-mt.so,boost_ok=yes,boost_ok=no) + if test "x${boost_ok}" = "xyes" ; then + BOOST_LIBS="-L${BOOSTDIR}/lib" + AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS}) + fi + fi fi +AC_MSG_RESULT(for boost: $boost_ok) + AC_LANG_RESTORE ])dnl diff --git a/doc/salome/tui/MED/doxyfile b/doc/salome/tui/MED/doxyfile index 7dfdb20b6..91bd757f2 100755 --- a/doc/salome/tui/MED/doxyfile +++ b/doc/salome/tui/MED/doxyfile @@ -1,74 +1,89 @@ -# Doxyfile 1.3-rc1 +# Doxyfile 1.3.7 #--------------------------------------------------------------------------- -# General configuration options +# Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = "SALOME - MED - v.3.1.0" PROJECT_NUMBER = id#1.1 OUTPUT_DIRECTORY = ../ +CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = NO +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 5 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = YES +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- EXTRACT_ALL = YES EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES -SHORT_NAMES = NO HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES INLINE_INFO = YES SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 5 +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES -ALIASES = ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 25 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = YES SHOW_USED_FILES = NO + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = log.txt + #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ../../../share/salome/idl/MED.idl \ - ../../../share/salome/idl/MED_Gen.idl -FILE_PATTERNS = -RECURSIVE = NO +INPUT = ../../../share/salome/src \ + ../../../share/salome/idl +FILE_PATTERNS = *.idl *.h *.hh *.hxx *.c *.cc *.cxx *.ixx *.jxx +RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO +EXAMPLE_RECURSIVE = YES IMAGE_PATH = sources/ INPUT_FILTER = FILTER_SOURCE_FILES = YES + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- @@ -77,12 +92,15 @@ INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = YES +VERBATIM_HEADERS = YES + #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = + #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- @@ -103,6 +121,7 @@ DISABLE_INDEX = YES ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -117,6 +136,8 @@ LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- @@ -126,6 +147,7 @@ COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = + #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- @@ -133,16 +155,21 @@ GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO + #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO +XML_OUTPUT = xml XML_SCHEMA = XML_DTD = +XML_PROGRAMLISTING = YES + #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO + #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- @@ -150,6 +177,7 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = + #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- @@ -162,14 +190,16 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = NO + #--------------------------------------------------------------------------- -# Configuration::addtions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl + #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- @@ -178,24 +208,22 @@ HIDE_UNDOC_RELATIONS = NO HAVE_DOT = YES CLASS_GRAPH = YES COLLABORATION_GRAPH = NO +UML_LOOK = NO TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = NO +CALL_GRAPH = NO GRAPHICAL_HIERARCHY = YES DOT_IMAGE_FORMAT = jpg DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1200 +MAX_DOT_GRAPH_DEPTH = 0 GENERATE_LEGEND = NO DOT_CLEANUP = YES + #--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = diff --git a/src/INTERPOLATION/Makefile.in b/src/INTERPOLATION/Makefile.in index da0fbfd98..7e566ea9d 100644 --- a/src/INTERPOLATION/Makefile.in +++ b/src/INTERPOLATION/Makefile.in @@ -82,10 +82,10 @@ UseCaseWrapper_Maillage CPPFLAGS+=-U_DEBUG_ $(MED2_INCLUDES) $(HDF5_INCLUDES) -I../ CXXFLAGS+=-U_DEBUG_ @CXXTMPDPTHFLAGS@ #LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -LDFLAGS+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lMEDWrapper_V2_1 +LDFLAGS+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lmed_V2_1 #LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS) -L../.libs -lmedmem -LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -L../.libs -lmedmem -lMEDWrapper_V2_1 -lMEDWrapperBase +LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -L../.libs -lmedmem -lmed_V2_1 ifeq ($(MED_WITH_KERNEL),yes) CPPFLAGS+= -I${KERNEL_ROOT_DIR}/include/salome diff --git a/src/MEDGUI/Makefile.in b/src/MEDGUI/Makefile.in index 94abc038e..f6fdb6d63 100644 --- a/src/MEDGUI/Makefile.in +++ b/src/MEDGUI/Makefile.in @@ -58,8 +58,7 @@ LIB_SERVER_IDL = # additionnal information to compil and link file -CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome -I${BOOSTDIR} -LDFLAGS += -lSalomeApp -lMEDMEMImpl -lmedmem -lMEDEngine -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome -I${BOOSTDIR} +CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome ${BOOST_CPPFLAGS} LDFLAGS += -lSalomeApp -lMEDMEMImpl -lmedmem -lMEDEngine -L${KERNEL_ROOT_DIR}/lib/salome -L${GUI_ROOT_DIR}/lib/salome diff --git a/src/MEDMEM/Makefile.in b/src/MEDMEM/Makefile.in index 1a4f7957d..52aa6dd6b 100644 --- a/src/MEDMEM/Makefile.in +++ b/src/MEDMEM/Makefile.in @@ -158,11 +158,11 @@ CPPFLAGS+=$(MED2_INCLUDES) $(HDF5_INCLUDES) CXXFLAGS+=@CXXTMPDPTHFLAGS@ #LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) # change motivated by the bug KERNEL4778. -LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lMEDWrapper_V2_1 $(STDLIB) +LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmed_V2_1 $(STDLIB) #LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS) # change motivated by the bug KERNEL4778. -LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lMEDWrapper_V2_1 -lMEDWrapperBase +LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lmed_V2_1 ifeq ($(MED_WITH_KERNEL),yes) CPPFLAGS+= -I${KERNEL_ROOT_DIR}/include/salome diff --git a/src/MEDWrapper/Base/MED_Algorithm.cxx b/src/MEDWrapper/Base/MED_Algorithm.cxx index 59dd4e54e..6f523efec 100644 --- a/src/MEDWrapper/Base/MED_Algorithm.cxx +++ b/src/MEDWrapper/Base/MED_Algorithm.cxx @@ -27,84 +27,90 @@ // $Header$ #include "MED_Algorithm.hxx" +#include "MED_Wrapper.hxx" + #include "MED_Utilities.hxx" #ifdef _DEBUG_ static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; #else static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; #endif -namespace MED{ +namespace MED +{ //--------------------------------------------------------------- - TElemGroup - GetElemsByEntity(TWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo) + TEntity2TGeom2ElemInfo + GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo) { MSG(MYDEBUG,"GetElemsByEntity(...)"); - TElemGroup aGroup; + TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo; MED::TEntityInfo::const_iterator anIter = theEntityInfo.begin(); for(; anIter != theEntityInfo.end(); anIter++){ const EEntiteMaillage& anEntity = anIter->first; - const MED::TGeom& aGeom = anIter->second; - TElemMap& anElemMap = aGroup[anEntity]; + const TGeom2Size& aGeom2Size = anIter->second; + TGeom2ElemInfo& aGeom2ElemInfo = anEntity2TGeom2ElemInfo[anEntity]; if(anEntity == eNOEUD){ - anElemMap[ePOINT1] = theWrapper.GetPNodeInfo(theMeshInfo); + aGeom2ElemInfo[ePOINT1] = theWrapper->GetPNodeInfo(theMeshInfo); continue; } - MED::TGeom::const_iterator anGeomIter = aGeom.begin(); - for(; anGeomIter != aGeom.end(); anGeomIter++){ - const EGeometrieElement& aGeo = anGeomIter->first; - switch(aGeo){ + TGeom2Size::const_iterator anIter2 = aGeom2Size.begin(); + for(; anIter2 != aGeom2Size.end(); anIter2++){ + const EGeometrieElement& aGeom = anIter2->first; + switch(aGeom){ case ePOLYGONE: { - anElemMap[ePOLYGONE] = theWrapper.GetPPolygoneInfo(theMeshInfo,anEntity,aGeo); + aGeom2ElemInfo[ePOLYGONE] = theWrapper->GetPPolygoneInfo(theMeshInfo,anEntity,aGeom); break; } case ePOLYEDRE: { - anElemMap[ePOLYEDRE] = theWrapper.GetPPolyedreInfo(theMeshInfo,anEntity,aGeo); + aGeom2ElemInfo[ePOLYEDRE] = theWrapper->GetPPolyedreInfo(theMeshInfo,anEntity,aGeom); break; } default: { - anElemMap[aGeo] = theWrapper.GetPCellInfo(theMeshInfo,anEntity,aGeo); + aGeom2ElemInfo[aGeom] = theWrapper->GetPCellInfo(theMeshInfo,anEntity,aGeom); }} } } ADDMSG(MYDEBUG,"\n"); - return aGroup; + return anEntity2TGeom2ElemInfo; } //--------------------------------------------------------------- - TFamilyGroup - GetFamilies(TWrapper& theWrapper, - const PMeshInfo& theMeshInfo) + TFamilyInfoSet + GetFamilyInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo) { MSG(MYDEBUG,"GetFamilies(...)"); TErr anErr; - TFamilyGroup aGroup; - TInt aNbFam = theWrapper.GetNbFamilies(*theMeshInfo); + TFamilyInfoSet aFamilyInfoSet; + TInt aNbFam = theWrapper->GetNbFamilies(*theMeshInfo); INITMSG(MYDEBUG,"GetNbFamilies() = "<GetPFamilyInfo(theMeshInfo,iFam,&anErr); if(anErr >= 0) - aGroup.insert(aFamilyInfo); + aFamilyInfoSet.insert(aFamilyInfo); } ADDMSG(MYDEBUG,"\n"); - return aGroup; + return aFamilyInfoSet; } - TGroupInfo - GetFamiliesByGroup(const TFamilyGroup& theGroupInfo) + //--------------------------------------------------------------- + TGroupInfo + GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet) { MSG(MYDEBUG,"GetFamiliesByGroup(...)"); TGroupInfo aGroup; - TFamilyGroup::const_iterator anIter = theGroupInfo.begin(); - for(; anIter != theGroupInfo.end(); anIter++){ + TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); + for(; anIter != theFamilyInfoSet.end(); anIter++){ const PFamilyInfo& aFamilyInfo = *anIter; TInt aNbGroup = aFamilyInfo->GetNbGroup(); for(TInt iGroup = 0; iGroup < aNbGroup; iGroup++){ @@ -116,11 +122,11 @@ namespace MED{ if(MYDEBUG){ TGroupInfo::const_iterator anIter = aGroup.begin(); for(; anIter != aGroup.end(); anIter++){ - string aName = anIter->first; + const std::string& aName = anIter->first; INITMSG(MYDEBUG,"aGroupName = '"<second; - TFamilyGroup::const_iterator anFamIter = aFamilyGroup.begin(); - for(; anFamIter != aFamilyGroup.end(); anFamIter++){ + const TFamilyInfoSet& aFamilyInfoSet = anIter->second; + TFamilyInfoSet::const_iterator anFamIter = aFamilyInfoSet.begin(); + for(; anFamIter != aFamilyInfoSet.end(); anFamIter++){ const PFamilyInfo& aFamilyInfo = *anFamIter; INITMSG(MYDEBUG,"aFamilyName = '"<GetName()<<"'\n"); } @@ -134,106 +140,119 @@ namespace MED{ //--------------------------------------------------------------- - TTimeStampGroup - GetFieldsByEntity(TWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo) + TFieldInfo2TimeStampInfoSet + GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo) { MSG(MYDEBUG,"GetFieldsByEntity(...)"); - TTimeStampGroup aGroup; - TInt aNbFields = theWrapper.GetNbFields(); + TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet; + TInt aNbFields = theWrapper->GetNbFields(); INITMSG(MYDEBUG,"GetNbFields() = "<GetPFieldInfo(theMeshInfo,iField); INITMSG(MYDEBUG,"aFieldName = '"<GetName()<< "'; aNbComp = "<GetNbComp()<<"; "); - MED::TGeom aGeom; + TGeom2Size aGeom2Size; EEntiteMaillage anEntity = EEntiteMaillage(-1); - TInt aNbTimeStamps = theWrapper.GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom); + TInt aNbTimeStamps = theWrapper->GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom2Size); ADDMSG(MYDEBUG,"anEntity = "<GetUnitDt() - <<"\', aNbGauss = "<GetNbGauss()<<"\n"); + theWrapper->GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp); + aFieldInfo2TimeStampInfoSet[aFieldInfo].insert(aTimeStamp); + INITMSG(MYDEBUG, + "aDt = "<GetDt()<< + ", Unit = \'"<GetUnitDt()<<"\n"); } } ADDMSG(MYDEBUG,"\n"); - return aGroup; + return aFieldInfo2TimeStampInfoSet; } - TFieldGroup - GetFieldsByEntity(const TTimeStampGroup& theTimeStampGroup) + //--------------------------------------------------------------- + TEntite2TFieldInfo2TimeStampInfoSet + GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet) { - TFieldGroup aGroup; - TTimeStampGroup::const_iterator anIter = theTimeStampGroup.begin(); - for(; anIter != theTimeStampGroup.end(); anIter++){ + TEntite2TFieldInfo2TimeStampInfoSet anEntite2TFieldInfo2TimeStampInfoSet; + TFieldInfo2TimeStampInfoSet::const_iterator anIter = theFieldInfo2TimeStampInfoSet.begin(); + for(; anIter != theFieldInfo2TimeStampInfoSet.end(); anIter++){ + const TTimeStampInfoSet& aTimeStampInfoSet = anIter->second; //const PFieldInfo& aFieldInfo = anIter->first; - const TTimeStampSet& aTimeStampSet = anIter->second; - if(aTimeStampSet.empty()) continue; - const PTimeStampInfo& aTimeStampInfo = *aTimeStampSet.begin(); - aGroup[aTimeStampInfo->GetEntity()].insert(*anIter); + if(aTimeStampInfoSet.empty()) + continue; + const PTimeStampInfo& aTimeStampInfo = *aTimeStampInfoSet.begin(); + anEntite2TFieldInfo2TimeStampInfoSet[aTimeStampInfo->GetEntity()].insert(*anIter); } - return aGroup; + return anEntite2TFieldInfo2TimeStampInfoSet; } - TFamilyByEntity - GetFamiliesByEntity(TWrapper& theWrapper, - const TElemGroup& theElemGroup, - const TFamilyGroup& theFamilyGroup) + //--------------------------------------------------------------- + bool + operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight) + { + const MED::PFamilyInfo& aLeftInfo = boost::get<0>(theLeft); + const MED::PFamilyInfo& aRightInfo = boost::get<0>(theRight); + return aLeftInfo->GetId() < aRightInfo->GetId(); + } + + + //--------------------------------------------------------------- + TEntity2FamilySet + GetEntity2FamilySet(const PWrapper& theWrapper, + const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, + const TFamilyInfoSet& theFamilyInfoSet) { MSG(MYDEBUG,"GetFamiliesByEntity(...)"); - TFamilyByEntity aFamilyByEntity; + TEntity2FamilySet anEntity2FamilySet; - typedef map TFamilyByIdMap; - TFamilyByIdMap aFamilyByIdMap; - TFamilyGroup::const_iterator anIter = theFamilyGroup.begin(); - for(; anIter != theFamilyGroup.end(); anIter++){ + typedef map TId2Family; + TId2Family anId2Family; + TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); + for(; anIter != theFamilyInfoSet.end(); anIter++){ const PFamilyInfo& aFamilyInfo = *anIter; - aFamilyByIdMap.insert(TFamilyByIdMap::value_type(aFamilyInfo->GetId(),aFamilyInfo)); + anId2Family.insert(TId2Family::value_type(aFamilyInfo->GetId(),aFamilyInfo)); } - if(!aFamilyByIdMap.empty()){ - typedef set TFamilyIdSet; - typedef map TFamilyIdByEntity; - TFamilyIdByEntity aFamilyIdByEntity; + if(!anId2Family.empty()){ + typedef std::map TFamilyID2Size; + typedef map TEntity2FamilyID; + TEntity2FamilyID anEntity2FamilyID; - if(!theElemGroup.empty()){ - TElemGroup::const_iterator anIter = theElemGroup.begin(); - for(; anIter != theElemGroup.end(); anIter++){ + if(!theEntity2TGeom2ElemInfo.empty()){ + TEntity2TGeom2ElemInfo::const_iterator anIter = theEntity2TGeom2ElemInfo.begin(); + for(; anIter != theEntity2TGeom2ElemInfo.end(); anIter++){ const EEntiteMaillage& anEntity = anIter->first; - TFamilyIdSet& aFamilyIdSet = aFamilyIdByEntity[anEntity]; - const TElemMap& anElemMap = anIter->second; - TElemMap::const_iterator anElemIter = anElemMap.begin(); - for(; anElemIter != anElemMap.end(); anElemIter++){ - const PElemInfo& aElemInfo = anElemIter->second; + TFamilyID2Size& aFamilyID2Size = anEntity2FamilyID[anEntity]; + const TGeom2ElemInfo& aGeom2ElemInfo = anIter->second; + TGeom2ElemInfo::const_iterator aGeom2ElemInfoIter = aGeom2ElemInfo.begin(); + for(; aGeom2ElemInfoIter != aGeom2ElemInfo.end(); aGeom2ElemInfoIter++){ + const PElemInfo& aElemInfo = aGeom2ElemInfoIter->second; if(TInt aNbElem = aElemInfo->GetNbElem()){ for(TInt i = 0; i < aNbElem; i++){ - aFamilyIdSet.insert(aElemInfo->GetFamNum(i)); + aFamilyID2Size[aElemInfo->GetFamNum(i)] += 1; } } } } } - if(!aFamilyIdByEntity.empty()){ - TFamilyIdByEntity::const_iterator anIter = aFamilyIdByEntity.begin(); - for(; anIter != aFamilyIdByEntity.end(); anIter++){ + if(!anEntity2FamilyID.empty()){ + TEntity2FamilyID::const_iterator anIter = anEntity2FamilyID.begin(); + for(; anIter != anEntity2FamilyID.end(); anIter++){ const EEntiteMaillage& anEntity = anIter->first; INITMSG(MYDEBUG,"anEntity = "<second; - TFamilyIdSet::const_iterator anFamilyIdIter = aFamilyIdSet.begin(); - for(; anFamilyIdIter != aFamilyIdSet.end(); anFamilyIdIter++){ - const TInt& aFamilyId = *anFamilyIdIter; - TFamilyByIdMap::const_iterator - anFamilyByIdMapIter = aFamilyByIdMap.find(aFamilyId); - if(anFamilyByIdMapIter != aFamilyByIdMap.end()){ - const PFamilyInfo& aFamilyInfo = anFamilyByIdMapIter->second; - aFamilyByEntity[anEntity].insert(aFamilyInfo); + const TFamilyID2Size& aFamilyID2Size = anIter->second; + TFamilyID2Size::const_iterator anIter2 = aFamilyID2Size.begin(); + for(; anIter2 != aFamilyID2Size.end(); anIter2++){ + TInt anId = anIter2->first; + TInt aSize = anIter2->second; + TId2Family::const_iterator anIter3 = anId2Family.find(anId); + if(anIter3 != anId2Family.end()){ + const PFamilyInfo& aFamilyInfo = anIter3->second; + anEntity2FamilySet[anEntity].insert(TFamilyTSize(aFamilyInfo,aSize)); INITMSG(MYDEBUG, "aFamilyName = '"<GetName()<< "' anId = "<GetId()<<"\n"); @@ -243,7 +262,88 @@ namespace MED{ } } ADDMSG(MYDEBUG,"\n"); - return aFamilyByEntity; + return anEntity2FamilySet; } + + //--------------------------------------------------------------- + TKey2Gauss + GetKey2Gauss(const PWrapper& theWrapper, + TErr* theErr, + EModeSwitch theMode) + { + INITMSG(MYDEBUG,"GetKey2Gauss - theMode = "<GetNbGauss(theErr); + for(TInt anId = 1; anId <= aNbGauss; anId++){ + TGaussInfo::TInfo aPreInfo = theWrapper->GetGaussPreInfo(anId); + PGaussInfo anInfo = theWrapper->CrGaussInfo(aPreInfo,theMode); + theWrapper->GetGaussInfo(anId,anInfo,theErr); + TGaussInfo::TKey aKey = boost::get<0>(aPreInfo); + aKey2Gauss[aKey] = anInfo; + +#ifdef _DEBUG_ + const EGeometrieElement& aGeom = boost::get<0>(aKey); + const std::string& aName = boost::get<1>(aKey); + INITMSG(MYDEBUG, + "- aGeom = "<GetNbProfiles(theErr); + for(TInt anId = 1; anId <= aNbProfiles; anId++){ + TProfileInfo::TInfo aPreInfo = theWrapper->GetProfilePreInfo(anId); + const std::string& aName = boost::get<0>(aPreInfo); + if(aName == theProfileName) + return theWrapper->GetPProfileInfo(anId,theMode,theErr); + } + return anInfo; + } + + + //--------------------------------------------------------------- + TMKey2Profile + GetMKey2Profile(const PWrapper& theWrapper, + TErr* theErr, + EModeProfil theMode) + { + INITMSG(MYDEBUG,"GetMKey2Profile - theMode = "<GetNbProfiles(theErr); + for(TInt anId = 1; anId <= aNbProfiles; anId++){ + TProfileInfo::TInfo aPreInfo = theWrapper->GetProfilePreInfo(anId); + PProfileInfo anInfo = theWrapper->GetPProfileInfo(anId,theMode,theErr); + const std::string& aName = boost::get<0>(aPreInfo); + aKey2Profile[aName] = anInfo; + +#ifdef _DEBUG_ + INITMSG(MYDEBUG, + "- aName = '"<myElemNum.size(); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG,endl); +#endif + + } + return TMKey2Profile(theMode,aKey2Profile); + } + } diff --git a/src/MEDWrapper/Base/MED_Algorithm.hxx b/src/MEDWrapper/Base/MED_Algorithm.hxx index d688f5135..e53380602 100644 --- a/src/MEDWrapper/Base/MED_Algorithm.hxx +++ b/src/MEDWrapper/Base/MED_Algorithm.hxx @@ -30,55 +30,104 @@ #define MED_Algorithm_HeaderFile #include "MED_Structures.hxx" -#include "MED_Wrapper.hxx" #include -namespace MED{ +namespace MED +{ //--------------------------------------------------------------- - typedef std::map TElemMap; - typedef std::map TElemGroup; + typedef std::map TGeom2ElemInfo; + typedef std::map TEntity2TGeom2ElemInfo; - TElemGroup GetElemsByEntity(TWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo); + //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY + TEntity2TGeom2ElemInfo + GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo); //--------------------------------------------------------------- - typedef std::set TFamilyGroup; - - TFamilyGroup GetFamilies(TWrapper& theWrapper, - const PMeshInfo& theMeshInfo); + typedef std::set TFamilyInfoSet; + //! Read set of MED FAMILIES for defined MED file + TFamilyInfoSet + GetFamilyInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo); + //--------------------------------------------------------------- - typedef std::map TFamilyByEntity; - - TFamilyByEntity GetFamiliesByEntity(TWrapper& theWrapper, - const TElemGroup& theElemGroup, - const TFamilyGroup& theFamilyGroup); + typedef boost::tuple TFamilyTSize; + + bool + operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight); + typedef std::set TFamilyTSizeSet; //--------------------------------------------------------------- - typedef std::map TGroupInfo; + typedef std::map TEntity2FamilySet; + + //! Split set of MED FAMILIES by corresponding MED ENTITY + TEntity2FamilySet + GetEntity2FamilySet(const PWrapper& theWrapper, + const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, + const TFamilyInfoSet& theFamilyInfoSet); - TGroupInfo GetFamiliesByGroup(const TFamilyGroup& theGroupInfo); + //--------------------------------------------------------------- + typedef std::map TGroupInfo; + + //! Split the input set of MED FAMILIES by corresponding MED GROUPS + TGroupInfo + GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet); + //--------------------------------------------------------------- - typedef std::set TTimeStampSet; - typedef std::map TTimeStampGroup; + typedef std::set TTimeStampInfoSet; + typedef std::map TFieldInfo2TimeStampInfoSet; + + //! Read set of MED TIMESTAMPS groupped by corresponding MED FIELDS + TFieldInfo2TimeStampInfoSet + GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo); + + + //--------------------------------------------------------------- + typedef std::map TEntite2TFieldInfo2TimeStampInfoSet; + + //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES + TEntite2TFieldInfo2TimeStampInfoSet + GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet); - TTimeStampGroup GetFieldsByEntity(TWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo); + + //--------------------------------------------------------------- + typedef std::map TKey2Gauss; + + //! Read set of MED GAUSS + TKey2Gauss + GetKey2Gauss(const PWrapper& theWrapper, + TErr* theErr = NULL, + EModeSwitch theMode = eFULL_INTERLACE); //--------------------------------------------------------------- - typedef std::map TFieldGroup; + //! Get MED PROFILE by its name + PProfileInfo + GetProfileInfo(const PWrapper& theWrapper, + const std::string& theProfileName, + TErr* theErr = NULL, + EModeProfil theMode = eCOMPACT); - TFieldGroup GetFieldsByEntity(const TTimeStampGroup& theTimeStampGroup); + //--------------------------------------------------------------- + typedef std::map TKey2Profile; + typedef boost::tuple TMKey2Profile; + + //! Read set of MED PROFILES + TMKey2Profile + GetMKey2Profile(const PWrapper& theWrapper, + TErr* theErr = NULL, + EModeProfil theMode = eCOMPACT); } #endif diff --git a/src/MEDWrapper/Base/MED_Common.hxx b/src/MEDWrapper/Base/MED_Common.hxx index 279489642..f659a8fc2 100644 --- a/src/MEDWrapper/Base/MED_Common.hxx +++ b/src/MEDWrapper/Base/MED_Common.hxx @@ -29,125 +29,27 @@ #ifndef MED_Common_HeaderFile #define MED_Common_HeaderFile -#include -#include -#include #include #include #include -extern "C"{ +extern "C" +{ #include } -#include +#include #include "SALOMEconfig.h" +#include "MED_Vector.hxx" +#include "MED_SharedPtr.hxx" +#include "MED_SliceArray.hxx" + namespace MED{ enum EVersion {eVUnknown = -1, eV2_1, eV2_2}; - - template class SharedPtr: public boost::shared_ptr - { - public: - SharedPtr() {} - - template - explicit SharedPtr(Y * p): - boost::shared_ptr(p) - {} - - template - SharedPtr(SharedPtr const & r): - boost::shared_ptr(r,boost::detail::polymorphic_cast_tag()) - {} - - template - SharedPtr& operator=(SharedPtr const & r) - { - boost::shared_ptr(r,boost::detail::polymorphic_cast_tag()).swap(*this); - return *this; - } - - template SharedPtr& operator()(Y * p) // Y must be complete - { - return operator=(SharedPtr(p)); - } - - operator const T& () const - { - return *(this->get()); - } - - operator T& () - { - return *(this->get()); - } - }; - - - template - class ConstSliceArray - { - const TContainer& myConstContainer; - std::slice mySlice; - protected: - size_t GetID(size_t theId) const - { - if(theId < mySlice.size()){ - size_t anId = mySlice.start() + theId*mySlice.stride(); - if(anId < myConstContainer.size()) - return anId; - } - throw std::out_of_range(); - return -1; - } - - public: - typedef typename TContainer::value_type TValue; - - ConstSliceArray(const TContainer& theContainer, - const std::slice& theSlice): - myConstContainer(theContainer), - mySlice(theSlice) - { - } - - const TValue& operator[](size_t theId) const - { - return myConstContainer[GetID(theId)]; - } - - size_t size() const - { - return mySlice.size(); - } - }; - - - template - class SliceArray: public ConstSliceArray - { - TContainer& myContainer; - - public: - typedef ConstSliceArray TSupperClass; - SliceArray(TContainer& theContainer, - const std::slice& theSlice): - TSupperClass(theContainer,theSlice), - myContainer(theContainer) - { - } - - typename TSupperClass::TValue& operator[](size_t theId) - { - return myContainer[this->GetID(theId)]; - } - }; - - typedef enum {eFAUX, eVRAI} EBooleen ; typedef double TFloat; #if defined(SUN4SOL2) || defined(PCLINUX) || defined(OSF1_32) || defined(IRIX64_32) || defined(RS6000) || defined(HP9000) @@ -159,6 +61,8 @@ namespace MED{ typedef hid_t TIdt; typedef herr_t TErr; + typedef enum {eFULL_INTERLACE, eNO_INTERLACE} EModeSwitch; + typedef enum {eFLOAT64=6, eINT=26} ETypeChamp; typedef enum {eNON_STRUCTURE, eSTRUCTURE} EMaillage; @@ -177,36 +81,48 @@ namespace MED{ typedef enum {eNO_PFLMOD, eGLOBAL, eCOMPACT} EModeProfil; - typedef std::vector TFloatVector; - typedef std::vector TStringVector; - typedef std::vector TIntVector; + typedef TVector TFloatVector; + typedef TVector TStringVector; + typedef TVector TIntVector; typedef std::set TStringSet; - typedef std::map TGeom; - typedef std::map TEntityInfo; + typedef std::map TGeom2Size; + typedef std::map TEntityInfo; typedef std::set TGeomSet; typedef std::map TEntity2GeomSet; - const TEntity2GeomSet& GetEntity2GeomSet(); + const TEntity2GeomSet& + GetEntity2GeomSet(); - template - - TInt GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim); + template + TInt + GetDESCLength(); - template<> - TInt GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim); - - template<> - TInt GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim); - - TInt GetNbNodes(EGeometrieElement typmai); + template + TInt + GetIDENTLength(); + + template + TInt + GetNOMLength(); + + template + TInt + GetLNOMLength(); + + template + TInt + GetPNOMLength(); + + template + TInt + GetNbConn(EGeometrieElement typmai, + EEntiteMaillage typent, + TInt mdim); + + TInt + GetNbNodes(EGeometrieElement typmai); struct TNameInfo; typedef SharedPtr PNameInfo; @@ -237,6 +153,12 @@ namespace MED{ struct TTimeStampInfo; typedef SharedPtr PTimeStampInfo; + + struct TProfileInfo; + typedef SharedPtr PProfileInfo; + + struct TGaussInfo; + typedef SharedPtr PGaussInfo; struct TTimeStampVal; typedef SharedPtr PTimeStampVal; diff --git a/src/MEDWrapper/Base/MED_CoordUtils.cxx b/src/MEDWrapper/Base/MED_CoordUtils.cxx new file mode 100644 index 000000000..74225911b --- /dev/null +++ b/src/MEDWrapper/Base/MED_CoordUtils.cxx @@ -0,0 +1,160 @@ +// +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : +// $Header$ + +#include "MED_CoordUtils.hxx" +#include "MED_Utilities.hxx" + +namespace MED +{ + + enum ECoordName{eX, eY, eZ, eNone}; + + template + TFloat + GetCoord(const TCCoordSlice& theCoordSlice) + { + return theCoordSlice[TCoordId]; + } + + template<> + TFloat + GetCoord(const TCCoordSlice& theCoordSlice) + { + return 0.0; + } + + TGetCoord + aXYZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aXYGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aYZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aXZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + + TGetCoord + aXGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aYGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + + //--------------------------------------------------------------- + TCoordHelper + ::TCoordHelper(TGetCoord* theGetCoord): + myGetCoord(theGetCoord) + {} + + TFloat + TCoordHelper + ::GetCoord(TCCoordSlice& theCoordSlice, + TInt theCoordId) + { + return (*myGetCoord[theCoordId])(theCoordSlice); + } + + + //--------------------------------------------------------------- + PCoordHelper + GetCoordHelper(PNodeInfo theNodeInfo) + { + PCoordHelper aCoordHelper; + { + PMeshInfo aMeshInfo = theNodeInfo->GetMeshInfo(); + TInt aMeshDimension = aMeshInfo->GetDim(); + bool anIsDimPresent[3] = {false, false, false}; + for(int iDim = 0; iDim < aMeshDimension; iDim++){ + std::string aName = theNodeInfo->GetCoordName(iDim); + if(aName == "x" || aName == "X") + anIsDimPresent[eX] = true; + else if(aName == "y" || aName == "Y") + anIsDimPresent[eY] = true; + else if(aName == "z" || aName == "Z") + anIsDimPresent[eZ] = true; + } + + switch(aMeshDimension){ + case 3: + aCoordHelper.reset(new TCoordHelper(aXYZGetCoord)); + break; + case 2: + if(anIsDimPresent[eY] && anIsDimPresent[eZ]) + aCoordHelper.reset(new TCoordHelper(aYZGetCoord)); + else if(anIsDimPresent[eX] && anIsDimPresent[eZ]) + aCoordHelper.reset(new TCoordHelper(aXZGetCoord)); + else + aCoordHelper.reset(new TCoordHelper(aXYGetCoord)); + break; + case 1: + if(anIsDimPresent[eY]) + aCoordHelper.reset(new TCoordHelper(aYGetCoord)); + else if(anIsDimPresent[eZ]) + aCoordHelper.reset(new TCoordHelper(aZGetCoord)); + else + aCoordHelper.reset(new TCoordHelper(aXGetCoord)); + break; + } + } + return aCoordHelper; + } +} diff --git a/src/MEDWrapper/Base/MED_CoordUtils.hxx b/src/MEDWrapper/Base/MED_CoordUtils.hxx new file mode 100644 index 000000000..9ed526407 --- /dev/null +++ b/src/MEDWrapper/Base/MED_CoordUtils.hxx @@ -0,0 +1,60 @@ +// +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : +// $Header$ + +#ifndef MED_CoordUtils_HeaderFile +#define MED_CoordUtils_HeaderFile + +#include "MED_Structures.hxx" + +namespace MED +{ + typedef TFloat (*TGetCoord)(const TCCoordSlice& theCoordSlice); + + + //--------------------------------------------------------------- + class TCoordHelper + { + TGetCoord* myGetCoord; + + public: + TCoordHelper(TGetCoord* theGetCoord); + + TFloat + GetCoord(TCCoordSlice& theCoordSlice, + TInt theCoordId); + }; + typedef SharedPtr PCoordHelper; + + + //--------------------------------------------------------------- + PCoordHelper + GetCoordHelper(PNodeInfo theNodeInfo); + +} + +#endif diff --git a/src/MEDWrapper/Base/MED_GaussUtils.cxx b/src/MEDWrapper/Base/MED_GaussUtils.cxx new file mode 100644 index 000000000..ad532ba42 --- /dev/null +++ b/src/MEDWrapper/Base/MED_GaussUtils.cxx @@ -0,0 +1,1364 @@ +// +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : +// $Header$ + +#include "MED_GaussUtils.hxx" +#include "MED_Utilities.hxx" + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#else +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#endif + +//#define _DEBUG_REF_COORDS_ + +namespace MED +{ + //--------------------------------------------------------------- + TGaussCoord + ::TGaussCoord(): + TModeSwitchInfo(eFULL_INTERLACE), + myNbElem(0), + myNbGauss(0), + myDim(0), + myGaussStep(0) + { + } + + void + TGaussCoord + ::Init(TInt theNbElem, + TInt theNbGauss, + TInt theDim, + EModeSwitch theMode) + { + myModeSwitch = theMode; + + myNbElem = theNbElem; + myNbGauss = theNbGauss; + myDim = theDim; + + myGaussStep = myNbGauss*myDim; + + myGaussCoord.resize(theNbElem*myGaussStep); + } + + + TCCoordSliceArr + TGaussCoord + ::GetCoordSliceArr(TInt theElemId) const + { + TCCoordSliceArr aCoordSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myGaussStep; + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCCoordSlice(myGaussCoord,std::slice(anId,myDim,1)); + anId += myDim; + } + } + else{ + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCCoordSlice(myGaussCoord,std::slice(theElemId,myDim,myGaussStep)); + } + } + return aCoordSliceArr; + } + + + TCoordSliceArr + TGaussCoord + ::GetCoordSliceArr(TInt theElemId) + { + TCoordSliceArr aCoordSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myGaussStep; + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCoordSlice(myGaussCoord,std::slice(anId,myDim,1)); + anId += myDim; + } + } + else{ + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCoordSlice(myGaussCoord,std::slice(theElemId,myDim,myGaussStep)); + } + } + return aCoordSliceArr; + } + + + //--------------------------------------------------------------- + inline + bool + IsEqual(TFloat theLeft, TFloat theRight) + { + static TFloat EPS = 1.0E-3; + if(fabs(theLeft) + fabs(theRight) > EPS) + return fabs(theLeft-theRight)/(fabs(theLeft)+fabs(theRight)) < EPS; + return true; + } + + + struct TShapeFun + { + class TFun + { + TFloatVector myFun; + TInt myNbRef; + + public: + + void + Init(TInt theNbGauss, + TInt theNbRef) + { + myFun.resize(theNbGauss*theNbRef); + myNbRef = theNbRef; + } + + TCFloatVecSlice + GetFunSlice(TInt theGaussId) const + { + return TCFloatVecSlice(myFun,std::slice(theGaussId*myNbRef,myNbRef,1)); + } + + TFloatVecSlice + GetFunSlice(TInt theGaussId) + { + return TFloatVecSlice(myFun,std::slice(theGaussId*myNbRef,myNbRef,1)); + } + }; + + typedef TVector TCCoordSliceArr; + typedef TVector TCoordSliceArr; + + TFloatVector myRefCoord; + TInt myDim; + TInt myNbRef; + + TShapeFun(TInt theDim = 0, TInt theNbRef = 0): + myDim(theDim), + myNbRef(theNbRef), + myRefCoord(theNbRef*theDim) + {} + + TInt + GetNbRef() const + { + return myNbRef; + } + + TCCoordSlice + GetCoord(TInt theRefId) const + { + return TCCoordSlice(myRefCoord,std::slice(theRefId*myDim,myDim,1)); + } + + TCoordSlice + GetCoord(TInt theRefId) + { + return TCoordSlice(myRefCoord,std::slice(theRefId*myDim,myDim,1)); + } + + void + GetFun(const TShapeFun::TCCoordSliceArr& theRef, + const TShapeFun::TCCoordSliceArr& theGauss, + TFun& theFun) const + { + TInt aNbRef = theRef.size(); + TInt aNbGauss = theGauss.size(); + theFun.Init(aNbGauss,aNbRef); + } + + virtual + void + InitFun(const TShapeFun::TCCoordSliceArr& theRef, + const TShapeFun::TCCoordSliceArr& theGauss, + TFun& theFun) const = 0; + + virtual + bool + IsSatisfy(const TShapeFun::TCCoordSliceArr& theRefCoord) const + { + TInt aNbRef = theRefCoord.size(); + TInt aNbRef2 = GetNbRef(); + INITMSG(MYDEBUG,"TShapeFun::IsSatisfy "<< + "- aNbRef("<GetDim(); + TInt aNbGauss = theGauss.size(); + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = theCellInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + TFun aFun; + InitFun(theRef,theGauss,aFun); + TInt aConnDim = theCellInfo.GetConnDim(); + + INITMSG(MYDEBUG,"aDim = "<GetDim(); + static TInt aNbGauss = 1; + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = theCellInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + INITMSGA(MYDEBUG,0, + "- aDim = "<GetDim(); + static TInt aNbGauss = 1; + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = thePolygoneInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + INITMSGA(MYDEBUG,0, + "- aDim = "<GetDim(); + static TInt aNbGauss = 1; + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = thePolyedreInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + INITMSGA(MYDEBUG,0, + "- aDim = "< TCCoordSliceArr; + typedef TVector TCoordSliceArr; + + //! Define a helper class to handle Gauss Points coordinates + class TGaussCoord: + virtual TModeSwitchInfo + { + TInt myNbElem; + TInt myNbGauss; + TInt myDim; + + TInt myGaussStep; + + TNodeCoord myGaussCoord; + + public: + + TGaussCoord(); + + //! Get slice of the coordinate that corresponds to defined cell (const version) + TCCoordSliceArr + GetCoordSliceArr(TInt theElemId) const; + + //! Get slice of the coordinate that corresponds to defined cell + TCoordSliceArr + GetCoordSliceArr(TInt theElemId); + + //! To init the class + void + Init(TInt theNbElem, + TInt theNbGauss, + TInt theDim, + EModeSwitch theMode = eFULL_INTERLACE); + + TInt + GetNbElem() const { return myNbElem; } + + TInt + GetNbGauss() const { return myNbGauss; } + + TInt + GetDim() const { return myDim; } + }; + + + //--------------------------------------------------------------- + //! To calculate Gauss Points coordinates + bool + GetGaussCoord3D(const TGaussInfo& theGaussInfo, + const TCellInfo& theCellInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + + //--------------------------------------------------------------- + //! To calculate Gauss Points coordinates for defined TCellInfo as its bary center + bool + GetBaryCenter(const TCellInfo& theCellInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! To calculate Gauss Points coordinates for defined TPolygoneInfo as its bary center + bool + GetBaryCenter(const TPolygoneInfo& thePolygoneInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! To calculate Gauss Points coordinates for defined TPolyedreInfo as its bary center + bool + GetBaryCenter(const TPolyedreInfo& thePolyedreInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); +} + +#endif diff --git a/src/MEDWrapper/Base/MED_SharedPtr.hxx b/src/MEDWrapper/Base/MED_SharedPtr.hxx new file mode 100644 index 000000000..e0067f977 --- /dev/null +++ b/src/MEDWrapper/Base/MED_SharedPtr.hxx @@ -0,0 +1,102 @@ +// +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : +// $Header$ + +#ifndef MED_SharedPtr_HeaderFile +#define MED_SharedPtr_HeaderFile + +#include + +namespace MED +{ + + //! To extend the boost::shared_ptr to support such features automatic dynamic cast + /*! + All entities of the MEDWrapper package are handled as pointer. + This class was introduced to provide correct and flexible memory management + for all of the MEDWrapper objects. + */ + template class SharedPtr: public boost::shared_ptr + { + public: + //! Default constructor + SharedPtr() {} + + //! Construct the class by any type of a pointer + template + explicit SharedPtr(Y * p): + boost::shared_ptr(p) + {} + + //! Construct the class by any specialisation of the class + template + SharedPtr(SharedPtr const & r): + boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) + {} + + //! Copy-constructor + template + SharedPtr& + operator=(SharedPtr const & r) + { + boost::shared_ptr(r,boost::detail::dynamic_cast_tag()).swap(*this); + return *this; + } + + //! Introduce a flexible way to reset the wrapped pointer + template + SharedPtr& + operator()(Y * p) // Y must be complete + { + return operator=(SharedPtr(p)); + } + + //! Introduce a flexible way to reset the wrapped pointer + template + SharedPtr& + operator()(SharedPtr const & r) // Y must be complete + { + return operator=(SharedPtr(r)); + } + + //! To provide a flexible way to use reference to the wrapped pointer (const version) + operator const T& () const + { + return *(this->get()); + } + + //! To provide a flexible way to use reference to the wrapped pointer + operator T& () + { + return *(this->get()); + } + }; + +} + + +#endif diff --git a/src/MEDWrapper/Base/MED_SliceArray.hxx b/src/MEDWrapper/Base/MED_SliceArray.hxx new file mode 100644 index 000000000..d0b8923d9 --- /dev/null +++ b/src/MEDWrapper/Base/MED_SliceArray.hxx @@ -0,0 +1,136 @@ +// +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : +// $Header$ + +#ifndef MED_SliceArray_HeaderFile +#define MED_SliceArray_HeaderFile + +#include +#include + +namespace MED +{ + //--------------------------------------------------------------- + //! This class intends to provide an uniform way to handle multy-dimention data (const version) + /*! + It just contains pointer to real sequence and implement proper calcultion of its indexes. + This class deal with constant pointer to the sources data and provide const method to + read the them (data). + */ + template + class TCSlice + { + typedef const TContainer* PCContainer; + PCContainer myCContainer; //!< Reference to source multy-dimension data + std::slice mySlice; //!< Defines algorithm of index calculation + protected: + //! Calculate internal index to get proper element from the source multy-dimension data + size_t + GetID(size_t theId) const + { +#ifdef _DEBUG_ + size_t anId = -1; + if(theId < mySlice.size()){ + anId = mySlice.start() + theId*mySlice.stride(); + if(anId < myCContainer->size()) + return anId; + } + throw std::out_of_range(std::string("TCSlice::GetID")); + return anId; +#else + return mySlice.start() + theId*mySlice.stride(); +#endif + } + + public: + typedef typename TContainer::value_type value_type; + + //! Construct the class + TCSlice(const TContainer& theContainer, + const std::slice& theSlice): + myCContainer(&theContainer), + mySlice(theSlice) + {} + + //! Default constructor (dangerous) + TCSlice(): + myCContainer(NULL) + {} + + //! Get element by its number (const version) + const value_type& + operator[](size_t theId) const + { + return (*myCContainer)[GetID(theId)]; + } + + //! Get range of the order numbers + size_t + size() const + { + return mySlice.size(); + } + }; + + + //--------------------------------------------------------------- + //! This class extend TCSlice functionality for non-constant case + template + class TSlice: public TCSlice + { + typedef TContainer* PContainer; + PContainer myContainer; + + public: + typedef typename TContainer::value_type value_type; + typedef TCSlice TSupperClass; + + //! Construct the class + TSlice(TContainer& theContainer, + const std::slice& theSlice): + TSupperClass(theContainer,theSlice), + myContainer(&theContainer) + { + } + + //! Default constructor (dangerous) + TSlice(): + myContainer(NULL) + {} + + //! Get element by its number + value_type& + operator[](size_t theId) + { + return (*myContainer)[this->GetID(theId)]; + } + }; + +} + + +#endif diff --git a/src/MEDWrapper/Base/MED_Structures.cxx b/src/MEDWrapper/Base/MED_Structures.cxx index c193acce8..0c1346e46 100644 --- a/src/MEDWrapper/Base/MED_Structures.cxx +++ b/src/MEDWrapper/Base/MED_Structures.cxx @@ -8,174 +8,449 @@ #include "MED_Structures.hxx" #include "MED_Utilities.hxx" -using namespace MED; - -#if defined __GNUC__ - #if __GNUC__ == 2 - #define __GNUC_2__ - #endif -#endif -#if defined __GNUC_2__ -#define GETINDEX(anArray,ind) anArray[ind] -#else -#define GETINDEX(anArray,ind) anArray.at(ind) -#endif - -namespace MED{ +using namespace MED; - TInt GetNbNodes(EGeometrieElement typmai) +namespace MED +{ + TInt + GetNbNodes(EGeometrieElement typmai) { return typmai%100; } - template<> - TInt GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim) + std::string + GetString(TInt theId, + TInt theStep, + const TString& theString) { - TInt nsup = 0; - - if(typent == eMAILLE){ - TInt edim = typmai / 100; - if(mdim == 2 || mdim == 3) - if(edim == 1) - nsup = 1; - - if(mdim == 3) - if (edim == 2) - nsup = 1; - } - - return nsup + typmai%100; + const char* aPos = &theString[theId*theStep]; + TInt aSize = std::min(TInt(strlen(aPos)),theStep); + return std::string(aPos,aSize); } - template<> - TInt GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim) + void + SetString(TInt theId, + TInt theStep, + TString& theString, + const std::string& theValue) { - return typmai%100; + TInt aSize = std::min(TInt(theValue.size()+1),theStep); + char* aPos = &theString[theId*theStep]; + strncpy(aPos,theValue.c_str(),aSize); } - std::string GetString(TInt theId, TInt theStep, - const TString& theString) + TInt + GetDimGaussCoord(EGeometrieElement theGeom) { - const char* aPos = &GETINDEX(theString,theId*theStep); - TInt aSize = std::min(TInt(strlen(aPos)),theStep); - return std::string(aPos,aSize); + return theGeom/100; } - void SetString(TInt theId, TInt theStep, - TString& theString, - const std::string& theValue) + TInt + GetNbRefCoord(EGeometrieElement theGeom) { - TInt aSize = std::min(TInt(theValue.size()+1),theStep); - char* aPos = &GETINDEX(theString,theId*theStep); - strncpy(aPos,theValue.c_str(),aSize); + return (theGeom%100); } } //--------------------------------------------------------------- -TInt TFamilyInfo::GetAttrId(TInt theId) const { - return GETINDEX(myAttrId,theId); +TInt +TFamilyInfo +::GetAttrId(TInt theId) const +{ + return myAttrId[theId]; } -TInt TFamilyInfo::GetAttrVal(TInt theId) const { - return GETINDEX(myAttrVal,theId); +TInt +TFamilyInfo +::GetAttrVal(TInt theId) const +{ + return myAttrVal[theId]; } -void TFamilyInfo::SetAttrId(TInt theId,TInt theVal) { - GETINDEX(myAttrId,theId) = theVal; +void +TFamilyInfo +::SetAttrId(TInt theId,TInt theVal) +{ + myAttrId[theId] = theVal; } -void TFamilyInfo::SetAttrVal(TInt theId,TInt theVal) { - GETINDEX(myAttrVal,theId) = theVal; +void +TFamilyInfo +::SetAttrVal(TInt theId,TInt theVal) +{ + myAttrVal[theId] = theVal; } //--------------------------------------------------------------- -TInt TElemInfo::GetFamNum(TInt theId) const { - return GETINDEX(myFamNum,theId); +TInt +TElemInfo +::GetFamNum(TInt theId) const +{ + return myFamNum[theId]; } -TInt TElemInfo::GetElemNum(TInt theId) const { - return GETINDEX(myElemNum,theId); +TInt +TElemInfo +::GetElemNum(TInt theId) const +{ + return myElemNum[theId]; } -void TElemInfo::SetFamNum(TInt theId,TInt theVal) { - GETINDEX(myFamNum,theId) = theVal; +void +TElemInfo +::SetFamNum(TInt theId,TInt theVal) +{ + myFamNum[theId] = theVal; } //--------------------------------------------------------------- -TFloat TNodeInfo::GetNodeCoord(TInt theId,TInt theComp) const { - return GETINDEX(myCoord,myMeshInfo->myDim*theId + theComp); +TCCoordSlice +TNodeInfo +::GetCoordSlice(TInt theId) const +{ + TInt aDim = myMeshInfo->GetDim(); + if(GetModeSwitch() == eFULL_INTERLACE) + return TCCoordSlice(myCoord,std::slice(theId*aDim,aDim,1)); + else + return TCCoordSlice(myCoord,std::slice(theId,aDim,aDim)); } -void TNodeInfo::SetNodeCoord(TInt theId,TInt theComp,TFloat theVal) { - GETINDEX(myCoord,myMeshInfo->myDim*theId + theComp) = theVal; +TCoordSlice +TNodeInfo +::GetCoordSlice(TInt theId) +{ + TInt aDim = myMeshInfo->GetDim(); + if(GetModeSwitch() == eFULL_INTERLACE) + return TCoordSlice(myCoord,std::slice(theId*aDim,aDim,1)); + else + return TCoordSlice(myCoord,std::slice(theId,aDim,aDim)); } //--------------------------------------------------------------- -TInt TCellInfo::GetConn(TInt theElemId, TInt theConnId) const { - return GETINDEX(myConn,GetConnDim()*theElemId + theConnId); +TCConnSlice +TCellInfo +::GetConnSlice(TInt theElemId) const +{ + if(GetModeSwitch() == eFULL_INTERLACE) + return TCConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbNodes(myGeom),1)); + else + return TCConnSlice(myConn,std::slice(theElemId,GetNbNodes(myGeom),GetConnDim())); +} + +TConnSlice +TCellInfo +::GetConnSlice(TInt theElemId) +{ + if(GetModeSwitch() == eFULL_INTERLACE) + return TConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbNodes(myGeom),1)); + else + return TConnSlice(myConn,std::slice(theElemId,GetNbNodes(myGeom),GetConnDim())); } -void TCellInfo::SetConn(TInt theElemId, TInt theConnId, TInt theVal){ - GETINDEX(myConn,GetConnDim()*theElemId + theConnId) = theVal; + +//--------------------------------------------------------------- +TInt +TPolygoneInfo +::GetNbConn(TInt theElemId) const +{ + return myIndex[theElemId + 1] - myIndex[theElemId]; } -TConstConnSlice -TCellInfo::GetConnSlice(TInt theElemId) const +TCConnSlice +TPolygoneInfo +::GetConnSlice(TInt theElemId) const { - return TConstConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbNodes(myTGeom),1)); + return TCConnSlice(myConn,std::slice(myIndex[theElemId]-1,GetNbConn(theElemId),1)); } TConnSlice -TCellInfo::GetConnSlice(TInt theElemId) +TPolygoneInfo +::GetConnSlice(TInt theElemId) +{ + return TConnSlice(myConn,std::slice(myIndex[theElemId]-1,GetNbConn(theElemId),1)); +} + + +//--------------------------------------------------------------- +TInt +TPolyedreInfo +::GetNbFaces(TInt theElemId) const +{ + return myIndex[theElemId+1] - myIndex[theElemId]; +} + +TInt +TPolyedreInfo +::GetNbNodes(TInt theElemId) const +{ + TInt aNbNodes = 0; + TInt aNbFaces = GetNbFaces(theElemId); + TInt aStartFaceId = myIndex[theElemId] - 1; + for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ + TInt aCurrentId = myFaces[aStartFaceId]; + TInt aDiff = myFaces[aStartFaceId + 1] - aCurrentId; + aNbNodes += aDiff; + } + return aNbNodes; +} + +TCConnSliceArr +TPolyedreInfo +::GetConnSliceArr(TInt theElemId) const { - return TConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbNodes(myTGeom),1)); + TInt aNbFaces = GetNbFaces(theElemId); + TCConnSliceArr aConnSliceArr(aNbFaces); + TInt aStartFaceId = myIndex[theElemId] - 1; + for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ + TInt aCurrentId = myFaces[aStartFaceId]; + TInt aDiff = myFaces[aStartFaceId + 1] - aCurrentId; + aConnSliceArr[aFaceId] = + TCConnSlice(myConn,std::slice(aCurrentId - 1,aDiff,1)); + } + return aConnSliceArr; +} + +TConnSliceArr +TPolyedreInfo +::GetConnSliceArr(TInt theElemId) +{ + TInt aNbFaces = GetNbFaces(theElemId); + TConnSliceArr aConnSliceArr(aNbFaces); + TInt aStartFaceId = myIndex[theElemId] - 1; + for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ + TInt aCurrentId = myFaces[aStartFaceId]; + TInt aDiff = myFaces[aStartFaceId + 1] - aCurrentId; + aConnSliceArr[aFaceId] = + TConnSlice(myConn,std::slice(aCurrentId - 1,aDiff,1)); + } + return aConnSliceArr; } + //--------------------------------------------------------------- -TInt TPolygoneInfo::GetNbConn(TInt theElemId) const { - TInt i1 = GETINDEX(myIndex,theElemId); - TInt i2 = GETINDEX(myIndex,theElemId+1); - TInt ret = i2 - i1; - return ret; +TInt +TProfileInfo +::GetElemNum(TInt theId) const +{ + return myElemNum[theId]; +} + +void +TProfileInfo +::SetElemNum(TInt theId,TInt theVal) +{ + myElemNum[theId] = theVal; } //--------------------------------------------------------------- -TInt TPolyedreInfo::GetNbConn(TInt theElemId) const { - TInt ind1 = GETINDEX(myIndex,theElemId); - TInt ind2 = GETINDEX(myIndex,theElemId+1); +bool +TGaussInfo::TLess +::operator()(const TKey& theLeft, const TKey& theRight) const +{ + EGeometrieElement aLGeom = boost::get<0>(theLeft); + EGeometrieElement aRGeom = boost::get<0>(theRight); + if(aLGeom != aRGeom) + return aLGeom < aRGeom; + + const std::string& aLStr = boost::get<1>(theLeft); + const std::string& aRStr = boost::get<1>(theRight); + return aLStr < aRStr; +} + +bool +TGaussInfo::TLess +::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const +{ + if(theLeft.myGeom != theRight.myGeom) + return theLeft.myGeom < theRight.myGeom; - TInt inf1 = GETINDEX(myFacesIndex,ind1-1); - TInt inf2 = GETINDEX(myFacesIndex,ind2-1); + if(theLeft.myRefCoord != theRight.myRefCoord) + return theLeft.myRefCoord < theRight.myRefCoord; - TInt ret = inf2-inf1; - return ret; + return theLeft.myGaussCoord < theRight.myGaussCoord; +} + +TCCoordSlice +TGaussInfo +::GetRefCoordSlice(TInt theId) const +{ + if(GetModeSwitch() == eFULL_INTERLACE) + return TCCoordSlice(myRefCoord,std::slice(theId*GetDim(),GetDim(),1)); + else + return TCCoordSlice(myRefCoord,std::slice(theId,GetDim(),GetDim())); +} + +TCoordSlice +TGaussInfo +::GetRefCoordSlice(TInt theId) +{ + if(GetModeSwitch() == eFULL_INTERLACE) + return TCoordSlice(myRefCoord,std::slice(theId*GetDim(),GetDim(),1)); + else + return TCoordSlice(myRefCoord,std::slice(theId,GetDim(),GetDim())); +} + +TCCoordSlice +TGaussInfo +::GetGaussCoordSlice(TInt theId) const +{ + if(GetModeSwitch() == eFULL_INTERLACE) + return TCCoordSlice(myGaussCoord,std::slice(theId*GetDim(),GetDim(),1)); + else + return TCCoordSlice(myGaussCoord,std::slice(theId,GetDim(),GetDim())); +} + +TCoordSlice +TGaussInfo +::GetGaussCoordSlice(TInt theId) +{ + if(GetModeSwitch() == eFULL_INTERLACE) + return TCoordSlice(myGaussCoord,std::slice(theId*GetDim(),GetNbGauss(),1)); + else + return TCoordSlice(myGaussCoord,std::slice(theId,GetNbGauss(),GetDim())); +} + + +//--------------------------------------------------------------- +TInt +TTimeStampInfo +::GetNbGauss(EGeometrieElement theGeom) const +{ + TGeom2NbGauss::const_iterator anIter = myGeom2NbGauss.find(theGeom); + if(anIter == myGeom2NbGauss.end()) + EXCEPTION(runtime_error,"TTimeStampInfo::GetNbGauss - myGeom2NbGauss.find(theGeom) fails"); + + return anIter->second; +} + + +//--------------------------------------------------------------- +void +TMeshValue +::Init(TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode) +{ + myModeSwitch = theMode; + + myNbElem = theNbElem; + myNbGauss = theNbGauss; + myNbComp = theNbComp; + + myStep = theNbComp*theNbGauss; + + myValue.resize(theNbElem*myStep); } //--------------------------------------------------------------- -TFloat TTimeStampVal::GetVal(EGeometrieElement theGeom, TInt theId, - TInt theComp, TInt theGauss) const { - TInt aNbComp = myTimeStampInfo->myFieldInfo->myNbComp; - TInt aNbGauss = myTimeStampInfo->myNbGauss; - TInt aStep = aNbComp*aNbGauss; - TMeshValue::const_iterator anIter = myMeshValue.find(theGeom); - if(anIter != myMeshValue.end()){ - TFloat aRet=GETINDEX(anIter->second,theId*aStep + theComp*aNbGauss + theGauss); - return aRet; - } - return TFloat(); -} - -void TTimeStampVal::SetVal(EGeometrieElement theGeom, TInt theId, - TInt theComp, TFloat theVal, TInt theGauss) -{ - TInt aNbComp = myTimeStampInfo->myFieldInfo->myNbComp; - TInt aNbGauss = myTimeStampInfo->myNbGauss; - TInt aStep = aNbComp*aNbGauss; - GETINDEX(myMeshValue[theGeom],theId*aStep + theComp*aNbGauss + theGauss) = theVal; +TCValueSliceArr +TMeshValue +::GetGaussValueSliceArr(TInt theElemId) const +{ + TCValueSliceArr aValueSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myStep; + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TCValueSlice(myValue,std::slice(anId,myNbComp,1)); + anId += myNbComp; + } + } + else{ + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TCValueSlice(myValue,std::slice(theElemId,myNbComp,myStep)); + } + } + return aValueSliceArr; +} + +TValueSliceArr +TMeshValue +::GetGaussValueSliceArr(TInt theElemId) +{ + TValueSliceArr aValueSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myStep; + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TValueSlice(myValue,std::slice(anId,myNbComp,1)); + anId += myNbComp; + } + } + else{ + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TValueSlice(myValue,std::slice(theElemId,myNbComp,myStep)); + } + } + return aValueSliceArr; +} + +//--------------------------------------------------------------- +TCValueSliceArr +TMeshValue +::GetCompValueSliceArr(TInt theElemId) const +{ + TCValueSliceArr aValueSliceArr(myNbComp); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myStep; + for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ + aValueSliceArr[aCompId] = + TCValueSlice(myValue,std::slice(anId,myNbGauss,myNbComp)); + anId += 1; + } + } + else{ + for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ + aValueSliceArr[aCompId] = + TCValueSlice(myValue,std::slice(theElemId,myNbGauss,myStep)); + } + } + return aValueSliceArr; +} + + +TValueSliceArr +TMeshValue +::GetCompValueSliceArr(TInt theElemId) +{ + TValueSliceArr aValueSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myStep; + for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ + aValueSliceArr[aCompId] = + TValueSlice(myValue,std::slice(anId,myNbGauss,myNbComp)); + anId += 1; + } + } + else{ + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TValueSlice(myValue,std::slice(theElemId,myNbComp,myStep)); + } + } + return aValueSliceArr; +} + + +//--------------------------------------------------------------- +const TMeshValue& +TTimeStampVal +::GetMeshValue(EGeometrieElement theGeom) const +{ + TGeom2Value::const_iterator anIter = myGeom2Value.find(theGeom); + if(anIter == myGeom2Value.end()) + EXCEPTION(runtime_error,"TTimeStampVal::GetMeshValue - myGeom2Value.find(theGeom) fails"); + return anIter->second; +} + +TMeshValue& +TTimeStampVal +::GetMeshValue(EGeometrieElement theGeom) +{ + return myGeom2Value[theGeom]; } diff --git a/src/MEDWrapper/Base/MED_Structures.hxx b/src/MEDWrapper/Base/MED_Structures.hxx index 560410eeb..f22f4b977 100644 --- a/src/MEDWrapper/Base/MED_Structures.hxx +++ b/src/MEDWrapper/Base/MED_Structures.hxx @@ -31,19 +31,24 @@ #include "MED_Common.hxx" -namespace MED{ +namespace MED +{ //--------------------------------------------------------------- - typedef std::vector TString; + //! Defines a type for managing sequence of strings + typedef TVector TString; + //! Extract a substring from the sequence of the strings std::string GetString(TInt theId, TInt theStep, const TString& theString); + //! Set a substring in the sequence of the strings void SetString(TInt theId, TInt theStep, TString& theString, const std::string& theValue); //--------------------------------------------------------------- + //! Define a parent class for all MEDWrapper classes struct TBase { virtual ~TBase() {} @@ -51,276 +56,542 @@ namespace MED{ //--------------------------------------------------------------- + //! Define a parent class for all named MED entities struct TNameInfo: virtual TBase { - TString myName; - virtual std::string GetName() const = 0; - virtual void SetName(const std::string& theValue) = 0; + TString myName; //!< Keeps its name + virtual std::string GetName() const = 0; //!< Gets its name + virtual void SetName(const std::string& theValue) = 0; //!< Set a new name }; //--------------------------------------------------------------- + //! Define a parent class for all MED entities that contains a sequence of numbers + /*! + It defines through corresponding enumeration (EModeSwitch) how the sequence + should be interpreted in C or Fortran mode (eFULL_INTERLACE or eNON_INTERLACE). + */ + struct TModeSwitchInfo: virtual TBase + { + //! To construct instance of the class by default + TModeSwitchInfo(): + myModeSwitch(eFULL_INTERLACE) + {} + + //! To construct instance of the class + TModeSwitchInfo(EModeSwitch theModeSwitch): + myModeSwitch(theModeSwitch) + {} + + EModeSwitch myModeSwitch; //!< Keeps the + EModeSwitch GetModeSwitch() const { return myModeSwitch;} + }; + + + //--------------------------------------------------------------- + //! Define a base class which represents MED Mesh entity struct TMeshInfo: virtual TNameInfo { - TInt myDim; - TInt GetDim() const { return myDim;} + TInt myDim; //!< Dimension of the mesh (0, 1, 2 or 3) + TInt GetDim() const { return myDim;} //!< Gets dimension of the mesh - EMaillage myType; - EMaillage GetType() const { return myType;} + EMaillage myType; //!< Type of the mesh + EMaillage GetType() const { return myType;} //!< Gets type of the mesh - TString myDesc; - virtual std::string GetDesc() const = 0; - virtual void SetDesc(const std::string& theValue) = 0; + TString myDesc; //!< Description of the mesh + virtual std::string GetDesc() const = 0; //!< Get description for the mesh + virtual void SetDesc(const std::string& theValue) = 0; //!< Sets description for the mesh }; //--------------------------------------------------------------- - typedef std::vector TFamAttr; + typedef TVector TIntVector; + typedef TSlice TIntVecSlice; + typedef TCSlice TCIntVecSlice; + typedef TIntVector TFamAttr; + + //! Define a base class which represents MED Family entity struct TFamilyInfo: virtual TNameInfo { - PMeshInfo myMeshInfo; - const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} + PMeshInfo myMeshInfo; //!< A reference to correspondig MED Mesh + //! Get a reference to corresponding MED Mesh + const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - TInt myId; - TInt GetId() const { return myId;} - void SetId(TInt theId) { myId = theId;} + TInt myId; //!< An unique index of the MED FAMILY + TInt GetId() const { return myId;} //!< Gets number of the MED FAMILY + void SetId(TInt theId) { myId = theId;} //! Define number of the MED FAMILY - TInt myNbGroup; - TInt GetNbGroup() const { return myNbGroup;} + TInt myNbGroup; //!< Defines number MED Groups connected to + //! Gets number of MED GROUPS the MED FAMILY is bound to + TInt GetNbGroup() const { return myNbGroup;} - TString myGroupNames; + //! Contains sequence of the names for the MED Groups connected to + TString myGroupNames; + //! Gets name of a bound MED GROUP by its number virtual std::string GetGroupName(TInt theId) const = 0; + //! Sets name of the defined MED GROUP by its number virtual void SetGroupName(TInt theId, const std::string& theValue) = 0; - TInt myNbAttr; - TInt GetNbAttr() const { return myNbAttr;} + TInt myNbAttr; //!< Defines number of the MED Family attributes + //! Gets number of attached attributes for the MED FAMILY + TInt GetNbAttr() const { return myNbAttr;} - TFamAttr myAttrId; + //! Defines sequence of the indexes of the MED Family attributes + TFamAttr myAttrId; + //! Get MED FAMILY attribute by its number TInt GetAttrId(TInt theId) const; + //! Set MED FAMILY attribute by its number void SetAttrId(TInt theId, TInt theVal); + //! Defines sequence of the values of the MED Family attributes TFamAttr myAttrVal; + //! Get MED FAMILY attribute by its number TInt GetAttrVal(TInt theId) const; + //! Set MED FAMILY attribute by its number void SetAttrVal(TInt theId, TInt theVal); + //! Defines sequence of the names of the MED Family attributes TString myAttrDesc; + //! Get value of the MED FAMILY attribute by its number virtual std::string GetAttrDesc(TInt theId) const = 0; + //! Set value of the MED FAMILY attribute by its number virtual void SetAttrDesc(TInt theId, const std::string& theValue) = 0; }; //--------------------------------------------------------------- - typedef std::vector TElemNum; + typedef TIntVector TElemNum; + //! Define a parent class for all MED entities that describes mesh entites such as nodes and cells. struct TElemInfo: virtual TBase { - PMeshInfo myMeshInfo; + PMeshInfo myMeshInfo; //!< A reference to correspondig MED Mesh + //! Get a reference to corresponding MED Mesh const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - TInt myNbElem; - TInt GetNbElem() const { return myNbElem;} + TInt myNbElem; // TNodeCoord; - - struct TNodeInfo: virtual TElemInfo + typedef TVector TFloatVector; + typedef TSlice TFloatVecSlice; + typedef TCSlice TCFloatVecSlice; + + typedef TFloatVector TNodeCoord; + typedef TFloatVecSlice TCoordSlice; + typedef TCFloatVecSlice TCCoordSlice; + + //! Define a base class which represents MED Nodes entity + struct TNodeInfo: + virtual TElemInfo, + virtual TModeSwitchInfo { - TNodeCoord myCoord; - TFloat GetNodeCoord(TInt theId, TInt theComp) const; - void SetNodeCoord(TInt theId, TInt theComp, TFloat theVal); + TNodeCoord myCoord; //!< Contains all nodal coordinates - ERepere mySystem; + //! Gives coordinates for mesh node by its number (const version) + TCCoordSlice GetCoordSlice(TInt theId) const; + //! Gives coordinates for mesh node by its number + TCoordSlice GetCoordSlice(TInt theId); + + ERepere mySystem; //!< Defines, which coordinate system is used + //! Get which coordinate system is used for the node describing ERepere GetSystem() const { return mySystem;} + //! Set coordinate system to be used for the node describing void SetSystem(ERepere theSystem) { mySystem = theSystem;} - TString myCoordNames; + TString myCoordNames; //!< Contains names for the coordinate dimensions + //! Get name of the coordinate dimension by its order number virtual std::string GetCoordName(TInt theId) const = 0; + //! Set name of the coordinate dimension by its order number virtual void SetCoordName(TInt theId, const std::string& theValue) = 0; - TString myCoordUnits; + TString myCoordUnits; //!< Contains units for the coordinate dimensions + //! Get name of unit for the coordinate dimension by its order number virtual std::string GetCoordUnit(TInt theId) const = 0; + //! Set name of unit for the coordinate dimension by its order number virtual void SetCoordUnit(TInt theId, const std::string& theValue) = 0; }; //--------------------------------------------------------------- - typedef SliceArray TConnSlice; - typedef ConstSliceArray TConstConnSlice; + typedef TIntVecSlice TConnSlice; + typedef TCIntVecSlice TCConnSlice; - struct TCellInfo: virtual TElemInfo + //! Define a base class which represents MED Cells entity + struct TCellInfo: + virtual TElemInfo, + virtual TModeSwitchInfo { - EEntiteMaillage myTEntity; - EEntiteMaillage GetEntity() const { return myTEntity;} + EEntiteMaillage myEntity; //!< Defines the MED Entity where the mesh cells belongs to + //! Let known what MED ENTITY the cells belong to + EEntiteMaillage GetEntity() const { return myEntity;} - EGeometrieElement myTGeom; - EGeometrieElement GetGeom() const { return myTGeom;} + EGeometrieElement myGeom; //!< Defines the MED Geometric type of the instance + //! Let known what MED geometrical type the cells belong to + EGeometrieElement GetGeom() const { return myGeom;} - EConnectivite myTConn; - EConnectivite GetConn() const { return myTConn;} + EConnectivite myConnMode; //!< Defines connectivity mode + //! Let known in what connectivity the cells are writen + EConnectivite GetConnMode() const { return myConnMode;} - virtual TInt GetConnDim() const = 0; + virtual TInt GetConnDim() const = 0; //!< Gives step in the connectivity sequence - TElemNum myConn; - TConstConnSlice GetConnSlice(TInt theElemId) const; - TConnSlice GetConnSlice(TInt theElemId); + TElemNum myConn; //!< Defines sequence which describe connectivity for ech of mesh cell - TInt GetConn(TInt theElemId, TInt theConnId) const; - void SetConn(TInt theElemId, TInt theConnId, TInt theVal); + //! Gives connectivities for mesh cell by its number (const version) + TCConnSlice GetConnSlice(TInt theElemId) const; + //! Gives connectivities for mesh cell by its number + TConnSlice GetConnSlice(TInt theElemId); }; //--------------------------------------------------------------- - struct TPolygoneInfo: virtual TElemInfo + //! Define a base class which represents MED Polygon entity + struct TPolygoneInfo: + virtual TElemInfo { - EEntiteMaillage myTEntity; // MED_FACE|MED_MAILLE - EEntiteMaillage GetEntity() const { return myTEntity;} + //! Defines the MED Entity where the polygons belongs to + EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE + //! Let known what MED ENTITY the MED Polygons belong to + EEntiteMaillage GetEntity() const { return myEntity;} - EGeometrieElement myTGeom; // ePOLYGONE + //! Defines the MED Geometric type of the instance + EGeometrieElement myGeom; // ePOLYGONE + //! Let known what MED geometrical type the MED Polygons belong to EGeometrieElement GetGeom() const { return ePOLYGONE;} - EConnectivite myTConn; // eNOD|eDESC(eDESC not used) - EConnectivite GetConn() const { return myTConn;} - - TInt myConnDim; - TInt GetConnDim() const { return myConnDim;} + //! Defines connectivity mode + EConnectivite myConnMode; // eNOD|eDESC(eDESC not used) + //! Let known in what connectivity the cells are writen + EConnectivite GetConnMode() const { return myConnMode;} - TElemNum myConn; // Table de connectivities - TElemNum GetConnectivite() const { return myConn;} + TElemNum myConn; //!< Table de connectivities + TElemNum myIndex; //!< Table de indexes - TElemNum myIndex; // Table de indexes - TElemNum GetIndex() {return myIndex;} + //! Gives number of the connectivities for the defined polygon TInt GetNbConn(TInt theElemId) const; + + //! Gives connectivities for polygon by its number (const version) + TCConnSlice GetConnSlice(TInt theElemId) const; + //! Gives connectivities for polygon by its number + TConnSlice GetConnSlice(TInt theElemId); }; //--------------------------------------------------------------- - struct TPolyedreInfo: virtual TElemInfo + typedef TVector TCConnSliceArr; + typedef TVector TConnSliceArr; + + //! Define a base class which represents MED Polyedre entity + struct TPolyedreInfo: + virtual TElemInfo { - EEntiteMaillage myTEntity; // MED_FACE|MED_MAILLE - EEntiteMaillage GetEntity() const { return myTEntity;} + //! Defines the MED Entity where the polyedres belongs to + EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE + //! Let known what MED ENTITY the MED Polyedres belong to + EEntiteMaillage GetEntity() const { return myEntity;} - EGeometrieElement myTGeom; // ePOLYEDRE + //! Defines the MED Geometric type of the instance + EGeometrieElement myGeom; // ePOLYEDRE + //! Let known what MED geometrical type the MED Polyedres belong to EGeometrieElement GetGeom() const { return ePOLYEDRE;} - EConnectivite myTConn; // eNOD|eDESC(eDESC not used) - EConnectivite GetConn() const { return myTConn;} + //! Defines connectivity mode + EConnectivite myConnMode; // eNOD|eDESC(eDESC not used) + //! Let known in what connectivity the cells are writen + EConnectivite GetConnMode() const { return myConnMode;} - TInt myNbConn; - TInt GetNbConn() const { return myNbConn;} + TElemNum myConn; //!< Table de connectivities + TElemNum myFaces; //!< Table de faces indexes + TElemNum myIndex; //!< Table de indexes - TElemNum myConn; // Table de connectivities - TElemNum GetConnectivite() const { return myConn;} - - TInt myNbFacesIndex; - TInt GetNbFacesIndex() const { return myNbFacesIndex;} - - TElemNum myFacesIndex; // Table de faces indexes - TElemNum GetFacesIndex() {return myFacesIndex;} - - TElemNum myIndex; // Table de indexes - TElemNum GetIndex() {return myIndex;} - TInt GetNbConn(TInt theElemId) const; + //! Gives number of the faces for the defined polyedre (const version) + TInt GetNbFaces(TInt theElemId) const; + //! Gives number of the nodes for the defined polyedre + TInt GetNbNodes(TInt theElemId) const; + + //! Gives sequence of the face connectivities for polyedre by its number (const version) + TCConnSliceArr GetConnSliceArr(TInt theElemId) const; + //! Gives sequence of the face connectivities for polyedre by its number + TConnSliceArr GetConnSliceArr(TInt theElemId); }; //--------------------------------------------------------------- - struct TFieldInfo: virtual TNameInfo + //! Define a base class which represents MED Field entity + struct TFieldInfo: + virtual TNameInfo { - PMeshInfo myMeshInfo; + PMeshInfo myMeshInfo; //!< A reference to correspondig MED Mesh + //! Get a reference to corresponding MED Mesh const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - ETypeChamp myType; + ETypeChamp myType; //!< Defines type of the MED Field + //! Let known what type of the MED FIELD is used ETypeChamp GetType() const { return myType;} - TInt myNbComp; + TInt myNbComp; //!< Defines number of components stored in the field + //! Get number of components for the MED FIELD TInt GetNbComp() const { return myNbComp;} - EBooleen myIsLocal; + EBooleen myIsLocal; //!< Defines if the MED Field is local + //! Let known is the MED FIELD is local or not EBooleen GetIsLocal() const { return myIsLocal;} - TInt myNbRef; + TInt myNbRef; //!< Defines number of refereces of the field + //! Let known number of references for the MED FIELD TInt GetNbRef() const { return myNbRef;} - TString myCompNames; + TString myCompNames; //!< Contains names for each of MED Field components + //! Get name of the component by its order number virtual std::string GetCompName(TInt theId) const = 0; + //! Set name for the component by its order number virtual void SetCompName(TInt theId, const std::string& theValue) = 0; - TString myUnitNames; + TString myUnitNames; //!< Contains units for each of MED Field components + //! Get unit of the component by its order number virtual std::string GetUnitName(TInt theId) const = 0; + //! Set unit for the component by its order number virtual void SetUnitName(TInt theId, const std::string& theValue) = 0; }; //--------------------------------------------------------------- - struct TTimeStampInfo: virtual TBase + //! Get dimension of the Gauss coordinates for the defined type of mesh cell + TInt + GetDimGaussCoord(EGeometrieElement theGeom); + + //! Get number of referenced nodes for the defined type of mesh cell + TInt + GetNbRefCoord(EGeometrieElement theGeom); + + typedef TFloatVector TWeight; + + //! The class represents MED Gauss entity + struct TGaussInfo: + virtual TNameInfo, + virtual TModeSwitchInfo + { + typedef boost::tuple TKey; + typedef boost::tuple TInfo; + struct TLess + { + bool + operator()(const TKey& theLeft, const TKey& theRight) const; + + bool + operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const; + }; + + //! Defines, which geometrical type the MED Gauss entity belongs to + EGeometrieElement myGeom; + //! Let known what MED geometrical type the MED GAUSS entity belong to + EGeometrieElement GetGeom() const { return myGeom;} + + //! Contains coordinates for the refereced nodes + TNodeCoord myRefCoord; + + //! Gives coordinates for the referenced node by its number + TCCoordSlice GetRefCoordSlice(TInt theId) const; + //! Gives coordinates for the referenced node by its number + TCoordSlice GetRefCoordSlice(TInt theId); + + //! Contains coordinates for the Gauss points + TNodeCoord myGaussCoord; + + //! Gives coordinates for the Gauss points by its number + TCCoordSlice GetGaussCoordSlice(TInt theId) const; + //! Gives coordinates for the Gauss points by its number + TCoordSlice GetGaussCoordSlice(TInt theId); + + //! Contains wheights for the Gauss points + TWeight myWeight; + + //! Gives number of the referenced nodes + TInt GetNbRef() const { return GetNbRefCoord(GetGeom());} + + //! Gives dimension of the referenced nodes + TInt GetDim() const { return GetDimGaussCoord(GetGeom());} + + //! Gives number of the Gauss Points + TInt GetNbGauss() const { return myGaussCoord.size()/GetDim();} + }; + + + //--------------------------------------------------------------- + typedef std::map TGeom2Gauss; + typedef std::map TGeom2NbGauss; + + //! Define a base class which represents MED TimeStamp + struct TTimeStampInfo: + virtual TBase { - PFieldInfo myFieldInfo; + PFieldInfo myFieldInfo; //!< A reference to correspondig MED Field + //! Get a reference to corresponding MED Field const PFieldInfo& GetFieldInfo() const { return myFieldInfo;} + //! Defines the MED Entity where the MED TimeStamp belongs to EEntiteMaillage myEntity; + //! Let known to what MED Entity the MED TimeStamp belong to EEntiteMaillage GetEntity() const { return myEntity;} - TGeom myGeom; - const TGeom& GetGeom() const { return myGeom;} + //! Keeps map of number of cells per geometric type where the MED TimeStamp belongs to + TGeom2Size myGeom2Size; + //! Get map of number of cells per geometric type where the MED TimeStamp belongs to + const TGeom2Size& GetGeom2Size() const { return myGeom2Size;} + + TGeom2NbGauss myGeom2NbGauss; //!< Keeps number of the Gauss Points for the MED TimeStamp + TInt GetNbGauss(EGeometrieElement theGeom) const; //!< Gives number of the Gauss Points for the MED TimeStamp - TInt myNbGauss, myNumDt, myNumOrd; - TInt GetNbGauss() const { return myNbGauss;} - TInt GetNumDt() const { return myNumDt;} - TInt GetNumOrd() const { return myNumOrd;} + TInt myNumDt; //!< Keeps number in time for the MED TimeStamp + TInt GetNumDt() const { return myNumDt;} //!< Defines number in time for the MED TimeStamp - TFloat myDt; - TFloat GetDt() const { return myDt;} + TInt myNumOrd; //!< Keeps number for the MED TimeStamp + TInt GetNumOrd() const { return myNumOrd;} //!< Defines number for the MED TimeStamp - TString myGaussName; - virtual std::string GetGaussName() const = 0; - virtual void SetGaussName(const std::string& theValue) = 0; + TFloat myDt; //!< Keeps time for the MED TimeStamp + TFloat GetDt() const { return myDt;} //!< Defines time for the MED TimeStamp - TString myUnitDt; + //! Keeps map of MED Gauss entityes per geometric type + TGeom2Gauss myGeom2Gauss; + //! Gets a map of MED Gauss entityes per geometric type + const TGeom2Gauss& GetGeom2Gauss() const { return myGeom2Gauss;} + + TString myUnitDt; //!< Defines unit for the time for the MED TimeStamp + //! Get unit of time for the MED TimeStamp virtual std::string GetUnitDt() const = 0; + //! Set unit of time for the MED TimeStamp virtual void SetUnitDt(const std::string& theValue) = 0; }; //--------------------------------------------------------------- - typedef std::vector TValue; - typedef std::map TMeshValue; + //! The class represents MED Profile entity + struct TProfileInfo: + virtual TNameInfo + { + typedef std::string TKey; + typedef boost::tuple TInfo; + + EModeProfil myMode; //!< Keeps mode for the MED Profile + //! Let known what mode of MED Profile is used + EModeProfil GetMode() const { return myMode;} + //! Set mode for the MED Profile + void SetMode(EModeProfil theMode) { myMode = theMode;} + + TElemNum myElemNum; //!< Keeps sequence of cell by its number which belong to the profile + //! Get number of mesh elelemts by its order number + TInt GetElemNum(TInt theId) const; + //! Set number of mesh elelemts by its order number + void SetElemNum(TInt theId, TInt theVal); + + //! Let known is the MED Profile defined + bool IsPresent() const { return GetName() != "";} + + //! Let known size of the MED Profile + TInt GetSize() const { return myElemNum.size();} + }; + + + //--------------------------------------------------------------- + typedef TFloatVector TValue; + typedef TSlice TValueSlice; + typedef TCSlice TCValueSlice; + + typedef TVector TCValueSliceArr; + typedef TVector TValueSliceArr; - struct TTimeStampVal: virtual TBase + //! The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp + struct TMeshValue: + virtual TModeSwitchInfo { - PTimeStampInfo myTimeStampInfo; + TValue myValue; + + TInt myNbElem; + TInt myNbComp; + TInt myNbGauss; + TInt myStep; + + //! Initialize the class + void + Init(TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode = eFULL_INTERLACE); + + //! Iteration through Gauss Points by their components + TCValueSliceArr + GetGaussValueSliceArr(TInt theElemId) const; + + //! Iteration through Gauss Points by their components + TValueSliceArr + GetGaussValueSliceArr(TInt theElemId); + + //! Iteration through components by corresponding Gauss Points + TCValueSliceArr + GetCompValueSliceArr(TInt theElemId) const; + + //! Iteration through components by corresponding Gauss Points + TValueSliceArr + GetCompValueSliceArr(TInt theElemId); + }; + + + //--------------------------------------------------------------- + typedef std::map TGeom2Value; + typedef std::map TGeom2Profile; + + //! The class implements a container for MED TimeStamp values + struct TTimeStampVal: + virtual TModeSwitchInfo + { + PTimeStampInfo myTimeStampInfo; //!< A reference to correspondig MED TimeStamp + //!< Get a reference to correspondig MED TimeStamp const PTimeStampInfo& GetTimeStampInfo() const { return myTimeStampInfo;} - TMeshValue myMeshValue; - TFloat GetVal(EGeometrieElement theGeom, TInt theId, - TInt theComp, TInt theGauss = 0) const; + //! Keeps map of MED Profiles per geometric type + TGeom2Profile myGeom2Profile; + //! Gets a map of MED Profiles per geometric type + const TGeom2Profile& GetGeom2Profile() const { return myGeom2Profile;} + + TGeom2Value myGeom2Value; - void SetVal(EGeometrieElement theGeom, TInt theId, - TInt theComp, TFloat theVal, TInt theGauss = 0); - EModeProfil myPflMode; - EModeProfil GetPflMode() const { return myPflMode;} - void GetPflMode(EModeProfil theVal) { myPflMode = theVal;} + //! Keeps map of MED TimeStamp values per geometric type (const version) + const TMeshValue& GetMeshValue(EGeometrieElement theGeom) const; - TString myPflName; - virtual std::string GetPflName() const = 0; - virtual void SetPflName(const std::string& theValue) = 0; + //! Keeps map of MED TimeStamp values per geometric type + TMeshValue& GetMeshValue(EGeometrieElement theGeom); }; } diff --git a/src/MEDWrapper/Base/MED_TStructures.hxx b/src/MEDWrapper/Base/MED_TStructures.hxx index ed9d00d69..71be52285 100644 --- a/src/MEDWrapper/Base/MED_TStructures.hxx +++ b/src/MEDWrapper/Base/MED_TStructures.hxx @@ -31,40 +31,41 @@ #include "MED_Structures.hxx" -namespace MED{ - - const TInt DESC = 200; - const TInt IDENT = 8; - const TInt NOM = 32; - const TInt LNOM = 80; - +namespace MED +{ //--------------------------------------------------------------- - template + template struct TTNameInfo: virtual TNameInfo { - TTNameInfo(const std::string& theValue = "") + TTNameInfo(const std::string& theValue) { - myName.resize(nNOM+1); + myName.resize(GetNOMLength()+1); SetName(theValue); } - virtual std::string GetName() const { - return GetString(0,nNOM,myName); + virtual + std::string + GetName() const + { + return GetString(0,GetNOMLength(),myName); } - virtual void SetName(const std::string& theValue){ - SetString(0,nNOM,myName,theValue); + virtual + void + SetName(const std::string& theValue) + { + SetString(0,GetNOMLength(),myName,theValue); } }; //--------------------------------------------------------------- - template + template struct TTMeshInfo: virtual TMeshInfo, - virtual TTNameInfo + virtual TTNameInfo { - typedef TTNameInfo TNameInfoBase; + typedef TTNameInfo TNameInfoBase; TTMeshInfo(const PMeshInfo& theInfo): TNameInfoBase(theInfo->GetName()) @@ -72,40 +73,46 @@ namespace MED{ myDim = theInfo->GetDim(); myType = theInfo->GetType(); - myDesc.resize(nDESC+1); + myDesc.resize(GetDESCLength()+1); SetDesc(theInfo->GetDesc()); } - TTMeshInfo(TInt theDim = 0, - const std::string& theValue = "", - EMaillage theType = eNON_STRUCTURE, - const std::string& theDesc = ""): + TTMeshInfo(TInt theDim, + const std::string& theValue, + EMaillage theType, + const std::string& theDesc): TNameInfoBase(theValue) { myDim = theDim; myType = theType; - myDesc.resize(nDESC+1); + myDesc.resize(GetDESCLength()+1); SetDesc(theDesc); } - virtual std::string GetDesc() const { - return GetString(0,nDESC,myDesc); + virtual + std::string + GetDesc() const + { + return GetString(0,GetDESCLength(),myDesc); } - virtual void SetDesc(const std::string& theValue){ - SetString(0,nDESC,myDesc,theValue); + virtual + void + SetDesc(const std::string& theValue) + { + SetString(0,GetDESCLength(),myDesc,theValue); } }; //--------------------------------------------------------------- - template + template struct TTFamilyInfo: virtual TFamilyInfo, - virtual TTNameInfo + virtual TTNameInfo { - typedef TTNameInfo TNameInfoBase; + typedef TTNameInfo TNameInfoBase; TTFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo): TNameInfoBase(theInfo->GetName()) @@ -115,7 +122,7 @@ namespace MED{ myId = theInfo->GetId(); myNbGroup = theInfo->GetNbGroup(); - myGroupNames.resize(myNbGroup*nLNOM+1); + myGroupNames.resize(myNbGroup*GetLNOMLength()+1); if(myNbGroup){ for(TInt anId = 0; anId < myNbGroup; anId++){ SetGroupName(anId,theInfo->GetGroupName(anId)); @@ -125,7 +132,7 @@ namespace MED{ myNbAttr = theInfo->GetNbAttr(); myAttrId.resize(myNbAttr); myAttrVal.resize(myNbAttr); - myAttrDesc.resize(myNbAttr*nDESC+1); + myAttrDesc.resize(myNbAttr*GetDESCLength()+1); if(myNbAttr){ for(TInt anId = 0; anId < myNbAttr; anId++){ SetAttrDesc(anId,theInfo->GetAttrDesc(anId)); @@ -136,10 +143,10 @@ namespace MED{ } TTFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theNbGroup = 0, - TInt theNbAttr = 0, - TInt theId = 0, - const std::string& theValue = ""): + TInt theNbGroup, + TInt theNbAttr, + TInt theId, + const std::string& theValue): TNameInfoBase(theValue) { myMeshInfo = theMeshInfo; @@ -147,21 +154,21 @@ namespace MED{ myId = theId; myNbGroup = theNbGroup; - myGroupNames.resize(theNbGroup*nLNOM+1); + myGroupNames.resize(theNbGroup*GetLNOMLength()+1); myNbAttr = theNbAttr; myAttrId.resize(theNbAttr); myAttrVal.resize(theNbAttr); - myAttrDesc.resize(theNbAttr*nDESC+1); + myAttrDesc.resize(theNbAttr*GetDESCLength()+1); } TTFamilyInfo(const PMeshInfo& theMeshInfo, const std::string& theValue, TInt theId, const TStringSet& theGroupNames, - const TStringVector& theAttrDescs = TStringVector(), - const TIntVector& theAttrIds = TIntVector(), - const TIntVector& theAttrVals = TIntVector()): + const TStringVector& theAttrDescs, + const TIntVector& theAttrIds, + const TIntVector& theAttrVals): TNameInfoBase(theValue) { myMeshInfo = theMeshInfo; @@ -169,7 +176,7 @@ namespace MED{ myId = theId; myNbGroup = theGroupNames.size(); - myGroupNames.resize(myNbGroup*nLNOM+1); + myGroupNames.resize(myNbGroup*GetLNOMLength()+1); if(myNbGroup){ TStringSet::const_iterator anIter = theGroupNames.begin(); for(TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){ @@ -181,7 +188,7 @@ namespace MED{ myNbAttr = theAttrDescs.size(); myAttrId.resize(myNbAttr); myAttrVal.resize(myNbAttr); - myAttrDesc.resize(myNbAttr*nDESC+1); + myAttrDesc.resize(myNbAttr*GetDESCLength()+1); if(myNbAttr){ for(TInt anId = 0, anEnd = theAttrDescs.size(); anId < anEnd; anId++){ SetAttrDesc(anId,theAttrDescs[anId]); @@ -191,26 +198,38 @@ namespace MED{ } } - virtual std::string GetGroupName(TInt theId) const { - return GetString(theId,nLNOM,myGroupNames); + virtual + std::string + GetGroupName(TInt theId) const + { + return GetString(theId,GetLNOMLength(),myGroupNames); } - virtual void SetGroupName(TInt theId, const std::string& theValue){ - SetString(theId,nLNOM,myGroupNames,theValue); + virtual + void + SetGroupName(TInt theId, const std::string& theValue) + { + SetString(theId,GetLNOMLength(),myGroupNames,theValue); } - virtual std::string GetAttrDesc(TInt theId) const { - return GetString(theId,nDESC,myAttrDesc); + virtual + std::string + GetAttrDesc(TInt theId) const + { + return GetString(theId,GetDESCLength(),myAttrDesc); } - virtual void SetAttrDesc(TInt theId, const std::string& theValue){ - SetString(theId,nDESC,myAttrDesc,theValue); + virtual + void + SetAttrDesc(TInt theId, const std::string& theValue) + { + SetString(theId,GetDESCLength(),myAttrDesc,theValue); } }; //--------------------------------------------------------------- - template + template struct TTElemInfo: virtual TElemInfo { TTElemInfo(const PMeshInfo& theMeshInfo, const PElemInfo& theInfo) @@ -224,7 +243,7 @@ namespace MED{ myElemNum.resize(myIsElemNum == eFAUX? 0: myNbElem); myIsElemNames = theInfo->IsElemNames(); - myElemNames.resize(myNbElem*nPNOM+1); + myElemNames.resize(myNbElem*GetPNOMLength()+1); if(myNbElem){ for(TInt anId = 0; anId < myNbElem; anId++){ @@ -245,8 +264,8 @@ namespace MED{ TTElemInfo(const PMeshInfo& theMeshInfo, TInt theNbElem, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + EBooleen theIsElemNum, + EBooleen theIsElemNames) { myMeshInfo = theMeshInfo; @@ -254,39 +273,43 @@ namespace MED{ myFamNum.resize(theNbElem); myIsElemNum = theIsElemNum; - myElemNum.resize(theIsElemNum == eFAUX? 0: theNbElem); + if(theIsElemNum) + myElemNum.resize(theNbElem); myIsElemNames = theIsElemNames; - myElemNames.resize(theNbElem*nPNOM+1); + if(theIsElemNames) + myElemNames.resize(theNbElem*GetPNOMLength()+1); } TTElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, const TIntVector& theFamilyNums, const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + const TStringVector& theElemNames) { myMeshInfo = theMeshInfo; - myNbElem = theFamilyNums.size(); - myFamNum.resize(myNbElem); + myNbElem = theNbElem; myIsElemNum = theElemNums.size()? eVRAI: eFAUX; - myElemNum.resize(theElemNums.size()); + if(myIsElemNum) + myElemNum.resize(theNbElem); myIsElemNames = theElemNames.size()? eVRAI: eFAUX; - myElemNames.resize(theElemNames.size()*nPNOM+1); + if(myIsElemNames) + myElemNames.resize(theNbElem*GetPNOMLength()+1); - if(myNbElem){ - for(TInt anId = 0; anId < myNbElem; anId++){ - myFamNum[anId] = theFamilyNums[anId]; - } - if(myIsElemNum == eVRAI){ - for(TInt anId = 0; anId < myNbElem; anId++){ - myElemNum[anId] = theElemNums[anId]; - } - } - if(myIsElemNames == eVRAI){ - for(TInt anId = 0; anId < myNbElem; anId++){ + if(theNbElem){ + + myFamNum.resize(theNbElem); + if(theFamilyNums.size()) + myFamNum = theFamilyNums; + + if(myIsElemNum) + myElemNum = theElemNums; + + if(myIsElemNames){ + for(TInt anId = 0; anId < theNbElem; anId++){ const std::string& aVal = theElemNames[anId]; SetElemName(anId,aVal); } @@ -294,334 +317,371 @@ namespace MED{ } } - virtual std::string GetElemName(TInt theId) const { - return GetString(theId,nPNOM,myElemNames); + virtual + std::string + GetElemName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myElemNames); } - virtual void SetElemName(TInt theId, const std::string& theValue){ - SetString(theId,nPNOM,myElemNames,theValue); + virtual + void + SetElemName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myElemNames,theValue); } }; //--------------------------------------------------------------- - template + template struct TTNodeInfo: virtual TNodeInfo, - virtual TTElemInfo + virtual TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo): - TElemInfoBase(theMeshInfo,theInfo) + TElemInfoBase(theMeshInfo,theInfo), + TNodeInfo(theInfo) { + myModeSwitch = theInfo->GetModeSwitch(); + mySystem = theInfo->GetSystem(); - - TInt aDim = theMeshInfo->GetDim(); - TInt aNbElem = theInfo->GetNbElem(); - myCoord.resize(aNbElem*aDim); - for(TInt anElemId = 0; anElemId < aNbElem; anElemId++){ - for(TInt anDimId = 0; anDimId < aDim; anDimId++){ - SetNodeCoord(anElemId,anDimId,theInfo->GetNodeCoord(anElemId,anDimId)); - } - } + myCoord = theInfo->myCoord; + + TInt aDim = theMeshInfo->GetDim(); - myCoordNames.resize(aDim*nPNOM+1); - for(TInt anId = 0; anId < aDim; anId++){ + myCoordNames.resize(aDim*GetPNOMLength()+1); + for(TInt anId = 0; anId < aDim; anId++) SetCoordName(anId,theInfo->GetCoordName(anId)); - } - myCoordUnits.resize(aDim*nPNOM+1); - for(TInt anId = 0; anId < aDim; anId++){ + myCoordUnits.resize(aDim*GetPNOMLength()+1); + for(TInt anId = 0; anId < aDim; anId++) SetCoordUnit(anId,theInfo->GetCoordUnit(anId)); - } } TTNodeInfo(const PMeshInfo& theMeshInfo, TInt theNbElem, - ERepere theSystem = eCART, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI): + EModeSwitch theMode, + ERepere theSystem, + EBooleen theIsElemNum, + EBooleen theIsElemNames): TElemInfoBase(theMeshInfo, theNbElem, theIsElemNum, - theIsElemNames) + theIsElemNames), + TModeSwitchInfo(theMode) { mySystem = theSystem; + myCoord.resize(theNbElem*theMeshInfo->myDim); - myCoordNames.resize(theMeshInfo->myDim*nPNOM+1); - myCoordUnits.resize(theMeshInfo->myDim*nPNOM+1); + + if(theIsElemNum) + myCoordUnits.resize(theMeshInfo->myDim*GetPNOMLength()+1); + + if(theIsElemNames) + myCoordNames.resize(theMeshInfo->myDim*GetPNOMLength()+1); } TTNodeInfo(const PMeshInfo& theMeshInfo, - ERepere theSystem, const TFloatVector& theNodeCoords, + EModeSwitch theMode, + ERepere theSystem, const TStringVector& theCoordNames, const TStringVector& theCoordUnits, const TIntVector& theFamilyNums, const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()): + const TStringVector& theElemNames): TElemInfoBase(theMeshInfo, + theNodeCoords.size()/theMeshInfo->GetDim(), theFamilyNums, theElemNums, - theElemNames) + theElemNames), + TModeSwitchInfo(theMode) { mySystem = theSystem; - myCoord.resize(theNodeCoords.size()); - - for(TInt anId = 0, anEnd = myCoord.size(); anId < anEnd; anId++){ - myCoord[anId] = theNodeCoords[anId]; - } + myCoord = theNodeCoords; + TInt aDim = theMeshInfo->GetDim(); - myCoordNames.resize(aDim*nPNOM+1); - for(TInt anId = 0; anId < aDim; anId++){ - SetCoordName(anId,theCoordNames[anId]); - } + + myCoordNames.resize(aDim*GetPNOMLength()+1); + if(!theCoordNames.empty()) + for(TInt anId = 0; anId < aDim; anId++) + SetCoordName(anId,theCoordNames[anId]); - myCoordUnits.resize(aDim*nPNOM+1); - for(TInt anId = 0; anId < aDim; anId++){ - SetCoordUnit(anId,theCoordUnits[anId]); - } + myCoordUnits.resize(aDim*GetPNOMLength()+1); + if(!theCoordUnits.empty()) + for(TInt anId = 0; anId < aDim; anId++) + SetCoordUnit(anId,theCoordUnits[anId]); } - virtual std::string GetCoordName(TInt theId) const { - return GetString(theId,nPNOM,myCoordNames); + virtual + std::string + GetCoordName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myCoordNames); } - virtual void SetCoordName(TInt theId, const std::string& theValue){ - SetString(theId,nPNOM,myCoordNames,theValue); + virtual + void + SetCoordName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myCoordNames,theValue); } - virtual std::string GetCoordUnit(TInt theId) const { - return GetString(theId,nPNOM,myCoordUnits); + virtual + std::string + GetCoordUnit(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myCoordUnits); } - virtual void SetCoordUnit(TInt theId, const std::string& theValue){ - SetString(theId,nPNOM,myCoordUnits,theValue); + virtual + void + SetCoordUnit(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myCoordUnits,theValue); } }; //--------------------------------------------------------------- - template + template struct TTPolygoneInfo: virtual TPolygoneInfo, - virtual TTElemInfo + virtual TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) { - myTEntity = theInfo->GetEntity(); - myTGeom = theInfo->GetGeom(); - myTConn = theInfo->GetConn(); - myConnDim = theInfo->GetConnDim(); - myConn = theInfo->GetConnectivite(); - myIndex = theInfo->GetIndex(); + myEntity = theInfo->GetEntity(); + myGeom = theInfo->GetGeom(); + + myIndex = theInfo->myIndex; + myConn = theInfo->myConn; + + myConnMode = theInfo->GetConnMode(); } TTPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - TInt theNbConn, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI): + TInt theConnSize, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames): TElemInfoBase(theMeshInfo, theNbElem, theIsElemNum, theIsElemNames) { - myTEntity = theTEntity; - myTGeom = theTGeom; - myTConn = theTConn; - myConnDim = theNbConn; - myConn.resize(myConnDim); + myEntity = theEntity; + myGeom = theGeom; + myIndex.resize(theNbElem+1); + myConn.resize(theConnSize); + + myConnMode = theConnMode; } TTPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theIndexes, + const TIntVector& theConnectivities, + EConnectivite theConnMode, const TIntVector& theFamilyNums, const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()): + const TStringVector& theElemNames): TElemInfoBase(theMeshInfo, + theIndexes.size() - 1, theFamilyNums, theElemNums, theElemNames) { - myTEntity = theTEntity; - myTGeom = theTGeom; - myTConn = theTConn; - myConnDim = theConnectivities.size(); - myConn = theConnectivities; + myEntity = theEntity; + myGeom = theGeom; + myIndex = theIndexes; + myConn = theConnectivities; + + myConnMode = theConnMode; } }; //--------------------------------------------------------------- - template + template struct TTPolyedreInfo: virtual TPolyedreInfo, - virtual TTElemInfo + virtual TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) { - myTEntity = theInfo->GetEntity(); - myTGeom = theInfo->GetGeom(); - myTConn = theInfo->GetConn(); - myNbConn = theInfo->GetNbConn(); - myNbFacesIndex = theInfo->GetNbFacesIndex(); - myConn = theInfo->GetConnectivite(); - myFacesIndex = theInfo->GetFacesIndex(); - myIndex = theInfo->GetIndex(); + myEntity = theInfo->GetEntity(); + myGeom = theInfo->GetGeom(); + + myIndex = theInfo->myIndex; + myFaces = theInfo->myFaces; + myConn = theInfo->myConn; + + myConnMode = theInfo->GetConnMode(); } TTPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - TInt theNbConn, - TInt theNbFacesIndex, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI): + TInt theNbFaces, + TInt theConnSize, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames): TElemInfoBase(theMeshInfo, theNbElem, theIsElemNum, theIsElemNames) { - myTEntity = theTEntity; - myTGeom = theTGeom; - myTConn = theTConn; - myNbConn = theNbConn; - myNbFacesIndex = theNbFacesIndex; - myConn.resize(myNbConn); - myFacesIndex.resize(myNbFacesIndex); - myIndex.resize(theNbElem+1); + myEntity = theEntity; + myGeom = theGeom; + + myIndex.resize(theNbElem + 1); + myFaces.resize(theNbFaces); + myConn.resize(theConnSize); + + myConnMode = theConnMode; } TTPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFacesIndexes, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theIndexes, + const TIntVector& theFaces, + const TIntVector& theConnectivities, + EConnectivite theConnMode, const TIntVector& theFamilyNums, const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()): + const TStringVector& theElemNames): TElemInfoBase(theMeshInfo, + theIndexes.size()-1, theFamilyNums, theElemNums, theElemNames) { - myTEntity = theTEntity; - myTGeom = theTGeom; - myTConn = theTConn; - myNbConn = theConnectivities.size(); - myNbFacesIndex = theFacesIndexes.size(); - myConn = theConnectivities; - myFacesIndex = theFacesIndexes; + myEntity = theEntity; + myGeom = theGeom; + myIndex = theIndexes; + myFaces = theFaces; + myConn = theConnectivities; + + myConnMode = theConnMode; } }; //--------------------------------------------------------------- - template + template struct TTCellInfo: virtual TCellInfo, - virtual TTElemInfo + virtual TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) { - myTEntity = theInfo->GetEntity(); - myTGeom = theInfo->GetGeom(); - myTConn = theInfo->GetConn(); + myEntity = theInfo->GetEntity(); + myGeom = theInfo->GetGeom(); + myConnMode = theInfo->GetConnMode(); - TInt aConnDim = GetNbNodes(myTGeom); - myConn.resize(myNbElem*GetNbConn(myTGeom,myTEntity,myMeshInfo->myDim)); + TInt aConnDim = GetNbNodes(myGeom); + myConn.resize(myNbElem*GetNbConn(myGeom,myEntity,myMeshInfo->myDim)); for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ + TConnSlice aConnSlice = GetConnSlice(anElemId); + TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId); for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ - SetConn(anElemId,anConnId,theInfo->GetConn(anElemId,anConnId)); + aConnSlice[anConnId] = aConnSlice2[anConnId]; } } } TTCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI): + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames, + EModeSwitch theMode): TElemInfoBase(theMeshInfo, theNbElem, theIsElemNum, - theIsElemNames) + theIsElemNames), + TModeSwitchInfo(theMode) { - myTEntity = theTEntity; - myTGeom = theTGeom; - myTConn = theTConn; - myConn.resize(theNbElem*GetNbConn(theTGeom,myTEntity,theMeshInfo->myDim)); + myEntity = theEntity; + myGeom = theGeom; + + myConnMode = theConnMode; + myConn.resize(theNbElem*GetNbConn(theGeom,myEntity,theMeshInfo->myDim)); } TTCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theConnectivities, + EConnectivite theConnMode, const TIntVector& theFamilyNums, const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()): + const TStringVector& theElemNames, + EModeSwitch theMode): TElemInfoBase(theMeshInfo, + theConnectivities.size()/GetNbNodes(theGeom), theFamilyNums, theElemNums, - theElemNames) + theElemNames), + TModeSwitchInfo(theMode) { - myTEntity = theTEntity; - myTGeom = theTGeom; - myTConn = theTConn; + myEntity = theEntity; + myGeom = theGeom; - TInt aConnDim = GetNbNodes(myTGeom); - myNbElem = theConnectivities.size() / aConnDim; - myConn.resize(myNbElem*GetNbConn(myTGeom,myTEntity,myMeshInfo->myDim)); + myConnMode = theConnMode; + TInt aConnDim = GetNbNodes(myGeom); + myConn.resize(myNbElem*GetNbConn(myGeom,myEntity,myMeshInfo->myDim)); for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ + TConnSlice aConnSlice = GetConnSlice(anElemId); for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ - SetConn(anElemId,anConnId,theConnectivities[anElemId*aConnDim+anConnId]); + aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim+anConnId]; } } } - virtual TInt GetConnDim() const { - return GetNbConn(myTGeom,myTEntity,myMeshInfo->myDim); + virtual + TInt + GetConnDim() const + { + return GetNbConn(myGeom,myEntity,myMeshInfo->myDim); } }; //--------------------------------------------------------------- - template + template struct TTFieldInfo: virtual TFieldInfo, - virtual TTNameInfo + virtual TTNameInfo { - typedef TTNameInfo TNameInfoBase; + typedef TTNameInfo TNameInfoBase; TTFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo): TNameInfoBase(theInfo->GetName()) @@ -629,12 +689,12 @@ namespace MED{ myMeshInfo = theMeshInfo; myNbComp = theInfo->GetNbComp(); - myCompNames.resize(myNbComp*nPNOM+1); + myCompNames.resize(myNbComp*GetPNOMLength()+1); for(TInt anId = 0; anId < myNbComp; anId++){ SetCompName(anId,theInfo->GetCompName(anId)); } - myUnitNames.resize(myNbComp*nPNOM+1); + myUnitNames.resize(myNbComp*GetPNOMLength()+1); for(TInt anId = 0; anId < myNbComp; anId++){ SetUnitName(anId,theInfo->GetUnitName(anId)); } @@ -646,18 +706,18 @@ namespace MED{ } TTFieldInfo(const PMeshInfo& theMeshInfo, - TInt theNbComp = 0, - ETypeChamp theType = eFLOAT64, - const std::string& theValue = "", - EBooleen theIsLocal = eVRAI, - TInt theNbRef = 1): + TInt theNbComp, + ETypeChamp theType, + const std::string& theValue, + EBooleen theIsLocal, + TInt theNbRef): TNameInfoBase(theValue) { myMeshInfo = theMeshInfo; myNbComp = theNbComp; - myCompNames.resize(theNbComp*nPNOM+1); - myUnitNames.resize(theNbComp*nPNOM+1); + myCompNames.resize(theNbComp*GetPNOMLength()+1); + myUnitNames.resize(theNbComp*GetPNOMLength()+1); myType = theType; @@ -665,26 +725,63 @@ namespace MED{ myNbRef = theNbRef; } - virtual std::string GetCompName(TInt theId) const { - return GetString(theId,nPNOM,myCompNames); + virtual + std::string + GetCompName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myCompNames); + } + + virtual + void + SetCompName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myCompNames,theValue); } - virtual void SetCompName(TInt theId, const std::string& theValue){ - SetString(theId,nPNOM,myCompNames,theValue); + virtual + std::string + GetUnitName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myUnitNames); } - virtual std::string GetUnitName(TInt theId) const { - return GetString(theId,nPNOM,myUnitNames); + virtual + void + SetUnitName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myUnitNames,theValue); } + }; + - virtual void SetUnitName(TInt theId, const std::string& theValue){ - SetString(theId,nPNOM,myUnitNames,theValue); + //--------------------------------------------------------------- + template + struct TTGaussInfo: + virtual TGaussInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTGaussInfo(const TGaussInfo::TInfo& theInfo, + EModeSwitch theMode): + TNameInfoBase(boost::get<1>(boost::get<0>(theInfo))), + TModeSwitchInfo(theMode) + { + const TGaussInfo::TKey& aKey = boost::get<0>(theInfo); + + myGeom = boost::get<0>(aKey); + myRefCoord.resize(GetNbRef()*GetDim()); + + TInt aNbGauss = boost::get<1>(theInfo); + myGaussCoord.resize(aNbGauss*GetDim()); + myWeight.resize(aNbGauss); } }; //--------------------------------------------------------------- - template + template struct TTTimeStampInfo: virtual TTimeStampInfo { TTTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo) @@ -692,126 +789,124 @@ namespace MED{ myFieldInfo = theFieldInfo; myEntity = theInfo->GetEntity(); - myGeom = theInfo->GetGeom(); + myGeom2Size = theInfo->GetGeom2Size(); - myNbGauss = theInfo->GetNbGauss(); myNumDt = theInfo->GetNumDt(); myNumOrd = theInfo->GetNumOrd(); myDt = theInfo->GetDt(); - myUnitDt.resize(nPNOM+1); + myUnitDt.resize(GetPNOMLength()+1); SetUnitDt(theInfo->GetUnitDt()); - myGaussName.resize(nNOM+1); - SetGaussName(theInfo->GetGaussName()); + myGeom2NbGauss = theInfo->myGeom2NbGauss; + myGeom2Gauss = theInfo->GetGeom2Gauss(); } TTTimeStampInfo(const PFieldInfo& theFieldInfo, EEntiteMaillage theEntity, - const TGeom& theGeom, - TInt theNbGauss = 0, - TInt theNumDt = 0, - TInt theNumOrd = 0, - TFloat theDt = 0, - const std::string& theUnitDt = "", - const std::string& theGaussName = "") + const TGeom2Size& theGeom2Size, + const TGeom2NbGauss& theGeom2NbGauss, + TInt theNumDt, + TInt theNumOrd, + TFloat theDt, + const std::string& theUnitDt, + const TGeom2Gauss& theGeom2Gauss) { myFieldInfo = theFieldInfo; myEntity = theEntity; - myGeom = theGeom; + myGeom2Size = theGeom2Size; - myNbGauss = theNbGauss; myNumDt = theNumDt; myNumOrd = theNumDt; myDt = theDt; - myUnitDt.resize(nPNOM+1); + myUnitDt.resize(GetPNOMLength()+1); SetUnitDt(theUnitDt); - myGaussName.resize(nNOM+1); - SetGaussName(theGaussName); + myGeom2NbGauss = theGeom2NbGauss; + myGeom2Gauss = theGeom2Gauss; } - virtual std::string GetGaussName() const { - return GetString(0,nNOM,myGaussName); + virtual + std::string + GetUnitDt() const + { + return GetString(0,GetPNOMLength(),myUnitDt); } - virtual void SetGaussName(const std::string& theValue){ - SetString(0,nNOM,myGaussName,theValue); + virtual + void + SetUnitDt(const std::string& theValue) + { + SetString(0,GetPNOMLength(),myUnitDt,theValue); } + }; - virtual std::string GetUnitDt() const { - return GetString(0,nPNOM,myUnitDt); - } - virtual void SetUnitDt(const std::string& theValue){ - SetString(0,nPNOM,myUnitDt,theValue); + //--------------------------------------------------------------- + template + struct TTProfileInfo: + virtual TProfileInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTProfileInfo(const TProfileInfo::TInfo& theInfo, + EModeProfil theMode): + TNameInfoBase(boost::get<0>(theInfo)) + { + TInt aSize = boost::get<1>(theInfo); + myElemNum.resize(aSize); + myMode = aSize > 0? theMode: eNO_PFLMOD; } }; //--------------------------------------------------------------- - template + template struct TTTimeStampVal: virtual TTimeStampVal { - TTTimeStampVal(const PTimeStampInfo& theTimeStampInfo, const PTimeStampVal& theInfo) + TTTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampVal& theInfo) { myTimeStampInfo = theTimeStampInfo; - myPflMode = theInfo->GetPflMode(); + myGeom2Profile = theInfo->GetGeom2Profile(); - myPflName.resize(nNOM+1); - SetPflName(theInfo->GetPflName()); - - TInt aNbComp = theTimeStampInfo->GetFieldInfo()->GetNbComp(); - const TGeom& aTGeom = theTimeStampInfo->GetGeom(); - TInt aNbGauss = theTimeStampInfo->GetNbGauss(); - TGeom::const_iterator anIter = aTGeom.begin(); - for(; anIter != aTGeom.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - TInt aNbElem = anIter->second; - TInt aSize = aNbElem*aNbComp*aNbGauss; - TValue& aValue = myMeshValue[aGeom]; - aValue.resize(aSize); - for(TInt anElemId = 0; anElemId < aNbElem; anElemId++){ - for(TInt aCompId = 0; aCompId < aNbComp; aCompId++){ - for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++){ - SetVal(aGeom,anElemId,aCompId,theInfo->GetVal(aGeom,anElemId,aCompId,aGaussId),aGaussId); - } - } - } - } + myGeom2Value = theInfo->myGeom2Value; } TTTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const std::string& thePflName = "", - EModeProfil thePflMode = eCOMPACT) + const TGeom2Profile& theGeom2Profile, + EModeSwitch theMode): + TModeSwitchInfo(theMode) { myTimeStampInfo = theTimeStampInfo; - myPflMode = thePflMode; - - myPflName.resize(nNOM+1); - SetPflName(thePflName); + myGeom2Profile = theGeom2Profile; TInt aNbComp = theTimeStampInfo->myFieldInfo->myNbComp; - TInt aNbGauss = theTimeStampInfo->myNbGauss; - const TGeom& aTGeom = theTimeStampInfo->myGeom; - TGeom::const_iterator anIter = aTGeom.begin(); - for(; anIter != aTGeom.end(); anIter++){ + + const TGeom2Size& aGeom2Size = theTimeStampInfo->myGeom2Size; + TGeom2Size::const_iterator anIter = aGeom2Size.begin(); + for(; anIter != aGeom2Size.end(); anIter++){ const EGeometrieElement& aGeom = anIter->first; - TInt aNb = anIter->second*aNbComp*aNbGauss; - myMeshValue[aGeom].resize(aNb); - } - } + TInt aNbElem = anIter->second; - virtual std::string GetPflName() const { - return GetString(0,nNOM,myPflName); - } - - virtual void SetPflName(const std::string& theValue){ - SetString(0,nNOM,myPflName,theValue); + MED::PProfileInfo aProfileInfo; + MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom); + if(anIter != theGeom2Profile.end()) + aProfileInfo = anIter->second; + + if(aProfileInfo && aProfileInfo->IsPresent()) + aNbElem = aProfileInfo->GetSize(); + + TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom); + + TMeshValue& aMeshValue = GetMeshValue(aGeom); + aMeshValue.Init(aNbElem,aNbGauss,aNbComp); + } } }; diff --git a/src/MEDWrapper/Base/MED_TWrapper.hxx b/src/MEDWrapper/Base/MED_TWrapper.hxx index e07ae30f8..3faa314c7 100644 --- a/src/MEDWrapper/Base/MED_TWrapper.hxx +++ b/src/MEDWrapper/Base/MED_TWrapper.hxx @@ -32,10 +32,12 @@ #include "MED_TStructures.hxx" #include "MED_Wrapper.hxx" -namespace MED{ +namespace MED +{ - template - class TTWrapper: public TWrapper{ + template + class TTWrapper: public TWrapper + { public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ virtual @@ -45,7 +47,7 @@ namespace MED{ EMaillage theType = eNON_STRUCTURE, const std::string& theDesc = "") { - return PMeshInfo(new TTMeshInfo + return PMeshInfo(new TTMeshInfo (theDim, theValue, theType, @@ -56,7 +58,7 @@ namespace MED{ PMeshInfo CrMeshInfo(const PMeshInfo& theInfo) { - return PMeshInfo(new TTMeshInfo(theInfo)); + return PMeshInfo(new TTMeshInfo(theInfo)); } @@ -69,7 +71,7 @@ namespace MED{ TInt theId = 0, const std::string& theValue = "") { - return PFamilyInfo(new TTFamilyInfo + return PFamilyInfo(new TTFamilyInfo (theMeshInfo, theNbGroup, theNbAttr, @@ -87,7 +89,7 @@ namespace MED{ const MED::TIntVector& theAttrIds = MED::TIntVector(), const MED::TIntVector& theAttrVals = MED::TIntVector()) { - return PFamilyInfo(new TTFamilyInfo + return PFamilyInfo(new TTFamilyInfo (theMeshInfo, theValue, theId, @@ -102,7 +104,7 @@ namespace MED{ CrFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo) { - return PFamilyInfo(new TTFamilyInfo + return PFamilyInfo(new TTFamilyInfo (theMeshInfo, theInfo)); } @@ -113,13 +115,15 @@ namespace MED{ PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, TInt theNbElem, + EModeSwitch theMode = eFULL_INTERLACE, ERepere theSystem = eCART, EBooleen theIsElemNum = eVRAI, EBooleen theIsElemNames = eVRAI) { - return PNodeInfo(new TTNodeInfo + return PNodeInfo(new TTNodeInfo (theMeshInfo, theNbElem, + theMode, theSystem, theIsElemNum, theIsElemNames)); @@ -128,18 +132,20 @@ namespace MED{ virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - ERepere theSystem, const TFloatVector& theNodeCoords, - const TStringVector& theCoordNames, - const TStringVector& theCoordUnits, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, + EModeSwitch theMode = eFULL_INTERLACE, + ERepere theSystem = eCART, + const TStringVector& theCoordNames = TStringVector(), + const TStringVector& theCoordUnits = TStringVector(), + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), const TStringVector& theElemNames = TStringVector()) { - return PNodeInfo(new TTNodeInfo + return PNodeInfo(new TTNodeInfo (theMeshInfo, - theSystem, theNodeCoords, + theMode, + theSystem, theCoordNames, theCoordUnits, theFamilyNums, @@ -152,7 +158,7 @@ namespace MED{ CrNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo) { - return PNodeInfo(new TTNodeInfo + return PNodeInfo(new TTNodeInfo (theMeshInfo, theInfo)); } @@ -161,21 +167,21 @@ namespace MED{ virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - TInt theNbConn, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, + TInt theConnSize, + EConnectivite theConnMode = eNOD, EBooleen theIsElemNum = eVRAI, EBooleen theIsElemNames = eVRAI) { - return PPolygoneInfo(new TTPolygoneInfo + return PPolygoneInfo(new TTPolygoneInfo (theMeshInfo, + theEntity, + theGeom, theNbElem, - theNbConn, - theTEntity, - theTGeom, - theTConn, + theConnSize, + theConnMode, theIsElemNum, theIsElemNames)); } @@ -183,22 +189,22 @@ namespace MED{ virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theIndexes, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), const TStringVector& theElemNames = TStringVector()) { - return PPolygoneInfo(new TTPolygoneInfo + return PPolygoneInfo(new TTPolygoneInfo (theMeshInfo, - theTEntity, - theTGeom, - theTConn, - theConnectivities, + theEntity, + theGeom, theIndexes, + theConnectivities, + theConnMode, theFamilyNums, theElemNums, theElemNames)); @@ -209,7 +215,7 @@ namespace MED{ CrPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo) { - return PPolygoneInfo(new TTPolygoneInfo + return PPolygoneInfo(new TTPolygoneInfo (theMeshInfo, theInfo)); } @@ -218,23 +224,23 @@ namespace MED{ virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - TInt theNbConn, TInt theNbFaces, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, + TInt theConnSize, + EConnectivite theConnMode = eNOD, EBooleen theIsElemNum = eVRAI, EBooleen theIsElemNames = eVRAI) { - return PPolyedreInfo(new TTPolyedreInfo + return PPolyedreInfo(new TTPolyedreInfo (theMeshInfo, + theEntity, + theGeom, theNbElem, - theNbConn, theNbFaces, - theTEntity, - theTGeom, - theTConn, + theConnSize, + theConnMode, theIsElemNum, theIsElemNames)); } @@ -242,24 +248,24 @@ namespace MED{ virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFacesIndexes, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theIndexes, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, + const TIntVector& theFaces, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), const TStringVector& theElemNames = TStringVector()) { - return PPolyedreInfo(new TTPolyedreInfo + return PPolyedreInfo(new TTPolyedreInfo (theMeshInfo, - theTEntity, - theTGeom, - theTConn, - theConnectivities, - theFacesIndexes, + theEntity, + theGeom, theIndexes, + theFaces, + theConnectivities, + theConnMode, theFamilyNums, theElemNums, theElemNames)); @@ -270,7 +276,7 @@ namespace MED{ CrPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo) { - return PPolyedreInfo(new TTPolyedreInfo + return PPolyedreInfo(new TTPolyedreInfo (theMeshInfo, theInfo)); } @@ -279,43 +285,47 @@ namespace MED{ virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, + EConnectivite theConnMode = eNOD, EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + EBooleen theIsElemNames = eVRAI, + EModeSwitch theMode = eFULL_INTERLACE) { - return PCellInfo(new TTCellInfo + return PCellInfo(new TTCellInfo (theMeshInfo, + theEntity, + theGeom, theNbElem, - theTEntity, - theTGeom, - theTConn, + theConnMode, theIsElemNum, - theIsElemNames)); + theIsElemNames, + theMode)); } virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theConnectivities, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), + const TStringVector& theElemNames = TStringVector(), + EModeSwitch theMode = eFULL_INTERLACE) { - return PCellInfo(new TTCellInfo + return PCellInfo(new TTCellInfo (theMeshInfo, - theTEntity, - theTGeom, - theTConn, + theEntity, + theGeom, theConnectivities, + theConnMode, theFamilyNums, theElemNums, - theElemNames)); + theElemNames, + theMode)); } virtual @@ -323,7 +333,7 @@ namespace MED{ CrCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo) { - return PCellInfo(new TTCellInfo + return PCellInfo(new TTCellInfo (theMeshInfo, theInfo)); } @@ -339,7 +349,7 @@ namespace MED{ EBooleen theIsLocal = eVRAI, TInt theNbRef = 1) { - return PFieldInfo(new TTFieldInfo + return PFieldInfo(new TTFieldInfo (theMeshInfo, theNbComp, theType, @@ -353,7 +363,7 @@ namespace MED{ CrFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo) { - return PFieldInfo(new TTFieldInfo + return PFieldInfo(new TTFieldInfo (theMeshInfo, theInfo)); } @@ -364,24 +374,24 @@ namespace MED{ PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, EEntiteMaillage theEntity, - const TGeom& theGeom, - TInt theNbGauss = 0, + const TGeom2Size& theGeom2Size, + const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(), TInt theNumDt = 0, TInt theNumOrd = 0, TFloat theDt = 0, const std::string& theUnitDt = "", - const std::string& theGaussName = "") + const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) { - return PTimeStampInfo(new TTTimeStampInfo + return PTimeStampInfo(new TTTimeStampInfo (theFieldInfo, theEntity, - theGeom, - theNbGauss, + theGeom2Size, + theGeom2NbGauss, theNumDt, theNumOrd, theDt, theUnitDt, - theGaussName)); + theGeom2Gauss)); } virtual @@ -389,23 +399,47 @@ namespace MED{ CrTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo) { - return PTimeStampInfo(new TTTimeStampInfo + return PTimeStampInfo(new TTTimeStampInfo (theFieldInfo, theInfo)); } + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + PGaussInfo + CrGaussInfo(const TGaussInfo::TInfo& theInfo, + EModeSwitch theMode = eFULL_INTERLACE) + { + return PGaussInfo(new TTGaussInfo + (theInfo, + theMode)); + } + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + PProfileInfo + CrProfileInfo(const TProfileInfo::TInfo& theInfo, + EModeProfil theMode = eCOMPACT) + { + return PProfileInfo(new TTProfileInfo + (theInfo, + theMode)); + } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const std::string& thePflName = "", - EModeProfil thePflMode = eCOMPACT) + const TGeom2Profile& theGeom2Profile = TGeom2Profile(), + EModeSwitch theMode = eFULL_INTERLACE) { - return PTimeStampVal(new TTTimeStampVal + return PTimeStampVal(new TTTimeStampVal (theTimeStampInfo, - thePflName, - thePflMode)); + theGeom2Profile, + theMode)); } virtual @@ -413,7 +447,7 @@ namespace MED{ CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, const PTimeStampVal& theInfo) { - return PTimeStampVal(new TTTimeStampVal + return PTimeStampVal(new TTTimeStampVal (theTimeStampInfo, theInfo)); } diff --git a/src/MEDWrapper/Base/MED_Utilities.cxx b/src/MEDWrapper/Base/MED_Utilities.cxx index 5c53a4df2..c66b2fe2c 100644 --- a/src/MEDWrapper/Base/MED_Utilities.cxx +++ b/src/MEDWrapper/Base/MED_Utilities.cxx @@ -50,14 +50,20 @@ MED::PrefixPrinter::PrefixPrinter(bool theIsActive): MED::PrefixPrinter::~PrefixPrinter() { - if(myIsActive) + if(myIsActive){ myCounter--; + if(myCounter < 0) + EXCEPTION(runtime_error,"PrefixPrinter::~PrefixPrinter() - myCounter("< + +#if !defined(__GNUC_2__) && defined(__GNUC__) && (__GNUC__ == 2) + #define __GNUC_2__ +#endif + +namespace MED +{ + + //! Main purpose to introduce the class was to customize operator [] + template > + class TVector : public std::vector<_Tp, _Alloc> + { + public: + typedef size_t size_type; + + typedef std::vector<_Tp, _Alloc> superclass; + typedef typename superclass::allocator_type allocator_type; + + typedef _Tp value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + public: + explicit + TVector(const allocator_type& __a = allocator_type()): + superclass(__a) + {} + + TVector(size_type __n, const value_type& __value, + const allocator_type& __a = allocator_type()): + superclass(__n, __value, __a) + {} + + explicit + TVector(size_type __n): + superclass(__n) + {} + + TVector(const TVector& __x): + superclass(__x) + {} + + template + TVector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()): + superclass(__first, __last, __a) + {} + + template + TVector(TVector<_Yp, _Al> __y): + superclass(__y.begin(), __y.end()) + {} + + TVector& + operator=(const TVector& __x) + { + superclass::operator=(__x); + return *this; + } + + template + TVector& + operator=(TVector<_Yp, _Al> __y) + { + this->assign(__y.begin(), __y.end()); + return *this; + } + + reference + operator[](size_type __n) + { +#if defined(__GNUC_2__) + return superclass::operator[](__n); +#else + return this->at(__n); +#endif + } + + const_reference + operator[](size_type __n) const + { +#if defined(__GNUC_2__) + return superclass::operator[](__n); +#else + return this->at(__n); +#endif + } + }; + +} + + +#endif diff --git a/src/MEDWrapper/Base/MED_Wrapper.cxx b/src/MEDWrapper/Base/MED_Wrapper.cxx index 9f69a0cfd..763bdacba 100644 --- a/src/MEDWrapper/Base/MED_Wrapper.cxx +++ b/src/MEDWrapper/Base/MED_Wrapper.cxx @@ -17,10 +17,35 @@ static int MYDEBUG = 0; static int MYVALUEDEBUG = 0; #endif -namespace MED{ +namespace MED +{ + TLockProxy + ::TLockProxy(TWrapper* theWrapper): + myWrapper(theWrapper) + { + boost::detail::thread::lock_ops::lock(myWrapper->myMutex); + INITMSG(MYDEBUG,"TLockProxy() - this -"<myCoord; - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - for(TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++){ - ADDMSG(MYVALUEDEBUG,aCoord[anId]<<","); - } - ADDMSG(MYVALUEDEBUG," "); - } - ADDMSG(MYDEBUG,endl); - - BEGMSG(MYDEBUG,"GetPNodeInfo - GetFamNum: "); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); - } - ADDMSG(MYDEBUG,endl); - - if(anInfo->IsElemNum()){ - BEGMSG(MYDEBUG,"GetPNodeInfo - GetElemNum: "); + INITMSG(MYDEBUG,"GetPNodeInfo: "); + { + INITMSG(MYDEBUG,"aCoords: "<myCoord; for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); + for(TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++){ + ADDMSG(MYVALUEDEBUG,aCoord[anId]<<","); + } + ADDMSG(MYVALUEDEBUG," "); } ADDMSG(MYDEBUG,endl); + + BEGMSG(MYVALUEDEBUG,"GetFamNum: "); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG,endl); + + if(anInfo->IsElemNum()){ + BEGMSG(MYVALUEDEBUG,"GetElemNum: "); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG,endl); + } } - ADDMSG(MYDEBUG,endl); #endif @@ -96,32 +127,29 @@ namespace MED{ } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PPolygoneInfo TWrapper::GetPPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConn) + PPolygoneInfo + TWrapper + ::GetPPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode) { - TInt aNbElem = GetNbPolygones(*theMeshInfo,theEntity,theGeom,theConn); - TInt aNbConn = GetNbPolygoneConn(*theMeshInfo,theEntity,theGeom,theConn); - PPolygoneInfo anInfo = CrPolygoneInfo(theMeshInfo,aNbElem,aNbConn,theEntity,theGeom,theConn); - GetPolygoneInfo(*anInfo); + TInt aNbElem = GetNbPolygones(theMeshInfo,theEntity,theGeom,theConnMode); + TInt aConnSize = GetPolygoneConnSize(theMeshInfo,theEntity,theGeom,theConnMode); + PPolygoneInfo anInfo = CrPolygoneInfo(theMeshInfo,theEntity,theGeom,aNbElem,aConnSize,theConnMode); + GetPolygoneInfo(anInfo); #ifdef _DEBUG_ - TElemNum aConn = anInfo->GetConnectivite(); - TElemNum aIndex = anInfo->GetIndex(); - TInt aNbIndex = aIndex.size(); - TInt aIndex0 = aIndex[0]; - INITMSG(MYDEBUG,"theGeom = "<GetConnSlice(iElem); + TInt aConnDim = aConnSlice.size(); + for(TInt iConn = 0; iConn < aConnDim; iConn++){ + ADDMSG(MYVALUEDEBUG,aConnSlice[iConn]<<","); + } ADDMSG(MYDEBUG," "); - aIndex0 = aIndex[iElem]; - } - ADDMSG(MYDEBUG,endl); - BEGMSG(MYDEBUG,"Indexes: "); - for(TInt iElem = 0; iElem < aIndex.size(); iElem++){ - ADDMSG(MYVALUEDEBUG,aIndex[iElem]<<","); } ADDMSG(MYDEBUG,endl); #endif @@ -130,79 +158,82 @@ namespace MED{ } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PPolyedreInfo TWrapper::GetPPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConn) + PPolyedreInfo + TWrapper + ::GetPPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode) { - TInt aNbElem = GetNbPolyedres(*theMeshInfo,theEntity,theGeom,theConn); - TInt aNbConn = 0; - TInt aNbFaces = 0; - GetNbPolyedreConnF(*theMeshInfo,theConn,aNbFaces,aNbConn); - PPolyedreInfo anInfo = CrPolyedreInfo(theMeshInfo,aNbElem,aNbConn,aNbFaces,theEntity,theGeom,theConn); - GetPolyedreInfo(*anInfo); + TInt aNbElem = GetNbPolyedres(theMeshInfo,theEntity,theGeom,theConnMode); + TInt aNbFaces, aConnSize; + GetPolyedreConnSize(theMeshInfo,aNbFaces,aConnSize,theConnMode); + PPolyedreInfo anInfo = CrPolyedreInfo(theMeshInfo,theEntity,theGeom,aNbElem,aNbFaces,aConnSize,theConnMode); + GetPolyedreInfo(anInfo); #ifdef _DEBUG_ - TElemNum aConn = anInfo->GetConnectivite(); - TElemNum aFacesIndex = anInfo->GetFacesIndex(); - TElemNum aIndex = anInfo->GetIndex(); - - TInt aNbIndex = aIndex.size(); - - for (int aNp = 0; aNp < aNbIndex-1;aNp++){ - if (anInfo->IsElemNames()) - ADDMSG(MYDEBUG,anInfo->GetElemName(aNp)<GetConnSliceArr(iElem); + TInt aNbFaces = aConnSliceArr.size(); + ADDMSG(MYDEBUG,"{"); + for(TInt iFace = 0; iFace < aNbFaces; iFace++){ + TCConnSlice aConnSlice = aConnSliceArr[iFace]; + TInt aNbConn = aConnSlice.size(); + ADDMSG(MYDEBUG,"["); + for(TInt iConn = 0; iConn < aNbConn; iConn++){ + ADDMSG(MYVALUEDEBUG,aConnSlice[iConn]<<","); } - ADDMSG(MYDEBUG," ]"<GetConnDim(); INITMSG(MYDEBUG,"GetPCellInfo - theEntity = "<GetConnSlice(iElem); for(TInt iConn = 0; iConn < aConnDim; iConn++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetConn(iElem,iConn)<<","); + ADDMSG(MYVALUEDEBUG,aConnSlice[iConn]<<","); } ADDMSG(MYVALUEDEBUG," "); } ADDMSG(MYDEBUG,endl); - BEGMSG(MYDEBUG,"GetPCellInfo - GetFamNum: "); + BEGMSG(MYVALUEDEBUG,"GetPCellInfo - GetFamNum: "); for(TInt iElem = 0; iElem < aNbElem; iElem++){ ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); } - ADDMSG(MYDEBUG,endl); + ADDMSG(MYVALUEDEBUG,endl); if(anInfo->IsElemNum()){ - BEGMSG(MYDEBUG,"GetPCellInfo - GetElemNum: "); + BEGMSG(MYVALUEDEBUG,"GetPCellInfo - GetElemNum: "); for(TInt iElem = 0; iElem < aNbElem; iElem++){ ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); } - ADDMSG(MYDEBUG,endl); + ADDMSG(MYVALUEDEBUG,endl); } ADDMSG(MYDEBUG,endl); #endif @@ -212,9 +243,11 @@ namespace MED{ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PFieldInfo TWrapper::GetPFieldInfo(const PMeshInfo& theMeshInfo, - TInt theId, - TErr* theErr) + PFieldInfo + TWrapper + ::GetPFieldInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr) { TInt aNbComp = GetNbComp(theId); PFieldInfo anInfo = CrFieldInfo(theMeshInfo,aNbComp); @@ -222,8 +255,11 @@ namespace MED{ #ifdef _DEBUG_ INITMSG(MYDEBUG, - "GetPFieldInfo - aNbComp = "<myGeom2NbGauss; + TGeom2NbGauss::const_iterator anIter = aGeom2NbGauss.begin(); + for(; anIter != aGeom2NbGauss.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + INITMSG(MYDEBUG,"aGeom = "<GetNbGauss(); PFieldInfo aFieldInfo = theTimeStampInfo->GetFieldInfo(); - TInt aNbComp = aFieldInfo->GetNbComp(); INITMSG(MYDEBUG,"GetPTimeStampVal\n"); - TMeshValue& aMeshValue = anInfo->myMeshValue; - TMeshValue::const_iterator aMeshValueIter = aMeshValue.begin(); - for(; aMeshValueIter != aMeshValue.end(); aMeshValueIter++){ - const EGeometrieElement& aGeom = aMeshValueIter->first; - const TValue& aValue = aMeshValueIter->second; - TInt iElemEnd = aValue.size() / aNbComp / aNbGauss; - INITMSG(MYDEBUG,"aGeom = "<myGeom2Value; + TGeom2Value::const_iterator anIter = aGeom2Value.begin(); + for(; anIter != aGeom2Value.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + const TMeshValue& aMeshValue = anIter->second; + TInt aNbElem = aMeshValue.myNbElem; + TInt aNbGauss = aMeshValue.myNbGauss; + TInt aNbComp = aMeshValue.myNbComp; + INITMSG(MYDEBUG,"aGeom = "< + +namespace MED +{ + + //---------------------------------------------------------------------------- + //! Define a base class that wraps the MED API + struct TWrapper + { + typedef boost::mutex TMutex; + //! This is a syncronization primitive which allow to support thread safety for the MED access + TMutex myMutex; - struct TWrapper{ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Creates a MEDWrapper MED Mesh representation virtual PMeshInfo CrMeshInfo(TInt theDim = 0, @@ -42,24 +54,30 @@ namespace MED{ EMaillage theType = eNON_STRUCTURE, const std::string& theDesc = "") = 0; + //! A copy-constructor for the MEDWrapper MED Mesh representation virtual PMeshInfo CrMeshInfo(const PMeshInfo& theInfo) = 0; + //! Read number of MED Mesh entities in the defined MED file virtual TInt GetNbMeshes(TErr* theErr = NULL) = 0; + //! Read a MEDWrapper MED Mesh representation by its number virtual void - GetMeshInfo(TInt theMeshId, TMeshInfo&, + GetMeshInfo(TInt theMeshId, + TMeshInfo& theInfo, TErr* theErr = NULL) = 0; + //! Write the MEDWrapper MED Mesh representation in the defined MED file virtual void SetMeshInfo(const TMeshInfo& theInfo, TErr* theErr = NULL) = 0; + //! Read a MEDWrapper MED Mesh representation by its number virtual PMeshInfo GetPMeshInfo(TInt theId, @@ -67,34 +85,40 @@ namespace MED{ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read number of MED Family entities in the defined MED file virtual TInt GetNbFamilies(const TMeshInfo& theMeshInfo, TErr* theErr = NULL) = 0; + //! Read number of attributes for defined MED Family virtual TInt GetNbFamAttr(TInt theFamId, const TMeshInfo& theInfo, TErr* theErr = NULL) = 0; + //! Read number of MED Groups where MED Family with the number belong to virtual TInt GetNbFamGroup(TInt theFamId, const TMeshInfo& theInfo, TErr* theErr = NULL) = 0; + //! Read a MEDWrapper MED Family representation by its number virtual void GetFamilyInfo(TInt theFamId, TFamilyInfo& theInfo, TErr* theErr = NULL) = 0; + //! Write a MEDWrapper MED Family representation by its number virtual void SetFamilyInfo(const TFamilyInfo& theInfo, TErr* theErr = NULL) = 0; + //! Creates a MEDWrapper MED Family representation virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, @@ -103,6 +127,7 @@ namespace MED{ TInt theId = 0, const std::string& theValue = "") = 0; + //! Creates a MEDWrapper MED Family representation virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, @@ -113,172 +138,206 @@ namespace MED{ const TIntVector& theAttrIds = TIntVector(), const TIntVector& theAttrVals = TIntVector()) = 0; + //! A copy-constructor for the MEDWrapper MED Family representation virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo) = 0; + //! Write a MEDWrapper MED Family representation by its number PFamilyInfo GetPFamilyInfo(const PMeshInfo& theMeshInfo, TInt theId, TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read sequence of names for any descendant of TElemInfo virtual void GetNames(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL) {} + //! Read sequence of numerous for any descendant of TElemInfo virtual void GetNumeration(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL) {} + //! Read sequence MED Family indexes for any descendant of TElemInfo virtual void GetFamilies(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL) {} + //! Write sequence of names for any descendant of TElemInfo virtual void SetNames(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL) {} + //! Write sequence of numerous for any descendant of TElemInfo virtual void SetNumeration(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL) {} + //! Write sequence MED Family indexes for any descendant of TElemInfo virtual void SetFamilies(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL) {} //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read number of nodes in defined MED Mesh virtual TInt GetNbNodes(const TMeshInfo& theMeshInfo, TErr* theErr = NULL) = 0; + //! Read a MEDWrapper MED Nodes representation from defined MED file virtual void GetNodeInfo(TNodeInfo& theInfo, TErr* theErr = NULL) = 0; + //! Write the MEDWrapper MED Nodes representation into defined MED file virtual void SetNodeInfo(const TNodeInfo& theInfo, TErr* theErr = NULL) = 0; + //! Creates a MEDWrapper MED Nodes representation virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, TInt theNbElem, + EModeSwitch theMode = eFULL_INTERLACE, ERepere theSystem = eCART, EBooleen theIsElemNum = eVRAI, EBooleen theIsElemNames = eVRAI) = 0; + //! Creates a MEDWrapper MED Nodes representation virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - ERepere theSystem, const TFloatVector& theNodeCoords, - const TStringVector& theCoordNames, - const TStringVector& theCoordUnits, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, + EModeSwitch theMode = eFULL_INTERLACE, + ERepere theSystem = eCART, + const TStringVector& theCoordNames = TStringVector(), + const TStringVector& theCoordUnits = TStringVector(), + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), const TStringVector& theElemNames = TStringVector()) = 0; + //! A copy-constructor for the MEDWrapper MED Nodes representation virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo) = 0; + //! Read a MEDWrapper MED Nodes representation from defined MED file PNodeInfo GetPNodeInfo(const PMeshInfo& theMeshInfo, TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read a MEDWrapper MED Polygones representation from defined MED file + /*! This feature is support only for version of 2.2 and higher */ virtual void GetPolygoneInfo(TPolygoneInfo& theInfo, TErr* theErr = NULL) {} + //! Write a MEDWrapper MED Polygones representation from defined MED file + /*! This feature is support only for version of 2.2 and higher */ virtual void SetPolygoneInfo(const TPolygoneInfo& theInfo, TErr* theErr = NULL) {} + //! Read number of MED Polygones in defined MED Mesh + /*! This feature is support only for version of 2.2 and higher */ virtual TInt GetNbPolygones(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL) - { return 0;} + { + return 0; + } + //! Read connectivity infroamtion for the MED Polygones in defined MED Mesh + /*! This feature is support only for version of 2.2 and higher */ virtual TInt - GetNbPolygoneConn(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL) - { return 0;} + GetPolygoneConnSize(const TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL) + { + return 0; + } + //! Creates a MEDWrapper MED Polygones representation + /*! This feature is support only for version of 2.2 and higher */ virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - TInt theNbConn, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, + TInt theConnSize, + EConnectivite theConnMode = eNOD, EBooleen theIsElemNum = eVRAI, EBooleen theIsElemNames = eVRAI) { return PPolygoneInfo(); } + //! Creates a MEDWrapper MED Polygones representation + /*! This feature is support only for version of 2.2 and higher */ virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theIndexes, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), const TStringVector& theElemNames = TStringVector()) { return PPolygoneInfo(); } + //! A copy-constructor for the MEDWrapper MED Polygones representation virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, @@ -287,74 +346,91 @@ namespace MED{ return PPolygoneInfo(); } + //! Read a MEDWrapper MED Polygones representation from defined MED file + /*! This feature is support only for version of 2.2 and higher */ PPolygoneInfo GetPPolygoneInfo(const PMeshInfo& theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, - EConnectivite theConn = eNOD); + EConnectivite theConnMode = eNOD); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read a MEDWrapper MED Polyedres representation from defined MED file + /*! This feature is support only for version of 2.2 and higher */ virtual void GetPolyedreInfo(TPolyedreInfo& theInfo, TErr* theErr = NULL) {} + //! Write a MEDWrapper MED Polyedres representation from defined MED file + /*! This feature is support only for version of 2.2 and higher */ virtual void SetPolyedreInfo(const TPolyedreInfo& theInfo, TErr* theErr = NULL) {} + //! Read number of MED Polyedres in defined MED Mesh + /*! This feature is support only for version of 2.2 and higher */ virtual TInt GetNbPolyedres(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL) - { return 0;} + { + return 0; + } + //! Read connectivity infroamtion for the MED Polyedres in defined MED Mesh + /*! This feature is support only for version of 2.2 and higher */ virtual void - GetNbPolyedreConnF(const TMeshInfo& theMeshInfo, - EConnectivite theConn, - TInt& nf, - TInt& nc, - TErr* theErr = NULL) - {} + GetPolyedreConnSize(const TMeshInfo& theMeshInfo, + TInt& theNbFaces, + TInt& theConnSize, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL) + { + theNbFaces = theConnSize = 0; + } virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - TInt theNbConn, TInt theNbFaces, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, + TInt theConnSize, + EConnectivite theConnMode = eNOD, EBooleen theIsElemNum = eVRAI, EBooleen theIsElemNames = eVRAI) { return PPolyedreInfo(); } + //! Creates a MEDWrapper MED Polyedres representation + /*! This feature is support only for version of 2.2 and higher */ virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFaces, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theIndexes, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, + const TIntVector& theFaces, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), const TStringVector& theElemNames = TStringVector()) { return PPolyedreInfo(); } + //! A copy-constructor for the MEDWrapper MED Polyedres representation virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, @@ -363,93 +439,110 @@ namespace MED{ return PPolyedreInfo(); } + //! Read a MEDWrapper MED Polyedres representation from defined MED file + /*! This feature is support only for version of 2.2 and higher */ PPolyedreInfo GetPPolyedreInfo(const PMeshInfo& theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, - EConnectivite theConn = eNOD); + EConnectivite theConnMode = eNOD); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Get TEntityInfo which contains brief information about existing cells and their destribution among MED ENTITIES virtual TEntityInfo GetEntityInfo(const TMeshInfo& theMeshInfo, - EConnectivite theTConn = eNOD, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL) = 0; + //! Read number of cells for defined MED Mesh, ENTITY and geometrical type with define mode of connectivity virtual TInt GetNbCells(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite theTConn = eNOD, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL) = 0; + //! Read a MEDWrapper MED Cells representation from defined MED file virtual void GetCellInfo(TCellInfo& theInfo, TErr* theErr = NULL) = 0; + //! Write the MEDWrapper MED Cells representation into defined MED file virtual void SetCellInfo(const TCellInfo& theInfo, TErr* theErr = NULL) = 0; + //! Creates a MEDWrapper MED Cells representation virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TInt theNbElem, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, + EConnectivite theConnMode = eNOD, EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) = 0; + EBooleen theIsElemNames = eVRAI, + EModeSwitch theMode = eFULL_INTERLACE) = 0; + //! Creates a MEDWrapper MED Cells representation virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, const TIntVector& theConnectivities, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) = 0; + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), + const TStringVector& theElemNames = TStringVector(), + EModeSwitch theMode = eFULL_INTERLACE) = 0; + //! A copy-constructor for the MEDWrapper MED Cells representation virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo) = 0; + //! Read a MEDWrapper MED Cells representation from defined MED file PCellInfo GetPCellInfo(const PMeshInfo& theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, - EConnectivite theConn = eNOD, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read number of MED FIELDS in defined MED Mesh virtual TInt GetNbFields(TErr* theErr = NULL) = 0; + //! Read number of components for the defined MED FIELD by its order number virtual TInt GetNbComp(TInt theFieldId, TErr* theErr = NULL) = 0; + //! Read MEDWrapper MED FIELD representation by its order number virtual void GetFieldInfo(TInt theFieldId, TFieldInfo& theInfo, TErr* theErr = NULL) = 0; + //! Write MEDWrapper MED FIELD representation into defined MED file virtual void SetFieldInfo(const TFieldInfo& theInfo, TErr* theErr = NULL) = 0; + //! Creates a MEDWrapper MED FIELD representation virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, @@ -459,11 +552,13 @@ namespace MED{ EBooleen theIsLocal = eVRAI, TInt theNbRef = 1) = 0; + //! A copy-constructor for the MEDWrapper MED FIELD representation virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo) = 0; + //! Read a MEDWrapper MED FIELD representation from defined MED file PFieldInfo GetPFieldInfo(const PMeshInfo& theMeshInfo, TInt theId, @@ -471,73 +566,238 @@ namespace MED{ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read number of MED GAUSS in defined MED Mesh + /*! This feature is support only for version of 2.2 and higher */ + virtual + TInt + GetNbGauss(TErr* theErr = NULL) + { + return TInt(); + } + + //! Read brief MED GAUSS information by its order number from defined MED Mesh + /*! This feature is support only for version of 2.2 and higher */ + virtual + TGaussInfo::TInfo + GetGaussPreInfo(TInt theId, + TErr* theErr = NULL) + { + return TGaussInfo::TInfo(); + } + + //! Read a MEDWrapper MED GAUSS representation by its order number from defined MED file + /*! This feature is support only for version of 2.2 and higher */ + virtual + void + GetGaussInfo(TInt theId, + TGaussInfo& theInfo, + TErr* theErr = NULL) + {} + + //! Creates a MEDWrapper MED GAUSS representation + /*! This feature is support only for version of 2.2 and higher */ + virtual + PGaussInfo + CrGaussInfo(const TGaussInfo::TInfo& theInfo, + EModeSwitch theMode = eFULL_INTERLACE) = 0; + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read number of MED TIMESTAMPS in defined MED Mesh + /*! + By the way some additional information can be obtained: + - to what MED ENTITY the MED TIMESTAMP conntected to; + - on what geometrical types the MED TIMESTAMP defined to. + */ virtual TInt GetNbTimeStamps(const TFieldInfo& theInfo, const TEntityInfo& theEntityInfo, EEntiteMaillage& theEntity, - TGeom& theGeom, + TGeom2Size& theGeom2Size, TErr* theErr = NULL) = 0; + //! Read MEDWrapper MED TIMESTAMP representation by its order number virtual void GetTimeStampInfo(TInt theTimeStampId, TTimeStampInfo& theInfo, TErr* theErr = NULL) = 0; + //! Creates a MEDWrapper MED TIMESTAMP representation virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, EEntiteMaillage theEntity, - const TGeom& theGeom, - TInt theNbGauss = 0, + const TGeom2Size& theGeom2Size, + const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(), TInt theNumDt = 0, TInt theNumOrd = 0, TFloat theDt = 0, const std::string& theUnitDt = "", - const std::string& theGaussName = "") = 0; + const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) = 0; + //! A copy-constructor for the MEDWrapper MED TIMESTAMP representation virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo) = 0; + //! Read MEDWrapper MED TIMESTAMP representation by its order number PTimeStampInfo GetPTimeStampInfo(const PFieldInfo& theFieldInfo, EEntiteMaillage theEntity, - const MED::TGeom& theGeom, + const TGeom2Size& theGeom2Size, TInt theId, TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read number of MED PROFILES in defined MED Mesh + virtual + TInt + GetNbProfiles(TErr* theErr = NULL) = 0; + + //! Read brief MED PROFILE information by its order number from defined MED Mesh + virtual + TProfileInfo::TInfo + GetProfilePreInfo(TInt theId, + TErr* theErr = NULL) = 0; + + //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file + virtual + void + GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr = NULL) = 0; + + //! Creates a MEDWrapper MED PROFILE representation + virtual + PProfileInfo + CrProfileInfo(const TProfileInfo::TInfo& theInfo, + EModeProfil theMode = eCOMPACT) = 0; + + //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file + PProfileInfo + GetPProfileInfo(TInt theId, + EModeProfil theMode = eCOMPACT, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file virtual void GetTimeStampVal(TTimeStampVal& theVal, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, TErr* theErr = NULL) = 0; + //! Write the values for MEDWrapper MED TIEMSTAMP to defined MED file virtual void SetTimeStamp(const TTimeStampVal& theTimeStampVal, TErr* theErr = NULL) = 0; + //! Creates the values for MEDWrapper MED TIEMSTAMP representation virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const std::string& thePflName = "", - EModeProfil thePflMode = eCOMPACT) = 0; + const TGeom2Profile& theGeom2Profile = TGeom2Profile(), + EModeSwitch theMode = eFULL_INTERLACE) = 0; + //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, const PTimeStampVal& theInfo) = 0; + //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file PTimeStampVal GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, TErr* theErr = NULL); }; + + //---------------------------------------------------------------------------- + //! This class provide thread-safety for MEDWrapper interaction + class TLockProxy + { + TLockProxy& operator=(const TLockProxy& ); + TWrapper* myWrapper; + + public: + TLockProxy(TWrapper* theWrapper); + + ~TLockProxy(); + + TWrapper * operator-> () const; + }; + + + //---------------------------------------------------------------------------- + //! To specialize the SharedPtr for TWrapper + template<> + class SharedPtr: public boost::shared_ptr + { + public: + SharedPtr() {} + + template + explicit SharedPtr(Y * p): + boost::shared_ptr(p) + {} + + template + SharedPtr(SharedPtr const & r): + boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) + {} + + template + SharedPtr& + operator=(SharedPtr const & r) + { + boost::shared_ptr(r,boost::detail::dynamic_cast_tag()).swap(*this); + return *this; + } + + template + SharedPtr& + operator()(Y * p) // Y must be complete + { + return operator=(SharedPtr(p)); + } + + template + SharedPtr& + operator()(SharedPtr const & r) // Y must be complete + { + return operator=(SharedPtr(r)); + } + + TLockProxy operator-> () const // never throws + { + return TLockProxy(this->get()); + } + + protected: + operator const TWrapper& () const; + + operator TWrapper& (); + + TWrapper& operator* () const; + + TWrapper * get() const // never throws + { + return boost::shared_ptr::get(); + } + }; + + //---------------------------------------------------------------------------- + typedef SharedPtr PWrapper; } #endif diff --git a/src/MEDWrapper/Base/Makefile.in b/src/MEDWrapper/Base/Makefile.in index dbb3f7164..5512b30e0 100644 --- a/src/MEDWrapper/Base/Makefile.in +++ b/src/MEDWrapper/Base/Makefile.in @@ -36,26 +36,35 @@ VPATH=.:@srcdir@:@top_srcdir@/idl EXPORT_HEADERS = \ MED_Common.hxx \ + MED_Vector.hxx \ + MED_SharedPtr.hxx \ + MED_SliceArray.hxx \ MED_Wrapper.hxx \ MED_TWrapper.hxx \ MED_Structures.hxx \ MED_TStructures.hxx \ MED_Algorithm.hxx \ + MED_GaussUtils.hxx \ + MED_CoordUtils.hxx \ MED_Utilities.hxx # Libraries targets LIB = libMEDWrapperBase.la LIB_SRC = \ - MED_Structures.cxx MED_Wrapper.cxx \ - MED_Algorithm.cxx MED_Utilities.cxx + MED_Structures.cxx \ + MED_Wrapper.cxx \ + MED_Algorithm.cxx \ + MED_GaussUtils.cxx \ + MED_CoordUtils.cxx \ + MED_Utilities.cxx # Executables targets BIN = BIN_SRC = -CPPFLAGS+= $(BOOST_CPPFLAGS) $(HDF5_INCLUDES) -D@MACHINE@ +CPPFLAGS+= $(BOOST_CPPFLAGS) $(HDF5_INCLUDES) -D@MACHINE@ -LDFLAGS+= +LDFLAGS+= $(BOOST_LIBS) -lboost_thread-mt @CONCLUDE@ diff --git a/src/MEDWrapper/Factory/MED_Test.cxx b/src/MEDWrapper/Factory/MED_Test.cxx index 80ce383ad..969af7253 100644 --- a/src/MEDWrapper/Factory/MED_Test.cxx +++ b/src/MEDWrapper/Factory/MED_Test.cxx @@ -28,6 +28,7 @@ #include "MED_Utilities.hxx" #include "MED_Algorithm.hxx" +#include "MED_GaussUtils.hxx" #include "MED_Factory.hxx" #ifdef _DEBUG_ @@ -36,57 +37,101 @@ static int MYDEBUG = 1; static int MYDEBUG = 0; #endif -static int MYVALUEDEBUG = 0; - static int MYWRITEDEBUG = 1; using namespace MED; +#undef _DEBUG_ void CheckMed(const std::string& theFileName) { MSG(MYDEBUG,"CheckMed - theFileName = '"<GetNbProfiles() = "<GetNbProfiles()<GetNbMeshes(); - INITMSG(MYDEBUG,"GetNbMeshes() = "<GetName() = "<GetName()<GetName() = '"<GetName()<<"'"<GetEntityInfo(aMeshInfo); - TElemGroup aElemGroup = GetElemsByEntity(aMed,aMeshInfo,aEntityInfo); - - TFamilyGroup aFamilyGroup = GetFamilies(aMed,aMeshInfo); + TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = + GetEntity2TGeom2ElemInfo(aMed,aMeshInfo,aEntityInfo); + + TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet = + GetFieldInfo2TimeStampInfoSet(aMed,aMeshInfo,aEntityInfo); - TFamilyByEntity aFamilyByEntity = GetFamiliesByEntity(aMed,aElemGroup,aFamilyGroup); + TEntite2TFieldInfo2TimeStampInfoSet anEntite2TFieldInfo2TimeStampInfoSet = + GetEntite2TFieldInfo2TimeStampInfoSet(aFieldInfo2TimeStampInfoSet); + + TEntite2TFieldInfo2TimeStampInfoSet::const_iterator anEntite2TFieldInfo2TimeStampInfoSetIter = + anEntite2TFieldInfo2TimeStampInfoSet.begin(); + for(; anEntite2TFieldInfo2TimeStampInfoSetIter != anEntite2TFieldInfo2TimeStampInfoSet.end(); anEntite2TFieldInfo2TimeStampInfoSetIter++){ + const TFieldInfo2TimeStampInfoSet& aFieldInfo2TimeStampInfoSet = anEntite2TFieldInfo2TimeStampInfoSetIter->second; + TFieldInfo2TimeStampInfoSet::const_iterator aFieldInfo2TimeStampInfoSetIter = aFieldInfo2TimeStampInfoSet.begin(); + for(; aFieldInfo2TimeStampInfoSetIter != aFieldInfo2TimeStampInfoSet.end(); aFieldInfo2TimeStampInfoSetIter++){ + PFieldInfo aFieldInfo = aFieldInfo2TimeStampInfoSetIter->first; + INITMSG(MYDEBUG, + "GetPFieldInfo "<< + "- aName = '"<GetName()<<"'"<< + "; aType = "<GetType()<< + "; aNbComp = "<GetNbComp()<< + endl); + const TTimeStampInfoSet& aTimeStampInfoSet = aFieldInfo2TimeStampInfoSetIter->second; + TTimeStampInfoSet::const_iterator aTimeStampInfoSettIter = aTimeStampInfoSet.begin(); + for(; aTimeStampInfoSettIter != aTimeStampInfoSet.end(); aTimeStampInfoSettIter++){ + PTimeStampInfo aTimeStampInfo = *aTimeStampInfoSettIter; + INITMSG(MYDEBUG, + "GetPTimeStampInfo "<< + "- anEntity = "<GetEntity()<< + "; aNumDt = "<GetNumDt()<< + endl); + PTimeStampVal aTimeStampVal = aMed->GetPTimeStampVal(aTimeStampInfo, + aMKey2Profile, + aKey2Gauss); + } + } + } + + continue; + + TFamilyInfoSet aFamilyInfoSet = GetFamilyInfoSet(aMed,aMeshInfo); - TGroupInfo aGroupInfo = GetFamiliesByGroup(aFamilyGroup); + TEntity2FamilySet aEntity2FamilySet = + GetEntity2FamilySet(aMed,anEntity2TGeom2ElemInfo,aFamilyInfoSet); - TTimeStampGroup aTimeStampGroup = GetFieldsByEntity(aMed,aMeshInfo,aEntityInfo); + TGroupInfo aGroupInfo = GetGroupInfo(aFamilyInfoSet); - TFieldGroup aFieldGroup = GetFieldsByEntity(aTimeStampGroup); - - TFieldGroup::const_iterator aFieldGroupIter = aFieldGroup.begin(); - for(; aFieldGroupIter != aFieldGroup.end(); aFieldGroupIter++){ - const TTimeStampGroup& aTTimeStampGroup = aFieldGroupIter->second; - TTimeStampGroup::const_iterator aTTimeStampGroupIter = aTTimeStampGroup.begin(); - for(; aTTimeStampGroupIter != aTTimeStampGroup.end(); aTTimeStampGroupIter++){ - PFieldInfo aFieldInfo = aTTimeStampGroupIter->first; - const TTimeStampSet& aTimeStampSet = aTTimeStampGroupIter->second; - TTimeStampSet::const_iterator aTTimeStampSetIter = aTimeStampSet.begin(); - for(; aTTimeStampSetIter != aTimeStampSet.end(); aTTimeStampSetIter++){ - PTimeStampInfo aTimeStampInfo = *aTTimeStampSetIter; - TErr anErr; - PTimeStampVal aTimeStampVal = aMed->GetPTimeStampVal(aTimeStampInfo,&anErr); + PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo); + TEntity2TGeom2ElemInfo::const_iterator anIter = anEntity2TGeom2ElemInfo.begin(); + for(; anIter != anEntity2TGeom2ElemInfo.end(); anIter++){ + const EEntiteMaillage& anEntity = anIter->first; + if(anEntity != eNOEUD){ + const TGeom2ElemInfo& aGeom2ElemInfo = anIter->second; + TKey2Gauss::const_iterator anIter2 = aKey2Gauss.begin(); + for(; anIter2 != aKey2Gauss.end(); anIter2++){ + const TGaussInfo::TKey& aKey = anIter2->first; + EGeometrieElement aGeom = boost::get<0>(aKey); + TGeom2ElemInfo::const_iterator anIter3 = aGeom2ElemInfo.find(aGeom); + if(anIter3 != aGeom2ElemInfo.end()){ + if(PCellInfo aCellInfo = anIter3->second){ + PGaussInfo aGaussInfo = anIter2->second; + TGaussCoord aGaussCoord; + GetGaussCoord3D(aGaussInfo,aCellInfo,aNodeInfo,aGaussCoord); + } + } } } } - + } } MSG(MYDEBUG,"OK"); @@ -97,6 +142,9 @@ void CopyMed(const PWrapper& theMed, const PWrapper& theMed2, int theIncr) { + TKey2Gauss aKey2Gauss = GetKey2Gauss(theMed); + TMKey2Profile aMKey2Profile = GetMKey2Profile(theMed); + TInt aNbMeshes = theMed->GetNbMeshes(); MSG(MYDEBUG,"aNbMeshes = "<GetNbTimeStamps(aFieldInfo,aEntityInfo,anEntity,aTGeom); + theMed->GetNbTimeStamps(aFieldInfo,aEntityInfo,anEntity,aGeom2Size); { INITMSG(MYDEBUG,"GetNbTimeStamps = "<GetPTimeStampInfo(aFieldInfo,anEntity,aTGeom,iTimeStamp+1); + theMed->GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp+1); TInt aNumDt = aTimeStampInfo->GetNumDt(); - TInt aNbGauss = aTimeStampInfo->GetNbGauss(); - INITMSG(MYDEBUG,"aNbGauss = "<CrTimeStampInfo(aFieldInfo2,aTimeStampInfo); - PTimeStampVal aTimeStampVal = theMed->GetPTimeStampVal(aTimeStampInfo); + PTimeStampVal aTimeStampVal = theMed->GetPTimeStampVal(aTimeStampInfo, + aMKey2Profile, + aKey2Gauss); - PTimeStampVal aTimeStampVal2 = theMed->CrTimeStampVal(aTimeStampInfo2,aTimeStampVal); + PTimeStampVal aTimeStampVal2 = theMed->CrTimeStampVal(aTimeStampInfo2, + aTimeStampVal); if(MYWRITEDEBUG) theMed2->SetTimeStamp(aTimeStampVal2); - - TMeshValue& aMeshValue = aTimeStampVal->myMeshValue; - TMeshValue::iterator aMeshValueIter = aMeshValue.begin(); - for(; aMeshValueIter != aMeshValue.end(); aMeshValueIter++){ - EGeometrieElement aGeom = aMeshValueIter->first; - TValue aValue = aMeshValueIter->second; - INITMSG(MYDEBUG,"aGeom = "<SetNodeInfo(aNodeInfo2); continue; } - TGeom& aTGeom = anEntityInfoIter->second; - TGeom::iterator anTGeomIter = aTGeom.begin(); - for(; anTGeomIter != aTGeom.end(); anTGeomIter++){ - const EGeometrieElement& aGeom = anTGeomIter->first; - const TInt& aNbElem = anTGeomIter->second; + TGeom2Size& aGeom2Size = anEntityInfoIter->second; + TGeom2Size::iterator aGeomIter = aGeom2Size.begin(); + for(; aGeomIter != aGeom2Size.end(); aGeomIter++){ + const EGeometrieElement& aGeom = aGeomIter->first; + const TInt& aNbElem = aGeomIter->second; INITMSG(MYDEBUG,"aGeom = "<GetPPolygoneInfo(aMeshInfo,anEntity,aGeom); - TElemNum aConn = aPolygoneInfo->GetConnectivite(); - TElemNum aIndex = aPolygoneInfo->GetIndex(); - TInt aNbIndex = aIndex.size(); - TInt aIndex0 = aIndex[0]; - for(TInt iElem = 1; iElem < aNbIndex; iElem++){ - for (TInt i = aIndex0; i < aIndex[iElem];i++) - ADDMSG(MYVALUEDEBUG,aConn[i-1]<<","); - ADDMSG(MYDEBUG," "); - aIndex0 = aIndex[iElem]; - } - ADDMSG(MYDEBUG,endl); - INITMSG(MYDEBUG,"Indexes :"); - for(TInt iElem = 0; iElem < aIndex.size(); iElem++){ - ADDMSG(MYVALUEDEBUG,aIndex[iElem]<<","); - } - ADDMSG(MYDEBUG,endl); - PPolygoneInfo aPolygoneInfo2 = theMed->CrPolygoneInfo(aMeshInfo2,aPolygoneInfo); - if(MYWRITEDEBUG) theMed2->SetPolygoneInfo(aPolygoneInfo2); - break; - } - case ePOLYEDRE: - { - PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,anEntity,aGeom); - TElemNum aConn = aPolyedreInfo->GetConnectivite(); - TElemNum aFacesIndex = aPolyedreInfo->GetFacesIndex(); - TElemNum aIndex = aPolyedreInfo->GetIndex(); - - TInt aNbIndex = aIndex.size(); - - for (int aNp = 0; aNp < aNbIndex-1;aNp++){ - if (aPolyedreInfo->IsElemNames()) - ADDMSG(MYDEBUG,aPolyedreInfo->GetElemName(aNp)<CrPolyedreInfo(aMeshInfo2,aPolyedreInfo); - if(MYWRITEDEBUG) theMed2->SetPolyedreInfo(aPolyedreInfo2); - break; - } + case ePOLYGONE: { + PPolygoneInfo aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,anEntity,aGeom); + PPolygoneInfo aPolygoneInfo2 = theMed->CrPolygoneInfo(aMeshInfo2,aPolygoneInfo); + if(MYWRITEDEBUG) theMed2->SetPolygoneInfo(aPolygoneInfo2); + break; + } + case ePOLYEDRE: { + PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,anEntity,aGeom); + PPolyedreInfo aPolyedreInfo2 = theMed->CrPolyedreInfo(aMeshInfo2,aPolyedreInfo); + if(MYWRITEDEBUG) theMed2->SetPolyedreInfo(aPolyedreInfo2); + break; + } default: PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,anEntity,aGeom); PCellInfo aCellInfo2 = theMed2->CrCellInfo(aMeshInfo2,aCellInfo); @@ -317,7 +313,9 @@ void ReadMed(const char* theFileName, int main(int argc, char** argv){ +#ifndef _DEBUG_ try{ +#endif if(argc == 2) CheckMed(argv[1]); if(argc == 3) @@ -327,10 +325,12 @@ int main(int argc, char** argv){ if(argc == 5) ReadMed(argv[1],argv[2],MED::EVersion(atoi(argv[3])),atoi(argv[4])); return 0; +#ifndef _DEBUG_ }catch(std::exception& exc){ MSG(MYDEBUG,"Follow exception was accured :\n"< +#include "hdf5_version2api.hxx" /* * - Nom de la fonction : _MEDdatasetNumEcrire @@ -70,7 +71,11 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, med_size *size, unsigned char *val, med_mode_acces mode) { med_idt dataset, dataspace = 0, memspace = 0; +#ifdef HDF_NEW_API + med_size start_mem[1],start_data[1],*pflmem,*pfldsk; +#else med_ssize start_mem[1],start_data[1],*pflmem,*pfldsk; +#endif med_size stride[1],count[1],pcount[1],pflsize[1]; med_err ret; int i,j,index,type_hdf; @@ -101,7 +106,7 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, case MED_INT32 : #if defined(PCLINUX) type_hdf = H5T_STD_I32BE; - if ((H5Tconvert(H5T_NATIVE_INT,H5T_STD_I32BE,(hsize_t)*size,(void *)val,NULL,NULL)) < 0) + if ((H5Tconvert(H5T_NATIVE_INT,H5T_STD_I32BE,(hsize_t)*size,(void *)val,NULL,(hid_t)0)) < 0) return -1; #else type_hdf = H5T_NATIVE_INT; @@ -188,8 +193,13 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, pflsize [0] = psize*ngauss*nbdim; pcount [0] = psize*ngauss*dimutil; +#ifdef HDF_NEW_API + pflmem = (med_size *) malloc (sizeof(med_size)*pcount[0]); + pfldsk = (med_size *) malloc (sizeof(med_size)*pcount[0]); +#else pflmem = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]); pfldsk = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]); +#endif switch(pflmod) { /* switch pflmod pout FULL_INTERLACE*/ @@ -209,11 +219,19 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0) + return -1; + + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0) return -1; if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif break; @@ -236,11 +254,19 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0) + return -1; + + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0) return -1; if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif break; @@ -296,7 +322,11 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, pflsize [0] = psize*ngauss*nbdim; pcount [0] = psize*ngauss*dimutil; /* nom pas très coherent avec count !!! A revoir */ +#ifdef HDF_NEW_API + pfldsk = (med_size *) malloc(sizeof(med_size)*pcount[0]); +#else pfldsk = (med_ssize *) malloc(sizeof(med_ssize)*pcount[0]); +#endif switch(pflmod) { /*switch plfmod pour NO_INTERLACE */ @@ -311,8 +341,13 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif if ((ret = H5Dwrite(dataset,type_hdf,dataspace,dataspace,H5P_DEFAULT, val)) < 0) return -1; @@ -328,7 +363,11 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, if ( (memspace = H5Screate_simple (1, pflsize, NULL)) <0) return -1; +#ifdef HDF_NEW_API + pflmem = (med_size *) malloc (sizeof(med_size)*pcount[0]); +#else pflmem = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]); +#endif /* Le profil COMPACT est contigüe, mais il est possible que l'on selectionne uniquemenent une dimension*/ @@ -342,11 +381,19 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET,pcount[0], (const hsize_t **) pflmem ) ) <0) + return -1; + + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET,pcount[0], (const hssize_t **) pflmem ) ) <0) return -1; if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif if ((ret = H5Dwrite(dataset,type_hdf,memspace,dataspace,H5P_DEFAULT, val)) < 0) return -1; @@ -383,7 +430,7 @@ _MEDdatasetNumEcrire(med_idt pere,char *nom, med_type_champ type, #if defined(PCLINUX) if (type == MED_INT32) - if ((H5Tconvert(H5T_STD_I32BE,H5T_NATIVE_INT,(hsize_t)*size,(void *)val,NULL,NULL)) < 0) + if ((H5Tconvert(H5T_STD_I32BE,H5T_NATIVE_INT,(hsize_t)*size,(void *)val,NULL,(hid_t)0)) < 0) return -1; #endif diff --git a/src/MEDWrapper/V2_1/MEDdatasetNumLire.cxx b/src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx similarity index 88% rename from src/MEDWrapper/V2_1/MEDdatasetNumLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx index 20a2d2a1d..e6ce9c37a 100644 --- a/src/MEDWrapper/V2_1/MEDdatasetNumLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx @@ -38,6 +38,7 @@ #include "med.hxx" #include "med_outils.hxx" #include +#include "hdf5_version2api.hxx" /* * - Nom de la fonction : _MEDdatasetNumLire @@ -67,7 +68,11 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, unsigned char *val) { med_idt dataset, dataspace = 0, memspace = 0; +#ifdef HDF_NEW_API + med_size start_mem[1],start_data[1],*pflmem=0,*pfldsk=0; +#else med_ssize start_mem[1],start_data[1],*pflmem=0,*pfldsk=0; +#endif med_size stride[1],count[1],pcount[1],size[1],pflsize[1]; med_err ret; int i,j,index,type_hdf; @@ -172,8 +177,13 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, pflsize [0] = psize*ngauss*nbdim; pcount [0] = psize*ngauss*dimutil; +#ifdef HDF_NEW_API + pflmem = (med_size *) malloc (sizeof(med_size)*pcount[0]); + pfldsk = (med_size *) malloc (sizeof(med_size)*pcount[0]); +#else pflmem = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]); pfldsk = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]); +#endif switch(pflmod) { /* switch pflmod pour FULL_INTERLACE*/ @@ -193,11 +203,19 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0) + return -1; + + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0) return -1; if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif break; @@ -220,11 +238,19 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0) + return -1; + + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0) return -1; if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif break; @@ -279,7 +305,11 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, pflsize [0] = psize*ngauss*nbdim; pcount [0] = psize*ngauss*dimutil; /* nom pas très coherent avec count !!! A revoir */ +#ifdef HDF_NEW_API + pfldsk = (med_size *) malloc(sizeof(med_size)*pcount[0]); +#else pfldsk = (med_ssize *) malloc(sizeof(med_ssize)*pcount[0]); +#endif switch(pflmod) { /*switch plfmod pour NO_INTERLACE */ @@ -294,8 +324,13 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif if ((ret = H5Dread(dataset,type_hdf,dataspace,dataspace,H5P_DEFAULT, val)) < 0) return -1; @@ -311,7 +346,11 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, if ( (memspace = H5Screate_simple (1, pflsize, NULL)) <0) return -1; +#ifdef HDF_NEW_API + pflmem = (med_size *) malloc (sizeof(med_size)*pcount[0]); +#else pflmem = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]); +#endif /* Le profil COMPACT est contigüe, mais il est possible que l'on selectionne uniquemenent une dimension*/ @@ -325,11 +364,19 @@ _MEDdatasetNumLire(med_idt pere,char *nom,med_type_champ type, } } +#ifdef HDF_NEW_API + if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0) + return -1; + + if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0) + return -1; +#else if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0) return -1; if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0) return -1; +#endif if ((ret = H5Dread(dataset,type_hdf,memspace,dataspace,H5P_DEFAULT, val)) < 0) return -1; diff --git a/src/MEDWrapper/V2_1/MEDdatasetOuvrir.cxx b/src/MEDWrapper/V2_1/Core/MEDdatasetOuvrir.cxx similarity index 61% rename from src/MEDWrapper/V2_1/MEDdatasetOuvrir.cxx rename to src/MEDWrapper/V2_1/Core/MEDdatasetOuvrir.cxx index 3c37511e0..b3e852cd1 100644 --- a/src/MEDWrapper/V2_1/MEDdatasetOuvrir.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDdatasetOuvrir.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDdatasetStringEcrire.cxx b/src/MEDWrapper/V2_1/Core/MEDdatasetStringEcrire.cxx similarity index 74% rename from src/MEDWrapper/V2_1/MEDdatasetStringEcrire.cxx rename to src/MEDWrapper/V2_1/Core/MEDdatasetStringEcrire.cxx index 02de46980..651f5a84d 100644 --- a/src/MEDWrapper/V2_1/MEDdatasetStringEcrire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDdatasetStringEcrire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDdatasetStringLire.cxx b/src/MEDWrapper/V2_1/Core/MEDdatasetStringLire.cxx similarity index 67% rename from src/MEDWrapper/V2_1/MEDdatasetStringLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDdatasetStringLire.cxx index a88e2bce5..017ccbf7b 100644 --- a/src/MEDWrapper/V2_1/MEDdatasetStringLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDdatasetStringLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDdimLire.cxx b/src/MEDWrapper/V2_1/Core/MEDdimLire.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDdimLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDdimLire.cxx index caad4c5c1..3ca50c61f 100644 --- a/src/MEDWrapper/V2_1/MEDdimLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDdimLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDelementsEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDelementsEcr.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDelementsEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDelementsEcr.cxx index ce57c5a85..e67b44d38 100644 --- a/src/MEDWrapper/V2_1/MEDelementsEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDelementsEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDelementsLire.cxx b/src/MEDWrapper/V2_1/Core/MEDelementsLire.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDelementsLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDelementsLire.cxx index 88716ffe9..bdd85909e 100644 --- a/src/MEDWrapper/V2_1/MEDelementsLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDelementsLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDequivCr.cxx b/src/MEDWrapper/V2_1/Core/MEDequivCr.cxx similarity index 71% rename from src/MEDWrapper/V2_1/MEDequivCr.cxx rename to src/MEDWrapper/V2_1/Core/MEDequivCr.cxx index 8579cb6b2..a5a3b816d 100644 --- a/src/MEDWrapper/V2_1/MEDequivCr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDequivCr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDequivEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDequivEcr.cxx similarity index 79% rename from src/MEDWrapper/V2_1/MEDequivEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDequivEcr.cxx index bcbaa2cdd..dfa3f72b1 100644 --- a/src/MEDWrapper/V2_1/MEDequivEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDequivEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDequivInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDequivInfo.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDequivInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDequivInfo.cxx index abb213140..e031dec8a 100644 --- a/src/MEDWrapper/V2_1/MEDequivInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDequivInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDequivLire.cxx b/src/MEDWrapper/V2_1/Core/MEDequivLire.cxx similarity index 76% rename from src/MEDWrapper/V2_1/MEDequivLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDequivLire.cxx index 3ae9b4fab..824e21c99 100644 --- a/src/MEDWrapper/V2_1/MEDequivLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDequivLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfam2groA.cxx b/src/MEDWrapper/V2_1/Core/MEDfam2groA.cxx similarity index 89% rename from src/MEDWrapper/V2_1/MEDfam2groA.cxx rename to src/MEDWrapper/V2_1/Core/MEDfam2groA.cxx index 6be083267..b964f813a 100644 --- a/src/MEDWrapper/V2_1/MEDfam2groA.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfam2groA.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfam2groB.cxx b/src/MEDWrapper/V2_1/Core/MEDfam2groB.cxx similarity index 89% rename from src/MEDWrapper/V2_1/MEDfam2groB.cxx rename to src/MEDWrapper/V2_1/Core/MEDfam2groB.cxx index e7cf5b2d2..3dbea6071 100644 --- a/src/MEDWrapper/V2_1/MEDfam2groB.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfam2groB.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamCr.cxx b/src/MEDWrapper/V2_1/Core/MEDfamCr.cxx similarity index 84% rename from src/MEDWrapper/V2_1/MEDfamCr.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamCr.cxx index 77db45a88..19faf22f8 100644 --- a/src/MEDWrapper/V2_1/MEDfamCr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamCr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDfamEcr.cxx similarity index 80% rename from src/MEDWrapper/V2_1/MEDfamEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamEcr.cxx index 998072646..e6beb4bf9 100644 --- a/src/MEDWrapper/V2_1/MEDfamEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamGridEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDfamGridEcr.cxx similarity index 67% rename from src/MEDWrapper/V2_1/MEDfamGridEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamGridEcr.cxx index 3631c8baa..be590c651 100644 --- a/src/MEDWrapper/V2_1/MEDfamGridEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamGridEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamGridLire.cxx b/src/MEDWrapper/V2_1/Core/MEDfamGridLire.cxx similarity index 67% rename from src/MEDWrapper/V2_1/MEDfamGridLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamGridLire.cxx index b68b22a58..2f89144e9 100644 --- a/src/MEDWrapper/V2_1/MEDfamGridLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamGridLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDfamInfo.cxx similarity index 82% rename from src/MEDWrapper/V2_1/MEDfamInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamInfo.cxx index 65c332f3f..b4527b122 100644 --- a/src/MEDWrapper/V2_1/MEDfamInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamLire.cxx b/src/MEDWrapper/V2_1/Core/MEDfamLire.cxx similarity index 77% rename from src/MEDWrapper/V2_1/MEDfamLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamLire.cxx index cee72f183..501b98f7c 100644 --- a/src/MEDWrapper/V2_1/MEDfamLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamMaaCr.cxx b/src/MEDWrapper/V2_1/Core/MEDfamMaaCr.cxx similarity index 71% rename from src/MEDWrapper/V2_1/MEDfamMaaCr.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamMaaCr.cxx index d35067194..f7dc6d2b4 100644 --- a/src/MEDWrapper/V2_1/MEDfamMaaCr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamMaaCr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamMaaInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDfamMaaInfo.cxx similarity index 64% rename from src/MEDWrapper/V2_1/MEDfamMaaInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamMaaInfo.cxx index 2a9e0d341..9868abfbd 100644 --- a/src/MEDWrapper/V2_1/MEDfamMaaInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamMaaInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfamMaaLire.cxx b/src/MEDWrapper/V2_1/Core/MEDfamMaaLire.cxx similarity index 65% rename from src/MEDWrapper/V2_1/MEDfamMaaLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDfamMaaLire.cxx index 5131a5534..ed3401a9b 100644 --- a/src/MEDWrapper/V2_1/MEDfamMaaLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfamMaaLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfermer.cxx b/src/MEDWrapper/V2_1/Core/MEDfermer.cxx similarity index 58% rename from src/MEDWrapper/V2_1/MEDfermer.cxx rename to src/MEDWrapper/V2_1/Core/MEDfermer.cxx index c182583eb..872ce4a05 100644 --- a/src/MEDWrapper/V2_1/MEDfermer.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfermer.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfichDesEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDfichDesEcr.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDfichDesEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDfichDesEcr.cxx index c294fbe7e..e33569305 100644 --- a/src/MEDWrapper/V2_1/MEDfichDesEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfichDesEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfichEntete.cxx b/src/MEDWrapper/V2_1/Core/MEDfichEntete.cxx similarity index 70% rename from src/MEDWrapper/V2_1/MEDfichEntete.cxx rename to src/MEDWrapper/V2_1/Core/MEDfichEntete.cxx index 86932617a..b191d3a4a 100644 --- a/src/MEDWrapper/V2_1/MEDfichEntete.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfichEntete.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfichierCreer.cxx b/src/MEDWrapper/V2_1/Core/MEDfichierCreer.cxx similarity index 70% rename from src/MEDWrapper/V2_1/MEDfichierCreer.cxx rename to src/MEDWrapper/V2_1/Core/MEDfichierCreer.cxx index 54ffeb323..dd72e8b4b 100644 --- a/src/MEDWrapper/V2_1/MEDfichierCreer.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfichierCreer.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfichierFermer.cxx b/src/MEDWrapper/V2_1/Core/MEDfichierFermer.cxx similarity index 59% rename from src/MEDWrapper/V2_1/MEDfichierFermer.cxx rename to src/MEDWrapper/V2_1/Core/MEDfichierFermer.cxx index efdece165..c0024e544 100644 --- a/src/MEDWrapper/V2_1/MEDfichierFermer.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfichierFermer.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfichierOuvrir.cxx b/src/MEDWrapper/V2_1/Core/MEDfichierOuvrir.cxx similarity index 65% rename from src/MEDWrapper/V2_1/MEDfichierOuvrir.cxx rename to src/MEDWrapper/V2_1/Core/MEDfichierOuvrir.cxx index 093e2606d..593fbd675 100644 --- a/src/MEDWrapper/V2_1/MEDfichierOuvrir.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfichierOuvrir.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDformatConforme.cxx b/src/MEDWrapper/V2_1/Core/MEDformatConforme.cxx similarity index 57% rename from src/MEDWrapper/V2_1/MEDformatConforme.cxx rename to src/MEDWrapper/V2_1/Core/MEDformatConforme.cxx index 3e25577c6..d5ddea8b3 100644 --- a/src/MEDWrapper/V2_1/MEDformatConforme.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDformatConforme.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDfstring.cxx b/src/MEDWrapper/V2_1/Core/MEDfstring.cxx similarity index 62% rename from src/MEDWrapper/V2_1/MEDfstring.cxx rename to src/MEDWrapper/V2_1/Core/MEDfstring.cxx index 54f812011..e1bc4faae 100644 --- a/src/MEDWrapper/V2_1/MEDfstring.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDfstring.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDgridCr.cxx b/src/MEDWrapper/V2_1/Core/MEDgridCr.cxx similarity index 71% rename from src/MEDWrapper/V2_1/MEDgridCr.cxx rename to src/MEDWrapper/V2_1/Core/MEDgridCr.cxx index 1fa323d64..6e9ae942d 100644 --- a/src/MEDWrapper/V2_1/MEDgridCr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDgridCr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDgridEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDgridEcr.cxx similarity index 79% rename from src/MEDWrapper/V2_1/MEDgridEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDgridEcr.cxx index b4c08197e..3acc181ee 100644 --- a/src/MEDWrapper/V2_1/MEDgridEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDgridEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDgridInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDgridInfo.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDgridInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDgridInfo.cxx index 6ac3e5fe6..43de1b2dd 100644 --- a/src/MEDWrapper/V2_1/MEDgridInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDgridInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDgridLire.cxx b/src/MEDWrapper/V2_1/Core/MEDgridLire.cxx similarity index 71% rename from src/MEDWrapper/V2_1/MEDgridLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDgridLire.cxx index 6369a69d4..032266335 100644 --- a/src/MEDWrapper/V2_1/MEDgridLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDgridLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// #include "med_outils.hxx" #include "med.hxx" diff --git a/src/MEDWrapper/V2_1/MEDgro2famA.cxx b/src/MEDWrapper/V2_1/Core/MEDgro2famA.cxx similarity index 90% rename from src/MEDWrapper/V2_1/MEDgro2famA.cxx rename to src/MEDWrapper/V2_1/Core/MEDgro2famA.cxx index b3f6c44f8..5838900ea 100644 --- a/src/MEDWrapper/V2_1/MEDgro2famA.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDgro2famA.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDgro2famB.cxx b/src/MEDWrapper/V2_1/Core/MEDgro2famB.cxx similarity index 92% rename from src/MEDWrapper/V2_1/MEDgro2famB.cxx rename to src/MEDWrapper/V2_1/Core/MEDgro2famB.cxx index f1732e59f..a7263b9a7 100644 --- a/src/MEDWrapper/V2_1/MEDgro2famB.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDgro2famB.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDindiceInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDindiceInfo.cxx similarity index 64% rename from src/MEDWrapper/V2_1/MEDindiceInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDindiceInfo.cxx index 5f1138ca4..4e88572f0 100644 --- a/src/MEDWrapper/V2_1/MEDindiceInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDindiceInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDindiceNum.cxx b/src/MEDWrapper/V2_1/Core/MEDindiceNum.cxx similarity index 64% rename from src/MEDWrapper/V2_1/MEDindiceNum.cxx rename to src/MEDWrapper/V2_1/Core/MEDindiceNum.cxx index 4824c5337..bc757ed92 100644 --- a/src/MEDWrapper/V2_1/MEDindiceNum.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDindiceNum.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDlFichDes.cxx b/src/MEDWrapper/V2_1/Core/MEDlFichDes.cxx similarity index 70% rename from src/MEDWrapper/V2_1/MEDlFichDes.cxx rename to src/MEDWrapper/V2_1/Core/MEDlFichDes.cxx index 436249441..7e63c919b 100644 --- a/src/MEDWrapper/V2_1/MEDlFichDes.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDlFichDes.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDmaaCr.cxx b/src/MEDWrapper/V2_1/Core/MEDmaaCr.cxx similarity index 70% rename from src/MEDWrapper/V2_1/MEDmaaCr.cxx rename to src/MEDWrapper/V2_1/Core/MEDmaaCr.cxx index cb6c72a3c..c4b50b717 100644 --- a/src/MEDWrapper/V2_1/MEDmaaCr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDmaaCr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDmaaInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDmaaInfo.cxx similarity index 67% rename from src/MEDWrapper/V2_1/MEDmaaInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDmaaInfo.cxx index 5094e7057..e2b48a7cb 100644 --- a/src/MEDWrapper/V2_1/MEDmaaInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDmaaInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDmodeErreurVerrouiller.cxx b/src/MEDWrapper/V2_1/Core/MEDmodeErreurVerrouiller.cxx similarity index 57% rename from src/MEDWrapper/V2_1/MEDmodeErreurVerrouiller.cxx rename to src/MEDWrapper/V2_1/Core/MEDmodeErreurVerrouiller.cxx index eb89a46ca..aa4eb0882 100644 --- a/src/MEDWrapper/V2_1/MEDmodeErreurVerrouiller.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDmodeErreurVerrouiller.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnChamp.cxx b/src/MEDWrapper/V2_1/Core/MEDnChamp.cxx similarity index 71% rename from src/MEDWrapper/V2_1/MEDnChamp.cxx rename to src/MEDWrapper/V2_1/Core/MEDnChamp.cxx index ff4490588..55347ba5f 100644 --- a/src/MEDWrapper/V2_1/MEDnChamp.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnChamp.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnCorres.cxx b/src/MEDWrapper/V2_1/Core/MEDnCorres.cxx similarity index 73% rename from src/MEDWrapper/V2_1/MEDnCorres.cxx rename to src/MEDWrapper/V2_1/Core/MEDnCorres.cxx index a5fb6d5a6..10b583021 100644 --- a/src/MEDWrapper/V2_1/MEDnCorres.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnCorres.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnEntMaa.cxx b/src/MEDWrapper/V2_1/Core/MEDnEntMaa.cxx similarity index 78% rename from src/MEDWrapper/V2_1/MEDnEntMaa.cxx rename to src/MEDWrapper/V2_1/Core/MEDnEntMaa.cxx index 933a428d8..7f9cfbdc4 100644 --- a/src/MEDWrapper/V2_1/MEDnEntMaa.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnEntMaa.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnEntites.cxx b/src/MEDWrapper/V2_1/Core/MEDnEntites.cxx similarity index 75% rename from src/MEDWrapper/V2_1/MEDnEntites.cxx rename to src/MEDWrapper/V2_1/Core/MEDnEntites.cxx index 9b409244b..b5b32c468 100644 --- a/src/MEDWrapper/V2_1/MEDnEntites.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnEntites.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnEquiv.cxx b/src/MEDWrapper/V2_1/Core/MEDnEquiv.cxx similarity index 61% rename from src/MEDWrapper/V2_1/MEDnEquiv.cxx rename to src/MEDWrapper/V2_1/Core/MEDnEquiv.cxx index 879836b89..7c9848110 100644 --- a/src/MEDWrapper/V2_1/MEDnEquiv.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnEquiv.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnFam.cxx b/src/MEDWrapper/V2_1/Core/MEDnFam.cxx similarity index 75% rename from src/MEDWrapper/V2_1/MEDnFam.cxx rename to src/MEDWrapper/V2_1/Core/MEDnFam.cxx index 55f4c96b0..3ac75795f 100644 --- a/src/MEDWrapper/V2_1/MEDnFam.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnFam.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnGrid.cxx b/src/MEDWrapper/V2_1/Core/MEDnGrid.cxx similarity index 82% rename from src/MEDWrapper/V2_1/MEDnGrid.cxx rename to src/MEDWrapper/V2_1/Core/MEDnGrid.cxx index 771a9962c..607888cf2 100644 --- a/src/MEDWrapper/V2_1/MEDnGrid.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnGrid.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnMaa.cxx b/src/MEDWrapper/V2_1/Core/MEDnMaa.cxx similarity index 56% rename from src/MEDWrapper/V2_1/MEDnMaa.cxx rename to src/MEDWrapper/V2_1/Core/MEDnMaa.cxx index e80596f48..a7a8124b6 100644 --- a/src/MEDWrapper/V2_1/MEDnMaa.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnMaa.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnObjets.cxx b/src/MEDWrapper/V2_1/Core/MEDnObjets.cxx similarity index 63% rename from src/MEDWrapper/V2_1/MEDnObjets.cxx rename to src/MEDWrapper/V2_1/Core/MEDnObjets.cxx index 6b385766c..6720f95f3 100644 --- a/src/MEDWrapper/V2_1/MEDnObjets.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnObjets.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnPasdetemps.cxx b/src/MEDWrapper/V2_1/Core/MEDnPasdetemps.cxx similarity index 69% rename from src/MEDWrapper/V2_1/MEDnPasdetemps.cxx rename to src/MEDWrapper/V2_1/Core/MEDnPasdetemps.cxx index c8a5e5255..6cad0ba8e 100644 --- a/src/MEDWrapper/V2_1/MEDnPasdetemps.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnPasdetemps.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnProfil.cxx b/src/MEDWrapper/V2_1/Core/MEDnProfil.cxx similarity index 56% rename from src/MEDWrapper/V2_1/MEDnProfil.cxx rename to src/MEDWrapper/V2_1/Core/MEDnProfil.cxx index 83f89b66d..5dcb6482f 100644 --- a/src/MEDWrapper/V2_1/MEDnProfil.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnProfil.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnVal.cxx b/src/MEDWrapper/V2_1/Core/MEDnVal.cxx similarity index 73% rename from src/MEDWrapper/V2_1/MEDnVal.cxx rename to src/MEDWrapper/V2_1/Core/MEDnVal.cxx index de0ce89e3..010c82636 100644 --- a/src/MEDWrapper/V2_1/MEDnVal.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnVal.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnValProfil.cxx b/src/MEDWrapper/V2_1/Core/MEDnValProfil.cxx similarity index 65% rename from src/MEDWrapper/V2_1/MEDnValProfil.cxx rename to src/MEDWrapper/V2_1/Core/MEDnValProfil.cxx index 341443614..7c14cf2ed 100644 --- a/src/MEDWrapper/V2_1/MEDnValProfil.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnValProfil.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnbnoisEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDnbnoisEcr.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnbnoisEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDnbnoisEcr.cxx index 00d767dd9..3c287ce7f 100644 --- a/src/MEDWrapper/V2_1/MEDnbnoisEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnbnoisEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnbnoisLire.cxx b/src/MEDWrapper/V2_1/Core/MEDnbnoisLire.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnbnoisLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDnbnoisLire.cxx index ef1b24f30..363d66ffe 100644 --- a/src/MEDWrapper/V2_1/MEDnbnoisLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnbnoisLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnbnomaEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDnbnomaEcr.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnbnomaEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDnbnomaEcr.cxx index 0806e0838..2d635253f 100644 --- a/src/MEDWrapper/V2_1/MEDnbnomaEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnbnomaEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnbnomaLire.cxx b/src/MEDWrapper/V2_1/Core/MEDnbnomaLire.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnbnomaLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDnbnomaLire.cxx index dfbdc35f6..b018a0aa5 100644 --- a/src/MEDWrapper/V2_1/MEDnbnomaLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnbnomaLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnbnosoEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDnbnosoEcr.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnbnosoEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDnbnosoEcr.cxx index 72e28be62..453ebe29f 100644 --- a/src/MEDWrapper/V2_1/MEDnbnosoEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnbnosoEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnbnosoLire.cxx b/src/MEDWrapper/V2_1/Core/MEDnbnosoLire.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnbnosoLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDnbnosoLire.cxx index e7307a85d..7a1b67270 100644 --- a/src/MEDWrapper/V2_1/MEDnbnosoLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnbnosoLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnoeudsEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDnoeudsEcr.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDnoeudsEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDnoeudsEcr.cxx index 22ea92f9a..808d25864 100644 --- a/src/MEDWrapper/V2_1/MEDnoeudsEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnoeudsEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnoeudsLire.cxx b/src/MEDWrapper/V2_1/Core/MEDnoeudsLire.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDnoeudsLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDnoeudsLire.cxx index af76b98d1..68014ba9a 100644 --- a/src/MEDWrapper/V2_1/MEDnoeudsLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnoeudsLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnomDataset.cxx b/src/MEDWrapper/V2_1/Core/MEDnomDataset.cxx similarity index 69% rename from src/MEDWrapper/V2_1/MEDnomDataset.cxx rename to src/MEDWrapper/V2_1/Core/MEDnomDataset.cxx index d041deada..fe72b24bb 100644 --- a/src/MEDWrapper/V2_1/MEDnomDataset.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnomDataset.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnomEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDnomEcr.cxx similarity index 78% rename from src/MEDWrapper/V2_1/MEDnomEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDnomEcr.cxx index 9dfc9b811..a71cf4757 100644 --- a/src/MEDWrapper/V2_1/MEDnomEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnomEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnomEntite.cxx b/src/MEDWrapper/V2_1/Core/MEDnomEntite.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDnomEntite.cxx rename to src/MEDWrapper/V2_1/Core/MEDnomEntite.cxx index 912f28840..b5b4350fb 100644 --- a/src/MEDWrapper/V2_1/MEDnomEntite.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnomEntite.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnomGeometrie.cxx b/src/MEDWrapper/V2_1/Core/MEDnomGeometrie.cxx similarity index 75% rename from src/MEDWrapper/V2_1/MEDnomGeometrie.cxx rename to src/MEDWrapper/V2_1/Core/MEDnomGeometrie.cxx index cf3c4ba3a..3cbc6bbe0 100644 --- a/src/MEDWrapper/V2_1/MEDnomGeometrie.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnomGeometrie.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnomLire.cxx b/src/MEDWrapper/V2_1/Core/MEDnomLire.cxx similarity index 75% rename from src/MEDWrapper/V2_1/MEDnomLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDnomLire.cxx index ddd0e6932..4ec85b304 100644 --- a/src/MEDWrapper/V2_1/MEDnomLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnomLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnumEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDnumEcr.cxx similarity index 80% rename from src/MEDWrapper/V2_1/MEDnumEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDnumEcr.cxx index 4382dc27d..d72b6ce9f 100644 --- a/src/MEDWrapper/V2_1/MEDnumEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnumEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDnumLire.cxx b/src/MEDWrapper/V2_1/Core/MEDnumLire.cxx similarity index 77% rename from src/MEDWrapper/V2_1/MEDnumLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDnumLire.cxx index 93e7952a1..938964060 100644 --- a/src/MEDWrapper/V2_1/MEDnumLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDnumLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDobjetIdentifer.cxx b/src/MEDWrapper/V2_1/Core/MEDobjetIdentifer.cxx similarity index 65% rename from src/MEDWrapper/V2_1/MEDobjetIdentifer.cxx rename to src/MEDWrapper/V2_1/Core/MEDobjetIdentifer.cxx index a48741414..14361bee5 100644 --- a/src/MEDWrapper/V2_1/MEDobjetIdentifer.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDobjetIdentifer.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDouvrir.cxx b/src/MEDWrapper/V2_1/Core/MEDouvrir.cxx similarity index 67% rename from src/MEDWrapper/V2_1/MEDouvrir.cxx rename to src/MEDWrapper/V2_1/Core/MEDouvrir.cxx index 5471a2c50..0d259deb6 100644 --- a/src/MEDWrapper/V2_1/MEDouvrir.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDouvrir.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDparametresGeometrie.cxx b/src/MEDWrapper/V2_1/Core/MEDparametresGeometrie.cxx similarity index 78% rename from src/MEDWrapper/V2_1/MEDparametresGeometrie.cxx rename to src/MEDWrapper/V2_1/Core/MEDparametresGeometrie.cxx index 57f360ffe..02a722f05 100644 --- a/src/MEDWrapper/V2_1/MEDparametresGeometrie.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDparametresGeometrie.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDpasdetempsInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDpasdetempsInfo.cxx similarity index 77% rename from src/MEDWrapper/V2_1/MEDpasdetempsInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDpasdetempsInfo.cxx index 7951c90ac..e95f6019c 100644 --- a/src/MEDWrapper/V2_1/MEDpasdetempsInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDpasdetempsInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDprofilEcr.cxx b/src/MEDWrapper/V2_1/Core/MEDprofilEcr.cxx similarity index 74% rename from src/MEDWrapper/V2_1/MEDprofilEcr.cxx rename to src/MEDWrapper/V2_1/Core/MEDprofilEcr.cxx index 0243e4eb0..b2d1e97b8 100644 --- a/src/MEDWrapper/V2_1/MEDprofilEcr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDprofilEcr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDprofilInfo.cxx b/src/MEDWrapper/V2_1/Core/MEDprofilInfo.cxx similarity index 67% rename from src/MEDWrapper/V2_1/MEDprofilInfo.cxx rename to src/MEDWrapper/V2_1/Core/MEDprofilInfo.cxx index 26b1f36e9..77f29687f 100644 --- a/src/MEDWrapper/V2_1/MEDprofilInfo.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDprofilInfo.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDprofilLire.cxx b/src/MEDWrapper/V2_1/Core/MEDprofilLire.cxx similarity index 69% rename from src/MEDWrapper/V2_1/MEDprofilLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDprofilLire.cxx index c954bddf8..7621f82d8 100644 --- a/src/MEDWrapper/V2_1/MEDprofilLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDprofilLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDunvCr.cxx b/src/MEDWrapper/V2_1/Core/MEDunvCr.cxx similarity index 75% rename from src/MEDWrapper/V2_1/MEDunvCr.cxx rename to src/MEDWrapper/V2_1/Core/MEDunvCr.cxx index f521e7b67..a1bcd9843 100644 --- a/src/MEDWrapper/V2_1/MEDunvCr.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDunvCr.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDunvLire.cxx b/src/MEDWrapper/V2_1/Core/MEDunvLire.cxx similarity index 66% rename from src/MEDWrapper/V2_1/MEDunvLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDunvLire.cxx index 8743cb4e4..f6ddc5f6b 100644 --- a/src/MEDWrapper/V2_1/MEDunvLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDunvLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDversionConforme.cxx b/src/MEDWrapper/V2_1/Core/MEDversionConforme.cxx similarity index 68% rename from src/MEDWrapper/V2_1/MEDversionConforme.cxx rename to src/MEDWrapper/V2_1/Core/MEDversionConforme.cxx index 201c2daf1..764a9a83a 100644 --- a/src/MEDWrapper/V2_1/MEDversionConforme.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDversionConforme.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDversionDonner.cxx b/src/MEDWrapper/V2_1/Core/MEDversionDonner.cxx similarity index 56% rename from src/MEDWrapper/V2_1/MEDversionDonner.cxx rename to src/MEDWrapper/V2_1/Core/MEDversionDonner.cxx index e3f725d8a..33a57726a 100644 --- a/src/MEDWrapper/V2_1/MEDversionDonner.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDversionDonner.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MEDversionLire.cxx b/src/MEDWrapper/V2_1/Core/MEDversionLire.cxx similarity index 65% rename from src/MEDWrapper/V2_1/MEDversionLire.cxx rename to src/MEDWrapper/V2_1/Core/MEDversionLire.cxx index 56feeb542..b358d8357 100644 --- a/src/MEDWrapper/V2_1/MEDversionLire.cxx +++ b/src/MEDWrapper/V2_1/Core/MEDversionLire.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/Core/Makefile.in b/src/MEDWrapper/V2_1/Core/Makefile.in new file mode 100644 index 000000000..8cdceac4b --- /dev/null +++ b/src/MEDWrapper/V2_1/Core/Makefile.in @@ -0,0 +1,169 @@ +# +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : +# Author : +# Module : +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../../../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +LIB_SRC_TOOLS_HDFI= \ +MEDattrFermer.cxx \ +MEDattrNumEcrire.cxx \ +MEDattrNumLire.cxx \ +MEDattrOuvrir.cxx \ +MEDattrStringEcrire.cxx \ +MEDattrStringLire.cxx \ +MEDdatagroupCreer.cxx \ +MEDdatagroupFermer.cxx \ +MEDdatagroupOuvrir.cxx \ +MEDdatasetFermer.cxx \ +MEDdatasetNumEcrire.cxx \ +MEDdatasetNumLire.cxx \ +MEDdatasetOuvrir.cxx \ +MEDdatasetStringEcrire.cxx \ +MEDdatasetStringLire.cxx \ +MEDfichierCreer.cxx \ +MEDfichierFermer.cxx \ +MEDfichierOuvrir.cxx \ +MEDindiceInfo.cxx \ +MEDindiceNum.cxx \ +MEDmodeErreurVerrouiller.cxx \ +MEDnObjets.cxx \ +MEDobjetIdentifer.cxx + +LIB_SRC_TOOLS_MISC= \ +MED1cstring.cxx MEDnomDataset.cxx \ +MED2cstring.cxx MEDnomEntite.cxx \ +MEDGeometrieElement.cxx MEDnomGeometrie.cxx \ +MEDcstringFree.cxx MEDparametresGeometrie.cxx \ +MEDfstring.cxx + +LIB_SRC_API_CI= \ +MEDchampCr.cxx \ +MEDchampEcr.cxx \ +MEDchampInfo.cxx \ +MEDchampLire.cxx \ +MEDconnEcr.cxx \ +MEDconnLire.cxx \ +MEDcoordEcr.cxx \ +MEDcoordLire.cxx \ +MEDdimLire.cxx \ +MEDelementsEcr.cxx \ +MEDelementsLire.cxx \ +MEDequivCr.cxx \ +MEDequivEcr.cxx \ +MEDequivInfo.cxx \ +MEDequivLire.cxx \ +MEDfam2groA.cxx \ +MEDfam2groB.cxx \ +MEDfamCr.cxx \ +MEDfamEcr.cxx \ +MEDfamInfo.cxx \ +MEDfamLire.cxx \ +MEDfamMaaCr.cxx \ +MEDfamMaaInfo.cxx \ +MEDfamMaaLire.cxx \ +MEDfermer.cxx \ +MEDfichDesEcr.cxx \ +MEDfichEntete.cxx \ +MEDgro2famA.cxx \ +MEDgro2famB.cxx \ +MEDlFichDes.cxx \ +MEDmaaCr.cxx \ +MEDmaaInfo.cxx \ +MEDnChamp.cxx \ +MEDnCorres.cxx \ +MEDnEntMaa.cxx \ +MEDnEntites.cxx \ +MEDnEquiv.cxx \ +MEDnFam.cxx \ +MEDnMaa.cxx \ +MEDnPasdetemps.cxx \ +MEDnProfil.cxx \ +MEDnVal.cxx \ +MEDnValProfil.cxx \ +MEDnbnoisEcr.cxx \ +MEDnbnoisLire.cxx \ +MEDnbnomaEcr.cxx \ +MEDnbnomaLire.cxx \ +MEDnbnosoEcr.cxx \ +MEDnbnosoLire.cxx \ +MEDnoeudsEcr.cxx \ +MEDnoeudsLire.cxx \ +MEDnomEcr.cxx \ +MEDnomLire.cxx \ +MEDnumEcr.cxx \ +MEDnumLire.cxx \ +MEDouvrir.cxx \ +MEDpasdetempsInfo.cxx \ +MEDprofilEcr.cxx \ +MEDprofilLire.cxx \ +MEDprofilInfo.cxx \ +MEDunvCr.cxx \ +MEDunvLire.cxx \ +MEDformatConforme.cxx \ +MEDversionConforme.cxx \ +MEDversionDonner.cxx \ +MEDversionLire.cxx \ +MEDbodyFittedEcr.cxx \ +MEDbodyFittedLire.cxx \ +MEDfamGridEcr.cxx \ +MEDfamGridLire.cxx \ +MEDgridCr.cxx \ +MEDgridEcr.cxx \ +MEDgridInfo.cxx \ +MEDgridLire.cxx \ +MEDnGrid.cxx + +# Libraries targets + +LIB = libmed_V2_1.la +LIB_SRC = \ + $(LIB_SRC_TOOLS_HDFI) \ + $(LIB_SRC_TOOLS_MISC) \ + $(LIB_SRC_API_CI) + +EXPORT_HEADERS = \ + med.hxx \ + med_proto.hxx \ + hdf5_version2api.hxx + +# Executables targets +BIN = mdump_V2_1 test1_V2_1 +BIN_SRC = + +CPPFLAGS+= -D@MACHINE@ $(BOOST_CPPFLAGS) $(HDF5_INCLUDES) + +LDFLAGS+= $(HDF5_LIBS) + +LDFLAGSFORBIN=$(LDFLAGS) + +@CONCLUDE@ diff --git a/src/MEDWrapper/V2_1/Core/hdf5_version2api.hxx b/src/MEDWrapper/V2_1/Core/hdf5_version2api.hxx new file mode 100644 index 000000000..2e353ea07 --- /dev/null +++ b/src/MEDWrapper/V2_1/Core/hdf5_version2api.hxx @@ -0,0 +1,45 @@ + +#ifndef _hdf5_version2api_hxx_ +#define _hdf5_version2api_hxx_ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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/ +// + +#include + +#if H5_VERS_MAJOR < 1 +#elif H5_VERS_MAJOR == 1 + +#if H5_VERS_MINOR < 6 +#elif H5_VERS_MINOR == 6 + +#if H5_VERS_RELEASE < 4 +#else +#define HDF_NEW_API +#endif + +#else /* H5_VERS_MINOR >= 7 */ +#define HDF_NEW_API +#endif /* H5_VERS_MINOR */ + +#else /* H5_VERS_MAJOR >= 2 */ +#define HDF_NEW_API +#endif /* H5_VERS_MAJOR */ + +#endif diff --git a/src/MEDWrapper/V2_1/mdump_V2_1.cxx b/src/MEDWrapper/V2_1/Core/mdump_V2_1.cxx similarity index 98% rename from src/MEDWrapper/V2_1/mdump_V2_1.cxx rename to src/MEDWrapper/V2_1/Core/mdump_V2_1.cxx index 7c9c125e0..6c959fde4 100644 --- a/src/MEDWrapper/V2_1/mdump_V2_1.cxx +++ b/src/MEDWrapper/V2_1/Core/mdump_V2_1.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /****************************************************************************** * - Nom du fichier : mdump.c * diff --git a/src/MEDWrapper/V2_1/med.hxx b/src/MEDWrapper/V2_1/Core/med.hxx similarity index 85% rename from src/MEDWrapper/V2_1/med.hxx rename to src/MEDWrapper/V2_1/Core/med.hxx index 9bb39cc2b..2fe174f9a 100644 --- a/src/MEDWrapper/V2_1/med.hxx +++ b/src/MEDWrapper/V2_1/Core/med.hxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2003 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/med_hdfi.hxx b/src/MEDWrapper/V2_1/Core/med_hdfi.hxx similarity index 80% rename from src/MEDWrapper/V2_1/med_hdfi.hxx rename to src/MEDWrapper/V2_1/Core/med_hdfi.hxx index a2d95d46d..670ff63a9 100644 --- a/src/MEDWrapper/V2_1/med_hdfi.hxx +++ b/src/MEDWrapper/V2_1/Core/med_hdfi.hxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/med_misc.hxx b/src/MEDWrapper/V2_1/Core/med_misc.hxx similarity index 68% rename from src/MEDWrapper/V2_1/med_misc.hxx rename to src/MEDWrapper/V2_1/Core/med_misc.hxx index 4202d92d6..9e9676ec8 100644 --- a/src/MEDWrapper/V2_1/med_misc.hxx +++ b/src/MEDWrapper/V2_1/Core/med_misc.hxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/med_outils.hxx b/src/MEDWrapper/V2_1/Core/med_outils.hxx similarity index 80% rename from src/MEDWrapper/V2_1/med_outils.hxx rename to src/MEDWrapper/V2_1/Core/med_outils.hxx index 84d0635b7..b897a6219 100644 --- a/src/MEDWrapper/V2_1/med_outils.hxx +++ b/src/MEDWrapper/V2_1/Core/med_outils.hxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2003 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/med_proto.hxx b/src/MEDWrapper/V2_1/Core/med_proto.hxx similarity index 92% rename from src/MEDWrapper/V2_1/med_proto.hxx rename to src/MEDWrapper/V2_1/Core/med_proto.hxx index e5694a9d1..1847b56a8 100644 --- a/src/MEDWrapper/V2_1/med_proto.hxx +++ b/src/MEDWrapper/V2_1/Core/med_proto.hxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/med_utils.hxx b/src/MEDWrapper/V2_1/Core/med_utils.hxx similarity index 86% rename from src/MEDWrapper/V2_1/med_utils.hxx rename to src/MEDWrapper/V2_1/Core/med_utils.hxx index 6e14343c5..0c16d650e 100644 --- a/src/MEDWrapper/V2_1/med_utils.hxx +++ b/src/MEDWrapper/V2_1/Core/med_utils.hxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/test1_V2_1.cxx b/src/MEDWrapper/V2_1/Core/test1_V2_1.cxx similarity index 72% rename from src/MEDWrapper/V2_1/test1_V2_1.cxx rename to src/MEDWrapper/V2_1/Core/test1_V2_1.cxx index 85a9258f7..20746cb11 100644 --- a/src/MEDWrapper/V2_1/test1_V2_1.cxx +++ b/src/MEDWrapper/V2_1/Core/test1_V2_1.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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/ -// /************************************************************************* * COPYRIGHT (C) 1999 - 2002 EDF R&D * THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY diff --git a/src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx b/src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx deleted file mode 100644 index 03de341a9..000000000 --- a/src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx +++ /dev/null @@ -1,947 +0,0 @@ -// -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : -// Author : -// Module : -// $Header$ - -#include "MED_V2_1_Wrapper.hxx" -#include "MED_Utilities.hxx" - -#include "med.hxx" -using namespace med_2_1; - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - - - -namespace MED{ - namespace V2_1{ - - //--------------------------------------------------------------- - class TFile{ - TFile(); - TFile(const TFile&); - - public: - TFile(const std::string& theFileName): - myFid(-1), - myCount(0), - myFileName(theFileName) - {} - - ~TFile(){ - Close(); - } - - void Open(EModeAcces theMode, TErr* theErr = NULL){ - if(myCount++ == 0){ - char* aFileName = const_cast(myFileName.c_str()); - myFid = MEDouvrir(aFileName,med_mode_acces(theMode)); - } - if(theErr){ - *theErr = TErr(myFid); - INITMSG(MYDEBUG && myFid < 0,"TFile::Open - MED_MODE_ACCES = "<Open(theMode,theErr); - } - - ~TFileWrapper(){ - myFile->Close(); - } - }; - - - //--------------------------------------------------------------- - TVWrapper::TVWrapper(const std::string& theFileName): - myFile(new TFile(theFileName)) - {} - - - TInt TVWrapper::GetNbMeshes(TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return -1; - - return MEDnMaa(myFile->Id()); - } - - - void TVWrapper::GetMeshInfo(TInt theMeshId, - MED::TMeshInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return; - - TErr aRet = MEDmaaInfo(myFile->Id(), - theMeshId, - &theInfo.myName[0], - (med_2_1::med_int *)&theInfo.myDim); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetMeshInfo - MEDmaaInfo(...)"); - } - - - void TVWrapper::SetMeshInfo(const MED::TMeshInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& anInfo = const_cast(theInfo); - - TErr aRet = MEDmaaCr(myFile->Id(), - &anInfo.myName[0], - anInfo.myDim); - - INITMSG(MYDEBUG,"TVWrapper::SetMeshInfo - MED_MODE_ACCES = "<(theInfo); - return MEDnFam(myFile->Id(), - &anInfo.myName[0], - 0, - MED_FAMILLE); - } - - - TInt TVWrapper::GetNbFamAttr(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& anInfo = const_cast(theInfo); - return MEDnFam(myFile->Id(), - &anInfo.myName[0], - theFamId, - MED_ATTR); - } - - - TInt TVWrapper::GetNbFamGroup(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& anInfo = const_cast(theInfo); - return MEDnFam(myFile->Id(), - &anInfo.myName[0], - theFamId, - MED_GROUPE); - } - - - void TVWrapper::GetFamilyInfo(TInt theFamId, - MED::TFamilyInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TErr aRet = MEDfamInfo(myFile->Id(), - &aMeshInfo.myName[0], - theFamId, - &theInfo.myName[0], - (med_2_1::med_int *)&theInfo.myId, - (med_2_1::med_int *)&theInfo.myAttrId[0], - (med_2_1::med_int *)&theInfo.myAttrVal[0], - &theInfo.myAttrDesc[0], - (med_2_1::med_int *)&theInfo.myNbAttr, - &theInfo.myGroupNames[0], - (med_2_1::med_int *)&theInfo.myNbGroup); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetFamilyInfo - MEDfamInfo - "<< - "&aMeshInfo.myName[0] = '"<<&aMeshInfo.myName[0]<<"'; "<< - "theFamId = "<(theMeshInfo); - - TInt aRet = MEDnEntMaa(myFile->Id(), - &aMeshInfo.myName[0], - MED_COOR, - MED_NOEUD, - med_geometrie_element(0), - med_connectivite(0)); - - ADDMSG(MYDEBUG," nbnodes="<Id(), - &aMeshInfo.myName[0], - aMeshInfo.myDim, - &theInfo.myCoord[0], - MED_FULL_INTERLACE, - &aRepere, - &theInfo.myCoordNames[0], - &theInfo.myCoordUnits[0], - &theInfo.myElemNames[0], - &anIsElemNames, - (med_2_1::med_int *)&theInfo.myElemNum[0], - &anIsElemNum, - (med_2_1::med_int *)&theInfo.myFamNum[0], - theInfo.myNbElem); - - ADDMSG(MYDEBUG," myDim="<(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - med_repere& aRepere = (med_repere&)(theInfo.mySystem); - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - - TErr aRet = MEDnoeudsEcr(myFile->Id(), - &aMeshInfo.myName[0], - aMeshInfo.myDim, - &anInfo.myCoord[0], - MED_FULL_INTERLACE, - aRepere, - &anInfo.myCoordNames[0], - &anInfo.myCoordUnits[0], - &anInfo.myElemNames[0], - anIsElemNames, - (med_2_1::med_int *)&anInfo.myElemNum[0], - anIsElemNum, - (med_2_1::med_int *)&anInfo.myFamNum[0], - anInfo.myNbElem, - MED_REMP); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"SetNodeInfo - MEDnoeudsEcr(...)"); - } - - - void TVWrapper::SetNodeInfo(const MED::TNodeInfo& theInfo, - TErr* theErr) - { - TErr aRet; - SetNodeInfo(theInfo,eECRI,&aRet); - - if(aRet < 0) - SetNodeInfo(theInfo,eREMP,theErr); - } - - - TEntityInfo TVWrapper::GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theTConn, - TErr* theErr) - { - TEntityInfo anInfo; - - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return anInfo; - - TInt aNbElem = GetNbNodes(theMeshInfo); - if(aNbElem > 0){ - anInfo[eNOEUD][ePOINT1] = aNbElem; - const TEntity2GeomSet& anEntity2GeomSet = GetEntity2GeomSet(); - TEntity2GeomSet::const_iterator anIter = anEntity2GeomSet.begin(); - TEntity2GeomSet::const_iterator anIterEnd = anEntity2GeomSet.end(); - for(; anIter != anIterEnd; anIter++){ - const EEntiteMaillage& anEntity = anIter->first; - const TGeomSet& aGeomSet = anIter->second; - TGeomSet::const_iterator anIter2 = aGeomSet.begin(); - TGeomSet::const_iterator anIterEnd2 = aGeomSet.end(); - for(; anIter2 != anIterEnd2; anIter2++){ - const EGeometrieElement& aGeom = *anIter2; - aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theTConn,theErr); - if(aNbElem > 0) - anInfo[anEntity][aGeom] = aNbElem; - } - } - } - return anInfo; - } - - - TInt TVWrapper::GetNbCells(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - - med_entite_maillage anEntity = med_entite_maillage(theTEntity); - med_geometrie_element aGeom = med_geometrie_element(theTGeom); - med_connectivite aConn = med_connectivite(theTConn); - - return MEDnEntMaa(myFile->Id(), - &aMeshInfo.myName[0], - MED_CONN, - anEntity, - aGeom, - aConn); - } - - - void TVWrapper::GetCellInfo(MED::TCellInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - TInt aNbElem = theInfo.myElemNum.size(); - - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - - TErr aRet = MEDelementsLire(myFile->Id(), - &aMeshInfo.myName[0], - aMeshInfo.myDim, - (med_2_1::med_int *)&theInfo.myConn[0], - MED_FULL_INTERLACE, - &theInfo.myElemNames[0], - &anIsElemNames, - (med_2_1::med_int *)&theInfo.myElemNum[0], - &anIsElemNum, - (med_2_1::med_int *)&theInfo.myFamNum[0], - aNbElem, - anEntity, - aGeom, - aConn); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetCellInfo - MEDelementsLire(...)"); - } - - - void TVWrapper::SetCellInfo(const MED::TCellInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr); - - if(theErr && *theErr < 0) - return; - - MED::TCellInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - - TErr aRet = MEDelementsEcr(myFile->Id(), - &aMeshInfo.myName[0], - aMeshInfo.myDim, - (med_2_1::med_int *)&anInfo.myConn[0], - MED_FULL_INTERLACE, - &anInfo.myElemNames[0], - anIsElemNames, - (med_2_1::med_int *)&anInfo.myElemNum[0], - anIsElemNum, - (med_2_1::med_int *)&anInfo.myFamNum[0], - anInfo.myNbElem, - anEntity, - aGeom, - aConn, - MED_REMP); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetCellInfo - MEDelementsLire(...)"); - } - - - void TVWrapper::SetCellInfo(const MED::TCellInfo& theInfo, - TErr* theErr) - { - TErr aRet; - SetCellInfo(theInfo,eECRI,&aRet); - - if(aRet < 0) - SetCellInfo(theInfo,eREMP,theErr); - } - - - TInt TVWrapper::GetNbFields(TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return -1; - - return MEDnChamp(myFile->Id(),0); - } - - - TInt TVWrapper::GetNbComp(TInt theFieldId, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return -1; - - return MEDnChamp(myFile->Id(),theFieldId); - } - - - void TVWrapper::GetFieldInfo(TInt theFieldId, - MED::TFieldInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return; - - med_type_champ& aType = (med_type_champ&)(theInfo.myType); - - TErr aRet = MEDchampInfo(myFile->Id(), - theFieldId, - &theInfo.myName[0], - &aType, - &theInfo.myCompNames[0], - &theInfo.myUnitNames[0], - theInfo.myNbComp); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetFieldInfo - MEDchampInfo(...)"); - } - - - void TVWrapper::SetFieldInfo(const MED::TFieldInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr); - - if(theErr && *theErr < 0) - return; - - MED::TFieldInfo& anInfo = const_cast(theInfo); - - med_type_champ& aType = (med_type_champ&)(theInfo.myType); - - TErr aRet = MEDchampCr(myFile->Id(), - &anInfo.myName[0], - aType, - &anInfo.myCompNames[0], - &anInfo.myUnitNames[0], - anInfo.myNbComp); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"SetFieldInfo - MEDchampCr(...)"); - } - - - void TVWrapper::SetFieldInfo(const MED::TFieldInfo& theInfo, - TErr* theErr) - { - try{ - - TErr aRet; - SetFieldInfo(theInfo,eECRI,&aRet); - - if(aRet < 0) - SetFieldInfo(theInfo,eREMP,theErr); - - }catch(const std::exception& theExc){ - EXCEPTION(runtime_error,"SetFieldInfo(...)"<(theInfo); - TEntityInfo::const_iterator anIter = theEntityInfo.begin(); - for(; anIter != theEntityInfo.end(); anIter++){ - const med_entite_maillage& anEntity = (const med_entite_maillage&)(anIter->first); - const TGeom& aTGeom = anIter->second; - TGeom::const_iterator anGeomIter = aTGeom.begin(); - for(; anGeomIter != aTGeom.end(); anGeomIter++){ - const med_geometrie_element& aGeom = (const med_geometrie_element&)(anGeomIter->first); - aNbTimeStamps = MEDnPasdetemps(myFile->Id(),&anInfo.myName[0],anEntity,aGeom); - if(aNbTimeStamps){ - theEntity = EEntiteMaillage(anEntity); - theGeom[EGeometrieElement(aGeom)] = anGeomIter->second; - } - } - if(aNbTimeStamps) - break; - } - return aNbTimeStamps; - } - - - void TVWrapper::GetTimeStampInfo(TInt theTimeStampId, - MED::TTimeStampInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - TGeom& aTGeom = theInfo.myGeom; - - if(theErr){ - if(aTGeom.empty()) - *theErr = -1; - if(*theErr < 0) - return; - }else if(aTGeom.empty()) - EXCEPTION(runtime_error,"GetTimeStampInfo - There is no any cell"); - - MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo; - MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myEntity); - - TGeom::iterator anIter = aTGeom.begin(); - med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first); - - TErr aRet = MEDpasdetempsInfo(myFile->Id(), - &aFieldInfo.myName[0], - anEntity, - aGeom, - theTimeStampId, - &aMeshInfo.myName[0], - (med_2_1::med_int *)&theInfo.myNbGauss, - (med_2_1::med_int *)&theInfo.myNumDt, - &theInfo.myUnitDt[0], - &theInfo.myDt, - (med_2_1::med_int *)&theInfo.myNumOrd); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetTimeStampInfo - MEDpasdetempsInfo(...)"); - - static TInt MAX_NB_GAUSS_POINTS = 32; - if(theInfo.myNbGauss <= 0 || theInfo.myNbGauss > MAX_NB_GAUSS_POINTS) - theInfo.myNbGauss = 1; - } - - - void TVWrapper::GetTimeStampVal(MED::TTimeStampVal& theVal, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECT,theErr); - - if(theErr && *theErr < 0) - return; - - TIdt anId = myFile->Id(); - - MED::TTimeStampInfo& aTimeStampInfo = *theVal.myTimeStampInfo; - MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo; - MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - - med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity); - TGeom& aTGeom = aTimeStampInfo.myGeom; - TGeom::iterator anIter = aTGeom.begin(); - for(; anIter != aTGeom.end(); anIter++){ - med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first); - TInt aNbVal = MEDnVal(anId, - &aFieldInfo.myName[0], - anEntity, - aGeom, - aTimeStampInfo.myNumDt, - aTimeStampInfo.myNumOrd); - if(aNbVal <= 0){ - if(theErr){ - *theErr = -1; - return; - } - EXCEPTION(runtime_error,"GetTimeStampInfo - MEDnVal(...) - aNbVal == "<Id(); - - MED::TTimeStampVal& aVal = const_cast(theVal); - MED::TTimeStampInfo& aTimeStampInfo = *aVal.myTimeStampInfo; - MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo; - MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - MED::TMeshValue& aMeshValue = aVal.myMeshValue; - - med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity); - TMeshValue::iterator anIter = aMeshValue.begin(); - for(; anIter != aMeshValue.end(); anIter++){ - med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first); - TValue& aValue = aVal.myMeshValue[EGeometrieElement(aGeom)]; - med_int iEnd = aValue.size(); - med_int aNbVal = iEnd / aFieldInfo.myNbComp; - - switch(aFieldInfo.myType){ - case eFLOAT64: { - std::vector& anArray = aValue; - - aRet = MEDchampEcr(anId, - &aMeshInfo.myName[0], - &aFieldInfo.myName[0], - (unsigned char*)&anArray[0], - MED_FULL_INTERLACE, - aNbVal, - aTimeStampInfo.myNbGauss, - MED_ALL, - &aVal.myPflName[0], - MED_ECRI, - anEntity, - aGeom, - aTimeStampInfo.myNumDt, - &aTimeStampInfo.myUnitDt[0], - aTimeStampInfo.myDt, - aTimeStampInfo.myNumOrd); - break; - } - default: { - vector anArray(iEnd); - for(TInt i = 0; i< iEnd; i++) anArray[i] = TInt(aValue[i]); - - aRet = MEDchampEcr(anId, - &aMeshInfo.myName[0], - &aFieldInfo.myName[0], - (unsigned char*)&anArray[0], - MED_FULL_INTERLACE, - aNbVal, - aTimeStampInfo.myNbGauss, - MED_ALL, - &aVal.myPflName[0], - MED_ECRI, - anEntity, - aGeom, - aTimeStampInfo.myNumDt, - &aTimeStampInfo.myUnitDt[0], - aTimeStampInfo.myDt, - aTimeStampInfo.myNumOrd); - break; - }} - - if(aRet < 0){ - if(theErr){ - *theErr = aRet; - break; - } - EXCEPTION(runtime_error,"SetTimeStamp - MEDchampEcr(...)"); - } - - } - - INITMSG(MYDEBUG,"TVWrapper::SetMeshInfo - MED_MODE_ACCES = "< TVMeshInfo; - - typedef MED::TTFamilyInfo TVFamilyInfo; - - typedef MED::TTNodeInfo TVNodeInfo; - - typedef MED::TTCellInfo TVCellInfo; - - typedef MED::TTFieldInfo TVFieldInfo; - - typedef MED::TTTimeStampInfo TVTimeStampInfo; - - typedef MED::TTTimeStampVal TVTimeStampVal; - - //--------------------------------------------------------------- - class TFile; - typedef boost::shared_ptr PFile; - - typedef enum {eLECT, eECRI, eREMP} EModeAcces; - - //--------------------------------------------------------------- - class TVWrapper: public MED::TTWrapper - { - TVWrapper(); - TVWrapper(const TVWrapper&); - TVWrapper& operator=(const TVWrapper&); - - public: - TVWrapper(const std::string& theFileName); - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbMeshes(TErr* theErr = NULL); - - virtual void GetMeshInfo(TInt theMeshId, MED::TMeshInfo&, - TErr* theErr = NULL); - - virtual void SetMeshInfo(const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - - void SetMeshInfo(const MED::TMeshInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbFamilies(const MED::TMeshInfo& theMeshInfo, - TErr* theErr = NULL); - virtual TInt GetNbFamAttr(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - virtual TInt GetNbFamGroup(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - - virtual void GetFamilyInfo(TInt theFamId, - MED::TFamilyInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetFamilyInfo(const MED::TFamilyInfo& theInfo, - TErr* theErr = NULL); - - void SetFamilyInfo(const MED::TFamilyInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbNodes(const MED::TMeshInfo& theMeshInfo, - TErr* theErr = NULL); - - virtual void GetNodeInfo(MED::TNodeInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetNodeInfo(const MED::TNodeInfo& theInfo, - TErr* theErr = NULL); - - void SetNodeInfo(const MED::TNodeInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TEntityInfo GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theTConn = eNOD, - TErr* theErr = NULL); - - virtual TInt GetNbCells(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite theTConn = eNOD, - TErr* theErr = NULL); - - virtual void GetCellInfo(MED::TCellInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetCellInfo(const MED::TCellInfo& theInfo, - TErr* theErr = NULL); - - void SetCellInfo(const MED::TCellInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbFields(TErr* theErr = NULL); - - virtual TInt GetNbComp(TInt theFieldId, - TErr* theErr = NULL); - - virtual void GetFieldInfo(TInt theFieldId, - MED::TFieldInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetFieldInfo(const MED::TFieldInfo& theInfo, - TErr* theErr = NULL); - - void SetFieldInfo(const MED::TFieldInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbTimeStamps(const MED::TFieldInfo& theInfo, - const MED::TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom& theGeom, - TErr* theErr = NULL); - - virtual void GetTimeStampInfo(TInt theTimeStampId, - MED::TTimeStampInfo& theInfo, - TErr* theErr = NULL); - - virtual void GetTimeStampVal(MED::TTimeStampVal& theVal, - TErr* theErr = NULL); - - virtual void SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, - TErr* theErr = NULL); - - void SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, - EModeAcces theMode, - TErr* theErr = NULL); - - protected: - PFile myFile; - }; - } -} - -#endif diff --git a/src/MEDWrapper/V2_1/Makefile.in b/src/MEDWrapper/V2_1/Makefile.in index 778b27267..906408d74 100644 --- a/src/MEDWrapper/V2_1/Makefile.in +++ b/src/MEDWrapper/V2_1/Makefile.in @@ -34,137 +34,6 @@ VPATH=.:@srcdir@:@top_srcdir@/idl @COMMENCE@ -LIB_SRC_TOOLS_HDFI= \ -MEDattrFermer.cxx \ -MEDattrNumEcrire.cxx \ -MEDattrNumLire.cxx \ -MEDattrOuvrir.cxx \ -MEDattrStringEcrire.cxx \ -MEDattrStringLire.cxx \ -MEDdatagroupCreer.cxx \ -MEDdatagroupFermer.cxx \ -MEDdatagroupOuvrir.cxx \ -MEDdatasetFermer.cxx \ -MEDdatasetNumEcrire.cxx \ -MEDdatasetNumLire.cxx \ -MEDdatasetOuvrir.cxx \ -MEDdatasetStringEcrire.cxx \ -MEDdatasetStringLire.cxx \ -MEDfichierCreer.cxx \ -MEDfichierFermer.cxx \ -MEDfichierOuvrir.cxx \ -MEDindiceInfo.cxx \ -MEDindiceNum.cxx \ -MEDmodeErreurVerrouiller.cxx \ -MEDnObjets.cxx \ -MEDobjetIdentifer.cxx +SUBDIRS = Core Wrapper -LIB_SRC_TOOLS_MISC= \ -MED1cstring.cxx MEDnomDataset.cxx \ -MED2cstring.cxx MEDnomEntite.cxx \ -MEDGeometrieElement.cxx MEDnomGeometrie.cxx \ -MEDcstringFree.cxx MEDparametresGeometrie.cxx \ -MEDfstring.cxx - -LIB_SRC_API_CI= \ -MEDchampCr.cxx \ -MEDchampEcr.cxx \ -MEDchampInfo.cxx \ -MEDchampLire.cxx \ -MEDconnEcr.cxx \ -MEDconnLire.cxx \ -MEDcoordEcr.cxx \ -MEDcoordLire.cxx \ -MEDdimLire.cxx \ -MEDelementsEcr.cxx \ -MEDelementsLire.cxx \ -MEDequivCr.cxx \ -MEDequivEcr.cxx \ -MEDequivInfo.cxx \ -MEDequivLire.cxx \ -MEDfam2groA.cxx \ -MEDfam2groB.cxx \ -MEDfamCr.cxx \ -MEDfamEcr.cxx \ -MEDfamInfo.cxx \ -MEDfamLire.cxx \ -MEDfamMaaCr.cxx \ -MEDfamMaaInfo.cxx \ -MEDfamMaaLire.cxx \ -MEDfermer.cxx \ -MEDfichDesEcr.cxx \ -MEDfichEntete.cxx \ -MEDgro2famA.cxx \ -MEDgro2famB.cxx \ -MEDlFichDes.cxx \ -MEDmaaCr.cxx \ -MEDmaaInfo.cxx \ -MEDnChamp.cxx \ -MEDnCorres.cxx \ -MEDnEntMaa.cxx \ -MEDnEntites.cxx \ -MEDnEquiv.cxx \ -MEDnFam.cxx \ -MEDnMaa.cxx \ -MEDnPasdetemps.cxx \ -MEDnProfil.cxx \ -MEDnVal.cxx \ -MEDnValProfil.cxx \ -MEDnbnoisEcr.cxx \ -MEDnbnoisLire.cxx \ -MEDnbnomaEcr.cxx \ -MEDnbnomaLire.cxx \ -MEDnbnosoEcr.cxx \ -MEDnbnosoLire.cxx \ -MEDnoeudsEcr.cxx \ -MEDnoeudsLire.cxx \ -MEDnomEcr.cxx \ -MEDnomLire.cxx \ -MEDnumEcr.cxx \ -MEDnumLire.cxx \ -MEDouvrir.cxx \ -MEDpasdetempsInfo.cxx \ -MEDprofilEcr.cxx \ -MEDprofilLire.cxx \ -MEDprofilInfo.cxx \ -MEDunvCr.cxx \ -MEDunvLire.cxx \ -MEDformatConforme.cxx \ -MEDversionConforme.cxx \ -MEDversionDonner.cxx \ -MEDversionLire.cxx \ -MEDbodyFittedEcr.cxx \ -MEDbodyFittedLire.cxx \ -MEDfamGridEcr.cxx \ -MEDfamGridLire.cxx \ -MEDgridCr.cxx \ -MEDgridEcr.cxx \ -MEDgridInfo.cxx \ -MEDgridLire.cxx \ -MEDnGrid.cxx - -# Libraries targets - -LIB = libMEDWrapper_V2_1.la -LIB_SRC = \ - $(LIB_SRC_TOOLS_HDFI) \ - $(LIB_SRC_TOOLS_MISC) \ - $(LIB_SRC_API_CI) \ - MED_V2_1_Wrapper.cxx - -EXPORT_HEADERS = \ - MED_V2_1_Wrapper.hxx \ - med.hxx \ - med_proto.hxx - -# Executables targets -BIN = mdump_V2_1 test1_V2_1 -BIN_SRC = - -CPPFLAGS+= -D@MACHINE@ $(BOOST_CPPFLAGS) $(HDF5_INCLUDES) - -LDFLAGS+= $(HDF5_LIBS) -lMEDWrapperBase - -LDFLAGSFORBIN=$(LDFLAGS) - -@CONCLUDE@ +@MODULE@ diff --git a/src/MEDWrapper/V2_1/Wrapper/MED_V2_1_Wrapper.cxx b/src/MEDWrapper/V2_1/Wrapper/MED_V2_1_Wrapper.cxx new file mode 100644 index 000000000..0b95e7646 --- /dev/null +++ b/src/MEDWrapper/V2_1/Wrapper/MED_V2_1_Wrapper.cxx @@ -0,0 +1,1211 @@ +// +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : +// $Header$ + +#include "MED_V2_1_Wrapper.hxx" +#include "MED_Algorithm.hxx" +#include "MED_Utilities.hxx" + +#include "med.hxx" +using namespace med_2_1; + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + + + +namespace MED +{ + + template<> + TInt + GetDESCLength() + { + return 200; + } + + template<> + TInt + GetIDENTLength() + { + return 8; + } + + template<> + TInt + GetLNOMLength() + { + return 80; + } + + template<> + TInt + GetNOMLength() + { + return 32; + } + + template<> + TInt + GetPNOMLength() + { + return 8; + } + + template<> + TInt + GetNbConn(EGeometrieElement typmai, + EEntiteMaillage typent, + TInt mdim) + { + TInt nsup = 0; + + if(typent == eMAILLE){ + TInt edim = typmai / 100; + if(mdim == 2 || mdim == 3) + if(edim == 1) + nsup = 1; + + if(mdim == 3) + if (edim == 2) + nsup = 1; + } + + return nsup + typmai%100; + } + + namespace V2_1 + { + + //--------------------------------------------------------------- + class TFile{ + TFile(); + TFile(const TFile&); + + public: + TFile(const std::string& theFileName): + myFid(-1), + myCount(0), + myFileName(theFileName) + {} + + ~TFile(){ + Close(); + } + + void Open(EModeAcces theMode, TErr* theErr = NULL){ + if(myCount++ == 0){ + char* aFileName = const_cast(myFileName.c_str()); + myFid = MEDouvrir(aFileName,med_mode_acces(theMode)); + } + if(theErr){ + *theErr = TErr(myFid); + INITMSG(MYDEBUG && myFid < 0,"TFile::Open - MED_MODE_ACCES = "<Open(theMode,theErr); + } + + ~TFileWrapper(){ + myFile->Close(); + } + }; + + + //--------------------------------------------------------------- + TVWrapper + ::TVWrapper(const std::string& theFileName): + myFile(new TFile(theFileName)) + {} + + + TInt + TVWrapper + ::GetNbMeshes(TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + return MEDnMaa(myFile->Id()); + } + + + void + TVWrapper + ::GetMeshInfo(TInt theMeshId, + TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + TErr aRet = MEDmaaInfo(myFile->Id(), + theMeshId, + &theInfo.myName[0], + (med_int*)&theInfo.myDim); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetMeshInfo - MEDmaaInfo(...)"); + } + + + void + TVWrapper + ::SetMeshInfo(const TMeshInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,theMode,theErr); + + if(theErr && *theErr < 0) + return; + + TMeshInfo& anInfo = const_cast(theInfo); + + TErr aRet = MEDmaaCr(myFile->Id(), + &anInfo.myName[0], + anInfo.myDim); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"SetMeshInfo - MEDmaaCr(...)"); + } + + + void + TVWrapper + ::SetMeshInfo(const TMeshInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetMeshInfo(theInfo,eECRI,&aRet); + + if(aRet < 0) + SetMeshInfo(theInfo,eREMP,theErr); + } + + + TInt + TVWrapper + ::GetNbFamilies(const TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + TMeshInfo& anInfo = const_cast(theInfo); + + return MEDnFam(myFile->Id(), + &anInfo.myName[0], + 0, + MED_FAMILLE); + } + + + TInt + TVWrapper + ::GetNbFamAttr(TInt theFamId, + const TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + TMeshInfo& anInfo = const_cast(theInfo); + + return MEDnFam(myFile->Id(), + &anInfo.myName[0], + theFamId, + MED_ATTR); + } + + + TInt + TVWrapper + ::GetNbFamGroup(TInt theFamId, + const TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + TMeshInfo& anInfo = const_cast(theInfo); + + return MEDnFam(myFile->Id(), + &anInfo.myName[0], + theFamId, + MED_GROUPE); + } + + + void + TVWrapper + ::GetFamilyInfo(TInt theFamId, + TFamilyInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + med_int* anAttrId = theInfo.myNbAttr > 0? (med_int*)&theInfo.myAttrId[0]: NULL; + med_int* anAttrVal = theInfo.myNbAttr > 0? (med_int*)&theInfo.myAttrVal[0]: NULL; + char* anAttrDesc = theInfo.myNbAttr > 0? &theInfo.myAttrDesc[0]: NULL; + char* aGroupNames = theInfo.myNbGroup > 0? &theInfo.myGroupNames[0]: NULL; + + TErr aRet = MEDfamInfo(myFile->Id(), + &aMeshInfo.myName[0], + theFamId, + &theInfo.myName[0], + (med_int*)&theInfo.myId, + anAttrId, + anAttrVal, + anAttrDesc, + (med_int*)&theInfo.myNbAttr, + aGroupNames, + (med_int*)&theInfo.myNbGroup); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetFamilyInfo - MEDfamInfo - "<< + "&aMeshInfo.myName[0] = '"<<&aMeshInfo.myName[0]<<"'; "<< + "theFamId = "<(theMeshInfo); + + TInt aRet = MEDnEntMaa(myFile->Id(), + &aMeshInfo.myName[0], + MED_COOR, + MED_NOEUD, + med_geometrie_element(0), + med_connectivite(0)); + return aRet; + } + + + void + TVWrapper + ::GetNodeInfo(TNodeInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TErr aRet = MEDnoeudsLire(myFile->Id(), + &aMeshInfo.myName[0], + aMeshInfo.myDim, + &theInfo.myCoord[0], + med_mode_switch(theInfo.myModeSwitch), + (med_repere*)&theInfo.mySystem, + &theInfo.myCoordNames[0], + &theInfo.myCoordUnits[0], + &theInfo.myElemNames[0], + (med_booleen*)&theInfo.myIsElemNames, + (med_int*)&theInfo.myElemNum[0], + (med_booleen*)&theInfo.myIsElemNum, + (med_int*)&theInfo.myFamNum[0], + theInfo.myNbElem); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetNodeInfo - MEDnoeudsLire(...)"); + } + + + void + TVWrapper + ::SetNodeInfo(const MED::TNodeInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,theMode,theErr); + + if(theErr && *theErr < 0) + return; + + MED::TNodeInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + char* anElemNames = theInfo.myIsElemNames? &anInfo.myElemNames[0]: NULL; + med_int* anElemNum = theInfo.myIsElemNum? &anInfo.myElemNum[0]: NULL; + + TErr aRet = MEDnoeudsEcr(myFile->Id(), + &aMeshInfo.myName[0], + aMeshInfo.myDim, + &anInfo.myCoord[0], + med_mode_switch(theInfo.myModeSwitch), + med_repere(theInfo.mySystem), + &anInfo.myCoordNames[0], + &anInfo.myCoordUnits[0], + anElemNames, + med_booleen(theInfo.myIsElemNames), + anElemNum, + med_booleen(theInfo.myIsElemNum), + (med_int*)&anInfo.myFamNum[0], + anInfo.myNbElem, + MED_REMP); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"SetNodeInfo - MEDnoeudsEcr(...)"); + } + + + void + TVWrapper + ::SetNodeInfo(const MED::TNodeInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetNodeInfo(theInfo,eECRI,&aRet); + + if(aRet < 0) + SetNodeInfo(theInfo,eREMP,theErr); + } + + + TEntityInfo + TVWrapper + ::GetEntityInfo(const TMeshInfo& theMeshInfo, + EConnectivite theConnMode, + TErr* theErr) + { + TEntityInfo anInfo; + + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return anInfo; + + TInt aNbElem = GetNbNodes(theMeshInfo); + if(aNbElem > 0){ + anInfo[eNOEUD][ePOINT1] = aNbElem; + const TEntity2GeomSet& anEntity2GeomSet = GetEntity2GeomSet(); + TEntity2GeomSet::const_iterator anIter = anEntity2GeomSet.begin(); + TEntity2GeomSet::const_iterator anIterEnd = anEntity2GeomSet.end(); + for(; anIter != anIterEnd; anIter++){ + const EEntiteMaillage& anEntity = anIter->first; + const TGeomSet& aGeomSet = anIter->second; + TGeomSet::const_iterator anIter2 = aGeomSet.begin(); + TGeomSet::const_iterator anIterEnd2 = aGeomSet.end(); + for(; anIter2 != anIterEnd2; anIter2++){ + const EGeometrieElement& aGeom = *anIter2; + aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theConnMode,theErr); + if(aNbElem > 0) + anInfo[anEntity][aGeom] = aNbElem; + } + } + } + return anInfo; + } + + + TInt + TVWrapper + ::GetNbCells(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + + return MEDnEntMaa(myFile->Id(), + &aMeshInfo.myName[0], + MED_CONN, + med_entite_maillage(theEntity), + med_geometrie_element(theGeom), + med_connectivite(theConnMode)); + } + + + void + TVWrapper + ::GetCellInfo(MED::TCellInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + TInt aNbElem = theInfo.myElemNum.size(); + + TErr aRet; + aRet = MEDelementsLire(myFile->Id(), + &aMeshInfo.myName[0], + aMeshInfo.myDim, + (med_int*)&theInfo.myConn[0], + med_mode_switch(theInfo.myModeSwitch), + &theInfo.myElemNames[0], + (med_booleen*)&theInfo.myIsElemNames, + (med_int*)&theInfo.myElemNum[0], + (med_booleen*)&theInfo.myIsElemNum, + (med_int*)&theInfo.myFamNum[0], + aNbElem, + med_entite_maillage(theInfo.myEntity), + med_geometrie_element(theInfo.myGeom), + med_connectivite(theInfo.myConnMode)); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetCellInfo - MEDelementsLire(...)"); + } + + + void + TVWrapper + ::SetCellInfo(const MED::TCellInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,theMode,theErr); + + if(theErr && *theErr < 0) + return; + + MED::TCellInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + char* anElemNames = theInfo.myIsElemNames? &anInfo.myElemNames[0]: NULL; + med_int* anElemNum = theInfo.myIsElemNum? &anInfo.myElemNum[0]: NULL; + + TErr aRet; + aRet = MEDelementsEcr(myFile->Id(), + &aMeshInfo.myName[0], + aMeshInfo.myDim, + (med_int*)&anInfo.myConn[0], + med_mode_switch(theInfo.myModeSwitch), + anElemNames, + med_booleen(theInfo.myIsElemNames), + anElemNum, + med_booleen(theInfo.myIsElemNum), + (med_int*)&anInfo.myFamNum[0], + anInfo.myNbElem, + med_entite_maillage(theInfo.myEntity), + med_geometrie_element(theInfo.myGeom), + med_connectivite(theInfo.myConnMode), + MED_REMP); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetCellInfo - MEDelementsLire(...)"); + } + + + void + TVWrapper + ::SetCellInfo(const MED::TCellInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetCellInfo(theInfo,eECRI,&aRet); + + if(aRet < 0) + SetCellInfo(theInfo,eREMP,theErr); + } + + + TInt + TVWrapper + ::GetNbFields(TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + return MEDnChamp(myFile->Id(),0); + } + + + TInt + TVWrapper + ::GetNbComp(TInt theFieldId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return -1; + + return MEDnChamp(myFile->Id(),theFieldId); + } + + + void + TVWrapper + ::GetFieldInfo(TInt theFieldId, + MED::TFieldInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + TErr aRet; + aRet = MEDchampInfo(myFile->Id(), + theFieldId, + &theInfo.myName[0], + (med_type_champ*)&theInfo.myType, + &theInfo.myCompNames[0], + &theInfo.myUnitNames[0], + theInfo.myNbComp); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetFieldInfo - MEDchampInfo(...)"); + } + + + void + TVWrapper + ::SetFieldInfo(const MED::TFieldInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,theMode,theErr); + + if(theErr && *theErr < 0) + return; + + MED::TFieldInfo& anInfo = const_cast(theInfo); + + TErr aRet; + aRet = MEDchampCr(myFile->Id(), + &anInfo.myName[0], + med_type_champ(theInfo.myType), + &anInfo.myCompNames[0], + &anInfo.myUnitNames[0], + anInfo.myNbComp); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"SetFieldInfo - MEDchampCr(...)"); + } + + + void + TVWrapper + ::SetFieldInfo(const MED::TFieldInfo& theInfo, + TErr* theErr) + { + try{ + + TErr aRet; + SetFieldInfo(theInfo,eECRI,&aRet); + + if(aRet < 0) + SetFieldInfo(theInfo,eREMP,theErr); + + }catch(const std::exception& theExc){ + EXCEPTION(runtime_error,"SetFieldInfo(...)"<Id()); + } + + + TProfileInfo::TInfo + TVWrapper + ::GetProfilePreInfo(TInt theId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return TProfileInfo::TInfo("",-1); + + TInt aSize = -1; + TVector aName(GetNOMLength()+1); + + TErr aRet; + aRet = MEDprofilInfo(myFile->Id(), + theId, + &aName[0], + &aSize); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetProfilePreInfo - MEDprofilInfo(...)"); + + return TProfileInfo::TInfo(&aName[0],aSize); + } + + + void + TVWrapper + ::GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + TErr aRet; + aRet = MEDprofilLire(myFile->Id(), + &theInfo.myElemNum[0], + &theInfo.myName[0]); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"SetNodeInfo - MEDprofilLire(...)"); + } + + + //----------------------------------------------------------------- + TInt + TVWrapper + ::GetNbTimeStamps(const MED::TFieldInfo& theInfo, + const MED::TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom2Size& theGeom2Size, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr){ + if(theEntityInfo.empty()) + *theErr = -1; + if(*theErr < 0) + return -1; + }else if(theEntityInfo.empty()) + EXCEPTION(runtime_error,"GetNbTimeStamps - There is no any Entity on the Mesh"); + + theGeom2Size.clear(); + TInt aNbTimeStamps = 0; + TIdt anId = myFile->Id(); + + MED::TFieldInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = anInfo.myMeshInfo; + + TEntityInfo::const_iterator anIter = theEntityInfo.begin(); + for(; anIter != theEntityInfo.end(); anIter++){ + med_entite_maillage anEntity = med_entite_maillage(anIter->first); + const TGeom2Size& aGeom2Size = anIter->second; + TGeom2Size::const_iterator anGeomIter = aGeom2Size.begin(); + for(; anGeomIter != aGeom2Size.end(); anGeomIter++){ + med_geometrie_element aGeom = med_geometrie_element(anGeomIter->first); + TInt aNbStamps = MEDnPasdetemps(anId, + &anInfo.myName[0], + anEntity, + aGeom); + if(aNbStamps > 0){ + INITMSG(MYDEBUG, + "GetNbTimeStamps aNbTimeStamps = "<()+1]; + char aDtUnit[GetPNOMLength()+1]; + med_int aNbGauss; + med_int aNumDt; + med_int aNumOrd; + med_float aDt; + TErr aRet = MEDpasdetempsInfo(anId, + &anInfo.myName[0], + anEntity, + aGeom, + iTimeStamp, + aMaillageChamp, + &aNbGauss, + &aNumDt, + aDtUnit, + &aDt, + &aNumOrd); + + INITMSG(MYDEBUG, + "GetNbTimeStamps aMaillageChamp = '"<second; + theEntity = EEntiteMaillage(anEntity); + aNbTimeStamps = aNbStamps; + } + } + } + } + if(!theGeom2Size.empty()) + break; + } + return aNbTimeStamps; + } + + + void + TVWrapper + ::GetTimeStampInfo(TInt theTimeStampId, + MED::TTimeStampInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + const TGeom2Size& aGeom2Size = theInfo.myGeom2Size; + + if(theErr){ + if(aGeom2Size.empty()) + *theErr = -1; + if(*theErr < 0) + return; + }else if(aGeom2Size.empty()) + EXCEPTION(runtime_error,"GetTimeStampInfo - There is no any cell"); + + MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo; + MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; + + TGeom2NbGauss& aGeom2NbGauss = theInfo.myGeom2NbGauss; + + TGeom2Size::const_iterator anIter = aGeom2Size.begin(); + for(; anIter != aGeom2Size.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + med_int aNbGauss = -1; + + TErr aRet; + aRet = MEDpasdetempsInfo(myFile->Id(), + &aFieldInfo.myName[0], + med_entite_maillage(theInfo.myEntity), + med_geometrie_element(anIter->first), + theTimeStampId, + &aMeshInfo.myName[0], + &aNbGauss, + (med_int*)&theInfo.myNumDt, + &theInfo.myUnitDt[0], + &theInfo.myDt, + (med_int*)&theInfo.myNumOrd); + + + static TInt MAX_NB_GAUSS_POINTS = 32; + if(aNbGauss <= 0 || aNbGauss > MAX_NB_GAUSS_POINTS) + aNbGauss = 1; + + aGeom2NbGauss[aGeom] = aNbGauss; + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetTimeStampInfo - MEDpasdetempsInfo(...)"); + } + } + + + void + TVWrapper + ::GetTimeStampVal(TTimeStampVal& theVal, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECT,theErr); + + if(theErr && *theErr < 0) + return; + + TIdt anId = myFile->Id(); + + MED::TTimeStampInfo& aTimeStampInfo = *theVal.myTimeStampInfo; + MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo; + MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; + + MED::TKey2Profile aKey2Profile = boost::get<1>(theMKey2Profile); + TVector aProfileName(GetNOMLength()+1); + + TGeom2Size& aGeom2Size = aTimeStampInfo.myGeom2Size; + TGeom2Size::iterator anIter = aGeom2Size.begin(); + for(; anIter != aGeom2Size.end(); anIter++){ + EGeometrieElement aGeom = anIter->first; + TInt aNbVal = MEDnVal(anId, + &aFieldInfo.myName[0], + med_entite_maillage(aTimeStampInfo.myEntity), + med_geometrie_element(aGeom), + aTimeStampInfo.myNumDt, + aTimeStampInfo.myNumOrd); + if(aNbVal <= 0){ + if(theErr){ + *theErr = -1; + return; + } + EXCEPTION(runtime_error,"GetTimeStampVal - MEDnVal(...) - aNbVal == "<second; + theVal.myGeom2Profile[aGeom] = aProfileInfo; + } + } + + if(aProfileInfo && aProfileInfo->IsPresent()){ + TInt aSize = aProfileInfo->GetSize()*aFieldInfo.myNbComp*aNbGauss; + if(aSize > aValue.size()){ + if(theErr){ + *theErr = -1; + return; + } + EXCEPTION(runtime_error, + "GetTimeStampVal - aSize("< aValue.size()("< + TInt + GetDESCLength(); + + template<> + TInt + GetIDENTLength(); + + template<> + TInt + GetNOMLength(); + + template<> + TInt + GetLNOMLength(); + + template<> + TInt + GetPNOMLength(); + + template<> + TInt + GetNbConn(EGeometrieElement typmai, + EEntiteMaillage typent, + TInt mdim); + + namespace V2_1 + { + typedef MED::TTMeshInfo TVMeshInfo; + + typedef MED::TTFamilyInfo TVFamilyInfo; + + typedef MED::TTNodeInfo TVNodeInfo; + + typedef MED::TTCellInfo TVCellInfo; + + typedef MED::TTFieldInfo TVFieldInfo; + + typedef MED::TTTimeStampInfo TVTimeStampInfo; + + typedef MED::TTTimeStampVal TVTimeStampVal; + + //--------------------------------------------------------------- + class TFile; + typedef boost::shared_ptr PFile; + + typedef enum {eLECT, eECRI, eREMP} EModeAcces; + + //--------------------------------------------------------------- + class TVWrapper: public MED::TTWrapper + { + TVWrapper(); + TVWrapper(const TVWrapper&); + TVWrapper& operator=(const TVWrapper&); + + public: + TVWrapper(const std::string& theFileName); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbMeshes(TErr* theErr = NULL); + + virtual + void + GetMeshInfo(TInt theMeshId, MED::TMeshInfo&, + TErr* theErr = NULL); + + virtual + void + SetMeshInfo(const MED::TMeshInfo& theInfo, + TErr* theErr = NULL); + + void + SetMeshInfo(const MED::TMeshInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbFamilies(const MED::TMeshInfo& theMeshInfo, + TErr* theErr = NULL); + virtual + TInt + GetNbFamAttr(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr = NULL); + virtual + TInt + GetNbFamGroup(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + GetFamilyInfo(TInt theFamId, + MED::TFamilyInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetFamilyInfo(const MED::TFamilyInfo& theInfo, + TErr* theErr = NULL); + + void + SetFamilyInfo(const MED::TFamilyInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbNodes(const MED::TMeshInfo& theMeshInfo, + TErr* theErr = NULL); + + virtual + void + GetNodeInfo(MED::TNodeInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetNodeInfo(const MED::TNodeInfo& theInfo, + TErr* theErr = NULL); + + void + SetNodeInfo(const MED::TNodeInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TEntityInfo + GetEntityInfo(const MED::TMeshInfo& theMeshInfo, + EConnectivite theConn = eNOD, + TErr* theErr = NULL); + + virtual + TInt + GetNbCells(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite theConn = eNOD, + TErr* theErr = NULL); + + virtual + void + GetCellInfo(MED::TCellInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetCellInfo(const MED::TCellInfo& theInfo, + TErr* theErr = NULL); + + void + SetCellInfo(const MED::TCellInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbFields(TErr* theErr = NULL); + + virtual + TInt + GetNbComp(TInt theFieldId, + TErr* theErr = NULL); + + virtual + void + GetFieldInfo(TInt theFieldId, + MED::TFieldInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetFieldInfo(const MED::TFieldInfo& theInfo, + TErr* theErr = NULL); + + void + SetFieldInfo(const MED::TFieldInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbProfiles(TErr* theErr = NULL); + + virtual + TProfileInfo::TInfo + GetProfilePreInfo(TInt theId, + TErr* theErr = NULL); + + virtual + void + GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr = NULL); + + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbTimeStamps(const MED::TFieldInfo& theInfo, + const MED::TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom2Size& theGeom2Size, + TErr* theErr = NULL); + + virtual + void + GetTimeStampInfo(TInt theTimeStampId, + MED::TTimeStampInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + GetTimeStampVal(TTimeStampVal& theVal, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr = NULL); + + virtual + void + SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, + TErr* theErr = NULL); + + void + SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, + EModeAcces theMode, + TErr* theErr = NULL); + + protected: + PFile myFile; + }; + } +} + +#endif diff --git a/src/MEDWrapper/V2_1/Wrapper/Makefile.in b/src/MEDWrapper/V2_1/Wrapper/Makefile.in new file mode 100644 index 000000000..75c57b2d5 --- /dev/null +++ b/src/MEDWrapper/V2_1/Wrapper/Makefile.in @@ -0,0 +1,56 @@ +# +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : +# Author : +# Module : +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../../../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +# Libraries targets + +LIB = libMEDWrapper_V2_1.la +LIB_SRC = \ + MED_V2_1_Wrapper.cxx + +EXPORT_HEADERS = \ + MED_V2_1_Wrapper.hxx + +# Executables targets +BIN = +BIN_SRC = + +CPPFLAGS+= -D@MACHINE@ $(BOOST_CPPFLAGS) $(HDF5_INCLUDES) + +LDFLAGS+= $(HDF5_LIBS) -lMEDWrapperBase -lmed_V2_1 + +LDFLAGSFORBIN=$(LDFLAGS) + +@CONCLUDE@ diff --git a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx index 179bfa45c..d01a450ae 100644 --- a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx +++ b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx @@ -27,10 +27,16 @@ // $Header$ #include "MED_V2_2_Wrapper.hxx" +#include "MED_Algorithm.hxx" #include "MED_Utilities.hxx" -extern "C"{ +extern "C" +{ #include + +med_err +MEDgaussInfo(med_idt fid, int indice, char * locname, med_geometrie_element * type_geo, + med_int * ngauss ); } #ifdef _DEBUG_ @@ -41,8 +47,54 @@ static int MYDEBUG = 0; -namespace MED{ - namespace V2_2{ +namespace MED +{ + template<> + TInt + GetDESCLength() + { + return 200; + } + + template<> + TInt + GetIDENTLength() + { + return 8; + } + + template<> + TInt + GetNOMLength() + { + return 32; + } + + template<> + TInt + GetLNOMLength() + { + return 80; + } + + template<> + TInt + GetPNOMLength() + { + return 16; + } + + template<> + TInt + GetNbConn(EGeometrieElement typmai, + EEntiteMaillage typent, + TInt mdim) + { + return typmai%100; + } + + namespace V2_2 + { //--------------------------------------------------------------- class TFile{ @@ -113,7 +165,9 @@ namespace MED{ } - TInt TVWrapper::GetNbMeshes(TErr* theErr) + TInt + TVWrapper + ::GetNbMeshes(TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -124,22 +178,22 @@ namespace MED{ } - void TVWrapper::GetMeshInfo(TInt theMeshId, - MED::TMeshInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::GetMeshInfo(TInt theMeshId, + MED::TMeshInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); if(theErr && !*theErr) return; - med_maillage& aType = (med_maillage&)(theInfo.myType); - TErr aRet = MEDmaaInfo(myFile->Id(), theMeshId, &theInfo.myName[0], - (med_int *)&theInfo.myDim, - &aType, + (med_int*)&theInfo.myDim, + (med_maillage*)&theInfo.myType, &theInfo.myDesc[0]); if(theErr) *theErr = aRet; @@ -148,9 +202,11 @@ namespace MED{ } - void TVWrapper::SetMeshInfo(const MED::TMeshInfo& theInfo, - EModeAcces theMode, - TErr* theErr) + void + TVWrapper + ::SetMeshInfo(const MED::TMeshInfo& theInfo, + EModeAcces theMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -159,12 +215,10 @@ namespace MED{ MED::TMeshInfo& anInfo = const_cast(theInfo); - med_maillage& aType = (med_maillage&)(theInfo.myType); - TErr aRet = MEDmaaCr(myFile->Id(), &anInfo.myName[0], - anInfo.myDim, - aType, + med_int(anInfo.myDim), + med_maillage(theInfo.myType), &anInfo.myDesc[0]); if(aRet == 0){ aRet = MEDunvCr(myFile->Id(), @@ -180,8 +234,10 @@ namespace MED{ } - void TVWrapper::SetMeshInfo(const MED::TMeshInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::SetMeshInfo(const MED::TMeshInfo& theInfo, + TErr* theErr) { TErr aRet; SetMeshInfo(theInfo,eLECTURE_ECRITURE,&aRet); @@ -194,8 +250,10 @@ namespace MED{ } - TInt TVWrapper::GetNbFamilies(const MED::TMeshInfo& theInfo, - TErr* theErr) + TInt + TVWrapper + ::GetNbFamilies(const MED::TMeshInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -208,9 +266,11 @@ namespace MED{ } - TInt TVWrapper::GetNbFamAttr(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr) + TInt + TVWrapper + ::GetNbFamAttr(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -224,9 +284,11 @@ namespace MED{ } - TInt TVWrapper::GetNbFamGroup(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr) + TInt + TVWrapper + ::GetNbFamGroup(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -240,9 +302,11 @@ namespace MED{ } - void TVWrapper::GetFamilyInfo(TInt theFamId, - MED::TFamilyInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::GetFamilyInfo(TInt theFamId, + MED::TFamilyInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -251,17 +315,22 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + med_int* anAttrId = theInfo.myNbAttr > 0? (med_int*)&theInfo.myAttrId[0]: NULL; + med_int* anAttrVal = theInfo.myNbAttr > 0? (med_int*)&theInfo.myAttrVal[0]: NULL; + char* anAttrDesc = theInfo.myNbAttr > 0? &theInfo.myAttrDesc[0]: NULL; + char* aGroupNames = theInfo.myNbGroup > 0? &theInfo.myGroupNames[0]: NULL; + TErr aRet = MEDfamInfo(myFile->Id(), &aMeshInfo.myName[0], theFamId, &theInfo.myName[0], - (med_int *)&theInfo.myId, - (med_int *)&theInfo.myAttrId[0], - (med_int *)&theInfo.myAttrVal[0], - &theInfo.myAttrDesc[0], - (med_int *)&theInfo.myNbAttr, - &theInfo.myGroupNames[0], - (med_int *)&theInfo.myNbGroup); + (med_int*)&theInfo.myId, + anAttrId, + anAttrVal, + anAttrDesc, + (med_int*)&theInfo.myNbAttr, + aGroupNames, + (med_int*)&theInfo.myNbGroup); if(theErr) *theErr = aRet; @@ -271,18 +340,14 @@ namespace MED{ "'; theFamId = "<Id(), &aMeshInfo.myName[0], (med_int*)&theInfo.myElemNum[0], - nb, + theNb, anEntity, aGeom); - theInfo.myIsElemNum = (theInfo.myElemNum).empty()? EBooleen(0) : EBooleen(1) ; + theInfo.myIsElemNum = (theInfo.myElemNum).empty()? eFAUX : eVRAI ; if(theErr) *theErr = aRet; @@ -385,11 +458,13 @@ namespace MED{ EXCEPTION(runtime_error,"GetNumeration - MEDnumLire(...)"); } - void TVWrapper::GetFamilies(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::GetFamilies(TElemInfo& theInfo, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -398,15 +473,12 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom); - TErr aRet = MEDfamLire(myFile->Id(), &aMeshInfo.myName[0], (med_int*)&theInfo.myFamNum[0], - nb, - anEntity, - aGeom); + theNb, + med_entite_maillage(theEntity), + med_geometrie_element(theGeom)); if(theErr) *theErr = aRet; @@ -414,19 +486,23 @@ namespace MED{ EXCEPTION(runtime_error,"GetFamilies - MEDfamLire(...)"); } - void TVWrapper::SetNames(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::SetNames(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { - SetNames(theInfo,eLECTURE_ECRITURE,theTEntity,theTGeom,theErr); + SetNames(theInfo,eLECTURE_ECRITURE,theEntity,theGeom,theErr); } - void TVWrapper::SetNames(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::SetNames(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -436,18 +512,14 @@ namespace MED{ MED::TElemInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom); - TErr aRet = 0; - if (anIsElemNames){ + if(theInfo.myIsElemNames){ aRet = MEDnomEcr(myFile->Id(), &aMeshInfo.myName[0], &anInfo.myElemNames[0], anInfo.myElemNames.size(), - anEntity, - aGeom); + med_entite_maillage(theEntity), + med_geometrie_element(theGeom)); if(theErr) *theErr = aRet; else if(aRet < 0) @@ -455,19 +527,23 @@ namespace MED{ } } - void TVWrapper::SetNumeration(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::SetNumeration(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { - SetNumeration(theInfo,eLECTURE_ECRITURE,theTEntity,theTGeom,theErr); + SetNumeration(theInfo,eLECTURE_ECRITURE,theEntity,theGeom,theErr); } - void TVWrapper::SetNumeration(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::SetNumeration(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -477,18 +553,14 @@ namespace MED{ MED::TElemInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom); - TErr aRet = 0; - if (anIsElemNum){ + if(theInfo.myIsElemNum){ aRet = MEDnumEcr(myFile->Id(), &aMeshInfo.myName[0], (med_int*)&anInfo.myElemNum[0], anInfo.myElemNum.size(), - anEntity, - aGeom); + med_entite_maillage(theEntity), + med_geometrie_element(theGeom)); if(theErr) *theErr = aRet; else if(aRet < 0) @@ -496,19 +568,23 @@ namespace MED{ } } - void TVWrapper::SetFamilies(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::SetFamilies(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { - SetFamilies(theInfo,eLECTURE_ECRITURE,theTEntity,theTGeom,theErr); + SetFamilies(theInfo,eLECTURE_ECRITURE,theEntity,theGeom,theErr); } - void TVWrapper::SetFamilies(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - TErr* theErr) + void + TVWrapper + ::SetFamilies(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -518,15 +594,12 @@ namespace MED{ MED::TElemInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom); - TErr aRet = MEDfamEcr(myFile->Id(), &aMeshInfo.myName[0], - (med_int *)&anInfo.myFamNum[0], + (med_int*)&anInfo.myFamNum[0], anInfo.myFamNum.size(), - anEntity, - aGeom); + med_entite_maillage(theEntity), + med_geometrie_element(theGeom)); if(theErr) *theErr = aRet; @@ -535,8 +608,10 @@ namespace MED{ } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TInt TVWrapper::GetNbNodes(const MED::TMeshInfo& theMeshInfo, - TErr* theErr) + TInt + TVWrapper + ::GetNbNodes(const MED::TMeshInfo& theMeshInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -554,8 +629,10 @@ namespace MED{ } - void TVWrapper::GetNodeInfo(MED::TNodeInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::GetNodeInfo(MED::TNodeInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -564,23 +641,22 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - med_repere& aRepere = (med_repere&)(theInfo.mySystem); - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); + char* anElemNames = theInfo.myIsElemNames? &theInfo.myElemNames[0]: NULL; + med_int* anElemNum = theInfo.myIsElemNum? &theInfo.myElemNum[0]: NULL; TErr aRet = MEDnoeudsLire(myFile->Id(), &aMeshInfo.myName[0], aMeshInfo.myDim, &theInfo.myCoord[0], - MED_FULL_INTERLACE, - &aRepere, + med_mode_switch(theInfo.myModeSwitch), + (med_repere*)&theInfo.mySystem, &theInfo.myCoordNames[0], &theInfo.myCoordUnits[0], - &theInfo.myElemNames[0], - &anIsElemNames, - (med_int *)&theInfo.myElemNum[0], - &anIsElemNum, - (med_int *)&theInfo.myFamNum[0], + anElemNames, + (med_booleen*)&theInfo.myIsElemNames, + anElemNum, + (med_booleen*)&theInfo.myIsElemNum, + (med_int*)&theInfo.myFamNum[0], theInfo.myNbElem); if(theErr) *theErr = aRet; @@ -589,9 +665,11 @@ namespace MED{ } - void TVWrapper::SetNodeInfo(const MED::TNodeInfo& theInfo, - EModeAcces theMode, - TErr* theErr) + void + TVWrapper + ::SetNodeInfo(const MED::TNodeInfo& theInfo, + EModeAcces theMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -601,23 +679,22 @@ namespace MED{ MED::TNodeInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_repere& aRepere = (med_repere&)(theInfo.mySystem); - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); + char* anElemNames = theInfo.myIsElemNames? &anInfo.myElemNames[0]: NULL; + med_int* anElemNum = theInfo.myIsElemNum? &anInfo.myElemNum[0]: NULL; TErr aRet = MEDnoeudsEcr(myFile->Id(), &aMeshInfo.myName[0], aMeshInfo.myDim, &anInfo.myCoord[0], - MED_FULL_INTERLACE, - aRepere, + med_mode_switch(theInfo.myModeSwitch), + med_repere(theInfo.mySystem), &anInfo.myCoordNames[0], &anInfo.myCoordUnits[0], - &anInfo.myElemNames[0], - anIsElemNames, - (med_int *)&anInfo.myElemNum[0], - anIsElemNum, - (med_int *)&anInfo.myFamNum[0], + anElemNames, + med_booleen(theInfo.myIsElemNames), + anElemNum, + med_booleen(theInfo.myIsElemNum), + (med_int*)&anInfo.myFamNum[0], anInfo.myNbElem); if(theErr) *theErr = aRet; @@ -626,8 +703,10 @@ namespace MED{ } - void TVWrapper::SetNodeInfo(const MED::TNodeInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::SetNodeInfo(const MED::TNodeInfo& theInfo, + TErr* theErr) { TErr aRet; SetNodeInfo(theInfo,eLECTURE_ECRITURE,&aRet); @@ -636,8 +715,12 @@ namespace MED{ SetNodeInfo(theInfo,eLECTURE_AJOUT,theErr); } - void TVWrapper::GetPolygoneInfo(MED::TPolygoneInfo& theInfo, - TErr* theErr) + + //----------------------------------------------------------------- + void + TVWrapper + ::GetPolygoneInfo(MED::TPolygoneInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -647,47 +730,50 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; TInt aNbElem = theInfo.myElemNum.size(); - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - - TErr aRet = 0; - + TErr aRet; aRet = MEDpolygoneConnLire(myFile->Id(), &aMeshInfo.myName[0], - (med_int *)&theInfo.myIndex[0], + (med_int*)&theInfo.myIndex[0], aNbElem+1, - (med_int *)&theInfo.myConn[0], - anEntity, - aConn); + (med_int*)&theInfo.myConn[0], + med_entite_maillage(theInfo.myEntity), + med_connectivite(theInfo.myConnMode)); if(theErr) *theErr = aRet; else if(aRet < 0) EXCEPTION(runtime_error,"GetPolygoneInfo - MEDpolygoneInfo(...)"); + if(theInfo.myIsElemNames){ + GetNames(theInfo,aNbElem,theInfo.myEntity,ePOLYGONE,&aRet); + if(theErr) + *theErr = aRet; + } - GetNames(theInfo,aNbElem,theInfo.myTEntity,ePOLYGONE,&aRet); - if(theErr) - *theErr = aRet; - - GetNumeration(theInfo,aNbElem,theInfo.myTEntity,ePOLYGONE,&aRet); - if(theErr) - *theErr = aRet; + if(theInfo.myIsElemNum){ + GetNumeration(theInfo,aNbElem,theInfo.myEntity,ePOLYGONE,&aRet); + if(theErr) + *theErr = aRet; + } - GetFamilies(theInfo,aNbElem,theInfo.myTEntity,ePOLYGONE,&aRet); + GetFamilies(theInfo,aNbElem,theInfo.myEntity,ePOLYGONE,&aRet); if(theErr) *theErr = aRet; } - void TVWrapper::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, + TErr* theErr) { SetPolygoneInfo(theInfo,eLECTURE_ECRITURE,theErr); } - void TVWrapper::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, - EModeAcces theMode, - TErr* theErr) + void + TVWrapper + ::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, + EModeAcces theMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -697,49 +783,50 @@ namespace MED{ MED::TPolygoneInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - TErr aRet = MEDpolygoneConnEcr(myFile->Id(), &aMeshInfo.myName[0], - (med_int *)&anInfo.myIndex[0], + (med_int*)&anInfo.myIndex[0], anInfo.myNbElem+1, - (med_int *)&anInfo.myConn[0], - anEntity, - aConn); + (med_int*)&anInfo.myConn[0], + med_entite_maillage(theInfo.myEntity), + med_connectivite(theInfo.myConnMode)); if(theErr) *theErr = aRet; else if(aRet < 0) EXCEPTION(runtime_error,"SetPolygoneInfo - MEDpolygoneConnEcr(...)"); - SetNames(anInfo,theInfo.myTEntity,ePOLYGONE,&aRet); + SetNames(anInfo,theInfo.myEntity,ePOLYGONE,&aRet); if(theErr) *theErr = aRet; - SetNumeration(anInfo,theInfo.myTEntity,ePOLYGONE,&aRet); + SetNumeration(anInfo,theInfo.myEntity,ePOLYGONE,&aRet); if(theErr) *theErr = aRet; - SetFamilies(anInfo,theInfo.myTEntity,ePOLYGONE,&aRet); + SetFamilies(anInfo,theInfo.myEntity,ePOLYGONE,&aRet); if(theErr) *theErr = aRet; } - TInt TVWrapper::GetNbPolygones(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - TErr* theErr) + TInt + TVWrapper + ::GetNbPolygones(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) { - return GetNbCells(theMeshInfo,theTEntity,theTGeom,theTConn,theErr); + return GetNbCells(theMeshInfo,theEntity,theGeom,theConnMode,theErr); } - TInt TVWrapper::GetNbPolygoneConn(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - TErr* theErr) + TInt + TVWrapper + ::GetPolygoneConnSize(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -748,16 +835,14 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity); - med_connectivite& aConn = (med_connectivite&)(theTConn); - med_int taille = 0; - TErr aRet = MEDpolygoneInfo(myFile->Id(), - &aMeshInfo.myName[0], - anEntity, - aConn, - &taille); + TErr aRet; + aRet = MEDpolygoneInfo(myFile->Id(), + &aMeshInfo.myName[0], + med_entite_maillage(theEntity), + med_connectivite(theConnMode), + &taille); if(theErr) *theErr = aRet; @@ -767,8 +852,11 @@ namespace MED{ return TInt(taille); } - void TVWrapper::GetPolyedreInfo(TPolyedreInfo& theInfo, - TErr* theErr) + //----------------------------------------------------------------- + void + TVWrapper + ::GetPolyedreInfo(TPolyedreInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -778,46 +866,51 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; TInt aNbElem = theInfo.myElemNum.size(); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - - TErr aRet = 0; - + TErr aRet; aRet = MEDpolyedreConnLire(myFile->Id(), &aMeshInfo.myName[0], - (med_int *)&theInfo.myIndex[0], - aNbElem+1, - (med_int *)&theInfo.myFacesIndex[0], - theInfo.myNbFacesIndex, - (med_int *)&theInfo.myConn[0], - aConn); + (med_int*)&theInfo.myIndex[0], + aNbElem + 1, + (med_int*)&theInfo.myFaces[0], + theInfo.myFaces.size(), + (med_int*)&theInfo.myConn[0], + med_connectivite(theInfo.myConnMode)); if(theErr) *theErr = aRet; else if(aRet < 0) EXCEPTION(runtime_error,"GetPolygoneInfo - MEDpolyedreConnLire(...)"); - GetNames(theInfo,aNbElem,theInfo.myTEntity,ePOLYEDRE,&aRet); - if(theErr) - *theErr = aRet; + if(theInfo.myIsElemNames){ + GetNames(theInfo,aNbElem,theInfo.myEntity,ePOLYEDRE,&aRet); + if(theErr) + *theErr = aRet; + } - GetNumeration(theInfo,aNbElem,theInfo.myTEntity,ePOLYEDRE,&aRet); - if(theErr) - *theErr = aRet; + if(theInfo.myIsElemNum){ + GetNumeration(theInfo,aNbElem,theInfo.myEntity,ePOLYEDRE,&aRet); + if(theErr) + *theErr = aRet; + } - GetFamilies(theInfo,aNbElem,theInfo.myTEntity,ePOLYEDRE,&aRet); + GetFamilies(theInfo,aNbElem,theInfo.myEntity,ePOLYEDRE,&aRet); if(theErr) *theErr = aRet; } - void TVWrapper::SetPolyedreInfo(const TPolyedreInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::SetPolyedreInfo(const TPolyedreInfo& theInfo, + TErr* theErr) { SetPolyedreInfo(theInfo,eLECTURE_ECRITURE,theErr); } - void TVWrapper::SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, - EModeAcces theMode, - TErr* theErr) + void + TVWrapper + ::SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, + EModeAcces theMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -827,31 +920,27 @@ namespace MED{ MED::TPolyedreInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - - TErr aRet = MEDpolyedreConnEcr(myFile->Id(), - &aMeshInfo.myName[0], - (med_int *)&anInfo.myIndex[0], - anInfo.myNbElem+1, - (med_int *)&anInfo.myFacesIndex[0], - anInfo.myNbFacesIndex, - (med_int *)&anInfo.myConn[0], - aConn); + TErr aRet; + aRet = MEDpolyedreConnEcr(myFile->Id(), + &aMeshInfo.myName[0], + (med_int*)&anInfo.myIndex[0], + anInfo.myNbElem+1, + (med_int*)&anInfo.myFaces[0], + anInfo.myFaces.size(), + (med_int*)&anInfo.myConn[0], + med_connectivite(theInfo.myConnMode)); if(theErr) *theErr = aRet; else if(aRet < 0) EXCEPTION(runtime_error,"SetPolyedreInfo - MEDpolyedreConnEcr(...)"); - if (anIsElemNames){ + if(theInfo.myIsElemNames){ aRet = MEDnomEcr(myFile->Id(), &aMeshInfo.myName[0], &anInfo.myElemNames[0], anInfo.myElemNames.size(), - anEntity, + med_entite_maillage(theInfo.myEntity), MED_POLYEDRE); if(theErr) *theErr = aRet; @@ -859,12 +948,12 @@ namespace MED{ EXCEPTION(runtime_error,"SetPolyedreInfo - MEDnomEcr(...)"); } - if (anIsElemNum){ + if(theInfo.myIsElemNum){ aRet = MEDnumEcr(myFile->Id(), &aMeshInfo.myName[0], - (med_int *)&anInfo.myElemNum[0], + (med_int*)&anInfo.myElemNum[0], anInfo.myElemNum.size(), - anEntity, + med_entite_maillage(theInfo.myEntity), MED_POLYEDRE); if(theErr) *theErr = aRet; @@ -875,9 +964,9 @@ namespace MED{ aRet = MEDfamEcr(myFile->Id(), &aMeshInfo.myName[0], - (med_int *)&anInfo.myFamNum[0], + (med_int*)&anInfo.myFamNum[0], anInfo.myFamNum.size(), - anEntity, + med_entite_maillage(theInfo.myEntity), MED_POLYEDRE); if(theErr) @@ -886,33 +975,37 @@ namespace MED{ EXCEPTION(runtime_error,"SetPolyedreInfo - MEDfamEcr(...)"); } - TInt TVWrapper::GetNbPolyedres(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - TErr* theErr) + TInt + TVWrapper + ::GetNbPolyedres(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) { - return GetNbCells(theMeshInfo,theTEntity,theTGeom,theTConn,theErr); + return GetNbCells(theMeshInfo,theEntity,theGeom,theConnMode,theErr); } - void TVWrapper::GetNbPolyedreConnF(const MED::TMeshInfo& theMeshInfo, - EConnectivite theTConn, - TInt& nf, - TInt& nc, - TErr* theErr) + void + TVWrapper + ::GetPolyedreConnSize(const TMeshInfo& theMeshInfo, + TInt& theNbFaces, + TInt& theConnSize, + EConnectivite theConnMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); - if(theErr && !*theErr) EXCEPTION(runtime_error,"GetPolyedreInfo - (...)"); + if(theErr && !*theErr) + EXCEPTION(runtime_error,"GetPolyedreInfo - (...)"); MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - med_connectivite& aConn = (med_connectivite&)(theTConn); TErr aRet = MEDpolyedreInfo(myFile->Id(), &aMeshInfo.myName[0], - aConn, - (med_int *)&nf, - (med_int *)&nc); + med_connectivite(theConnMode), + (med_int*)&theNbFaces, + (med_int*)&theConnSize); if(theErr) *theErr = aRet; @@ -921,9 +1014,12 @@ namespace MED{ } - TEntityInfo TVWrapper::GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theTConn, - TErr* theErr) + //----------------------------------------------------------------- + TEntityInfo + TVWrapper + ::GetEntityInfo(const MED::TMeshInfo& theMeshInfo, + EConnectivite theConnMode, + TErr* theErr) { TEntityInfo anInfo; @@ -945,7 +1041,7 @@ namespace MED{ TGeomSet::const_iterator anIterEnd2 = aGeomSet.end(); for(; anIter2 != anIterEnd2; anIter2++){ const EGeometrieElement& aGeom = *anIter2; - aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theTConn,theErr); + aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theConnMode,theErr); if(aNbElem > 0) anInfo[anEntity][aGeom] = aNbElem; } @@ -955,11 +1051,14 @@ namespace MED{ } - TInt TVWrapper::GetNbCells(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - TErr* theErr) + //----------------------------------------------------------------- + TInt + TVWrapper + ::GetNbCells(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -968,21 +1067,19 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - med_entite_maillage anEntity = med_entite_maillage(theTEntity); - med_geometrie_element aGeom = med_geometrie_element(theTGeom); - med_connectivite aConn = med_connectivite(theTConn); - return MEDnEntMaa(myFile->Id(), &aMeshInfo.myName[0], MED_CONN, - anEntity, - aGeom, - aConn); + med_entite_maillage(theEntity), + med_geometrie_element(theGeom), + med_connectivite(theConnMode)); } - void TVWrapper::GetCellInfo(MED::TCellInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::GetCellInfo(MED::TCellInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -992,26 +1089,24 @@ namespace MED{ MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; TInt aNbElem = theInfo.myElemNum.size(); - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); - - TErr aRet = MEDelementsLire(myFile->Id(), - &aMeshInfo.myName[0], - aMeshInfo.myDim, - (med_int *)&theInfo.myConn[0], - MED_FULL_INTERLACE, - &theInfo.myElemNames[0], - &anIsElemNames, - (med_int *)&theInfo.myElemNum[0], - &anIsElemNum, - (med_int *)&theInfo.myFamNum[0], - aNbElem, - anEntity, - aGeom, - aConn); + char* anElemNames = theInfo.myIsElemNames? &theInfo.myElemNames[0]: NULL; + med_int* anElemNum = theInfo.myIsElemNum? &theInfo.myElemNum[0]: NULL; + + TErr aRet; + aRet = MEDelementsLire(myFile->Id(), + &aMeshInfo.myName[0], + aMeshInfo.myDim, + (med_int*)&theInfo.myConn[0], + med_mode_switch(theInfo.myModeSwitch), + anElemNames, + (med_booleen*)&theInfo.myIsElemNames, + anElemNum, + (med_booleen*)&theInfo.myIsElemNum, + (med_int*)&theInfo.myFamNum[0], + aNbElem, + med_entite_maillage(theInfo.myEntity), + med_geometrie_element(theInfo.myGeom), + med_connectivite(theInfo.myConnMode)); if(theErr) *theErr = aRet; else if(aRet < 0) @@ -1019,9 +1114,11 @@ namespace MED{ } - void TVWrapper::SetCellInfo(const MED::TCellInfo& theInfo, - EModeAcces theMode, - TErr* theErr) + void + TVWrapper + ::SetCellInfo(const MED::TCellInfo& theInfo, + EModeAcces theMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -1031,26 +1128,24 @@ namespace MED{ MED::TCellInfo& anInfo = const_cast(theInfo); MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames); - med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum); - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity); - med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom); - med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn); + char* anElemNames = theInfo.myIsElemNames? &anInfo.myElemNames[0]: NULL; + med_int* anElemNum = theInfo.myIsElemNum? &anInfo.myElemNum[0]: NULL; - TErr aRet = MEDelementsEcr(myFile->Id(), - &aMeshInfo.myName[0], - aMeshInfo.myDim, - (med_int *)&anInfo.myConn[0], - MED_FULL_INTERLACE, - &anInfo.myElemNames[0], - anIsElemNames, - (med_int *)&anInfo.myElemNum[0], - anIsElemNum, - (med_int *)&anInfo.myFamNum[0], - anInfo.myNbElem, - anEntity, - aGeom, - aConn); + TErr aRet; + aRet = MEDelementsEcr(myFile->Id(), + &aMeshInfo.myName[0], + aMeshInfo.myDim, + (med_int*)&anInfo.myConn[0], + med_mode_switch(theInfo.myModeSwitch), + anElemNames, + med_booleen(theInfo.myIsElemNames), + anElemNum, + med_booleen(theInfo.myIsElemNum), + (med_int*)&anInfo.myFamNum[0], + anInfo.myNbElem, + med_entite_maillage(theInfo.myEntity), + med_geometrie_element(theInfo.myGeom), + med_connectivite(theInfo.myConnMode)); if(theErr) *theErr = aRet; @@ -1059,14 +1154,19 @@ namespace MED{ } - void TVWrapper::SetCellInfo(const MED::TCellInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::SetCellInfo(const MED::TCellInfo& theInfo, + TErr* theErr) { SetCellInfo(theInfo,eLECTURE_ECRITURE,theErr); } - TInt TVWrapper::GetNbFields(TErr* theErr) + //----------------------------------------------------------------- + TInt + TVWrapper + ::GetNbFields(TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -1077,8 +1177,10 @@ namespace MED{ } - TInt TVWrapper::GetNbComp(TInt theFieldId, - TErr* theErr) + TInt + TVWrapper + ::GetNbComp(TInt theFieldId, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -1089,8 +1191,10 @@ namespace MED{ } - void TVWrapper::GetFieldInfo(TInt theFieldId, - MED::TFieldInfo& theInfo, + void + TVWrapper + ::GetFieldInfo(TInt theFieldId, + MED::TFieldInfo& theInfo, TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -1098,15 +1202,14 @@ namespace MED{ if(theErr && !*theErr) return; - med_type_champ& aType = (med_type_champ&)(theInfo.myType); - - TErr aRet = MEDchampInfo(myFile->Id(), - theFieldId, - &theInfo.myName[0], - &aType, - &theInfo.myCompNames[0], - &theInfo.myUnitNames[0], - theInfo.myNbComp); + TErr aRet; + aRet = MEDchampInfo(myFile->Id(), + theFieldId, + &theInfo.myName[0], + (med_type_champ*)&theInfo.myType, + &theInfo.myCompNames[0], + &theInfo.myUnitNames[0], + theInfo.myNbComp); if(theErr) *theErr = aRet; else if(aRet < 0) @@ -1114,9 +1217,11 @@ namespace MED{ } - void TVWrapper::SetFieldInfo(const MED::TFieldInfo& theInfo, - EModeAcces theMode, - TErr* theErr) + void + TVWrapper + ::SetFieldInfo(const MED::TFieldInfo& theInfo, + EModeAcces theMode, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,theMode,theErr); @@ -1125,14 +1230,13 @@ namespace MED{ MED::TFieldInfo& anInfo = const_cast(theInfo); - med_type_champ& aType = (med_type_champ&)(theInfo.myType); - - TErr aRet = MEDchampCr(myFile->Id(), - &anInfo.myName[0], - aType, - &anInfo.myCompNames[0], - &anInfo.myUnitNames[0], - anInfo.myNbComp); + TErr aRet; + aRet = MEDchampCr(myFile->Id(), + &anInfo.myName[0], + med_type_champ(theInfo.myType), + &anInfo.myCompNames[0], + &anInfo.myUnitNames[0], + anInfo.myNbComp); if(theErr) *theErr = aRet; else if(aRet < 0) @@ -1140,8 +1244,10 @@ namespace MED{ } - void TVWrapper::SetFieldInfo(const MED::TFieldInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::SetFieldInfo(const MED::TFieldInfo& theInfo, + TErr* theErr) { TErr aRet; SetFieldInfo(theInfo,eLECTURE_ECRITURE,&aRet); @@ -1151,11 +1257,147 @@ namespace MED{ } - TInt TVWrapper::GetNbTimeStamps(const MED::TFieldInfo& theInfo, - const MED::TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom& theGeom, - TErr* theErr) + //----------------------------------------------------------------- + TInt + TVWrapper + ::GetNbGauss(TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + + if(theErr && *theErr < 0) + return -1; + + return MEDnGauss(myFile->Id()); + } + + + TGaussInfo::TInfo + TVWrapper + ::GetGaussPreInfo(TInt theId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + + if(theErr && *theErr < 0) + return TGaussInfo::TInfo(); + + med_int aNbGaussPoints = med_int(); + TVector aName(GetNOMLength()+1); + med_geometrie_element aGeom = MED_NONE; + + TErr aRet; + aRet = MEDgaussInfo(myFile->Id(), + theId, + &aName[0], + &aGeom, + &aNbGaussPoints); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetGaussPreInfo - MEDgaussInfo(...)"); + + return TGaussInfo::TInfo(TGaussInfo::TKey(EGeometrieElement(aGeom),&aName[0]), + TInt(aNbGaussPoints)); + } + + + void + TVWrapper + ::GetGaussInfo(TInt theId, + TGaussInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + + if(theErr && *theErr < 0) + return; + + TErr aRet; + aRet = MEDgaussLire(myFile->Id(), + &theInfo.myRefCoord[0], + &theInfo.myGaussCoord[0], + &theInfo.myWeight[0], + med_mode_switch(theInfo.myModeSwitch), + &theInfo.myName[0]); + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetGaussInfo - MEDgaussLire(...)"); + } + + + //----------------------------------------------------------------- + TInt + TVWrapper + ::GetNbProfiles(TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + + if(theErr && *theErr < 0) + return -1; + + return MEDnProfil(myFile->Id()); + } + + + TProfileInfo::TInfo + TVWrapper + ::GetProfilePreInfo(TInt theId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + + if(theErr && *theErr < 0) + return TProfileInfo::TInfo(); + + TInt aSize = -1; + TVector aName(GetNOMLength()+1); + + TErr aRet; + aRet = MEDprofilInfo(myFile->Id(), + theId, + &aName[0], + &aSize); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetProfilePreInfo - MEDprofilInfo(...)"); + + return TProfileInfo::TInfo(&aName[0],aSize); + } + + + void + TVWrapper + ::GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + + if(theErr && *theErr < 0) + return; + + TErr aRet; + aRet = MEDprofilLire(myFile->Id(), + &theInfo.myElemNum[0], + &theInfo.myName[0]); + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetProfileInfo - MEDprofilLire(...)"); + } + + + //----------------------------------------------------------------- + TInt + TVWrapper + ::GetNbTimeStamps(const MED::TFieldInfo& theInfo, + const MED::TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom2Size& theGeom2Size, + TErr* theErr) { theEntity = EEntiteMaillage(-1); TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -1168,86 +1410,131 @@ namespace MED{ }else if(theEntityInfo.empty()) EXCEPTION(runtime_error,"GetNbTimeStamps - There is no any Entity on the Mesh"); - theGeom.clear(); + theGeom2Size.clear(); TInt aNbTimeStamps = 0; + TIdt anId = myFile->Id(); + MED::TFieldInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = anInfo.myMeshInfo; + TEntityInfo::const_iterator anIter = theEntityInfo.begin(); for(; anIter != theEntityInfo.end(); anIter++){ - const med_entite_maillage& anEntity = (const med_entite_maillage&)(anIter->first); - const TGeom& aTGeom = anIter->second; - TGeom::const_iterator anGeomIter = aTGeom.begin(); - for(; anGeomIter != aTGeom.end(); anGeomIter++){ - const med_geometrie_element& aGeom = (const med_geometrie_element&)(anGeomIter->first); - TInt aTmp = MEDnPasdetemps(myFile->Id(),&anInfo.myName[0],anEntity,aGeom); - aNbTimeStamps = max(aTmp,aNbTimeStamps); - if (aNbTimeStamps<1) - continue; - BEGMSG(MYDEBUG,"GetNbTimeStamps aNbTimeStamps="<second; + med_entite_maillage anEntity = med_entite_maillage(anIter->first); + const TGeom2Size& aGeom2Size = anIter->second; + TGeom2Size::const_iterator anGeomIter = aGeom2Size.begin(); + for(; anGeomIter != aGeom2Size.end(); anGeomIter++){ + med_geometrie_element aGeom = med_geometrie_element(anGeomIter->first); + TInt aNbStamps = MEDnPasdetemps(anId, + &anInfo.myName[0], + anEntity, + aGeom); + if(aNbStamps > 0){ + INITMSG(MYDEBUG, + "GetNbTimeStamps aNbTimeStamps = "<()+1]; + char aDtUnit[GetPNOMLength()+1]; + med_int aNbGauss; + med_int aNumDt; + med_int aNumOrd; + med_float aDt; + med_booleen anIsLocal; + med_int aNbRef; + TErr aRet = MEDpasdetempsInfo(anId, + &anInfo.myName[0], + anEntity, + aGeom, + iTimeStamp, + &aNbGauss, + &aNumDt, + &aNumOrd, + aDtUnit, + &aDt, + aMaillageChamp, + &anIsLocal, + &aNbRef); + INITMSG(MYDEBUG, + "GetNbTimeStamps aMaillageChamp = '"<second; + theEntity = EEntiteMaillage(anEntity); + aNbTimeStamps = aNbStamps; + } + } } } - if(!theGeom.empty()) + if(!theGeom2Size.empty()) break; } return aNbTimeStamps; } - void TVWrapper::GetTimeStampInfo(TInt theTimeStampId, - MED::TTimeStampInfo& theInfo, - TErr* theErr) + void + TVWrapper + ::GetTimeStampInfo(TInt theTimeStampId, + MED::TTimeStampInfo& theInfo, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); - TGeom& aTGeom = theInfo.myGeom; + const TGeom2Size& aGeom2Size = theInfo.myGeom2Size; if(theErr){ - if(aTGeom.empty()) + if(aGeom2Size.empty()) *theErr = -1; if(*theErr < 0) return; - }else if(aTGeom.empty()) + }else if(aGeom2Size.empty()) EXCEPTION(runtime_error,"GetTimeStampInfo - There is no any cell"); MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo; MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myEntity); - - TGeom::iterator anIter = aTGeom.begin(); - med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first); - - med_booleen& anIsLocal = (med_booleen&)(aFieldInfo.myIsLocal); - - TErr aRet = MEDpasdetempsInfo(myFile->Id(), - &aFieldInfo.myName[0], - anEntity, - aGeom, - theTimeStampId, - (med_int *)&theInfo.myNbGauss, - (med_int *)&theInfo.myNumDt, - (med_int *)&theInfo.myNumOrd, - &theInfo.myUnitDt[0], - &theInfo.myDt, - &aMeshInfo.myName[0], - &anIsLocal, - (med_int *)&aFieldInfo.myNbRef); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(runtime_error,"GetTimeStampInfo - MEDpasdetempsInfo(...)"); - - static TInt MAX_NB_GAUSS_POINTS = 32; - if(theInfo.myNbGauss <= 0 || theInfo.myNbGauss > MAX_NB_GAUSS_POINTS) - theInfo.myNbGauss = 1; + TGeom2NbGauss& aGeom2NbGauss = theInfo.myGeom2NbGauss; + + TGeom2Size::const_iterator anIter = aGeom2Size.begin(); + for(; anIter != aGeom2Size.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + med_int aNbGauss = -1; + + TErr aRet; + aRet = MEDpasdetempsInfo(myFile->Id(), + &aFieldInfo.myName[0], + med_entite_maillage(theInfo.myEntity), + med_geometrie_element(anIter->first), + theTimeStampId, + &aNbGauss, + (med_int*)&theInfo.myNumDt, + (med_int*)&theInfo.myNumOrd, + &theInfo.myUnitDt[0], + &theInfo.myDt, + &aMeshInfo.myName[0], + (med_booleen*)&aFieldInfo.myIsLocal, + (med_int*)&aFieldInfo.myNbRef); + + static TInt MAX_NB_GAUSS_POINTS = 32; + if(aNbGauss <= 0 || aNbGauss > MAX_NB_GAUSS_POINTS) + aNbGauss = 1; + + aGeom2NbGauss[aGeom] = aNbGauss; + + if(theErr) + *theErr = aRet; + else if(aRet < 0) + EXCEPTION(runtime_error,"GetTimeStampInfo - MEDpasdetempsInfo(...)"); + } } - void TVWrapper::GetTimeStampVal(MED::TTimeStampVal& theVal, - TErr* theErr) + void + TVWrapper + ::GetTimeStampVal(TTimeStampVal& theVal, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr) { TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); @@ -1260,20 +1547,63 @@ namespace MED{ MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo; MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity); - med_mode_profil& aPflMode = (med_mode_profil&)(theVal.myPflMode); - TGeom& aTGeom = aTimeStampInfo.myGeom; - TGeom::iterator anIter = aTGeom.begin(); - for(; anIter != aTGeom.end(); anIter++){ - med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first); + TGeom2Gauss& aGeom2Gauss = aTimeStampInfo.myGeom2Gauss; + TVector aGaussName(GetNOMLength()+1); + + med_mode_profil aProfileMode = med_mode_profil(boost::get<0>(theMKey2Profile)); + MED::TKey2Profile aKey2Profile = boost::get<1>(theMKey2Profile); + MED::TGeom2Profile& aGeom2Profile = theVal.myGeom2Profile; + TVector aProfileName(GetNOMLength()+1); + + TGeom2Size& aGeom2Size = aTimeStampInfo.myGeom2Size; + TGeom2Size::iterator anIter = aGeom2Size.begin(); + for(; anIter != aGeom2Size.end(); anIter++){ + EGeometrieElement aGeom = anIter->first; + TInt aNbCells = anIter->second; + + TInt aNbMeshRef = MEDnChampRef(anId, + &aFieldInfo.myName[0], + med_entite_maillage(aTimeStampInfo.myEntity), + med_geometrie_element(aGeom), + aTimeStampInfo.myNumDt, + aTimeStampInfo.myNumOrd); + if(aNbMeshRef < 1){ + if(theErr){ + *theErr = MED_FAUX; + return; + } + EXCEPTION(runtime_error,"GetTimeStampVal - MEDnChampRef(...) < 1"); + } + + TErr aRet; + med_int aNbGauss = -1; + aRet = MEDchampRefInfo(anId, + &aFieldInfo.myName[0], + med_entite_maillage(aTimeStampInfo.myEntity), + med_geometrie_element(aGeom), + aNbMeshRef, + aTimeStampInfo.myNumDt, + aTimeStampInfo.myNumOrd, + &aMeshInfo.myName[0], + (med_booleen*)&aFieldInfo.myIsLocal, + &aNbGauss); + + if(aRet < 0){ + if(theErr){ + *theErr = MED_FAUX; + return; + } + EXCEPTION(runtime_error,"GetTimeStampVal - MEDchampRefInfo(...)"); + } + TInt aNbVal = MEDnVal(anId, &aFieldInfo.myName[0], - anEntity, - aGeom, + med_entite_maillage(aTimeStampInfo.myEntity), + med_geometrie_element(aGeom), aTimeStampInfo.myNumDt, aTimeStampInfo.myNumOrd, &aMeshInfo.myName[0], - aPflMode); + aProfileMode); if(aNbVal <= 0){ if(theErr){ *theErr = -1; @@ -1282,64 +1612,56 @@ namespace MED{ EXCEPTION(runtime_error,"GetTimeStampInfo - MEDnVal(...) - aNbVal == "<second; + aGeom2Gauss[aGeom] = aGaussInfo; + } + } + + MED::PProfileInfo aProfileInfo; + if(strcmp(&aProfileName[0],"") != 0){ + MED::TKey2Profile::const_iterator anIter = aKey2Profile.find(&aProfileName[0]); + if(anIter != aKey2Profile.end()){ + aProfileInfo = anIter->second; + aGeom2Profile[aGeom] = aProfileInfo; + } + } + + if(aNbGauss > 1 && !aGaussInfo){ + if(theErr){ + *theErr = MED_FAUX; + return; + } + EXCEPTION(runtime_error,"GetValTimeStamp "<< + "- aNbGauss("< 1 && !aGaussInfo"<< + "; aGaussName = '"<<&aGaussName[0]<<"'"<< + "; aGeom = "<GetNbGauss()){ + if(theErr){ + *theErr = MED_FAUX; + return; + } + EXCEPTION(runtime_error,"GetValTimeStamp - aNbGauss != aGaussInfo->GetNbGauss()"); + } + + if(aProfileInfo && aProfileInfo->IsPresent()){ + TInt aNbSubCells = aProfileInfo->GetSize(); + + TInt aSize = aNbSubCells*aFieldInfo.myNbComp*aNbGauss; + if(aSize != aValue.size()){ + if(theErr){ + *theErr = -1; + return; + } + EXCEPTION(runtime_error, + "GetTimeStampInfo - aSize("<Id(); MED::TTimeStampVal& aVal = const_cast(theVal); + MED::TTimeStampInfo& aTimeStampInfo = *aVal.myTimeStampInfo; MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo; MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - MED::TMeshValue& aMeshValue = aVal.myMeshValue; - - med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity); - med_mode_profil& aPflMode = (med_mode_profil&)(theVal.myPflMode); - TMeshValue::iterator anIter = aMeshValue.begin(); - for(; anIter != aMeshValue.end(); anIter++){ - med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first); - TValue& aValue = aVal.myMeshValue[EGeometrieElement(aGeom)]; - med_int iEnd = aValue.size(); - med_int aNbVal = iEnd / aFieldInfo.myNbComp; + MED::TGeom2Value& aGeom2Value = aVal.myGeom2Value; + + MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo.myGeom2Gauss; + MED::TGeom2Profile& aGeom2Profile = aVal.myGeom2Profile; + + TGeom2Value::iterator anIter = aGeom2Value.begin(); + for(; anIter != aGeom2Value.end(); anIter++){ + EGeometrieElement aGeom = anIter->first; + TMeshValue& aMeshValue = anIter->second; + + TVector aGaussName(GetNOMLength()+1); + MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aGeom); + if(aGaussIter != aGeom2Gauss.end()){ + MED::PGaussInfo aGaussInfo = aGaussIter->second; + strcpy(&aGaussName[0],&aGaussInfo->myName[0]); + } + + TVector aProfileName(GetNOMLength()+1); + med_mode_profil aProfileMode = med_mode_profil(eNO_PFLMOD); + MED::TGeom2Profile::const_iterator aProfileIter = aGeom2Profile.find(aGeom); + if(aProfileIter != aGeom2Profile.end()){ + MED::PProfileInfo aProfileInfo = aProfileIter->second; + aProfileMode = med_mode_profil(aProfileInfo->myMode); + strcpy(&aProfileName[0],&aProfileInfo->myName[0]); + } + + med_int aNbVal = aMeshValue.myNbElem / aFieldInfo.myNbComp; + TValue& aValue = aMeshValue.myValue; + TInt anEnd = aValue.size(); switch(aFieldInfo.myType){ case eFLOAT64: { - std::vector& anArray = aValue; + TVector& anArray = aValue; aRet = MEDchampEcr(anId, &aMeshInfo.myName[0], &aFieldInfo.myName[0], (unsigned char*)&anArray[0], - MED_FULL_INTERLACE, + med_mode_switch(theVal.myModeSwitch), aNbVal, - &aTimeStampInfo.myGaussName[0], + &aGaussName[0], MED_ALL, - &aVal.myPflName[0], - aPflMode, - anEntity, - aGeom, + &aProfileName[0], + aProfileMode, + med_entite_maillage(aTimeStampInfo.myEntity), + med_geometrie_element(aGeom), aTimeStampInfo.myNumDt, &aTimeStampInfo.myUnitDt[0], aTimeStampInfo.myDt, @@ -1401,21 +1824,22 @@ namespace MED{ break; } default: { - vector anArray(iEnd); - for(TInt i = 0; i< iEnd; i++) anArray[i] = TInt(aValue[i]); + vector anArray(anEnd); + for(TInt anID = 0; anID < anEnd; anID++) + anArray[anID] = TInt(aValue[anID]); aRet = MEDchampEcr(anId, &aMeshInfo.myName[0], &aFieldInfo.myName[0], (unsigned char*)&anArray[0], - MED_FULL_INTERLACE, + med_mode_switch(theVal.myModeSwitch), aNbVal, - &aTimeStampInfo.myGaussName[0], + &aGaussName[0], MED_ALL, - &aVal.myPflName[0], - aPflMode, - anEntity, - aGeom, + &aProfileName[0], + aProfileMode, + med_entite_maillage(aTimeStampInfo.myEntity), + med_geometrie_element(aGeom), aTimeStampInfo.myNumDt, &aTimeStampInfo.myUnitDt[0], aTimeStampInfo.myDt, @@ -1437,8 +1861,10 @@ namespace MED{ } - void TVWrapper::SetTimeStamp(const MED::TTimeStampVal& theVal, - TErr* theErr) + void + TVWrapper + ::SetTimeStamp(const MED::TTimeStampVal& theVal, + TErr* theErr) { TErr aRet; SetTimeStamp(theVal,eLECTURE_ECRITURE,&aRet); diff --git a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx index 9b20a1c57..f8398b758 100644 --- a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx +++ b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx @@ -32,24 +32,50 @@ #include "MED_Structures.hxx" #include "MED_TWrapper.hxx" -namespace MED{ - namespace V2_2{ +namespace MED +{ + template<> + TInt + GetDESCLength(); + + template<> + TInt + GetIDENTLength(); + + template<> + TInt + GetNOMLength(); + + template<> + TInt + GetLNOMLength(); + + template<> + TInt + GetPNOMLength(); - const TInt PNOM = 16; + template<> + TInt + GetNbConn(EGeometrieElement typmai, + EEntiteMaillage typent, + TInt mdim); - typedef MED::TTMeshInfo TVMeshInfo; + namespace V2_2 + { - typedef MED::TTFamilyInfo TVFamilyInfo; + typedef MED::TTMeshInfo TVMeshInfo; - typedef MED::TTNodeInfo TVNodeInfo; + typedef MED::TTFamilyInfo TVFamilyInfo; - typedef MED::TTCellInfo TVCellInfo; + typedef MED::TTNodeInfo TVNodeInfo; - typedef MED::TTFieldInfo TVFieldInfo; + typedef MED::TTCellInfo TVCellInfo; - typedef MED::TTTimeStampInfo TVTimeStampInfo; + typedef MED::TTFieldInfo TVFieldInfo; - typedef MED::TTTimeStampVal TVTimeStampVal; + typedef MED::TTTimeStampInfo TVTimeStampInfo; + + typedef MED::TTTimeStampVal TVTimeStampVal; //--------------------------------------------------------------- class TFile; @@ -58,7 +84,8 @@ namespace MED{ typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces; //--------------------------------------------------------------- - class TVWrapper: public MED::TTWrapper{ + class TVWrapper: public MED::TTWrapper + { TVWrapper(); TVWrapper(const TVWrapper&); TVWrapper& operator=(const TVWrapper&); @@ -126,64 +153,64 @@ namespace MED{ void GetNames(TElemInfo& theInfo, TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); virtual void GetNumeration(TElemInfo& theInfo, TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); virtual void GetFamilies(TElemInfo& theInfo, TInt nb, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); virtual void SetNames(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); void SetNames(const TElemInfo& theInfo, EModeAcces theMode, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); virtual void SetNumeration(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); void SetNumeration(const TElemInfo& theInfo, EModeAcces theMode, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); virtual void SetFamilies(const TElemInfo& theInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); void SetFamilies(const TElemInfo& theInfo, EModeAcces theMode, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -226,17 +253,17 @@ namespace MED{ virtual TInt GetNbPolygones(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL); + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); virtual TInt - GetNbPolygoneConn(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, + GetPolygoneConnSize(const TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -265,17 +292,17 @@ namespace MED{ virtual void - GetNbPolyedreConnF(const TMeshInfo& theMeshInfo, - EConnectivite, - TInt& nf, - TInt& nc, - TErr* theErr = NULL); + GetPolyedreConnSize(const TMeshInfo& theMeshInfo, + TInt& theNbFaces, + TInt& theConnSize, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ virtual TEntityInfo GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theTConn = eNOD, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL); virtual @@ -283,7 +310,7 @@ namespace MED{ GetNbCells(const MED::TMeshInfo& theMeshInfo, EEntiteMaillage, EGeometrieElement, - EConnectivite theTConn = eNOD, + EConnectivite theConnMode = eNOD, TErr* theErr = NULL); virtual @@ -328,14 +355,46 @@ namespace MED{ EModeAcces theMode, TErr* theErr = NULL); + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbGauss(TErr* theErr = NULL); + + virtual + TGaussInfo::TInfo + GetGaussPreInfo(TInt theId, + TErr* theErr = NULL); + + virtual + void + GetGaussInfo(TInt theId, + TGaussInfo& theInfo, + TErr* theErr = NULL); + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + virtual + TInt + GetNbProfiles(TErr* theErr = NULL); + + virtual + TProfileInfo::TInfo + GetProfilePreInfo(TInt theId, + TErr* theErr = NULL); + virtual + void + GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr = NULL); + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ virtual TInt GetNbTimeStamps(const MED::TFieldInfo& theInfo, const MED::TEntityInfo& theEntityInfo, EEntiteMaillage& theEntity, - TGeom& theGeom, + TGeom2Size& theGeom2Size, TErr* theErr = NULL); virtual @@ -347,6 +406,8 @@ namespace MED{ virtual void GetTimeStampVal(MED::TTimeStampVal& theVal, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, TErr* theErr = NULL); virtual -- 2.39.2