diff --git a/CMake/CMakeCABMacros.cmake b/CMake/CMakeCABMacros.cmake index 85cd2eaa28bd417ee3a5cc5cc9b2082db526b4ba..ee8c539128fa26a25e4c7191ba32a1ef413270c7 100644 --- a/CMake/CMakeCABMacros.cmake +++ b/CMake/CMakeCABMacros.cmake @@ -18,15 +18,7 @@ SET(CAB_ADDITIONAL_LINK_FLAGS_RELEASE) SET(CAB_ADDITIONAL_LINK_LIBRARIES) -############################################################### -# SOURCE_DIR variable wird beim einbinden automatisch gesetzt - ebenso das include dir!!! -# SOURCE_DIR wird dem Projekt als Standardincludepfad hinzugefuegt -############################################################### -#CMakeCABMacros.txt liegt direkt im source-Ordner -> pfad == SOURCE_ROOT -GET_FILENAME_COMPONENT( SOURCE_ROOT ${CMAKE_CURRENT_LIST_FILE} PATH) -STRING(REGEX REPLACE "(.*)/CMake" "\\1" SOURCE_ROOT "${SOURCE_ROOT}" ) -INCLUDE_DIRECTORIES(${SOURCE_ROOT}) -LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -DSOURCE_ROOT=${SOURCE_ROOT} ) +LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -DSOURCE_ROOT=${VF_ROOT_DIR} ) ############################################################### # hostename ermitteln -> CAB_MACHINE @@ -63,8 +55,8 @@ ENDIF() ############################################################################ # externe (ACHTUNG: die darin enthaltenen benoetigen teils noch macros die # hier im Anschluss folgen -INCLUDE("${SOURCE_ROOT}/CMake/CMakeSetCompilerFlags.cmake") -INCLUDE("${SOURCE_ROOT}/CMake/CMakeCompilerMacros.cmake") +INCLUDE("${CMAKE_PATH}/CMakeSetCompilerFlags.cmake") +INCLUDE("${CMAKE_PATH}/CMakeCompilerMacros.cmake") ################################################################ ### ADD_TARGET_PROPERTIES ### @@ -319,7 +311,7 @@ SET_CAB_COMPILER() CHECK_FOR_VARIABLE(CAB_MACHINE "machine name, e.g. ALTIX, ARWEN") LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -DCAB_MACHINE_${CAB_MACHINE}) LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -DCAB_MACHINE=${CAB_MACHINE}) -SET(CMAKE_CONFIG_FILE "${SOURCE_ROOT}/CMake/cmake_config_files/${CAB_MACHINE}.config.cmake") +SET(CMAKE_CONFIG_FILE "${CMAKE_PATH}/cmake_config_files/${CAB_MACHINE}.config.cmake") IF(NOT EXISTS ${CMAKE_CONFIG_FILE}) MESSAGE(FATAL_ERROR "${CMAKE_CONFIG_FILE} does not exists... maybe false CAB_MACHINE = ${CAB_MACHINE}") diff --git a/CMake/CMakeSetCompilerFlags.cmake b/CMake/CMakeSetCompilerFlags.cmake index 10a277299b1124026dc110c9dc06824603863346..624246e026ce62dc149eae65caa01da6ff08be4b 100644 --- a/CMake/CMakeSetCompilerFlags.cmake +++ b/CMake/CMakeSetCompilerFlags.cmake @@ -38,8 +38,8 @@ MACRO(SET_COMPILER_SPECIFIC_FLAGS compiler_type build_type) ############################################################################################################### ## standard compiler flags ############################################################################################################### - ELSEIF( EXISTS "${SOURCE_ROOT}/CMake/compilerflags/${CAB_COMPILER}.cmake" ) - INCLUDE( ${SOURCE_ROOT}/CMake/compilerflags/${CAB_COMPILER}.cmake) + ELSEIF( EXISTS "${CMAKE_PATH}/compilerflags/${CAB_COMPILER}.cmake" ) + INCLUDE( ${CMAKE_PATH}/compilerflags/${CAB_COMPILER}.cmake) ############################################################################################################### ## unknown compiler ############################################################################################################### @@ -47,7 +47,7 @@ MACRO(SET_COMPILER_SPECIFIC_FLAGS compiler_type build_type) #MESSAGE(FATAL_ERROR "CAB_COMPILER=${CAB_COMPILER} seems to be a not supported compiler") #MESSAGE(WARNING "CAB_COMPILER=${CAB_COMPILER} seems to be a not supported compiler; set to generic") SET(CAB_COMPILER "gccGeneric") - INCLUDE( ${SOURCE_ROOT}/CMake/compilerflags/${CAB_COMPILER}.cmake) + INCLUDE( ${CMAKE_PATH}/compilerflags/${CAB_COMPILER}.cmake) ENDIF() diff --git a/CMake/VirtualFluidsMacros.cmake b/CMake/VirtualFluidsMacros.cmake index 5b059d4fe01d3e7485a1bf70276a91aca218ab41..5b9050427029c54eb30c2aacf028dfb8a405bfaf 100644 --- a/CMake/VirtualFluidsMacros.cmake +++ b/CMake/VirtualFluidsMacros.cmake @@ -165,7 +165,7 @@ function(vf_add_library) target_include_directories(${library_name} PRIVATE ${CMAKE_BINARY_DIR}) target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src) + target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}) #status("... configuring target: ${library_name} (type=${ARG_BUILDTYPE}) done") @@ -215,7 +215,7 @@ function(vf_add_tests) # link tested library target_include_directories(${library_test_name} PRIVATE ${CMAKE_BINARY_DIR}) target_include_directories(${library_test_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - target_include_directories(${library_test_name} PRIVATE ${CMAKE_SOURCE_DIR}/src) + target_include_directories(${library_test_name} PRIVATE ${SOURCE_PATH}) # link googlemock include(${CMAKE_PATH}/3rd/gmock.cmake) diff --git a/CMake/cmake_config_files/BILBO.config.cmake b/CMake/cmake_config_files/BILBO.config.cmake index e9757065cd956c8ab7f57d0a95388bc3df6c6dd1..ead4ef15bcfe529d4b6a5a2d9d5e6f5211f04a66 100644 --- a/CMake/cmake_config_files/BILBO.config.cmake +++ b/CMake/cmake_config_files/BILBO.config.cmake @@ -39,6 +39,3 @@ IF(${USE_METIS}) SET(METIS_DEBUG_LIBRARY "/usr/local/lib/libmetis.a") SET(METIS_RELEASE_LIBRARY "/usr/local/lib/libmetis.a") ENDIF() -#set(SOURCE_ROOT "/host/Projects/pFluid/source") - -SET(GMOCK_ROOT "~/Libraries/googletest-release-1.10.0" CACHE PATH "GMOCK ROOT") \ No newline at end of file diff --git a/CMake/cmake_config_files/ELLADAN.config.cmake b/CMake/cmake_config_files/ELLADAN.config.cmake index 3729898e3b9f105232db5d8552fbb9e87c85e2d3..7896929276a2969029937ab819b7a59b8132a7c6 100644 --- a/CMake/cmake_config_files/ELLADAN.config.cmake +++ b/CMake/cmake_config_files/ELLADAN.config.cmake @@ -42,6 +42,3 @@ IF(${USE_METIS}) SET(METIS_DEBUG_LIBRARY "/usr/lib/x86_64-linux-gnu/libmetis.so") SET(METIS_RELEASE_LIBRARY "/usr/lib/x86_64-linux-gnu/libmetis.so") ENDIF() -#set(SOURCE_ROOT "/host/Projects/pFluid/source") - -SET(GMOCK_ROOT /usr/src/googletest CACHE PATH "GMOCK ROOT") \ No newline at end of file diff --git a/CMake/cmake_config_files/TESLA01.config.cmake b/CMake/cmake_config_files/TESLA01.config.cmake index 4301bd774cb2a8aa43c0926a03a8e9ade628c2a0..67bde26227cffb5b4e8ea31b53abc438891de433 100644 --- a/CMake/cmake_config_files/TESLA01.config.cmake +++ b/CMake/cmake_config_files/TESLA01.config.cmake @@ -1,10 +1,9 @@ #Don't change: -SET(METIS_ROOT ${CMAKE_SOURCE_DIR}/3rdParty/metis/metis-5.1.0 CACHE PATH "METIS ROOT") -#SET(GMOCK_ROOT ${CMAKE_SOURCE_DIR}/3rdParty/googletest CACHE PATH "GMOCK ROOT") -SET(JSONCPP_ROOT ${CMAKE_SOURCE_DIR}/3rdParty/jsoncpp CACHE PATH "JSONCPP ROOT") -SET(FFTW_ROOT ${CMAKE_SOURCE_DIR}/3rdParty/fftw/fftw-3.3.7 CACHE PATH "JSONCPP ROOT") +SET(METIS_ROOT ${THIRD_PATH}/metis/metis-5.1.0 CACHE PATH "METIS ROOT") +SET(GMOCK_ROOT ${THIRD_PATH}/googletest CACHE PATH "GMOCK ROOT") +SET(JSONCPP_ROOT ${THIRD_PATH}/jsoncpp CACHE PATH "JSONCPP ROOT") +SET(FFTW_ROOT ${THIRD_PATH}/fftw/fftw-3.3.7 CACHE PATH "JSONCPP ROOT") -SET(GMOCK_ROOT C:\\Libraries\\googletest-release-1.10.0 CACHE PATH "GMOCK ROOT") #SET TO CORRECT PATH: SET(BOOST_ROOT "C:\\Libraries\\boost_1_65_1" CACHE PATH "BOOST_ROOT") diff --git a/CMakeLists.txt b/CMakeLists.txt index f96898b83ba569e788d94dbaf40c98642e31b7ed..ab37a4f3c82aa9fae7ec632eb3a55fe90ad39000 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ # required cmake versions # CMAKE 3.9: CUDA support ################################################################################# -cmake_minimum_required(VERSION 3.13..3.17 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13..3.18 FATAL_ERROR) project(VirtualFluids CXX) @@ -22,6 +22,11 @@ set(testFolder "tests") set(appFolder "apps") set(thirdFolder "3rd") +set (CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake) +set (THIRD_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty) +set (SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src) +set (VF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + ################################################################################# # OPTIONS ################################################################################# @@ -30,17 +35,27 @@ option(BUILD_VF_GPU "Build VirtualFluids gpu variant" OFF) option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" OFF) option(BUILD_SHARED_LIBS "" ON) + +################################################################################# +# CMAKE POLICIES +################################################################################# +# CMAKE_CUDA_ARCHITECTURES +# https://cmake.org/cmake/help/git-stage/policy/CMP0104.htmls +if(POLICY CMP0104) + cmake_policy(SET CMP0104 NEW) + set(CMAKE_CUDA_ARCHITECTURES 30) +endif() + ################################################################################# # MACROS ################################################################################# include(CMakePrintHelpers) -set (CMAKE_PATH "${CMAKE_SOURCE_DIR}/CMake") -include("${CMAKE_PATH}/CMakeCABMacros.cmake") -include("${CMAKE_PATH}/FileUtilities.cmake") -include("${CMAKE_PATH}/VirtualFluidsMacros.cmake") +include(${CMAKE_PATH}/CMakeCABMacros.cmake) +include(${CMAKE_PATH}/FileUtilities.cmake) +include(${CMAKE_PATH}/VirtualFluidsMacros.cmake) include(${CMAKE_PATH}/CMakeMacros_old/general/FindCompiler.cmake) -configure_file(src/basics/VirtualFluidsDefinitions.in.h VirtualFluidsDefinitions.h) +configure_file(src/basics/VirtualFluidsDefinitions.in.h ${CMAKE_BINARY_DIR}/VirtualFluidsDefinitions.h) ################################################################################# # COMMON LIBRARIES @@ -61,5 +76,5 @@ endif() # 3rd Party Libraries ################################################################################# if(BUILD_VF_UNIT_TESTS) - add_subdirectory(${CMAKE_SOURCE_DIR}/3rdParty/googletest) + add_subdirectory(${THIRD_PATH}/googletest) endif() diff --git a/apps/cpu/IncludsList.cmake b/apps/cpu/IncludsList.cmake index d5ceb5de7764c40bb3fc2bc8e58de6ef9dd8c3dc..55b118583c7eebb06a94ab33b5e9edc6ffaa52dd 100644 --- a/apps/cpu/IncludsList.cmake +++ b/apps/cpu/IncludsList.cmake @@ -1,11 +1,14 @@ INCLUDE_DIRECTORIES(${APPS_ROOT_CPU}) -INCLUDE(${CMAKE_SOURCE_DIR}/src/cpu/VirtualFluidsCore/IncludsList.cmake) +INCLUDE(${SOURCE_PATH}/cpu/VirtualFluidsCore/IncludsList.cmake) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/geometry3d) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/basics/container) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/basics/memory) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/basics/objects) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/basics/transmiitter) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/basics/utilities) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/basics/basics/writer) \ No newline at end of file +INCLUDE_DIRECTORIES(${SOURCE_PATH}/cpu/VirtualFluidsCore) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/geometry3d) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/geometry3d/Creator) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/geometry3d/KdTree) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/basics/container) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/basics/memory) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/basics/objects) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/basics/transmiitter) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/basics/utilities) +INCLUDE_DIRECTORIES(${SOURCE_PATH}/basics/basics/writer) diff --git a/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp b/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp index 842c34389bc6ba79d55443b369876ceed232d2bd..8f11d8a197be080e59ab1e445596341b579ea66d 100644 --- a/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp +++ b/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp @@ -43,7 +43,7 @@ ////////////////////////////////////////////////////////////////////////// #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/LbmOrGks.h" #include "Core/VectorTypes.h" #include "Core/Logger/Logger.h" diff --git a/cpu.cmake b/cpu.cmake index 30b3254457c56120fb90ad150dbb3a88fa60b4af..7ec34d961425914eafb5a894958e7fc4c801f54c 100644 --- a/cpu.cmake +++ b/cpu.cmake @@ -4,13 +4,10 @@ SET(USE_INTEL OFF CACHE BOOL "include Intel compiler support") SET(USE_GCC OFF CACHE BOOL "include gcc compiler support") -set (SOURCE_DIR ${PROJECT_SOURCE_DIR}) -set(SOURCE_ROOT ${CMAKE_SOURCE_DIR}) - #CAB include("CMake/CMakeCABMacros.cmake") #TODO: Currently we have to include the CABMacros also here, so that the USE_* are defined in the config files for the cpu version -add_subdirectory(3rdParty/MuParser) +add_subdirectory(${THIRD_PATH}/MuParser) add_subdirectory(src/cpu/VirtualFluidsCore) diff --git a/gpu.cmake b/gpu.cmake index a49f517d03597b1aa9fe9c1de7412753c009946e..1d6ab6f2db516931d74f1fdc2718fd49d6560591 100644 --- a/gpu.cmake +++ b/gpu.cmake @@ -41,7 +41,6 @@ endif() project(VirtualFluidsGPU) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories(${CMAKE_BINARY_DIR}/gpu) # diff --git a/src/basics/Core/PointerDefinitions.h b/src/basics/PointerDefinitions.h similarity index 88% rename from src/basics/Core/PointerDefinitions.h rename to src/basics/PointerDefinitions.h index d3257e2ed85b8fb9c8fdf530185e1410259fd355..07462b89eca7f3248ee311a849ba185261597204 100644 --- a/src/basics/Core/PointerDefinitions.h +++ b/src/basics/PointerDefinitions.h @@ -23,6 +23,6 @@ using RPtr = T*; template <class T> using enableSharedFromThis = std::enable_shared_from_this<T>; -#define dynamicPointerCast dynamic_pointer_cast +#define dynamicPointerCast std::dynamic_pointer_cast #endif diff --git a/src/cpu/VirtualFluidsCore/CMakeLists.txt b/src/cpu/VirtualFluidsCore/CMakeLists.txt index d8bf322defe33c528c929797cf8f838c941ee2e9..14a44abd917653d810236eaeaf8eba236c97f7d8 100644 --- a/src/cpu/VirtualFluidsCore/CMakeLists.txt +++ b/src/cpu/VirtualFluidsCore/CMakeLists.txt @@ -15,12 +15,12 @@ ENDIF() vf_add_library(BUILDTYPE static DEPENDS basics MuParser ${CAB_ADDITIONAL_LINK_LIBRARIES}) vf_get_library_name(library_name) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/geometry3d) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/basics/container) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/basics/memory) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/basics/objects) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/basics/transmitter) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/basics/utilities) -target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basics/basics/writer) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/geometry3d) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/basics/container) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/basics/memory) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/basics/objects) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/basics/transmitter) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/basics/utilities) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/basics/writer) diff --git a/src/cpu/VirtualFluidsCore/IncludsList.cmake b/src/cpu/VirtualFluidsCore/IncludsList.cmake index 13812a8337d67e4359afb097bd46368f2c2eda2a..5eab959de3d72960298423146daa13382edadb86 100644 --- a/src/cpu/VirtualFluidsCore/IncludsList.cmake +++ b/src/cpu/VirtualFluidsCore/IncludsList.cmake @@ -1,18 +1,20 @@ #directory pathes for header files +set(VirtualFluidsCore_source_dir ${SOURCE_PATH}/cpu/VirtualFluidsCore) +vf_get_library_name(library_name) + set (SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/cpu/") +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/BoundaryConditions) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Connectors) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Data) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Interactors) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/LBM) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Parallel) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Grid) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Visitors) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/CoProcessors) +INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Utilities) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/BoundaryConditions) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Connectors) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Data) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Interactors) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/LBM) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Parallel) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Grid) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Visitors) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/CoProcessors) -INCLUDE_DIRECTORIES(${SOURCE_DIR}/VirtualFluidsCore/Utilities) +INCLUDE_DIRECTORIES(${THIRD_PATH}) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/3rdParty) diff --git a/src/cpu/VirtualFluidsCore/PointerDefinitions.h b/src/cpu/VirtualFluidsCore/PointerDefinitions.h deleted file mode 100644 index 09f9b1ac2bf04e2873d73e15b9f0b71f28290bde..0000000000000000000000000000000000000000 --- a/src/cpu/VirtualFluidsCore/PointerDefinitions.h +++ /dev/null @@ -1,53 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file PointerDefinitions.h -//! \ingroup Core -//! \author Soeren Peters -//======================================================================================= -#ifndef SHARED_POINTER_H -#define SHARED_POINTER_H - -#include <memory> - -template <class T> -using SPtr = std::shared_ptr<T>; - -template <class T> -using WPtr = std::weak_ptr<T>; - -template <class T> -using UPtr = std::unique_ptr<T>; - -template <class T> -using RPtr = T*; - -template <class T> -using enableSharedFromThis = std::enable_shared_from_this<T>; - -#endif diff --git a/src/gpu/GksGpu/Analyzer/ConvergenceAnalyzer.h b/src/gpu/GksGpu/Analyzer/ConvergenceAnalyzer.h index 789ba1c286b1282ae8d36f1724a060cddf9c33d9..15b7567977c172fec95221ed5a5ce85f2dd30909 100644 --- a/src/gpu/GksGpu/Analyzer/ConvergenceAnalyzer.h +++ b/src/gpu/GksGpu/Analyzer/ConvergenceAnalyzer.h @@ -37,7 +37,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/Timer/Timer.h" diff --git a/src/gpu/GksGpu/Analyzer/CupsAnalyzer.h b/src/gpu/GksGpu/Analyzer/CupsAnalyzer.h index ae36d86c6433cc70c059c2b4914f010130cee3bf..e221f085ae128948dd58dc7ba9b2a92986cc9e19 100644 --- a/src/gpu/GksGpu/Analyzer/CupsAnalyzer.h +++ b/src/gpu/GksGpu/Analyzer/CupsAnalyzer.h @@ -37,7 +37,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/Timer/Timer.h" diff --git a/src/gpu/GksGpu/BoundaryConditions/BoundaryCondition.h b/src/gpu/GksGpu/BoundaryConditions/BoundaryCondition.h index 9778745018af8600d129425f99610e65078be3dd..7c54de47e9918a6bec5a61513c4f122247e1b3e7 100644 --- a/src/gpu/GksGpu/BoundaryConditions/BoundaryCondition.h +++ b/src/gpu/GksGpu/BoundaryConditions/BoundaryCondition.h @@ -40,7 +40,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/VectorTypes.h" diff --git a/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.cu b/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.cu index 76e451818f657af2cf435d27e03d24ac3db02746..9c5587c83353759d9c0205371ae69cae6c44ceb2 100644 --- a/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.cu +++ b/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.cu @@ -39,7 +39,7 @@ #include <cuda_runtime.h> #include <helper_cuda.h> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/RealConstants.h" #include "DataBase/DataBase.h" diff --git a/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.h b/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.h index 21fda60d0b3a077257c628fb41f66c17232a8efb..e835f7fa2892a9d94f0c81845b65e47d9b8839cd 100644 --- a/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.h +++ b/src/gpu/GksGpu/BoundaryConditions/IsothermalWall.h @@ -37,7 +37,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/VectorTypes.h" diff --git a/src/gpu/GksGpu/CellUpdate/CellUpdate.cu b/src/gpu/GksGpu/CellUpdate/CellUpdate.cu index 71c6b68f8505baa4431b9bfe71c9a032ab408399..b62585a8c522b25204f38ad9690cc88bf6d761e0 100644 --- a/src/gpu/GksGpu/CellUpdate/CellUpdate.cu +++ b/src/gpu/GksGpu/CellUpdate/CellUpdate.cu @@ -37,7 +37,7 @@ #include <helper_cuda.h> #include <math.h> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/RealConstants.h" #include "DataBase/DataBaseStruct.h" diff --git a/src/gpu/GksGpu/CellUpdate/CellUpdate.h b/src/gpu/GksGpu/CellUpdate/CellUpdate.h index c7d2f2c1ab14cab73608c1693d6865926860dc8b..836443b4b37f24d4d37ea082a6236bf39a8f1ff9 100644 --- a/src/gpu/GksGpu/CellUpdate/CellUpdate.h +++ b/src/gpu/GksGpu/CellUpdate/CellUpdate.h @@ -35,7 +35,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "DataBase/DataBase.h" diff --git a/src/gpu/GksGpu/DataBase/DataBase.h b/src/gpu/GksGpu/DataBase/DataBase.h index bd34c936fe83088ba8d123b25a42835e12560a07..5b728120d827ccb175cb8ae902607e07288d42ce 100644 --- a/src/gpu/GksGpu/DataBase/DataBase.h +++ b/src/gpu/GksGpu/DataBase/DataBase.h @@ -38,7 +38,7 @@ #include <vector> #include <array> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/VectorTypes.h" #include "Core/ArrayTypes.h" diff --git a/src/gpu/GksGpu/DataBase/DataBaseAllocator.h b/src/gpu/GksGpu/DataBase/DataBaseAllocator.h index d44672c647fdde22bcb9a3edc45d5ba8b353951e..6173969ad52a9715296bd9eedb98ad180726b6c0 100644 --- a/src/gpu/GksGpu/DataBase/DataBaseAllocator.h +++ b/src/gpu/GksGpu/DataBase/DataBaseAllocator.h @@ -37,7 +37,7 @@ #include <vector> #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "VirtualFluidsDefinitions.h" diff --git a/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.cpp b/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.cpp index 5b5a144843626fcd48c6feac78fe3ae176b80b4a..93c8647df0fa04a3336a0404a98931d2c8149816 100644 --- a/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.cpp +++ b/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.cpp @@ -35,7 +35,7 @@ #include <cstring> #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "GksMeshAdapter/GksMeshAdapter.h" diff --git a/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.h b/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.h index afaf9e423ed517d8631f9fe05acfe7c47f087af5..19464aa98fbf30206c04adf540b28416139f5d66 100644 --- a/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.h +++ b/src/gpu/GksGpu/DataBase/DataBaseAllocatorCPU.h @@ -34,7 +34,7 @@ #define DatabaseAllocatorCPU_H #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "DataBaseAllocator.h" diff --git a/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.cpp b/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.cpp index cb3df88ea0eb55436accbab9eea786d6e38f7aa9..31c848cdbd7165af348d8206569d7f7c41549f31 100644 --- a/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.cpp +++ b/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.cpp @@ -38,7 +38,7 @@ #include <helper_cuda.h> #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "GksMeshAdapter/GksMeshAdapter.h" diff --git a/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.h b/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.h index 4c72ee3669423f6a7aeeee137174b1eb28a9c95d..5ed4c14329b1f4b342c7d609803db3b17bbf9dcb 100644 --- a/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.h +++ b/src/gpu/GksGpu/DataBase/DataBaseAllocatorGPU.h @@ -34,7 +34,7 @@ #define DatabaseAllocatorGPU_H #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "DataBaseAllocator.h" diff --git a/src/gpu/GksGpu/FluxComputation/FluxComputation.cu b/src/gpu/GksGpu/FluxComputation/FluxComputation.cu index 9fdd102c45e60c48fc3a5fa3f2170ee58fd5b737..b013bdfcee464e836aca5250be2dd2ae1bd07d62 100644 --- a/src/gpu/GksGpu/FluxComputation/FluxComputation.cu +++ b/src/gpu/GksGpu/FluxComputation/FluxComputation.cu @@ -36,7 +36,7 @@ #include <cuda_runtime.h> #include <helper_cuda.h> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "DataBase/DataBaseStruct.h" diff --git a/src/gpu/GksGpu/FluxComputation/FluxComputation.h b/src/gpu/GksGpu/FluxComputation/FluxComputation.h index 1202c38f9bc5646ffcfb2dc90bbfc2efd6db5350..0f49cff41bac650c2b4dbed81839a29fc4d7507f 100644 --- a/src/gpu/GksGpu/FluxComputation/FluxComputation.h +++ b/src/gpu/GksGpu/FluxComputation/FluxComputation.h @@ -35,7 +35,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "DataBase/DataBase.h" diff --git a/src/gpu/GksGpu/Initializer/Initializer.cpp b/src/gpu/GksGpu/Initializer/Initializer.cpp index 15bf9dbd6f40afbe0aa822cac447452daa9f621c..cdeeed1205cd386acb8763761f23f555ddfb8cfc 100644 --- a/src/gpu/GksGpu/Initializer/Initializer.cpp +++ b/src/gpu/GksGpu/Initializer/Initializer.cpp @@ -36,7 +36,7 @@ #define _USE_MATH_DEFINES #include <math.h> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/RealConstants.h" #include "DataBase/DataBaseStruct.h" diff --git a/src/gpu/GksGpu/Initializer/Initializer.h b/src/gpu/GksGpu/Initializer/Initializer.h index 249cd7cf49c0246d8401965d46bab5ae6177501e..0397af3f0c7d5169fd93d246655e7289d27a8aae 100644 --- a/src/gpu/GksGpu/Initializer/Initializer.h +++ b/src/gpu/GksGpu/Initializer/Initializer.h @@ -39,7 +39,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/VectorTypes.h" diff --git a/src/gpu/GksGpu/Initializer/InitializerKernel.cu b/src/gpu/GksGpu/Initializer/InitializerKernel.cu index 38a96ef1d4f6cef2dac9f62a9a20c43012377315..655ce8a1e79c9299fa6af0b2317272a33b7738fd 100644 --- a/src/gpu/GksGpu/Initializer/InitializerKernel.cu +++ b/src/gpu/GksGpu/Initializer/InitializerKernel.cu @@ -36,7 +36,7 @@ #include <cuda_runtime.h> #include <helper_cuda.h> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/RealConstants.h" #include "DataBase/DataBaseStruct.h" diff --git a/src/gpu/GksGpu/TimeStepping/NestedTimeStep.h b/src/gpu/GksGpu/TimeStepping/NestedTimeStep.h index 8b31dbac4fe06a5cb770169a863aa9a441d7ed7c..cb2ded487d2bd1148c74763cae436a9331b4fb62 100644 --- a/src/gpu/GksGpu/TimeStepping/NestedTimeStep.h +++ b/src/gpu/GksGpu/TimeStepping/NestedTimeStep.h @@ -35,7 +35,7 @@ #include "VirtualFluidsDefinitions.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "DataBase/DataBase.h" diff --git a/src/gpu/GksMeshAdapter/GksMeshAdapter.h b/src/gpu/GksMeshAdapter/GksMeshAdapter.h index cffb9c89ed557455d72fcb8f65027054bbce2c20..6a51d206deea911a5e95ec01f818c3d5622027c8 100644 --- a/src/gpu/GksMeshAdapter/GksMeshAdapter.h +++ b/src/gpu/GksMeshAdapter/GksMeshAdapter.h @@ -38,7 +38,7 @@ #include <vector> #include "Core/DataTypes.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "MeshCell.h" #include "MeshFace.h" diff --git a/src/gpu/GridGenerator/CMakeLists.txt b/src/gpu/GridGenerator/CMakeLists.txt index 7ec3d01d871944022e73d5064f0352958014836a..9859a66207b3c14ed7d81e26de366bc74c3f85cf 100644 --- a/src/gpu/GridGenerator/CMakeLists.txt +++ b/src/gpu/GridGenerator/CMakeLists.txt @@ -1,26 +1,15 @@ -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Cuda/Link.cmake) -#linkCuda(${targetName}) -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/MPI/Link.cmake) -#linkMPI(${targetName}) -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Boost/Link.cmake) -#linkBoost(${targetName} "serialization") -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Metis/Link.cmake) -#linkMetis(${targetName}) -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/OpenMP/Link.cmake) -#linkOpenMP(${targetName}) - - vf_add_library(BUILDTYPE shared DEPENDS basics) include (${CMAKE_PATH}/3rd/cuda.cmake) include (${CMAKE_PATH}/3rd/OpenMP.cmake) vf_get_library_name(library_name) -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core") +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/geometry3d) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/gpu) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/Core) set_property(TARGET ${library_name} PROPERTY CUDA_SEPARABLE_COMPILATION ON) \ No newline at end of file diff --git a/src/gpu/GridGenerator/global.h b/src/gpu/GridGenerator/global.h index cb7b08bdcd7a676bc8eec24307be79ee389aef51..248e3aeddfac9141fab3b3e84c29110d54873f5f 100644 --- a/src/gpu/GridGenerator/global.h +++ b/src/gpu/GridGenerator/global.h @@ -43,7 +43,7 @@ #include "GridGenerator_export.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "Core/Logger/Logger.h" diff --git a/src/gpu/VirtualFluids_GPU/CMakeLists.txt b/src/gpu/VirtualFluids_GPU/CMakeLists.txt index 22399d093f694e60171b5f58b304b8b12a1027a5..c1eac3f649adf0b4dcdd074241b5f8e6e67c6b6f 100644 --- a/src/gpu/VirtualFluids_GPU/CMakeLists.txt +++ b/src/gpu/VirtualFluids_GPU/CMakeLists.txt @@ -12,10 +12,10 @@ vf_add_library(BUILDTYPE shared DEPENDS ${libsToLink}) include (${CMAKE_PATH}/3rd/cuda.cmake) vf_get_library_name(library_name) -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/GridGenerator") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core") +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/gpu) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/gpu/GridGenerator) +target_include_directories(${library_name} PRIVATE ${SOURCE_PATH}/basics/Core) #SET(TPN_WIN32 "/EHsc") diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridProvider.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridProvider.h index eb16652deb94f7f84a68742cd0b8a80cddc8f6ab..a4224b4ef5f19eaae1e2000e1abcc0cf65ac4710 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridProvider.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridProvider.h @@ -36,7 +36,7 @@ #include <memory> #include <VirtualFluidsDefinitions.h> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "VirtualFluids_GPU_export.h" //! \brief Class forwarding for CudaMemoryManager, GridBuilder and Parameter diff --git a/src/gpu/VirtualFluids_GPU/GPU/CudaMemoryManager.h b/src/gpu/VirtualFluids_GPU/GPU/CudaMemoryManager.h index 322c5592f2c4b1162f5033f6d68d356cf11d5950..e5e3ab91dfec5b85b4c753fe5ae90518bd22511c 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/CudaMemoryManager.h +++ b/src/gpu/VirtualFluids_GPU/GPU/CudaMemoryManager.h @@ -34,7 +34,7 @@ #define CudamemoryManager_H #include <memory> -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "VirtualFluids_GPU_export.h" //! \brief Class forwarding for Parameter diff --git a/src/gpu/VirtualFluids_GPU/Init/InitLattice.h b/src/gpu/VirtualFluids_GPU/Init/InitLattice.h index ceb8e200b23dc063c9bb7728e3a2794a942c2ea8..4c51d2ee0a4f500aaa3dd4d49217fe603059e9d5 100644 --- a/src/gpu/VirtualFluids_GPU/Init/InitLattice.h +++ b/src/gpu/VirtualFluids_GPU/Init/InitLattice.h @@ -33,7 +33,7 @@ #ifndef INIT_LATTICE_H #define INIT_LATTICE_H -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" //! \brief Class forwarding for Parameter class Parameter; diff --git a/src/gpu/VirtualFluids_GPU/LBM/Simulation.h b/src/gpu/VirtualFluids_GPU/LBM/Simulation.h index bd1760ce39ab7a2f3103411bfdc5350850c79a3a..791ce78f7f1a2313f8b365b8f92059665fcd744a 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/Simulation.h +++ b/src/gpu/VirtualFluids_GPU/LBM/Simulation.h @@ -33,7 +33,7 @@ #ifndef _SIMULATION_H_ #define _SIMULATION_H_ -#include <Core/PointerDefinitions.h> +#include <PointerDefinitions.h> #include <VirtualFluidsDefinitions.h> #include "Output/LogWriter.hpp" #include "VirtualFluids_GPU_export.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/DataWriter.h b/src/gpu/VirtualFluids_GPU/Output/DataWriter.h index 6406cad772056bf243f609174f4b10d9e145d45a..6c10ea2f4b27f2553d8c827a4426172efda7dc8e 100644 --- a/src/gpu/VirtualFluids_GPU/Output/DataWriter.h +++ b/src/gpu/VirtualFluids_GPU/Output/DataWriter.h @@ -33,7 +33,7 @@ #ifndef DATA_WRITER_H #define DATA_WRITER_H -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "Core/DataTypes.h" #include "VirtualFluids_GPU_export.h" diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h index 6826684103e99315620fc979c875544315841366..5afd9aed76f3c6d061f9d36b29e43932aee6c46b 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h @@ -34,7 +34,7 @@ #define PARAMETER_H #include "LBM/LB.h" -#include "Core/PointerDefinitions.h" +#include "PointerDefinitions.h" #include "VirtualFluidsDefinitions.h" #include "VirtualFluids_GPU_export.h"