From 9fabb9b002092cd2924bc1450c3c9cc6d91a6f2d Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Wed, 15 Apr 2020 09:42:33 +0100 Subject: [PATCH] paraview: Upgrade to 5.8.0 PVReaders now support compilation against ParaView version 5.7.0 and greater. All references to ParaView versions less than 4.0.0 have been removed. Based on a patch contributed by CFD Support --- .../graphics/PVReaders/Allwclean | 4 +- .../graphics/PVReaders/Allwmake | 80 ++++++++++--------- .../graphics/PVReaders/CMakeLists.txt | 19 +++++ .../PVReaders/PVFoamReader/CMakeLists.txt | 69 ++++++++++------ .../PVReaders/PVFoamReader/paraview.plugin | 7 ++ .../PVReaders/PVFoamReader/vtk/CMakeLists.txt | 17 ++++ .../PVReaders/PVFoamReader/vtk/vtk.module | 6 ++ .../{ => vtk}/vtkPVFoamReader.cxx | 2 +- .../PVFoamReader/{ => vtk}/vtkPVFoamReader.h | 2 +- .../PVblockMeshReader/CMakeLists.txt | 71 ++++++++++------ .../PVblockMeshReader/paraview.plugin | 7 ++ .../PVblockMeshReader/vtk/CMakeLists.txt | 16 ++++ .../PVblockMeshReader/vtk/vtk.module | 6 ++ .../{ => vtk}/vtkPVblockMeshReader.cxx | 2 +- .../{ => vtk}/vtkPVblockMeshReader.h | 2 +- .../graphics/PVReaders/vtkPVFoam/Make/options | 2 +- .../PVReaders/vtkPVblockMesh/Make/options | 2 +- bin/paraFoam | 12 +-- etc/config.csh/paraview | 5 +- etc/config.sh/paraview | 5 +- 20 files changed, 236 insertions(+), 100 deletions(-) create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/paraview.plugin create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/CMakeLists.txt create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtk.module rename applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/{ => vtk}/vtkPVFoamReader.cxx (99%) rename applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/{ => vtk}/vtkPVFoamReader.h (99%) create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/paraview.plugin create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/CMakeLists.txt create mode 100644 applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtk.module rename applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/{ => vtk}/vtkPVblockMeshReader.cxx (99%) rename applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/{ => vtk}/vtkPVblockMeshReader.h (98%) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean index f29fafac7d..350b240819 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean @@ -4,7 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory wclean libso vtkPVblockMesh wclean libso vtkPVFoam -rm -f $FOAM_LIBBIN/libPVblockMeshReader* 2>/dev/null +rm -rf Make + +rm -f $FOAM_LIBBIN/libPVblockMeshReader* 2>/dev/null rm -rf PVblockMeshReader/Make rm -f $FOAM_LIBBIN/libPVFoamReader* 2>/dev/null diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake index 12b4679243..fa12e00b45 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake @@ -4,45 +4,51 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -case "$ParaView_VERSION" in -4* | 5*) - if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] +if [ ! -d "$ParaView_DIR" ] +then + echo " Warning: ParaView not found in $ParaView_DIR. Skipping." + exit 0 +fi + +if [ -z "$PV_PLUGIN_PATH" ] +then + echo " Error: \$PV_PLUGIN_PATH is unset." + exit 1 +fi + +# Ensure CMake gets the correct C/C++ compilers +[ -n "$WM_CC" ] && export CC="$WM_CC" +[ -n "$WM_CXX" ] && export CXX="$WM_CXX" + +wmake $targetType vtkPVblockMesh +wmake $targetType vtkPVFoam + +if [ "$targetType" != "objects" ] +then + if $WM_PROJECT_DIR/bin/tools/foamVersionCompare $ParaView_VERSION ge 5.7.0 then - [ -n "$PV_PLUGIN_PATH" ] || { - echo "$0 : PV_PLUGIN_PATH not valid - it is unset" - exit 1 - } - - # ensure CMake gets the correct C/C++ compilers - [ -n "$WM_CC" ] && export CC="$WM_CC" - [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - - wmake $targetType vtkPVblockMesh - wmake $targetType vtkPVFoam - - if [ "$targetType" != "objects" ] - then - ( - cd PVblockMeshReader - mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 - cd Make/$WM_OPTIONS - cmake ../.. - make - ) - - ( - cd PVFoamReader - mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 - cd Make/$WM_OPTIONS - cmake ../.. - make - ) - fi - + ( + mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 + cd Make/$WM_OPTIONS + cmake ../.. + make + ) else - echo " ERROR: ParaView not found in $ParaView_DIR" + ( + cd PVblockMeshReader + mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 + cd Make/$WM_OPTIONS + cmake ../.. + make + ) + ( + cd PVFoamReader + mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 + cd Make/$WM_OPTIONS + cmake ../.. + make + ) fi - ;; -esac +fi #------------------------------------------------------------------------------ diff --git a/applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt new file mode 100644 index 0000000000..e199b3f331 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt @@ -0,0 +1,19 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1) + +PROJECT(PVReaders) + +FIND_PACKAGE(ParaView REQUIRED) + +INCLUDE(GNUInstallDirs) + +SET(BUILD_SHARED_LIBS ON) + +PARAVIEW_PLUGIN_SCAN( + PLUGIN_FILES + "PVblockMeshReader/paraview.plugin" + "PVFoamReader/paraview.plugin" + PROVIDES_PLUGINS plugins + ENABLE_BY_DEFAULT ON +) + +PARAVIEW_PLUGIN_BUILD(PLUGINS ${plugins}) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt index bc8d45484d..e88e8d35dd 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt @@ -1,8 +1,20 @@ -# Set up the environment -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1) + +PROJECT(PVFoamReader) FIND_PACKAGE(ParaView REQUIRED) -INCLUDE(${PARAVIEW_USE_FILE}) + +IF(${ParaView_VERSION} VERSION_LESS 5.7) + # ParaView-5.7.x and lower will prepend "lib" to the target name + SET(TARGET_NAME PVFoamReader_SM) +ELSE() + SET(TARGET_NAME libPVFoamReader_SM) +ENDIF() + +IF(${ParaView_VERSION} VERSION_LESS 5.7) + # ParaView-5.7.x and lower requires the paraview include file + INCLUDE(${PARAVIEW_USE_FILE}) +ENDIF() LINK_DIRECTORIES( $ENV{FOAM_LIBBIN} @@ -14,6 +26,7 @@ INCLUDE_DIRECTORIES( $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude ${PROJECT_SOURCE_DIR}/../vtkPVFoam + ${PROJECT_SOURCE_DIR}/vtk ) ADD_DEFINITIONS( @@ -22,45 +35,55 @@ ADD_DEFINITIONS( -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE} ) -# Set the output library destination to the plugin directory -SET( - LIBRARY_OUTPUT_PATH $ENV{PV_PLUGIN_PATH} - CACHE INTERNAL - "Single output directory for building all libraries." -) - -# Add the plugin. ParaView-4.0.? requires a GUI_RESOURCE_FILES XML file. As of -# version 4.1.? this is no longer needed. -IF(${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR} VERSION_LESS 4.1) +# Add the plugin +IF(${ParaView_VERSION} VERSION_LESS 4.1) + # ParaView-4.0.x and lower requires a GUI_RESOURCE_FILES XML file ADD_PARAVIEW_PLUGIN( - PVFoamReader_SM + ${TARGET_NAME} "1.0" SERVER_MANAGER_XML PVFoamReader_SM.xml - SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx + SERVER_MANAGER_SOURCES vtk/vtkPVFoamReader.cxx GUI_RESOURCE_FILES PVFoamReader.xml ) -ELSE() +ELSEIF(${ParaView_VERSION} VERSION_LESS 5.7) ADD_PARAVIEW_PLUGIN( - PVFoamReader_SM + ${TARGET_NAME} "1.0" SERVER_MANAGER_XML PVFoamReader_SM.xml - SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx + SERVER_MANAGER_SOURCES vtk/vtkPVFoamReader.cxx + ) +ELSE() + # Paraview-5.7.x and higher builds the vtk module separately + PARAVIEW_ADD_PLUGIN( + ${TARGET_NAME} + VERSION "1.0" + SERVER_MANAGER_XML PVFoamReader_SM.xml + MODULES PVFoamReader_VTK + MODULE_FILES "vtk/vtk.module" ) ENDIF() -# Build the client-side plugin. Paraview-5.5.? needs QT-5 libraries listed in -# the link command in order for the headers to be available. -IF(${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR} VERSION_LESS 5.5) +# Set the output library destination to the plugin directory +SET_TARGET_PROPERTIES( + ${TARGET_NAME} + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "$ENV{PV_PLUGIN_PATH}" +) + +# Build the plugin +IF(${ParaView_VERSION} VERSION_LESS 5.5) TARGET_LINK_LIBRARIES( - PVFoamReader_SM + ${TARGET_NAME} LINK_PUBLIC vtkPVFoam finiteVolume OpenFOAM ) ELSE() + # Paraview-5.5.x and higher needs QT-5 libraries listed in the link command + # in order for the headers to be available TARGET_LINK_LIBRARIES( - PVFoamReader_SM + ${TARGET_NAME} LINK_PUBLIC vtkPVFoam finiteVolume diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/paraview.plugin b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/paraview.plugin new file mode 100644 index 0000000000..d35525d5ff --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/paraview.plugin @@ -0,0 +1,7 @@ +NAME + libPVFoamReader_SM +DESCRIPTION + OpenFOAM Foam reader for ParaView +REQUIRES_MODULES + VTK::CommonCore + VTK::FiltersCore diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/CMakeLists.txt new file mode 100644 index 0000000000..d17de423b5 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/CMakeLists.txt @@ -0,0 +1,17 @@ +VTK_MODULE_ADD_MODULE(PVFoamReader_VTK CLASSES vtkPVFoamReader) + +SET_TARGET_PROPERTIES( + PVFoamReader_VTK + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "$ENV{PV_PLUGIN_PATH}" +) + +TARGET_LINK_LIBRARIES( + PVFoamReader_VTK + LINK_PUBLIC + vtkPVFoam + finiteVolume + OpenFOAM + Qt5::Core + Qt5::Gui +) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtk.module b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtk.module new file mode 100644 index 0000000000..43cd87699d --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtk.module @@ -0,0 +1,6 @@ +NAME + PVFoamReader_VTK +DEPENDS + VTK::FiltersCore +PRIVATE_DEPENDS + VTK::CommonCore diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtkPVFoamReader.cxx similarity index 99% rename from applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtkPVFoamReader.cxx index 7a3b8285f3..6750e01f6b 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtkPVFoamReader.cxx @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtkPVFoamReader.h similarity index 99% rename from applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.h rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtkPVFoamReader.h index 67f8b7362d..07072622e8 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.h +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtk/vtkPVFoamReader.h @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt index f56a61ee29..e5e2952519 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt @@ -1,8 +1,20 @@ -# Set up the environment -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1) + +PROJECT(PVblockMeshReader) FIND_PACKAGE(ParaView REQUIRED) -INCLUDE(${PARAVIEW_USE_FILE}) + +IF(${ParaView_VERSION} VERSION_LESS 5.7) + # ParaView-5.7.x and lower will prepend "lib" to the target name + SET(TARGET_NAME PVblockMeshReader_SM) +ELSE() + SET(TARGET_NAME libPVblockMeshReader_SM) +ENDIF() + +IF(${ParaView_VERSION} VERSION_LESS 5.7) + # ParaView-5.7.x and lower requires the paraview include file + INCLUDE(${PARAVIEW_USE_FILE}) +ENDIF() LINK_DIRECTORIES( $ENV{FOAM_LIBBIN} @@ -13,6 +25,7 @@ INCLUDE_DIRECTORIES( $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude ${PROJECT_SOURCE_DIR}/../vtkPVblockMesh + ${PROJECT_SOURCE_DIR}/vtk ) ADD_DEFINITIONS( @@ -21,44 +34,54 @@ ADD_DEFINITIONS( -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE} ) -# Set the output library destination to the plugin directory -SET( - LIBRARY_OUTPUT_PATH $ENV{PV_PLUGIN_PATH} - CACHE INTERNAL - "Single output directory for building all libraries." -) - -# Add the plugin. ParaView-4.0.? requires a GUI_RESOURCE_FILES XML file. As of -# version 4.1.? this is no longer needed. -IF(${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR} VERSION_LESS 4.1) +# Add the plugin +IF(${ParaView_VERSION} VERSION_LESS 4.1) + # ParaView-4.0.x and lower requires a GUI_RESOURCE_FILES XML file ADD_PARAVIEW_PLUGIN( - PVblockMeshReader_SM + ${TARGET_NAME} "1.0" SERVER_MANAGER_XML PVblockMeshReader_SM.xml - SERVER_MANAGER_SOURCES vtkPVblockMeshReader.cxx + SERVER_MANAGER_SOURCES vtk/vtkPVblockMeshReader.cxx GUI_RESOURCE_FILES PVblockMeshReader.xml - ) -ELSE() + ) +ELSEIF(${ParaView_VERSION} VERSION_LESS 5.7) ADD_PARAVIEW_PLUGIN( - PVblockMeshReader_SM + ${TARGET_NAME} "1.0" SERVER_MANAGER_XML PVblockMeshReader_SM.xml - SERVER_MANAGER_SOURCES vtkPVblockMeshReader.cxx + SERVER_MANAGER_SOURCES vtk/vtkPVblockMeshReader.cxx + ) +ELSE() + # Paraview-5.7.x and higher builds the vtk module separately + PARAVIEW_ADD_PLUGIN( + ${TARGET_NAME} + VERSION "1.0" + SERVER_MANAGER_XML PVblockMeshReader_SM.xml + MODULES PVblockMeshReader_VTK + MODULE_FILES "vtk/vtk.module" ) ENDIF() -# Build the client-side plugin. Paraview-5.5.? needs QT-5 libraries listed in -# the link command in order for the headers to be available. -IF(${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR} VERSION_LESS 5.5) +# Set the output library destination to the plugin directory +SET_TARGET_PROPERTIES( + ${TARGET_NAME} + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "$ENV{PV_PLUGIN_PATH}" +) + +# Build the plugin +IF(${ParaView_VERSION} VERSION_LESS 5.5) TARGET_LINK_LIBRARIES( - PVblockMeshReader_SM + ${TARGET_NAME} LINK_PUBLIC vtkPVblockMesh OpenFOAM ) ELSE() + # Paraview-5.5.x and higher needs QT-5 libraries listed in the link command + # in order for the headers to be available TARGET_LINK_LIBRARIES( - PVblockMeshReader_SM + ${TARGET_NAME} LINK_PUBLIC vtkPVblockMesh OpenFOAM diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/paraview.plugin b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/paraview.plugin new file mode 100644 index 0000000000..907c346eaf --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/paraview.plugin @@ -0,0 +1,7 @@ +NAME + libPVblockMeshReader_SM +DESCRIPTION + OpenFOAM blockMesh reader for ParaView +REQUIRES_MODULES + VTK::CommonCore + VTK::FiltersCore diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/CMakeLists.txt new file mode 100644 index 0000000000..b1bd8f9dd1 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/CMakeLists.txt @@ -0,0 +1,16 @@ +VTK_MODULE_ADD_MODULE(PVblockMeshReader_VTK CLASSES vtkPVblockMeshReader) + +SET_TARGET_PROPERTIES( + PVblockMeshReader_VTK + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "$ENV{PV_PLUGIN_PATH}" +) + +TARGET_LINK_LIBRARIES( + PVblockMeshReader_VTK + LINK_PUBLIC + vtkPVblockMesh + OpenFOAM + Qt5::Core + Qt5::Gui +) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtk.module b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtk.module new file mode 100644 index 0000000000..7b6a73b8ba --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtk.module @@ -0,0 +1,6 @@ +NAME + PVblockMeshReader_VTK +DEPENDS + VTK::FiltersCore +PRIVATE_DEPENDS + VTK::CommonCore diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtkPVblockMeshReader.cxx similarity index 99% rename from applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMeshReader.cxx rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtkPVblockMeshReader.cxx index 6b2034fc3c..7998f67108 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtkPVblockMeshReader.cxx @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMeshReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtkPVblockMeshReader.h similarity index 98% rename from applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMeshReader.h rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtkPVblockMeshReader.h index 2b6139da0c..2ec7c881e5 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMeshReader.h +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtk/vtkPVblockMeshReader.h @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/Make/options index 8d26e378a6..b96dadc3c0 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/Make/options +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I../PVFoamReader \ + -I../PVFoamReader/vtk \ -I$(ParaView_INCLUDE_DIR) \ -I$(ParaView_INCLUDE_DIR)/vtkkwiml \ $(shell \ diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/Make/options index ea0253e0d8..37442e80d0 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/Make/options +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/Make/options @@ -4,7 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/mesh/blockMesh/lnInclude \ -I$(ParaView_INCLUDE_DIR) \ -I$(ParaView_INCLUDE_DIR)/vtkkwiml \ - -I../PVblockMeshReader + -I../PVblockMeshReader/vtk LIB_LIBS = \ -lmeshTools \ diff --git a/bin/paraFoam b/bin/paraFoam index cfd483da9a..78911fdce5 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -61,10 +61,12 @@ error() { } pvExec () { - _opt="" - [ "$ParaView_GL" = mesa ] && _opt="--mesa" - - paraview $_opt "$@" + if [ "$ParaView_GL" = mesa ] + then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_LIB_DIR/mesa paraview "$@" + else + paraview "$@" + fi } noPVReader () { diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview index 2ca18acc79..3244983985 100644 --- a/etc/config.csh/paraview +++ b/etc/config.csh/paraview @@ -60,7 +60,8 @@ end #setenv ParaView_VERSION 5.0.1 #setenv ParaView_VERSION 5.4.0 #setenv ParaView_VERSION 5.5.0 -setenv ParaView_VERSION 5.6.0 +#setenv ParaView_VERSION 5.6.0 +setenv ParaView_VERSION 5.8.0 setenv ParaView_MAJOR detect #setenv ParaView_GL system @@ -134,7 +135,7 @@ if ( -d $ParaView_DIR || -d $paraviewSrcDir ) then # Alias paraview to launch with mesa if necessary if ("$ParaView_GL" == mesa) then - alias paraview 'paraview --mesa' + alias paraview 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_LIB_DIR/mesa paraview' endif else unsetenv PV_PLUGIN_PATH diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index 5a6cd45b0c..db11bff756 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -65,7 +65,8 @@ done #export ParaView_VERSION=5.0.1 #export ParaView_VERSION=5.4.0 #export ParaView_VERSION=5.5.0 -export ParaView_VERSION=5.6.0 +#export ParaView_VERSION=5.6.0 +export ParaView_VERSION=5.8.0 export ParaView_MAJOR=detect #export ParaView_GL=system @@ -153,7 +154,7 @@ then # Alias paraview to launch with mesa if necessary if [ "$ParaView_GL" = mesa ] then - alias paraview="paraview --mesa" + alias paraview='LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_LIB_DIR/mesa paraview' fi else unset PV_PLUGIN_PATH