]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Corrected environment files and enabled testing
authorMichael NDJINGA <ndjinga@is228684.intra.cea.fr>
Mon, 14 Sep 2020 12:49:59 +0000 (14:49 +0200)
committerMichael NDJINGA <ndjinga@is228684.intra.cea.fr>
Mon, 14 Sep 2020 12:49:59 +0000 (14:49 +0200)
18 files changed:
CDMATH/base/inc/GenericMatrix.hxx
CDMATH/base/src/GenericMatrix.cxx [changed mode: 0644->0755]
CDMATH/mesh/inc/Field.hxx
CDMATH/mesh/src/Field.cxx
CDMATH/postprocessing/VTK_routines.py
CDMATH/tests/CMakeLists.txt
CDMATH/tests/cdmath/CMakeLists.txt
CDMATH/tests/examples/HeatEquation1DImplicit/CMakeLists.txt [changed mode: 0644->0755]
CDMATH/tests/examples/Poisson1DEF/FiniteElements1DPoisson.py
CDMATH/tests/examples/Poisson1DVF/FiniteVolumes1DPoisson.py
CDMATH/tests/examples/TransportEquation/TransportEquationUpwind.py
CDMATH/tests/examples/TransportEquation1DCenteredExplicit/1DTransportEquationCenteredExplicit.py
CDMATH/tests/examples/TransportEquation1DCenteredImplicit/CMakeLists.txt [changed mode: 0644->0755]
CDMATH/tests/examples/TransportEquation1DUpwindImplicit/CMakeLists.txt [changed mode: 0644->0755]
CDMATH/tests/swig/CMakeLists.txt
CMakeLists.txt
CoreFlows/env_CoreFlows.sh
env_SOLVERLAB.sh

index 3cf2231a2855bd8722627ba18fc2fab6faf1a730..77735d51a685aba22b127ad264ddfbe589e8e3a6 100755 (executable)
@@ -53,6 +53,10 @@ class GenericMatrix
 
     virtual double operator ()( int i, int j ) const = 0;
 
+    double max() const;
+
+    double min() const;
+
     virtual bool isSymmetric(double tol=1e-6) const ;
 
     bool isSquare() const ;
old mode 100644 (file)
new mode 100755 (executable)
index f9e15be..0d2f5eb
@@ -98,6 +98,21 @@ GenericMatrix::coefficient(int index) const
        return (-1);
 }
 
