]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[EDF30822] : Finalisation of integration of iterative statistics jsr/iterative_stats 16/head
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 27 Aug 2024 12:32:05 +0000 (14:32 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 27 Aug 2024 12:32:34 +0000 (14:32 +0200)
src/CMakeLists.txt
src/PyWrapping/CMakeLists.txt
src/PyWrapping/medcoupling.i
src/PyWrapping/medcoupling_pycode

index 4b5848813e9efc6f39c3261929f87a3977fd3115..14229c770a3a8b09212ed2dcd6f232d3a5146c6e 100644 (file)
@@ -33,12 +33,14 @@ ADD_SUBDIRECTORY(ICoCo)
 
 IF(MEDCOUPLING_ENABLE_PYTHON)
   ADD_SUBDIRECTORY(MEDCoupling_Swig)
-  ADD_SUBDIRECTORY(PyWrapping)
-
+  
   find_package(SalomeBasicIterativeStatistics)
   if( BASICITERATIVESTATISTICS_FOUND )
-    add_subdirectory(Stat)
+  add_subdirectory(Stat)
   endif( BASICITERATIVESTATISTICS_FOUND )
+
+  ADD_SUBDIRECTORY(PyWrapping)
+  
 ENDIF(MEDCOUPLING_ENABLE_PYTHON)
 
 IF(NOT MEDCOUPLING_MICROMED)
index 43340d0959f30d9ca131152d89d00faddeecf72c..642ce08f51c6f8bc77d071665661422ecf0db9d0 100644 (file)
@@ -95,6 +95,10 @@ IF(MEDCOUPLING_USE_MPI)
   LIST(APPEND medcoupling_LIB_dependancies paramedmem)
 ENDIF(MEDCOUPLING_USE_MPI)
 
+if(BASICITERATIVESTATISTICS_FOUND)
+  LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_ITERATIVE_STATISTICS)
+endif(BASICITERATIVESTATISTICS_FOUND)
+
 IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")     
   SWIG_ADD_MODULE(medcoupling python medcoupling.i)
 ELSE()
index 06c12759c2618b16f28ec6498f65dbc2e2de92b8..4e9436cae932de2abd4f811921715431892c67c4 100644 (file)
@@ -57,8 +57,9 @@
   static const char RENUM_EXT[]="Renumberer";
   static const char PART_EXT[]="Partitioner";
   static const char PAR_INTERPOL_EXT[]="Parallel interpolator (SPMD paradigm)";
+  static const char IT_STATS_EXT[] = "Iterative statistics";
   
-  static const char *EXTENSIONS[]={SEQ_INTERPOL_EXT,MEDFILEIO_EXT,RENUM_EXT,PART_EXT,PAR_INTERPOL_EXT};
+  static const char *EXTENSIONS[]={SEQ_INTERPOL_EXT,MEDFILEIO_EXT,RENUM_EXT,PART_EXT,PAR_INTERPOL_EXT,IT_STATS_EXT};
   static const int NB_OF_EXTENSIONS=sizeof(EXTENSIONS)/sizeof(const char *);
 %}
 
 #endif
 #ifdef WITH_PARALLEL_INTERPOLATOR
     ret.push_back(std::string(PAR_INTERPOL_EXT));
+#endif
+#ifdef WITH_ITERATIVE_STATISTICS
+    ret.push_back(std::string(IT_STATS_EXT));
 #endif
     return ret;
   }
index be8527b8eda2004f0a3f9da30b0b782291f21301..728e536d5740571deb9fd9d9624a14458583c081 100644 (file)
@@ -53,14 +53,6 @@ def AdvancedExtensionsStr(sz=60):
             SubExtension(MEDPartitioner.AllAlgorithms(),MEDPartitioner.AvailableAlgorithms(),pad,tab, sts)
             pass
         pass
-
-    try:
-        import iterative_stats
-        isOK = 1
-    except ImportError:
-        isOk = 0
-    sts.append(f"Iterative statistics {tab[isOK].rjust(3):.>{sz-21}}")
-
     return "\n".join(sts)
 
 def ShowAdvancedExtensions(sz=60):