endif(CDMATH_WITH_PETSC)
if (CDMATH_WITH_PYTHON)
- SET(TESTS_PYTHON_PATH ${CMAKE_BINARY_DIR}/CDMATH/swig:${CMAKE_BINARY_DIR}/CDMATH/postprocessing:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${PARAVIEW_ROOT_DIR}/lib/:${PARAVIEW_ROOT_DIR}/lib/python3.6/site-packages/:${PARAVIEW_ROOT_DIR}/lib/python3.6/site-packages/vtkmodules/:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PYQT5_ROOT_DIR}:${PYQT5_ROOT_DIR}/lib/python3.6/site-packages:${PYTHONPATH} )
+ 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:${PV_PYTHON_DIR} )
endif(CDMATH_WITH_PYTHON)
TARGET_LINK_LIBRARIES(TestCDMATH TestMesh base mesh ${CPPUNIT_LIBS} ${_extra_lib_TESTS})
if (CDMATH_WITH_PYTHON )
ADD_TEST(ExampleBurgersEquation_1DFV_shock_formation ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DBurgersEquation_shock_formation.py )
+ SET_PROPERTY(TEST ExampleBurgersEquation_1DFV_shock_formation PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleBurgersEquation_1DFV_shock_formation APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
+
ADD_TEST(ExampleBurgersEquation_1DFV_rarefaction_wave ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DBurgersEquation_rarefaction_wave.py )
+ SET_PROPERTY(TEST ExampleBurgersEquation_1DFV_rarefaction_wave PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleBurgersEquation_1DFV_rarefaction_wave APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
endif (CDMATH_WITH_PYTHON )
SET(CFL 0.99 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleHeatEquation_1DFV_Explicit_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/HeatEquation1DExplicit.py ${NX} ${CFL})
+ SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Explicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Explicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
SET(CFL 2 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleHeatEquation_1DFV_Explicit_CFL2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/HeatEquation1DExplicit.py ${NX} ${CFL})
+ SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Explicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleHeatEquation_1DFV_Explicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
endif (CDMATH_WITH_PYTHON )
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
SET(CFL 0.99 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredExplicit.py ${NX} ${CFL} ${SMOOTHNESS} )
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
- SET(CFL 0.5 )#Courant Friedrichs Lewy number
+ SET(CFL 0.5 )#Courant Friedrichs Lewy number
+
+ ADD_TEST(ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL0.5 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredExplicit.py ${NX} ${CFL} ${SMOOTHNESS} )
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL0.5 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL0.5 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
- ADD_TEST(ExampleTransportEquation_1DFV_CenteredExplicit_Stiff_CFL0.5 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredExplicit.py ${NX} ${CFL} ${SMOOTHNESS} )
SET(SMOOTHNESS 1 )
SET(CFL 0.99 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleTransportEquation_1DFV_CenteredExplicit_Smooth_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredExplicit.py ${NX} ${CFL} ${SMOOTHNESS} )
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Smooth_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Smooth_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
SET(CFL 0.5 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleTransportEquation_1DFV_CenteredExplicit_Smooth_CFL0.5 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationCenteredExplicit.py ${NX} ${CFL} ${SMOOTHNESS} )
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Smooth_CFL0.5 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_CenteredExplicit_Smooth_CFL0.5 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
endif (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:${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}:${Python_ROOT_DIR}/lib")
- 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}:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PV_PYTHON_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${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:${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}:${Python_ROOT_DIR}/lib")
- 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}:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PV_PYTHON_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Centered_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
endif (CDMATH_WITH_PYTHON )
SET(CFL 0.9999 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Explicit_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindExplicit.py ${NX} ${CFL})
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Explicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Explicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
SET(CFL 0.5 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Explicit_CFL0.5 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindExplicit.py ${NX} ${CFL})
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Explicit_CFL0.5 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Explicit_CFL0.5 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
SET(CFL 2 )#Courant Friedrichs Lewy number
ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Explicit_CFL2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindExplicit.py ${NX} ${CFL})
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Explicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Explicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
endif (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:${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}:${Python_ROOT_DIR}/lib")
- 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}:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PV_PYTHON_DIR}")
-
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${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:${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}:${Python_ROOT_DIR}/lib")
- 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}:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PV_PYTHON_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${TESTS_LIBRARY_PATH}:${PV_LIB_DIR}")
+ SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${TESTS_PYTHON_PATH}:${PV_PYTHON_DIR}")
endif (CDMATH_WITH_PYTHON )
include(ExternalProject)#For PETSc, MED and MEDCoupling
-set(Python_ROOT_DIR $ENV{PYTHON_ROOT_DIR} )
-set(PYQT5_ROOT_DIR $ENV{PYQT5_ROOT_DIR} )
-set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} )
-set(MATPLOTLIB_ROOT_DIR $ENV{MATPLOTLIB_ROOT_DIR} )
-set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} )
-
######################################################
# Detection or compilation of PETSc+SLEPc+HDF5 #
######################################################
####################
# Paraview variables to choose python version and for env_SOLVERLAB.sh
+if ( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR})
+ if ( DEFINED PARAVIEW_ROOT_DIR )
+ set( PARAVIEW_INCLUDE_DIR ${PARAVIEW_ROOT_DIR}/include)
+ set( PARAVIEW_LIBRARIES_DIR ${PARAVIEW_ROOT_DIR}/lib)
+ else( DEFINED PARAVIEW_ROOT_DIR )
+ set( PARAVIEW_INCLUDE_DIR $ENV{PARAVIEW_ROOT_DIR}/include)
+ set( PARAVIEW_LIBRARIES_DIR $ENV{PARAVIEW_ROOT_DIR}/lib)
+ endif( DEFINED PARAVIEW_ROOT_DIR )
+else( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR})
+ message(STATUS "PARAVIEW_ROOT_DIR not set. Trying to detect paraview.")
+ set( PARAVIEW_INCLUDE_DIR /usr/include/paraview/)
+ set( PARAVIEW_LIBRARIES_DIR /usr/lib/paraview/:/usr/lib64/paraview/:/usr/lib64/vtk/:/usr/lib/vtk/)
+endif( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR})
+
if ( DEFINED PARAVIEW_VERSION OR DEFINED ENV{PARAVIEW_VERSION} )
if ( NOT DEFINED PARAVIEW_VERSION )
set( PARAVIEW_VERSION $ENV{PARAVIEW_VERSION})
endif( NOT DEFINED PARAVIEW_VERSION )
message(STATUS "ParaView version is ${PARAVIEW_VERSION}" )
else( DEFINED PARAVIEW_VERSION OR DEFINED ENV{PARAVIEW_VERSION} )
- if ( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR})
- if ( DEFINED PARAVIEW_ROOT_DIR )
- set( PARAVIEW_INCLUDE_DIR ${PARAVIEW_ROOT_DIR}/include)
- set( PARAVIEW_LIBRARIES_DIR ${PARAVIEW_ROOT_DIR}/lib)
- else( DEFINED PARAVIEW_ROOT_DIR )
- set( PARAVIEW_INCLUDE_DIR $ENV{PARAVIEW_ROOT_DIR}/include)
- set( PARAVIEW_LIBRARIES_DIR $ENV{PARAVIEW_ROOT_DIR}/lib)
- endif( DEFINED PARAVIEW_ROOT_DIR )
- else( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR})
- message(STATUS "PARAVIEW_VERSION and PARAVIEW_ROOT_DIR not set. Trying to detect paraview.")
- set( PARAVIEW_INCLUDE_DIR /usr/include/paraview/)
- set( PARAVIEW_LIBRARIES_DIR /usr/lib/paraview/:/usr/lib64/paraview/:/usr/lib64/vtk/:/usr/lib/vtk/)
- endif( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR})
-
set( PARAVIEW_SUFFIXES paraview-5.0 paraview-5.1 paraview-5.2 paraview-5.3 paraview-5.4 paraview-5.5 paraview-5.6 paraview-5.7 paraview-5.8 paraview-5.9 )
find_file( vtkConfig_file vtkPVConfig.h HINTS ${PARAVIEW_INCLUDE_DIR} PATH_SUFFIXES ${PARAVIEW_SUFFIXES})
set(Python_VERSION_MINOR ${PYTHON_VERSION_MINOR})
ENDIF(${CMAKE_VERSION} VERSION_GREATER "3.12.0")
+IF ( PYTHON_ROOT_DIR OR ENV{PYTHON_ROOT_DIR})
+ IF ( PYTHON_ROOT_DIR )
+ set(PYQT5_ROOT_DIR ${PYQT5_ROOT_DIR} )
+ ELSE( PYTHON_ROOT_DIR })
+ set(PYQT5_ROOT_DIR $ENV{PYQT5_ROOT_DIR} )
+ ENDIF( PYTHON_ROOT_DIR })
+ENDIF(PYTHON_ROOT_DIR OR ENV{PYTHON_ROOT_DIR})
+set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} )
+set(MATPLOTLIB_ROOT_DIR $ENV{MATPLOTLIB_ROOT_DIR} )
+set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} )
+
+
#Paraview library paths
-set (PV_LIB_DIR /usr/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages/paraview/:/usr/lib64/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtk/:${PARAVIEW_LIBRARIES_DIR})
-set (PV_PYTHON_DIR /usr/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages/paraview/:/usr/lib64/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtk/:/usr/lib64/paraview/site-packages/:/usr/lib64/paraview/site-packages/paraview/:/usr/lib64/paraview/site-packages/vtk/:/usr/lib64/paraview/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/:/usr/lib64/paraview/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/paraview/:/usr/lib64/paraview/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtkmodules:/usr/lib/paraview/site-packages/paraview:/usr/lib/paraview/site-packages/paraview/vtk:${PARAVIEW_LIBRARIES_DIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtkmodules/)
+set (PV_LIB_DIR /usr/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages/paraview/:/usr/lib64/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtk/:${MATPLOTLIB_ROOT_DIR}/lib/:${PARAVIEW_LIBRARIES_DIR})
+set (PV_PYTHON_DIR /usr/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages/paraview/:/usr/lib64/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtk/:/usr/lib64/paraview/site-packages/:/usr/lib64/paraview/site-packages/paraview/:/usr/lib64/paraview/site-packages/vtk/:/usr/lib64/paraview/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/:/usr/lib64/paraview/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/paraview/:/usr/lib64/paraview/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtkmodules:/usr/lib/paraview/site-packages/paraview:/usr/lib/paraview/site-packages/paraview/vtk:${PARAVIEW_ROOT_DIR}/lib/:${PARAVIEW_ROOT_DIR}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/:${PARAVIEW_ROOT_DIR}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/vtkmodules/:${MATPLOTLIB_ROOT_DIR}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages:${PYQT5_ROOT_DIR}:${PYQT5_ROOT_DIR}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
message(STATUS "Python version found is ${Python_VERSION}")
find_package (SWIG 3.0 REQUIRED)