+
+double 
+GenericMatrix::max() const
+{
+    return _values.max();
+}
+
+
+double 
+GenericMatrix::min() const
+{
+    return _values.max();      
+}
+
+
 void
 GenericMatrix::view() const
 {
index 752f15ca31ed2ed443c05ddfc90f46a1dc191843..4323fe0594373942134333546d86e83b04f60890 100755 (executable)
@@ -243,7 +243,7 @@ class Field
 
     void setFieldByDataArrayDouble ( const MEDCoupling::DataArrayDouble* array );
 
-    DoubleTab getNormEuclidean( void ) const ;
+    Vector getNormEuclidean( void ) const ;
 
     double max( int component=0 ) const ;
 
index 64044f634f34169ed5982786d9a7bc8ba035cdef..699285d0faab1fbb84ec51cbeb450ce5df66272e 100755 (executable)
@@ -401,18 +401,21 @@ Field::readFieldMed( const std::string & fileNameRadical,
 }
 
 
-DoubleTab
+Vector
 Field::getNormEuclidean() const
 {
-       DoubleTab norm(getNumberOfElements(),_field->magnitude()->getArray()->getConstPointer());
-       return norm;
+       Vector result(_numberOfComponents);
+       DoubleTab norm(_numberOfComponents,_field->magnitude()->getArray()->getConstPointer());
+       result.setValues(norm);
+       
+       return result;
 }
 
 double
 Field::max(int component) const
 {
-       if( component >= getNumberOfComponents() )
-               throw CdmathException("double Field::max() : component number should be smaller than field number of components");
+       if( component >= getNumberOfComponents() || component < 0)
+               throw CdmathException("double Field::max() : component number should be between 0 and the field number of components");
                
        double result=-1e100;
        for(int i=0; i<getNumberOfElements() ; i++)
@@ -425,8 +428,8 @@ Field::max(int component) const
 double
 Field::min(int component) const
 {
-       if( component >= getNumberOfComponents() )
-               throw CdmathException("double Field::min() : component number should be smaller than field number of components");
+       if( component >= getNumberOfComponents() || component < 0)
+               throw CdmathException("double Field::min() : component number should be between 0 and the field number of components");
                
        double result=1e100;
        for(int i=0; i<getNumberOfElements() ; i++)
@@ -545,14 +548,12 @@ Field::normMax ( ) const
 //----------------------------------------------------------------------
 {
        int nbComp=_field->getNumberOfComponents();
-       int nbElems=getNumberOfElements();
-
-       Vector result(nbComp);//Vector containing the Linfinity norm of each component
+       double res[nbComp];//Pointer containing the L2 norm of each component
+       _field->normMax(res);
+       Vector result(nbComp);//Vector containing the L2 norm of each component
 
-       for(int i=0; i<nbElems ; i++)
-        for(int j=0; j<nbComp ; j++)
-            if(fabs((*this)(i,j))>result(j))
-                result(j)=fabs((*this)(i,j));
+       for(int i=0; i<nbComp ; i++)
+               result(i)=res[i];
 
        return result;
 }
index 702278963e66555002ae7bdb16e7aaf6636c0cde..67bbfe789e7567b446c3989b87bcef5e89353915 100755 (executable)
@@ -37,11 +37,12 @@ def Extract_VTK_data_over_line_to_txt_file(inputFileName, outputFileName, point1
 def Extract_field_data_over_line_to_numpyArray(field, point1, point2, resolution):
 
     inputFileName = field.getName()#os.getcwd()+field.get_name()
-    field.writeVTK(inputFileName)
+    inputFileName_removeSpaces=inputFileName.replace(" ", "")
+    field.writeVTK(inputFileName_removeSpaces)
 
-    numpy_array = Extract_VTK_data_over_line_to_numpyArray(inputFileName+"_1.vtu", point1, point2, resolution)
+    numpy_array = Extract_VTK_data_over_line_to_numpyArray(inputFileName_removeSpaces+"_0.vtu", point1, point2, resolution)
 
-    os.remove(inputFileName+"_1.vtu")
+    os.remove(inputFileName_removeSpaces+"_0.vtu")
     return numpy_array
 
 def Extract_field_data_over_line_to_txt_file(field, point1, point2, resolution, outputFileName):
@@ -62,7 +63,7 @@ def Slice_VTK_data_to_numpyArray(inputFileName,
     plane.SetOrigin(point)
     plane.SetNormal(normal)
 
-    cutter = vtk.vtkFiltersCorePython.vtkCutter()
+    cutter = vtk.vtkCutter()
     cutter.SetCutFunction(plane)
     cutter.SetInputConnection(reader.GetOutputPort())
     cutter.Update()
@@ -89,9 +90,9 @@ def Slice_field_data_to_numpyArray(field,
     inputFileName = field.getName()
     field.writeVTK(inputFileName)
  
-    numpy_array = Slice_VTK_data_to_numpyArray(inputFileName+"_1.vtu", point, normal, resolution)
+    numpy_array = Slice_VTK_data_to_numpyArray(inputFileName+"_0.vtu", point, normal, resolution)
 
-    os.remove(inputFileName+"_1.vtu")
+    os.remove(inputFileName+"_0.vtu")
     return numpy_array
 
 def Slice_field_data_to_txt_file(field, outputFileName,
@@ -114,7 +115,7 @@ def Slice_VTK_data_to_VTK(inputFileName,
     plane.SetOrigin(point)
     plane.SetNormal(normal)
 
-    cutter = vtk.vtkFiltersCorePython.vtkCutter()
+    cutter = vtk.vtkCutter()
     cutter.SetCutFunction(plane)
     cutter.SetInputConnection(reader.GetOutputPort())
     cutter.Update()
index cef0ca5f3de12f4881b21bcb7dd29c6fe66bef6b..948ca669ea53de29735d5489a2e8f20dc55c2b6e 100755 (executable)
@@ -24,15 +24,15 @@ IF (CDMATH_WITH_TESTS)
         )
       SET(_extra_lib_TESTS linearsolver ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
       SET_TARGET_PROPERTIES(TestCDMATH PROPERTIES COMPILE_FLAGS -DCDMATH_WITH_PETSC)
-      SET(TESTS_LIBRARY_PATH ${CMAKE_BINARY_DIR}/base/lib:${CMAKE_BINARY_DIR}/mesh/lib:${CMAKE_BINARY_DIR}/linearsolver/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT}/lib ) 
+      SET(TESTS_LIBRARY_PATH ${CMAKE_BINARY_DIR}/CDMATH/base/lib:${CMAKE_BINARY_DIR}/CDMATH/mesh/lib:${CMAKE_BINARY_DIR}/CDMATH/linearsolver/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT}/lib ) 
   else (CDMATH_WITH_PETSC)
       SET(_extra_lib_TESTS)
       SET_TARGET_PROPERTIES(TestCDMATH PROPERTIES COMPILE_FLAGS "")
-      SET(TESTS_LIBRARY_PATH ${CMAKE_BINARY_DIR}/base/lib:${CMAKE_BINARY_DIR}/mesh/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT}/lib ) 
+      SET(TESTS_LIBRARY_PATH ${CMAKE_BINARY_DIR}/CDMATH/base/lib:${CMAKE_BINARY_DIR}/CDMATH/mesh/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT}/lib ) 
   endif(CDMATH_WITH_PETSC)
 
   if   (CDMATH_WITH_PYTHON)
-    SET(TESTS_PYTHON_PATH ${CMAKE_BINARY_DIR}/swig:${CMAKE_BINARY_DIR}/postprocessing ) 
+    SET(TESTS_PYTHON_PATH ${CMAKE_BINARY_DIR}/CDMATH/swig:${CMAKE_BINARY_DIR}/CDMATH/postprocessing:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med ) 
   endif(CDMATH_WITH_PYTHON)
 
   TARGET_LINK_LIBRARIES(TestCDMATH TestMesh base mesh ${CPPUNIT_LIBS} ${_extra_lib_TESTS})
@@ -52,7 +52,6 @@ ENDIF (CDMATH_WITH_TESTS)
 ADD_SUBDIRECTORY(ressources)
 
 FILE(COPY doc/ DESTINATION share/doc/)
-INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/convergence_tests DESTINATION share/validation)
 
 if (CDMATH_WITH_PYTHON AND CDMATH_WITH_PETSC AND CDMATH_WITH_POSTPRO)
   # Examples tests
index b20f14e32b10c69564f185322cb01068caa7c089..dcb4556f4ee366d4a7ed562038ddb43a13d0e573 100755 (executable)
@@ -20,7 +20,7 @@ SET(MESH_MED
   ../ressources/meshCube.med
        )
 
-file(COPY ${MESH_MED} DESTINATION ${CMAKE_BINARY_DIR}/tests) 
+file(COPY ${MESH_MED} DESTINATION ${CMAKE_BINARY_DIR}/CDMATH/tests) 
 
 if (CDMATH_WITH_PETSC)
     FILE(GLOB TestMesh_SOURCES . *.cxx)
old mode 100644 (file)
new mode 100755 (executable)
index 8cb62c1..dbc53ab
@@ -6,13 +6,13 @@ if (CDMATH_WITH_PYTHON )
     SET(CFL  1  )#Courant Friedrichs Lewy number
 
     ADD_TEST(ExampleHeatEquation_1DFV_Implicit_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/HeatEquation1DImplicit.py ${NX} ${CFL})
-    SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
+    SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
     SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
 
     SET(CFL  2  )#Courant Friedrichs Lewy number
 
     ADD_TEST(ExampleHeatEquation_1DFV_Implicit_CFL2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/HeatEquation1DImplicit.py ${NX} ${CFL})
-    SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
+    SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
     SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
 
 endif (CDMATH_WITH_PYTHON )
index 8e8286efe8b0aa588e2ed8385be2dc2b3043758f..d0cdae67030b47aa3ae66d7db171423945144642 100755 (executable)
@@ -97,7 +97,7 @@ for i in range(nbCells):
                        #Ajout de la contribution de la cellule i au second membre du noeud j 
                        RHS[j_int]=Ci.getMeasure()/2*my_RHSfield[j]+RHS[j_int] # intégrale sur le segment du produit f x fonction de base
                        #Contribution de la cellule i à la ligne j_int du système linéaire
-                       for k in [nodeId0,nodeId1] : 
+                       for k in [nodeId0,nodeId1] : 
                                if boundaryNodes.count(k)==0 : #seuls les noeuds intérieurs contribuent à la matrice du système linéaire
                                        k_int=interiorNodes.index(k)#indice du noeud k en tant que noeud intérieur
                                        Rigidite.addValue(j_int,k_int,GradShapeFuncs[j]*GradShapeFuncs[k]/Ci.getMeasure())
@@ -139,7 +139,7 @@ plt.legend()
 plt.xlabel('Position')
 plt.ylabel('Value')
 plt.title('1D finite elements \n for Laplace operator')
-plt.savefig("FiniteElements1DPoisson_ResultField_"+str(nbNodes) + '_nodes'+".png")
+plt.savefig('FiniteElements1DPoisson_ResultField_'+str(nbNodes) + '_nodes'+'.png')
 
 print("Numerical solution of the 1D Poisson equation using finite elements done")
 
index db077ed92445548622ac5ca72965d38863671fe8..8143b5cd433affc8e701ad3ca7c3c8656ac254ea 100755 (executable)
@@ -69,7 +69,7 @@ for i in range(nbCells):
                        Ck=my_mesh.getCell(k)
                        distance=Ci.getBarryCenter().distance(Ck.getBarryCenter())
                        coeff=Fj.getMeasure()/Ci.getMeasure()/distance
-                       Rigidite.setValue(i,k,-coeff) # terme extradiagonal
+                       Rigidite.addValue(i,k,-coeff) # terme extradiagonal
                else:
                        coeff=Fj.getMeasure()/Ci.getMeasure()/Ci.getBarryCenter().distance(Fj.getBarryCenter())
                        #For the particular case where the mesh boundary does not coincide with the domain boundary
index b534a9c8a2f9b64cc06af2f69f4da724a1e7807e..7047c70348bd15ca85ebeb1613b05186cf61185a 100755 (executable)
@@ -196,7 +196,7 @@ def TransportEquationVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolu
         if(test_bc=="Periodic"):
             print( "Mass loss: ", (total_mass_initial-unknown_field.integral()).norm(), " precision required= ", precision )
             assert (total_mass_initial-unknown_field.integral()).norm()<precision
-        print "------------------------------------------------------------------------------------"
+        print( "------------------------------------------------------------------------------------")
 
         unknown_field.setTime(time,0);
         unknown_field.writeVTK("TransportEquation"+str(dim)+"DUpwind"+meshName+"_Stat");
@@ -209,7 +209,7 @@ def TransportEquationVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolu
         #Postprocessing : save 2D picture
         PV_routines.Save_PV_data_to_picture_file("TransportEquation"+str(dim)+"DUpwind"+meshName+"_Stat"+'_0.vtu',"unknown",'CELLS',"TransportEquation"+str(dim)+"DUpwind"+meshName+"_Stat")
         
-        return nbCells, time, it, unknown_field.getNormEuclidean().max(), diag_data_u
+        return nbCells, time, it, unknown_field.getNormEuclidean().max(), diag_data_u        
     else:
         print( "Temps maximum Tmax= ", tmax, " atteint" )
         raise ValueError("Maximum time reached : Stationary state not found !!!!!!!")
index 2b3ff9cf7541eb3f1179e090517d54b870574026..9b4336e2221287b16765e7874c08f9ce0b5269e6 100755 (executable)
@@ -95,12 +95,11 @@ def Transport1DCenteredExplicit(nx,cfl, isSmooth):
 
     print( "Exact solution minimum   : ", min(u_initial), "Numerical solution minimum   : ",  min(u) )
     print( "Exact solution maximum   : ", max(u_initial), "Numerical solution maximum   : ",  max(u) )
-    print( "Exact solution variation : ", np.sum([abs(u_initial[i] - u_initial[(i-1)%nx]) for i in range(nx)]), "Numerical solution variation : ",  np.sum([abs(u[i] - u[(i-1)%nx]) for i in range(nx)]) )
-    print( "l1 numerical error       : ", dx*np.sum([abs(u[i] - u_initial[i]) for i in range(nx)])        
-    
+    print( "Exact solution variation : ",    np.sum([abs(u_initial[i] - u_initial[(i-1)%nx]) for i in range(nx)]), "Numerical solution variation : ",  np.sum([abs(u[i] - u[(i-1)%nx]) for i in range(nx)]) )
+    print( "l1 numerical error       : ", dx*np.sum([abs(u[i]         - u_initial[i]       ) for i in range(nx)]))
+
     print( "Simulation of 1D transport equation with explicit centered scheme done" )
-    
-    #return min, max, total variation and l1 error
+
     return min(u), max(u), np.sum([abs(u[i] - u[(i-1)%nx]) for i in range(nx)]), dx*np.sum([abs(u[i] - u_initial[i]) for i in range(nx)])
 
 
old mode 100644 (file)
new mode 100755 (executable)
index ba5dd66..f80d93d
@@ -6,14 +6,14 @@ if (CDMATH_WITH_PYTHON )
     SET(CFL  1  )#Courant Friedrichs Lewy number
 
     ADD_TEST(ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredImplicit.py ${NX} ${CFL})
-    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
-    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
+    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
+    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
 
     SET(CFL  2  )#Courant Friedrichs Lewy number
 
     ADD_TEST(ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredImplicit.py ${NX} ${CFL})
-    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
-    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
+    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
+    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
 
 
 endif (CDMATH_WITH_PYTHON )
old mode 100644 (file)
new mode 100755 (executable)
index 9e409de..d85f8c2
@@ -6,13 +6,13 @@ if (CDMATH_WITH_PYTHON )
     SET(CFL  1  )#Courant Friedrichs Lewy number
 
     ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindImplicit.py ${NX} ${CFL})
-    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
+    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
     SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
 
     SET(CFL  2  )#Courant Friedrichs Lewy number
 
     ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindImplicit.py ${NX} ${CFL})
-    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
+    SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}")
     SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}")
 
 
