diff --git a/cmake/version.cmake b/cmake/version.cmake index bf7d368..4dd2e93 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -3,8 +3,8 @@ # set (LIMA_MAJOR_VERSION "7") -set (LIMA_MINOR_VERSION "11") -set (LIMA_RELEASE_VERSION "2") +set (LIMA_MINOR_VERSION "12") +set (LIMA_RELEASE_VERSION "0") set (LIMA_VERSION ${LIMA_MAJOR_VERSION}.${LIMA_MINOR_VERSION}.${LIMA_RELEASE_VERSION}) diff --git a/installation.txt b/installation.txt index 0d07ae0..635e6e9 100644 --- a/installation.txt +++ b/installation.txt @@ -22,7 +22,7 @@ cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_ -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_XLMLIMA=ON -DBUILD_TESTS:BOOL=ON -DBUILD_SCRIPTING:BOOL=ON -DMACHINE_TYPES:BOOL=OFF -DSUMESH:BOOL=OFF -DFORMAT_MLI:BOOL=OFF -DFORMAT_MLI2:BOOL=ON -DFORMAT_MLI2:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DINT_8:BOOL=ON -DREAL_8:BOOL=ON \ -DSWIG_EXECUTABLE=/opt/swig/4.1.1/bin/swig -DPython3_ROOT_DIR=/usr/lib/python3 -DHDF5_ROOT=/opt/HDF5/1.12.0 \ - -B /tmp/lima_build_dir -DCMAKE_INSTALL_PREFIX=/opt/Lima/7.11.2 + -B /tmp/lima_build_dir -DCMAKE_INSTALL_PREFIX=/opt/Lima/7.12.0 cmake --build /tmp/lima_build_dir cmake --install /tmp/lima_build_dir @@ -32,7 +32,7 @@ cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_ -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_XLMLIMA=ON -DBUILD_TESTS:BOOL=ON -DBUILD_SCRIPTING:BOOL=ON -DMACHINE_TYPES:BOOL=ON -DSUMESH:BOOL=ON -DFORMAT_MLI:BOOL=ON -DFORMAT_MLI2:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DINT_8:BOOL=ON -DREAL_8:BOOL=ON \ -DSWIG_EXECUTABLE=/opt/swig/4.1.1/bin/swig -DPython3_ROOT_DIR=/usr/lib/python3 -DHDF5_ROOT=/opt/HDF5/1.12.0 -DHDF145_INCLUDE_DIR=/opt/hdf145/1.3.0/include -DHDF145CPP_LIBRARY=/opt/hdf145/1.3.0/lib/libhdf145_cpp.so -DHDF145_LIBRARY=/opt/hdf145/1.3.0/lib/libhdf145.so \ - -B /tmp/lima_build_dir -DCMAKE_INSTALL_PREFIX=/opt/Lima/7.11.2 + -B /tmp/lima_build_dir -DCMAKE_INSTALL_PREFIX=/opt/Lima/7.12.0 cmake --build /tmp/lima_build_dir cmake --install /tmp/lima_build_dir diff --git a/src/Lima/maillage_it.cpp b/src/Lima/maillage_it.cpp index 3a67428..c73e8d3 100644 --- a/src/Lima/maillage_it.cpp +++ b/src/Lima/maillage_it.cpp @@ -2475,7 +2475,7 @@ void _MaillageInterne::lire_structure ( try { - auto_ptr<_Reader> reader (_Reader::create (this,fichier,format,num)); + unique_ptr<_Reader> reader (_Reader::create (this,fichier,format,num)); if (0 == reader.get ( )) throw read_erreur("Impossible d'initialiser le module de lecture\n"); @@ -2496,7 +2496,7 @@ void _MaillageInterne::lire(const string& fichier, format_t format, size_type nu try { - auto_ptr<_Reader> reader (_Reader::create (this,fichier,format,num)); + unique_ptr<_Reader> reader (_Reader::create (this,fichier,format,num)); if (0 == reader.get ( )) throw read_erreur("Impossible d'initialiser le module de lecture\n"); diff --git a/src/Lima/public/Lima/bras.h b/src/Lima/public/Lima/bras.h index bfc6ea5..14a81c8 100644 --- a/src/Lima/public/Lima/bras.h +++ b/src/Lima/public/Lima/bras.h @@ -24,7 +24,7 @@ class Bras : public Handle_BrasInterne public: Bras(const Noeud& n0, const Noeud& n1); #ifdef SWIG - %name(Bras_id) + %rename(Bras_id) Bras(size_type n, const Noeud& n0, const Noeud& n1); #endif Bras(size_type n, const Noeud& n0, const Noeud& n1); diff --git a/src/Lima/public/Lima/ligne.h b/src/Lima/public/Lima/ligne.h index 9940cdd..dec3264 100644 --- a/src/Lima/public/Lima/ligne.h +++ b/src/Lima/public/Lima/ligne.h @@ -58,7 +58,7 @@ class Ligne : public Handle_LigneInterne Bras bras_id(size_type id) const; #ifdef SWIG - %name(contenir_bras) + %rename(contenir_bras) contenir(const Bras& br) const; #endif bool contenir(const Bras& br) const; // Liste des attributs des bras. @@ -73,7 +73,7 @@ class Ligne : public Handle_LigneInterne Noeud noeud_id(size_type id) const; #ifdef SWIG - %name(contenir_noeud) + %rename(contenir_noeud) contenir(const Noeud& nd) const; #endif bool contenir(const Noeud& nd) const; // Liste des attributs des noeuds. diff --git a/src/Lima/public/Lima/lima.h b/src/Lima/public/Lima/lima.h index 238ee14..b6a163a 100644 --- a/src/Lima/public/Lima/lima.h +++ b/src/Lima/public/Lima/lima.h @@ -31,7 +31,7 @@ extern "C" { /** Types enum pour l'acces aux fichiers et la preparation */ - enum LM_FORMAT_FICHIER { + typedef enum LM_FORMAT_FICHIER { /** Detection du format par le suffixe du nom du fichier. * Formats utilises pour la lecture et l'ecriture */ LM_FF_SUFFIXE = 0, @@ -89,14 +89,13 @@ extern "C" { LM_FF_MALIPP2 = 15, #endif LM_FF_INCONNU - }; - typedef enum LM_FORMAT_FICHIER LM_FORMAT_FICHIER; + } LM_FORMAT_FICHIER; /** Niveau de preparation du maillage pour les codes * (verification et traitement) */ - enum LM_PREPARATION { + typedef enum LM_PREPARATION { /** Preparation minimale. Verification d'integrite uniquement. Seul les donnees de base sont autorise en consultation */ LM_PR_MINIMALE = 1, @@ -112,9 +111,7 @@ extern "C" { LM_PR_BASE_3D = 6, LM_PR_CODE_T = 7, LM_PR_INCONNU - }; - typedef enum LM_PREPARATION LM_PREPARATION; - + } LM_PREPARATION; #ifdef __INTERNE_MACHINE_TYPES diff --git a/src/Lima/public/Lima/maillage.h b/src/Lima/public/Lima/maillage.h index e95c536..49f57a7 100644 --- a/src/Lima/public/Lima/maillage.h +++ b/src/Lima/public/Lima/maillage.h @@ -141,38 +141,40 @@ class Maillage : public Handle_MaillageInterne // Dimension du maillage. #ifdef SWIG - %name(set_dimension) + %rename(set_dimension) dimension(dim_t dim); #endif void dimension(dim_t dim); // Unité de longueur du maillage. #ifdef SWIG - %name(set_unite_longueur) + %rename(set_unite_longueur) unite_longueur(double unilo); #endif void unite_longueur(double unilo); // Unité d'angle du maillage. #ifdef SWIG - %name(set_unite_angle) + %rename(set_unite_angle) unite_angle(double unia); #endif void unite_angle(double unia); // Type de géométrie du maillage. #ifdef SWIG - %name(set_type_geometrie) + %rename(set_type_geometrie) type_geometrie(geometrie_t geom); #endif void type_geometrie(geometrie_t geom); // Type de coordonnée du maillage. #ifdef SWIG - %name(set_type_coordonnee) + %rename(set_type_coordonnee) type_coordonnee(coordonnee_t tycoo); #endif void type_coordonnee(coordonnee_t tycoo); /// Titre du maillage. #ifdef SWIG - %name(set_titre) void titre(const char* titre); + %rename(set_titre) titre(const char* titre); + void titre (const char* titre); #else void titre(const IN_STD string& titre); #endif /// Date du maillage. #ifdef SWIG - %name(set_date) void date(const char* date); + %rename(set_date) date(const char* date); + void date(const char* date); #else void date(const IN_STD string& date); #endif @@ -186,19 +188,19 @@ class Maillage : public Handle_MaillageInterne // Noeud d'ID n. Noeud noeud_id(size_type id) const; #ifdef SWIG - %name(contenir_noeud) + %rename(contenir_noeud) contenir(const Noeud& nd) const; #endif bool contenir(const Noeud& nd) const; #ifdef SWIG - %name(ajouter_noeud) + %rename(ajouter_noeud) ajouter(const Noeud& nd); #endif void ajouter(const Noeud& nd); #ifdef SWIG - %name(retirer_noeud) + %rename(retirer_noeud) retirer(const Noeud& nd); #endif void retirer(const Noeud& nd); #ifdef SWIG - %name(deplacer_noeud) + %rename(deplacer_noeud) deplacer(size_type id, double x, double y, double z); #endif void deplacer(size_type id, double x, double y, double z); // Liste des attributs des noeuds. @@ -211,15 +213,15 @@ class Maillage : public Handle_MaillageInterne // Bras d'ID n. Bras bras_id(size_type id) const; #ifdef SWIG - %name(contenir_bras) + %rename(contenir_bras) contenir(const Bras& br) const; #endif bool contenir(const Bras& br) const; #ifdef SWIG - %name(ajouter_bras) + %rename(ajouter_bras) ajouter(const Bras& br); #endif void ajouter(const Bras& br); #ifdef SWIG - %name(retirer_bras) + %rename(retirer_bras) retirer(const Bras& br); #endif void retirer(const Bras& br); // Liste des attributs des bras. @@ -232,15 +234,15 @@ class Maillage : public Handle_MaillageInterne // Polygone d'ID n. Polygone polygone_id(size_type id) const; #ifdef SWIG - %name(contenir_polygone) + %rename(contenir_polygone)contenir(const Polygone& pg) const; #endif bool contenir(const Polygone& pg) const; #ifdef SWIG - %name(ajouter_polygone) -#endif + %rename(ajouter_polygone) ajouter(const Polygone& pg); +#endif void ajouter(const Polygone& pg); #ifdef SWIG - %name(retirer_polygone) + %rename(retirer_polygone) retirer(const Polygone& pg); #endif void retirer(const Polygone& pg); // Liste des attributs des polygones. @@ -253,15 +255,15 @@ class Maillage : public Handle_MaillageInterne // Polyedre d'ID n. Polyedre polyedre_id(size_type id) const; #ifdef SWIG - %name(contenir_polyedre) + %rename(contenir_polyedre) contenir(const Polyedre& pd) const; #endif bool contenir(const Polyedre& pd) const; #ifdef SWIG - %name(ajouter_polyedre) + %rename(ajouter_polyedre) ajouter(const Polyedre& pd); #endif void ajouter(const Polyedre& pd); #ifdef SWIG - %name(retirer_polyedre) + %rename(retirer_polyedre) retirer(const Polyedre& pd); #endif void retirer(const Polyedre& pd); // Liste des attributs des polyèdres. @@ -271,7 +273,7 @@ class Maillage : public Handle_MaillageInterne size_type nb_nuages() const; // Nuage numéro n. #ifdef SWIG - %name(nuage_id) + %rename(nuage_id) nuage(size_type n) const; #endif Nuage nuage(size_type n) const; // Nuage de nom str. @@ -281,15 +283,15 @@ class Maillage : public Handle_MaillageInterne Nuage nuage(const char* str) const; #endif #ifdef SWIG - %name(contenir_nuage) + %rename(contenir_nuage) contenir(const Nuage& nu) const; #endif bool contenir(const Nuage& nu) const; #ifdef SWIG - %name(ajouter_nuage) + %rename(ajouter_nuage) ajouter(const Nuage& nu); #endif void ajouter(const Nuage& nu); #ifdef SWIG - %name(retirer_nuage) + %rename(retirer_nuage) retirer(const Nuage& nu); #endif void retirer(const Nuage& nu); // Liste des attributs des nuages. @@ -299,7 +301,7 @@ class Maillage : public Handle_MaillageInterne size_type nb_lignes() const; // Ligne numéro n. #ifdef SWIG - %name(ligne_id) + %rename(ligne_id) ligne(size_type n) const; #endif Ligne ligne(size_type n) const; // Ligne de nom str. @@ -309,15 +311,15 @@ class Maillage : public Handle_MaillageInterne Ligne ligne(const char* str) const; #endif #ifdef SWIG - %name(contenir_ligne) + %rename(contenir_ligne) contenir(const Ligne& li) const; #endif bool contenir(const Ligne& li) const; #ifdef SWIG - %name(ajouter_ligne) + %rename(ajouter_ligne) ajouter(const Ligne& li); #endif void ajouter(const Ligne& li); #ifdef SWIG - %name(retirer_ligne) + %rename(retirer_ligne) retirer(const Ligne& li); #endif void retirer(const Ligne& li); // Liste des attributs des lignes. @@ -327,7 +329,7 @@ class Maillage : public Handle_MaillageInterne size_type nb_surfaces() const; // Surface numéro n. #ifdef SWIG - %name(surface_id) + %rename(surface_id) surface(size_type n) const; #endif Surface surface(size_type n) const; // Surface de nom str. @@ -337,15 +339,15 @@ class Maillage : public Handle_MaillageInterne Surface surface(const char* str) const; #endif #ifdef SWIG - %name(contenir_surface) + %rename(contenir_surface) contenir(const Surface& su) const; #endif bool contenir(const Surface& su) const; #ifdef SWIG - %name(ajouter_surface) + %rename(ajouter_surface) ajouter(const Surface& su); #endif void ajouter(const Surface& su); #ifdef SWIG - %name(retirer_surface) + %rename(retirer_surface) retirer(const Surface& su); #endif void retirer(const Surface& su); // Liste des attributs des surfaces. @@ -355,7 +357,7 @@ class Maillage : public Handle_MaillageInterne size_type nb_volumes() const; // Volume numéro n. #ifdef SWIG - %name(volume_id) + %rename(volume_id) volume(size_type n) const; #endif Volume volume(size_type n) const; // Volume de nom str. @@ -365,15 +367,15 @@ class Maillage : public Handle_MaillageInterne Volume volume(const char* str) const; #endif #ifdef SWIG - %name(contenir_volume) + %rename(contenir_volume) contenir(const Volume& vo) const; #endif bool contenir(const Volume& vo) const; #ifdef SWIG - %name(ajouter_volume) + %rename(ajouter_volume) ajouter(const Volume& vo); #endif void ajouter(const Volume& vo); #ifdef SWIG - %name(retirer_volume) + %rename(retirer_volume) retirer(const Volume& vo); #endif void retirer(const Volume& vo); // Liste des attributs des volumes. diff --git a/src/Lima/public/Lima/malipp.h b/src/Lima/public/Lima/malipp.h index d8f1bc2..00d57fc 100644 --- a/src/Lima/public/Lima/malipp.h +++ b/src/Lima/public/Lima/malipp.h @@ -1106,7 +1106,7 @@ class MaliPPReader Composition m_composition_polyedres; /** Le fichier HDF. */ - IN_STD auto_ptr m_fichier_hdf; + IN_STD unique_ptr m_fichier_hdf; /** Le maillage. */ IN_H5 Group m_maillage_hdf; @@ -1277,7 +1277,7 @@ class MaliPPWriter IN_H5 Group m_meshGroup; //! Le fichier HDF contenant le maillage. - IN_STD auto_ptr m_hdfFile; + IN_STD unique_ptr m_hdfFile; //! Dimension du maillage. dim_t m_dim; diff --git a/src/Lima/public/Lima/malipp2.h b/src/Lima/public/Lima/malipp2.h index 2df882c..785d2c0 100644 --- a/src/Lima/public/Lima/malipp2.h +++ b/src/Lima/public/Lima/malipp2.h @@ -1104,7 +1104,7 @@ class MaliPPReader2 Composition m_composition_polyedres; /** Le fichier HDF. */ - IN_STD auto_ptr m_fichier_hdf; + IN_STD unique_ptr m_fichier_hdf; /** Le maillage. */ H5::Group m_maillage_hdf; @@ -1253,7 +1253,7 @@ class MaliPPWriter2 H5::Group m_meshGroup; //! Le fichier HDF contenant le maillage. - IN_STD auto_ptr m_hdfFile; + IN_STD unique_ptr m_hdfFile; //! Dimension du maillage. dim_t m_dim; diff --git a/src/Lima/public/Lima/noeud.h b/src/Lima/public/Lima/noeud.h index 2b457f9..3112aaa 100644 --- a/src/Lima/public/Lima/noeud.h +++ b/src/Lima/public/Lima/noeud.h @@ -24,7 +24,7 @@ class Noeud : public Handle_NoeudInterne public: Noeud(double x=0, double y=0, double z=0); #ifdef SWIG - %name(Noeud_id) + %rename(Noeud_id) Noeud(size_type n, double x=0, double y=0, double z=0); #endif Noeud(size_type n, double x=0, double y=0, double z=0); diff --git a/src/Lima/public/Lima/nuage.h b/src/Lima/public/Lima/nuage.h index d7a65a4..9ef1ce3 100644 --- a/src/Lima/public/Lima/nuage.h +++ b/src/Lima/public/Lima/nuage.h @@ -54,7 +54,7 @@ class Nuage : public Handle_NuageInterne Noeud noeud_id(size_type id) const; #ifdef SWIG - %name(contenir_noeud) + %rename(contenir_noeud) contenir(const Noeud& nd) const; #endif bool contenir(const Noeud& nd) const; // Liste des attributs des noeuds. diff --git a/src/Lima/public/Lima/polyedre.h b/src/Lima/public/Lima/polyedre.h index fc354d5..84c57ca 100644 --- a/src/Lima/public/Lima/polyedre.h +++ b/src/Lima/public/Lima/polyedre.h @@ -40,85 +40,53 @@ class Polyedre : public Handle_PolyedreInterne Polyedre(); #ifdef SWIG - %name(Tetraedre) + %rename(Tetraedre) Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #endif - Polyedre(const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3); + Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #ifdef SWIG - %name(Pyramide) + %rename(Pyramide) Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #endif - Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, - const Noeud& n3, const Noeud& n4); + Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #ifdef SWIG - %name(Prisme) + %rename(Prisme) Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5); #endif - Polyedre(const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5); + Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5); #ifdef SWIG - %name(Hexaedre) + %rename(Hexaedre) Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7); #endif - Polyedre(const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5, - const Noeud& n6, const Noeud& n7); + Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7); #ifdef SWIG - %name(Heptaedre) + %rename(Heptaedre) Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9); #endif - Polyedre(const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5, - const Noeud& n6, const Noeud& n7, - const Noeud& n8, const Noeud& n9); + Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9); #ifdef SWIG - %name(Octoedre) -#endif - Polyedre(const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5, - const Noeud& n6, const Noeud& n7, - const Noeud& n8, const Noeud& n9, - const Noeud& n10, const Noeud& n11); + %rename(Octoedre) Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9, const Noeud& n10, const Noeud& n11); +#endif + Polyedre(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9, const Noeud& n10, const Noeud& n11); #ifdef SWIG - %name(Tetraedre_id) + %rename(Tetraedre_id) Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #endif - Polyedre(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3); + Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #ifdef SWIG - %name(Prisme_id) + %rename(Prisme_id) Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #endif - Polyedre(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, const Noeud& n4); + Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #ifdef SWIG - %name(Pyramide_id) + %rename(Pyramide_id) Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5); #endif - Polyedre(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5); + Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5); #ifdef SWIG - %name(Hexaedre_id) + %rename(Hexaedre_id) Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7); #endif - Polyedre(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5, - const Noeud& n6, const Noeud& n7); + Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7); #ifdef SWIG - %name(Heptaedre_id) + %rename(Heptaedre_id) Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9); #endif - Polyedre(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5, - const Noeud& n6, const Noeud& n7, - const Noeud& n8, const Noeud& n9); + Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9); #ifdef SWIG - %name(Octoedre_id) -#endif - Polyedre(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, - const Noeud& n4, const Noeud& n5, - const Noeud& n6, const Noeud& n7, - const Noeud& n8, const Noeud& n9, - const Noeud& n10, const Noeud& n11); + %rename(Octoedre_id) Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9, const Noeud& n10, const Noeud& n11); +#endif + Polyedre(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5, const Noeud& n6, const Noeud& n7, const Noeud& n8, const Noeud& n9, const Noeud& n10, const Noeud& n11); //! Remplace le noeud n1 par le noeud n2 pour chaque occurence existante de n1. void remplacer_noeud (const Noeud& n1, const Noeud& n2); diff --git a/src/Lima/public/Lima/polygone.h b/src/Lima/public/Lima/polygone.h index 62925df..e0ede9b 100644 --- a/src/Lima/public/Lima/polygone.h +++ b/src/Lima/public/Lima/polygone.h @@ -24,44 +24,37 @@ class Polygone : public Handle_PolygoneInterne public: Polygone(); #ifdef SWIG - %name(Triangle) + %rename(Triangle) Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2); #endif Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2); #ifdef SWIG - %name(Quadrangle) + %rename(Quadrangle) Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #endif - Polygone(const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3); + Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #ifdef SWIG - %name(Pentagone) + %rename(Pentagone) Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #endif - Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, - const Noeud& n3, const Noeud& n4); + Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #ifdef SWIG - %name(Hexagone) + %rename(Hexagone) Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5); #endif - Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, - const Noeud& n3, const Noeud& n4, const Noeud& n5); + Polygone(const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4, const Noeud& n5); #ifdef SWIG - %name(Triangle_id) + %rename(Triangle_id) Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2); #endif Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2); #ifdef SWIG - %name(Quadrangle_id) + %rename(Quadrangle_id) Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #endif - Polygone(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3); + Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3); #ifdef SWIG - %name(Pentagone_id) + %rename(Pentagone_id) Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #endif - Polygone(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, const Noeud& n4); + Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4); #ifdef SWIG - %name(Hexagone_id) + %rename(Hexagone_id) Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4,const Noeud& n5); #endif - Polygone(size_type n, const Noeud& n0, const Noeud& n1, - const Noeud& n2, const Noeud& n3, const Noeud& n4, - const Noeud& n5); + Polygone(size_type n, const Noeud& n0, const Noeud& n1, const Noeud& n2, const Noeud& n3, const Noeud& n4,const Noeud& n5); #ifndef SWIG Polygone(_PolygoneInterne* ptr); diff --git a/src/Lima/public/Lima/surface.h b/src/Lima/public/Lima/surface.h index 0de885a..7a3a827 100644 --- a/src/Lima/public/Lima/surface.h +++ b/src/Lima/public/Lima/surface.h @@ -61,7 +61,7 @@ class Surface : public Handle_SurfaceInterne Polygone polygone_id(size_type id) const; #ifdef SWIG - %name(contenir_polygone) + %rename(contenir_polygone) contenir(const Polygone& pg) const; #endif bool contenir(const Polygone& pg) const; // Liste des attributs des polygones. @@ -75,7 +75,7 @@ class Surface : public Handle_SurfaceInterne Bras bras_id(size_type id) const; #ifdef SWIG - %name(contenir_bras) + %rename(contenir_bras) contenir(const Bras& br) const; #endif bool contenir(const Bras& br) const; // Liste des attributs des bras. @@ -89,7 +89,7 @@ class Surface : public Handle_SurfaceInterne Liste_attribut& att_noeuds(); #ifdef SWIG - %name(contenir_noeud) + %rename(contenir_noeud) contenir(const Noeud& nd) const; #endif bool contenir(const Noeud& nd) const; diff --git a/src/Lima/public/Lima/vect2d.h b/src/Lima/public/Lima/vect2d.h index 7c5ac41..8ea7837 100644 --- a/src/Lima/public/Lima/vect2d.h +++ b/src/Lima/public/Lima/vect2d.h @@ -19,7 +19,7 @@ class Vect2d double y() const; // Lecture de la ieme composante du vecteur #ifdef SWIG - %name(get_coo) + %rename(get_coo) coo(size_type i) const; #endif double coo(size_type i) const; @@ -29,7 +29,7 @@ class Vect2d void set_y(double d); // Mise a jour de la ieme composante du vecteur #ifdef SWIG - %name(set_coo) + %rename(set_coo) coo(size_type i, double d); #endif void coo(size_type i, double d); diff --git a/src/Lima/public/Lima/vect3d.h b/src/Lima/public/Lima/vect3d.h index 0bc6907..59cc986 100644 --- a/src/Lima/public/Lima/vect3d.h +++ b/src/Lima/public/Lima/vect3d.h @@ -21,7 +21,7 @@ class Vect3d double z() const; // Lecture de la ieme composante du vecteur #ifdef SWIG - %name(get_coo) + %rename(get_coo) coo(size_type i) const; #endif double coo(size_type i) const; @@ -33,7 +33,7 @@ class Vect3d void set_z(double d); // Mise a jour de la ieme composante du vecteur #ifdef SWIG - %name(set_coo) + %rename(set_coo) coo(size_type i, double d); #endif void coo(size_type i, double d); diff --git a/src/Lima/public/Lima/volume.h b/src/Lima/public/Lima/volume.h index 511d711..0e0f39d 100644 --- a/src/Lima/public/Lima/volume.h +++ b/src/Lima/public/Lima/volume.h @@ -64,7 +64,7 @@ class Volume : public Handle_VolumeInterne Polyedre polyedre_id(size_type id) const; #ifdef SWIG - %name(contenir_polyedre) + %rename(contenir_polyedre) contenir(const Polyedre& pd) const; #endif bool contenir(const Polyedre& pd) const; // Liste des attributs des polyèdres. @@ -78,7 +78,7 @@ class Volume : public Handle_VolumeInterne Polygone polygone_id(size_type id) const; #ifdef SWIG - %name(contenir_polygone) + %rename(contenir_polygone) contenir(const Polygone& pg) const; #endif bool contenir(const Polygone& pg) const; // Liste des attributs des polygones. @@ -90,7 +90,7 @@ class Volume : public Handle_VolumeInterne Bras bras_id(size_type id) const; #ifdef SWIG - %name(contenir_bras) + %rename(contenir_bras) contenir(const Bras& br) const; #endif bool contenir(const Bras& br) const; // Liste des attributs des bras. @@ -102,7 +102,7 @@ class Volume : public Handle_VolumeInterne Noeud noeud_id(size_type id) const; #ifdef SWIG - %name(contenir_noeud) + %rename(contenir_noeud) contenir(const Noeud& nd) const; #endif bool contenir(const Noeud& nd) const; // Liste des attributs des noeuds. diff --git a/src/Lima/public/LimaP/reader_malipp.h b/src/Lima/public/LimaP/reader_malipp.h index f66f5d4..6167f07 100644 --- a/src/Lima/public/LimaP/reader_malipp.h +++ b/src/Lima/public/LimaP/reader_malipp.h @@ -161,7 +161,7 @@ public : IN_H5 Group m_meshGroup; //! Le fichier HDF contenant le maillage. - IN_STD auto_ptr m_hdfFile; + IN_STD unique_ptr m_hdfFile; //! Faut-il forcer la compression des datasets avec la zlib ? bool m_forceZlib; diff --git a/src/Lima/public/LimaP/reader_malipp2.h b/src/Lima/public/LimaP/reader_malipp2.h index b981c16..76f79b6 100644 --- a/src/Lima/public/LimaP/reader_malipp2.h +++ b/src/Lima/public/LimaP/reader_malipp2.h @@ -152,7 +152,7 @@ public : IN_H5 Group m_meshGroup; //! Le fichier HDF contenant le maillage. - IN_STD auto_ptr m_hdfFile; + IN_STD unique_ptr m_hdfFile; }; diff --git a/src/Lima/public/LimaP/using_it.h b/src/Lima/public/LimaP/using_it.h index d089426..34db36d 100755 --- a/src/Lima/public/LimaP/using_it.h +++ b/src/Lima/public/LimaP/using_it.h @@ -29,7 +29,7 @@ using std::reverse; using std::copy; using std::istrstream; -using std::auto_ptr; +using std::unique_ptr; using std::iterator; using std::map; @@ -74,7 +74,7 @@ using std::max_element; using std::reverse; using std::copy; -using std::auto_ptr; +using std::unique_ptr; using std::exception; diff --git a/src/LimaScripting/LimaScripting.i b/src/LimaScripting/LimaScripting.i index 51d924b..0f907c4 100644 --- a/src/LimaScripting/LimaScripting.i +++ b/src/LimaScripting/LimaScripting.i @@ -1,12 +1,11 @@ // ATTENTION : selon la plate-forme cible, il faut modifier SWIG_FLAGS de // maniere a redefinir IN_STD. -%title "Interface Python pour Lima", before -%text %{ +/* Du a un bug du generateur de doc de SWIG, les vrais noms des constructeurs sont pour les polygones Triangle et Quadrangle et pour les polyedres, Tetraedre, Prisme, Pyramide, Hexaedre, Heptaedre et Octoedre. -%} +*/ %module Lima %{ //#undef __sun @@ -273,9 +272,9 @@ using namespace Lima; }; // preparation_parametrable }; -%section "Exemples", pre -%text %{ - from Lima import * +/* Exemple en langage python : + + from LimaScripting import * # lecture m = Maillage() m.lire("puits.unv") @@ -302,4 +301,4 @@ using namespace Lima; # sauvegarde m.ecrire("puits.mli") -%} +*/ diff --git a/src/Xlmlima_exe/xlmlima.cpp b/src/Xlmlima_exe/xlmlima.cpp index 10ff955..a388eb9 100644 --- a/src/Xlmlima_exe/xlmlima.cpp +++ b/src/Xlmlima_exe/xlmlima.cpp @@ -23,7 +23,7 @@ int main (int argc, char* argv []) { try { - auto_ptr action; + unique_ptr action; action.reset (XlmLimaFactory::createAction (argc - 1, argv + 1)); if (0 == action.get ( )) throw XlmLimaException ("xlmlima. Erreur interne : absence d'action."); diff --git a/src/python/mesh_infos.py b/src/python/mesh_infos.py new file mode 100644 index 0000000..cef9d76 --- /dev/null +++ b/src/python/mesh_infos.py @@ -0,0 +1,90 @@ +import sys +from LimaScripting import * + +print ("Lima version " + lima_version ( )) + +print ("Affichage du contenu du maillage " + sys.argv [1]) + +m = Maillage ( ) +m.lire (sys.argv [1]) + +# informations +print ("Nombre de noeuds : " + str (m.nb_noeuds ( ))) +print ("Nombre de bras : " + str (m.nb_bras ( ))) +print ("Nombre de polygones : " + str (m.nb_polygones ( ))) +print ("Nombre de polyèdres : " + str (m.nb_polyedres ( ))) +print ("Nombre de nuages : " + str (m.nb_nuages ( ))) +print ("Nombre de lignes : " + str (m.nb_lignes ( ))) +print ("Nombre de surfaces : " + str (m.nb_surfaces ( ))) +print ("Nombre de volumes : " + str (m.nb_volumes ( ))) + +print ("Noeuds :") +for n in range (0, m.nb_noeuds ( )) : + noeud = m.noeud (n) + print (str (noeud.id ( )) + " (" + f"{noeud.x ( ):.3e}, {noeud.y ( ):.3e}, {noeud.z ( ):.3e}" + ")") +print ("Bras :") +for b in range (0, m.nb_bras ( )) : + bras = m.bras (b) + print (str (bras.id ( )) + " (" + str (bras.noeud (0).id ( )) + ", " + str (bras.noeud (1).id ( )) + ")") +print ("Polygones :") +for p in range (0, m.nb_polygones ( )) : + pg = m.polygone (p) + s = str (pg.id ( )) + " (" + for n in range (0, pg.nb_noeuds ( )): + noeud = pg.noeud (n) + if 0 != n: + s += ", " + s += str (noeud.id ( )); + s += ")" + print (s) +print ("Polyedres :") +for p in range (0, m.nb_polyedres ( )) : + pe = m.polyedre (p) + s = str (pe.id ( )) + " (" + for n in range (0, pe.nb_noeuds ( )): + noeud = pe.noeud (n) + if 0 != n: + s += ", " + s += str (noeud.id ( )); + s += ")" + print (s) +print ("Nuages :") +for n in range (0, m.nb_nuages ( )): + nuage = m.nuage_id (n) + s = nuage.nom ( ) + " : "; + for n in range (0, nuage.nb_noeuds ( )): + noeud = nuage.noeud (n) + if 0 != n: + s += ", " + s += str (noeud.id ( )); + print (s) +print ("Lignes :") +for l in range (0, m.nb_lignes ( )): + ligne = m.ligne_id (l) + s = ligne.nom ( ) + " : "; + for b in range (0, ligne.nb_bras ( )): + bras = ligne.bras (b) + if 0 != b: + s += ", " + s += str (bras.id ( )); + print (s) +print ("Surfaces :") +for sf in range (0, m.nb_surfaces ( )): + surface = m.surface_id (sf) + s = surface.nom ( ) + " : "; + for p in range (0, surface.nb_polygones ( )): + polygone = surface.polygone (p) + if 0 != p: + s += ", " + s += str (polygone.id ( )); + print (s) +print ("Volumes :") +for v in range (0, m.nb_volumes ( )): + volume = m.volume_id (v) + s = volume.nom ( ) + " : "; + for p in range (0, volume.nb_polyedres ( )): + polyedre = volume.polyedre (p) + if 0 != p: + s += ", " + s += str (polyedre.id ( )); + print (s)