index 64126c4ec2a80eaeed691b624fc6520cfd7d65be..15b064f3a1774b568c9d23ff6a447b437140c6a2 100755 (executable)
@@ -5,7 +5,7 @@ SET(MESH_MED
   ../ressources/meshCube.med
   )
 
-file(COPY ${MESH_MED} DESTINATION ${CMAKE_BINARY_DIR}/tests/swig)
+file(COPY ${MESH_MED} DESTINATION ${CMAKE_BINARY_DIR}/CDMATH/tests/swig)
 ADD_TEST(TestsCDMATHSwig ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mainTests.py)
 
 if (CDMATH_WITH_PETSC)
index 7badf23caffb476081447afb2b715eb0ad0a145d..909b4f7aaa2cd4d8d846a792e5747fdfe4f6fa0d 100644 (file)
@@ -212,7 +212,7 @@ include(ExternalProject)#For PETSc, MED and MEDCoupling
     add_definitions(-DPETSC_VERSION_GREATER_3_5)
   endif( ${PETSC_VERSION} VERSION_GREATER 3.5 )
 
-string(REPLACE ";" ":"  PETSC_INCLUDES_INSTALL "${PETSC_INCLUDES}")# use colon instead of semicolon in environment file env_CDMATH.sh
+string(REPLACE ";" ":"  PETSC_INCLUDES_INSTALL "${PETSC_INCLUDES}")# use colon instead of semicolon in environment file env_SOLVERLAB.sh
 
 add_library(petsc   SHARED IMPORTED)
 set_property(TARGET petsc  PROPERTY IMPORTED_LOCATION ${PETSC_LIBRARIES})
@@ -357,7 +357,7 @@ if( NOT DEFINED PARAVIEW_VERSION )
     set( PARAVIEW_LIBRARIES_DIR ${PARAVIEW_ROOT_DIR}/lib)
   else( DEFINED PARAVIEW_ROOT_DIR)
     set( PARAVIEW_INCLUDE_DIR /usr/include/paraview/)
-    set( PARAVIEW_LIBRARIES_DIR /usr/lib/paraview/:/usr/lib64/paraview/)
+    set( PARAVIEW_LIBRARIES_DIR /usr/lib/paraview/:/usr/lib64/paraview/:/usr/lib64/vtk/:/usr/lib/vtk/)
   endif( DEFINED PARAVIEW_ROOT_DIR)
 
   #extraction of the paraview version"
@@ -385,8 +385,8 @@ ELSE ( ${PARAVIEW_VERSION} STRGREATER "5.6" OR ${PARAVIEW_VERSION} STREQUAL "5.6
   SET(PYTHON2OR3 "2")
 ENDIF( ${PARAVIEW_VERSION} STRGREATER "5.6" OR ${PARAVIEW_VERSION} STREQUAL "5.6" )
 
-    set (PV_LIB_DIR    /usr/lib/python${PYTHON2OR3}.7/dist-packages/paraview/:${PARAVIEW_LIBRARIES_DIR})
-    set (PV_PYTHON_DIR /usr/lib/python${PYTHON2OR3}.7/dist-packages/paraview/:/usr/lib64/paraview/site-packages/:/usr/lib64/paraview/site-packages/paraview/:/usr/lib64/paraview/site-packages/vtk/:/usr/lib64/paraview/python${PYTHON2OR3}.7/site-packages/:/usr/lib64/paraview/python${PYTHON2OR3}.7/site-packages/paraview/:/usr/lib64/paraview/python${PYTHON2OR3}.7/site-packages/vtkmodules:/usr/lib/paraview/site-packages/paraview:/usr/lib/paraview/site-packages/paraview/vtk)
+    set (PV_LIB_DIR    /usr/lib/python${PYTHON2OR3}.7/dist-packages/paraview/:/usr/lib64/python${PYTHON2OR3}.7/site-packages/vtk/:${PARAVIEW_LIBRARIES_DIR})
+    set (PV_PYTHON_DIR /usr/lib/python${PYTHON2OR3}.7/dist-packages/paraview/:/usr/lib64/python${PYTHON2OR3}.7/site-packages/vtk/:/usr/lib64/paraview/site-packages/:/usr/lib64/paraview/site-packages/paraview/:/usr/lib64/paraview/site-packages/vtk/:/usr/lib64/paraview/python${PYTHON2OR3}.7/site-packages/:/usr/lib64/paraview/python${PYTHON2OR3}.7/site-packages/paraview/:/usr/lib64/paraview/python${PYTHON2OR3}.7/site-packages/vtkmodules:/usr/lib/paraview/site-packages/paraview:/usr/lib/paraview/site-packages/paraview/vtk)
 
 # Find python
 IF   (${CMAKE_VERSION} VERSION_GREATER "3.12.0")
@@ -412,6 +412,7 @@ if (SOLVERLAB_WITH_DOCUMENTATION)
   endif(NOT DOXYGEN_FOUND)
 endif()                        
 if (SOLVERLAB_WITH_TESTS)                                                                                  #
+  enable_testing ()
   find_package (CPPUNIT REQUIRED)
 endif()                        
 find_package (XDR REQUIRED)
index 82d48d00c4a37a1bd80e25fe7454c60c85aca1c5..19cb5d50944adafe7b1a86f662cf6747daf472c2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 export CDMATH_DIR=@CDMATH_INSTALL@
-source $CDMATH_DIR/env_CDMATH.sh
+source ${CMAKE_INSTALL_PREFIX}/env_SOLVERLAB.sh
 
 export CoreFlows_INSTALL=@CMAKE_INSTALL_PREFIX@
 export PETSC_DIR=@PETSC_DIR@
index b044bcb8879ede7461a8dfc4a3221f5dd4c86c72..d07e23be1bdf173d8befb6479e17288014442d5b 100644 (file)
@@ -17,5 +17,5 @@ export PV_PYTHON_DIR=@PV_PYTHON_DIR@
 
 export COREFLOWS=$COREFLOWS_INSTALL/bin/Executable/COREFLOWSMainExe
 export LD_LIBRARY_PATH=$COREFLOWS_INSTALL/lib:$CDMATH_INSTALL/lib:${PETSC_DIR}/${PETSC_ARCH}/lib:$PETSC_LIBRARIES:${MEDCOUPLING_LIBRARIES}:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:$PV_LIB_DIR:${LD_LIBRARY_PATH}
-export PYTHONPATH=$COREFLOWS_INSTALL/lib:$COREFLOWS_INSTALL/lib/coreflows:$COREFLOWS_INSTALL/bin/coreflows:$COREFLOWS_INSTALL/lib/python2.7/site-packages/salome:$CDMATH_INSTALL/lib/cdmath:$CDMATH_INSTALL/bin/cdmath:$CDMATH_INSTALL/bin/cdmath/postprocessing:$CDMATH_INSTALL/$PV_PYTHON_DIR:${PETSC_DIR}/${PETSC_ARCH}/lib:$PETSC_LIBRARIES:${MEDCOUPLING_LIBRARIES}:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:${PYTHONPATH}
+export PYTHONPATH=$COREFLOWS_INSTALL/lib:$COREFLOWS_INSTALL/lib/coreflows:$COREFLOWS_INSTALL/bin/coreflows:$COREFLOWS_INSTALL/lib/python3.7/site-packages/salome:$CDMATH_INSTALL/lib/cdmath:$CDMATH_INSTALL/bin/cdmath:$CDMATH_INSTALL/bin/cdmath/postprocessing:$CDMATH_INSTALL:$PV_PYTHON_DIR:${PETSC_DIR}/${PETSC_ARCH}/lib:$PETSC_LIBRARIES:${MEDCOUPLING_LIBRARIES}:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:${PYTHONPATH}
 export COREFLOWSGUI=$COREFLOWS_INSTALL/bin/salome/COREFLOWS_Standalone.py