From b80f9d07f29456cbf44a23cdaa960d3db9ab825f Mon Sep 17 00:00:00 2001 From: "LEGOLAS\\lenz" <lenz@irmb.tu-bs.de> Date: Thu, 19 Mar 2020 16:15:41 +0100 Subject: [PATCH] adds name space to all elements in the GksGpu library --- src/GksGpu/Analyzer/ConvergenceAnalyzer.cpp | 4 ++ src/GksGpu/Analyzer/ConvergenceAnalyzer.h | 4 ++ src/GksGpu/Analyzer/CupsAnalyzer.cpp | 4 ++ src/GksGpu/Analyzer/CupsAnalyzer.h | 4 ++ src/GksGpu/Analyzer/EnstrophyAnalyzer.cu | 4 ++ src/GksGpu/Analyzer/EnstrophyAnalyzer.h | 4 ++ src/GksGpu/Analyzer/HeatFluxAnalyzer.cu | 4 ++ src/GksGpu/Analyzer/HeatFluxAnalyzer.h | 4 ++ src/GksGpu/Analyzer/KineticEnergyAnalyzer.cu | 4 ++ src/GksGpu/Analyzer/KineticEnergyAnalyzer.h | 4 ++ .../Analyzer/PointTimeSeriesAnalyzer.cu | 4 ++ src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.h | 7 ++- .../Analyzer/PointTimeSeriesCollector.cpp | 4 ++ .../Analyzer/PointTimeseriesCollector.h | 7 ++- src/GksGpu/Analyzer/TurbulenceAnalyzer.cu | 4 ++ src/GksGpu/Analyzer/TurbulenceAnalyzer.h | 4 ++ .../BoundaryConditions/BoundaryCondition.h | 5 +- src/GksGpu/CellProperties/CellProperties.cuh | 4 ++ src/GksGpu/CellUpdate/CellUpdate.cu | 4 ++ src/GksGpu/CellUpdate/CellUpdate.h | 4 ++ src/GksGpu/CellUpdate/Reaction.cuh | 6 ++- src/GksGpu/Communication/Communicator.cpp | 4 ++ src/GksGpu/Communication/Communicator.cu | 6 ++- src/GksGpu/Communication/Communicator.h | 5 ++ src/GksGpu/Communication/MpiUtility.cpp | 4 ++ src/GksGpu/Communication/MpiUtility.h | 5 ++ src/GksGpu/CudaUtility/CudaRunKernel.hpp | 4 ++ src/GksGpu/CudaUtility/CudaUtility.cpp | 4 ++ src/GksGpu/CudaUtility/CudaUtility.h | 4 ++ src/GksGpu/DataBase/DataBase.cpp | 4 ++ src/GksGpu/DataBase/DataBase.h | 8 ++- src/GksGpu/DataBase/DataBaseAllocator.cpp | 4 ++ src/GksGpu/DataBase/DataBaseAllocator.h | 11 ++-- src/GksGpu/DataBase/DataBaseAllocatorCPU.cpp | 4 ++ src/GksGpu/DataBase/DataBaseAllocatorCPU.h | 8 ++- src/GksGpu/DataBase/DataBaseAllocatorGPU.cpp | 4 ++ src/GksGpu/DataBase/DataBaseAllocatorGPU.h | 8 ++- src/GksGpu/DataBase/DataBaseStruct.h | 4 ++ src/GksGpu/Definitions/AccumulatorDataType.h | 4 ++ src/GksGpu/FlowStateData/AccessDeviceData.cuh | 4 ++ src/GksGpu/FlowStateData/FlowStateData.cuh | 4 ++ .../FlowStateData/FlowStateDataConversion.cuh | 4 ++ .../FlowStateData/ThermalDependencies.cuh | 4 ++ src/GksGpu/FluxComputation/ApplyFlux.cuh | 4 ++ src/GksGpu/FluxComputation/AssembleFlux.cuh | 4 ++ .../FluxComputation/ExpansionCoefficients.cuh | 4 ++ src/GksGpu/FluxComputation/FluxComputation.cu | 4 ++ src/GksGpu/FluxComputation/FluxComputation.h | 4 ++ src/GksGpu/FluxComputation/Moments.cuh | 4 ++ src/GksGpu/FluxComputation/Reconstruction.cuh | 4 ++ src/GksGpu/FluxComputation/Smagorinsky.cuh | 4 ++ src/GksGpu/FluxComputation/SutherlandsLaw.cuh | 4 ++ src/GksGpu/FluxComputation/Transformation.cuh | 4 ++ src/GksGpu/Initializer/Initializer.cpp | 4 ++ src/GksGpu/Initializer/Initializer.h | 4 ++ src/GksGpu/Initializer/InitializerKernel.cu | 4 ++ src/GksGpu/Interface/CoarseToFineKernel.cu | 4 ++ src/GksGpu/Interface/FineToCoarseKernel.cu | 4 ++ src/GksGpu/Interface/Interface.h | 4 ++ src/GksGpu/Parameters/Parameters.h | 4 ++ src/GksGpu/Restart/Restart.cpp | 6 ++- src/GksGpu/Restart/Restart.h | 4 ++ src/GksGpu/TimeStepping/NestedTimeStep.cpp | 6 ++- src/GksGpu/TimeStepping/NestedTimeStep.h | 3 ++ src/GksVtkAdapter/VTKAdapter.cpp | 50 +++++++++---------- src/GksVtkAdapter/VTKAdapter.h | 4 +- src/GksVtkAdapter/VTKInterface.h | 28 ++++++----- 67 files changed, 316 insertions(+), 57 deletions(-) diff --git a/src/GksGpu/Analyzer/ConvergenceAnalyzer.cpp b/src/GksGpu/Analyzer/ConvergenceAnalyzer.cpp index 77264712c..2125ceb6c 100644 --- a/src/GksGpu/Analyzer/ConvergenceAnalyzer.cpp +++ b/src/GksGpu/Analyzer/ConvergenceAnalyzer.cpp @@ -10,6 +10,8 @@ #include "FlowStateData/AccessDeviceData.cuh" +namespace GksGpu { + ConvergenceAnalyzer::ConvergenceAnalyzer(SPtr<DataBase> dataBase, uint outputIter, real convergenceThreshold) { this->dataBase = dataBase; @@ -132,3 +134,5 @@ void ConvergenceAnalyzer::printL2Change(ConservedVariables L2Change) *logging::out << logging::Logger::INFO_HIGH << header.str() << "\n"; *logging::out << logging::Logger::INFO_HIGH << body.str() << "\n"; } + +} // namespace GksGpu diff --git a/src/GksGpu/Analyzer/ConvergenceAnalyzer.h b/src/GksGpu/Analyzer/ConvergenceAnalyzer.h index 116d3dad3..ae9a54098 100644 --- a/src/GksGpu/Analyzer/ConvergenceAnalyzer.h +++ b/src/GksGpu/Analyzer/ConvergenceAnalyzer.h @@ -11,6 +11,8 @@ #include "FlowStateData/FlowStateData.cuh" +namespace GksGpu { + struct DataBase; class VF_PUBLIC ConvergenceAnalyzer @@ -41,4 +43,6 @@ private: }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/CupsAnalyzer.cpp b/src/GksGpu/Analyzer/CupsAnalyzer.cpp index 86dc316a2..3407db77f 100644 --- a/src/GksGpu/Analyzer/CupsAnalyzer.cpp +++ b/src/GksGpu/Analyzer/CupsAnalyzer.cpp @@ -10,6 +10,8 @@ #include "DataBase/DataBase.h" +namespace GksGpu { + CupsAnalyzer::CupsAnalyzer(SPtr<DataBase> dataBase, bool outputPerTime, real outputTime, bool outputPerIter, uint outputIter) @@ -127,4 +129,6 @@ std::string CupsAnalyzer::getTimeString(real time) return timeString.str(); } +} // namespace GksGpu + diff --git a/src/GksGpu/Analyzer/CupsAnalyzer.h b/src/GksGpu/Analyzer/CupsAnalyzer.h index 49651a221..41f06d32e 100644 --- a/src/GksGpu/Analyzer/CupsAnalyzer.h +++ b/src/GksGpu/Analyzer/CupsAnalyzer.h @@ -9,6 +9,8 @@ #include "Core/DataTypes.h" #include "Core/Timer/Timer.h" +namespace GksGpu { + struct DataBase; class VF_PUBLIC CupsAnalyzer @@ -52,4 +54,6 @@ private: std::string getTimeString( real time ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/EnstrophyAnalyzer.cu b/src/GksGpu/Analyzer/EnstrophyAnalyzer.cu index 9ab9e1644..5a3dc76db 100644 --- a/src/GksGpu/Analyzer/EnstrophyAnalyzer.cu +++ b/src/GksGpu/Analyzer/EnstrophyAnalyzer.cu @@ -21,6 +21,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void enstrophyKernel ( DataBaseStruct dataBase, Parameters parameters, real* enstrophy, uint nx, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void enstrophyFunction( DataBaseStruct dataBase, Parameters parameters, real* enstrophy, uint nx, uint startIndex, uint index ); @@ -337,4 +339,6 @@ void EnstrophyAnalyzer::writeToFile(std::string filename) *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } +} // namespace GksGpu + diff --git a/src/GksGpu/Analyzer/EnstrophyAnalyzer.h b/src/GksGpu/Analyzer/EnstrophyAnalyzer.h index 41393953d..259362d78 100644 --- a/src/GksGpu/Analyzer/EnstrophyAnalyzer.h +++ b/src/GksGpu/Analyzer/EnstrophyAnalyzer.h @@ -13,6 +13,8 @@ #include "FlowStateData/FlowStateData.cuh" +namespace GksGpu { + struct DataBase; class VF_PUBLIC EnstrophyAnalyzer @@ -39,4 +41,6 @@ public: }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/HeatFluxAnalyzer.cu b/src/GksGpu/Analyzer/HeatFluxAnalyzer.cu index 4e8b2d377..e03c8fe52 100644 --- a/src/GksGpu/Analyzer/HeatFluxAnalyzer.cu +++ b/src/GksGpu/Analyzer/HeatFluxAnalyzer.cu @@ -26,6 +26,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void heatFluxKernel ( DataBaseStruct dataBase, GksGpu::BoundaryConditionStruct boundaryCondition, Parameters parameters, real* heatFlux, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void heatFluxFunction( DataBaseStruct& dataBase, GksGpu::BoundaryConditionStruct& boundaryCondition, Parameters& parameters, real* heatFlux, uint startIndex, uint index ); @@ -144,4 +146,6 @@ void HeatFluxAnalyzer::writeToFile(std::string filename) *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } +} // namespace GksGpu + diff --git a/src/GksGpu/Analyzer/HeatFluxAnalyzer.h b/src/GksGpu/Analyzer/HeatFluxAnalyzer.h index 1c94955d8..fcdeb82a6 100644 --- a/src/GksGpu/Analyzer/HeatFluxAnalyzer.h +++ b/src/GksGpu/Analyzer/HeatFluxAnalyzer.h @@ -15,6 +15,8 @@ #include "Parameters/Parameters.h" +namespace GksGpu { + struct DataBase; class VF_PUBLIC HeatFluxAnalyzer @@ -45,4 +47,6 @@ public: }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/KineticEnergyAnalyzer.cu b/src/GksGpu/Analyzer/KineticEnergyAnalyzer.cu index 88bbc2c00..e2df78f78 100644 --- a/src/GksGpu/Analyzer/KineticEnergyAnalyzer.cu +++ b/src/GksGpu/Analyzer/KineticEnergyAnalyzer.cu @@ -21,6 +21,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void kineticEnergyKernel ( DataBaseStruct dataBase, real* kineticEnergy, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void kineticEnergyFunction( DataBaseStruct dataBase, real* kineticEnergy, uint startIndex, uint index ); @@ -107,4 +109,6 @@ void KineticEnergyAnalyzer::writeToFile(std::string filename) *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } +} // namespace GksGpu + diff --git a/src/GksGpu/Analyzer/KineticEnergyAnalyzer.h b/src/GksGpu/Analyzer/KineticEnergyAnalyzer.h index 32945c660..d8c25160f 100644 --- a/src/GksGpu/Analyzer/KineticEnergyAnalyzer.h +++ b/src/GksGpu/Analyzer/KineticEnergyAnalyzer.h @@ -11,6 +11,8 @@ #include "FlowStateData/FlowStateData.cuh" +namespace GksGpu { + struct DataBase; class VF_PUBLIC KineticEnergyAnalyzer @@ -35,4 +37,6 @@ public: }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.cu b/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.cu index c605bb68e..bba7a1e88 100644 --- a/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.cu +++ b/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.cu @@ -28,6 +28,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void pointTimeSeriesKernel ( DataBaseStruct dataBase, PointTimeSeriesAnalyzerStruct pointTimeSeriesAnalyzer, Parameters parameters, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void pointTimeSeriesFunction( DataBaseStruct dataBase, PointTimeSeriesAnalyzerStruct pointTimeSeriesAnalyzer, Parameters parameters, uint startIndex, uint index ); @@ -189,4 +191,6 @@ void PointTimeSeriesAnalyzer::download() checkCudaErrors( cudaMemcpy( this->hostSeries.data() + oldSize, this->deviceSeries , sizeof(real) * outputIter, cudaMemcpyDeviceToHost ) ); } +} // namespace GksGpu + diff --git a/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.h b/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.h index 867ae1fd6..013c0be3c 100644 --- a/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.h +++ b/src/GksGpu/Analyzer/PointTimeSeriesAnalyzer.h @@ -11,9 +11,12 @@ #include "Core/DataTypes.h" #include "Core/VectorTypes.h" +class GksMeshAdapter; + +namespace GksGpu { + struct DataBase; struct Parameters; -class GksMeshAdapter; struct PointTimeSeriesAnalyzerStruct { @@ -67,4 +70,6 @@ public: void download(); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/PointTimeSeriesCollector.cpp b/src/GksGpu/Analyzer/PointTimeSeriesCollector.cpp index d1bc55c34..81918b256 100644 --- a/src/GksGpu/Analyzer/PointTimeSeriesCollector.cpp +++ b/src/GksGpu/Analyzer/PointTimeSeriesCollector.cpp @@ -9,6 +9,8 @@ #include "Parameters/Parameters.h" +namespace GksGpu { + PointTimeSeriesCollector::~PointTimeSeriesCollector() { } @@ -78,3 +80,5 @@ void PointTimeSeriesCollector::writeToFile(std::string filename) *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } + +} // namespace GksGpu diff --git a/src/GksGpu/Analyzer/PointTimeseriesCollector.h b/src/GksGpu/Analyzer/PointTimeseriesCollector.h index 4ed4c6ab8..364362220 100644 --- a/src/GksGpu/Analyzer/PointTimeseriesCollector.h +++ b/src/GksGpu/Analyzer/PointTimeseriesCollector.h @@ -12,10 +12,13 @@ #include "Core/DataTypes.h" #include "Core/VectorTypes.h" +class GksMeshAdapter; + +namespace GksGpu { + class PointTimeSeriesAnalyzer; struct DataBase; struct Parameters; -class GksMeshAdapter; class VF_PUBLIC PointTimeSeriesCollector { @@ -36,4 +39,6 @@ public: void writeToFile( std::string filename ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Analyzer/TurbulenceAnalyzer.cu b/src/GksGpu/Analyzer/TurbulenceAnalyzer.cu index 66c81ff51..d05c47cd2 100644 --- a/src/GksGpu/Analyzer/TurbulenceAnalyzer.cu +++ b/src/GksGpu/Analyzer/TurbulenceAnalyzer.cu @@ -26,6 +26,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void turbulenceKernel ( DataBaseStruct dataBase, TurbulenceAnalyzerStruct turbulenceAnalyzer, Parameters parameters, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void turbulenceFunction( DataBaseStruct dataBase, TurbulenceAnalyzerStruct turbulenceAnalyzer, Parameters parameters, uint startIndex, uint index ); @@ -424,4 +426,6 @@ void TurbulenceAnalyzer::upload() if( collect_p ) checkCudaErrors( cudaMemcpy( this->p , this->h_p.data() , sizeof(real) * dataBase->numberOfCells, cudaMemcpyHostToDevice ) ); } +} // namespace GksGpu + diff --git a/src/GksGpu/Analyzer/TurbulenceAnalyzer.h b/src/GksGpu/Analyzer/TurbulenceAnalyzer.h index 8965e96f5..b7686496c 100644 --- a/src/GksGpu/Analyzer/TurbulenceAnalyzer.h +++ b/src/GksGpu/Analyzer/TurbulenceAnalyzer.h @@ -12,6 +12,8 @@ #include "FlowStateData/FlowStateData.cuh" +namespace GksGpu { + struct DataBase; struct Parameters; @@ -120,4 +122,6 @@ public: void upload(); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/BoundaryConditions/BoundaryCondition.h b/src/GksGpu/BoundaryConditions/BoundaryCondition.h index 8ec82c2c0..70be3a6a0 100644 --- a/src/GksGpu/BoundaryConditions/BoundaryCondition.h +++ b/src/GksGpu/BoundaryConditions/BoundaryCondition.h @@ -15,11 +15,12 @@ #include "Parameters/Parameters.h" class GksMeshAdapter; -class DataBaseAllocator; -struct DataBase; namespace GksGpu{ +class DataBaseAllocator; +struct DataBase; + struct BoundaryConditionStruct { uint numberOfCells; diff --git a/src/GksGpu/CellProperties/CellProperties.cuh b/src/GksGpu/CellProperties/CellProperties.cuh index 246c462f3..1ce36e85b 100644 --- a/src/GksGpu/CellProperties/CellProperties.cuh +++ b/src/GksGpu/CellProperties/CellProperties.cuh @@ -22,6 +22,8 @@ ////////////////////////////////////////////////////////////////////////// +namespace GksGpu { + typedef unsigned char CellProperties; ////////////////////////////////////////////////////////////////////////// @@ -43,5 +45,7 @@ __host__ __device__ inline bool isCellProperties( const CellProperties& left, co ////////////////////////////////////////////////////////////////////////// +} // namespace GksGpu + #endif diff --git a/src/GksGpu/CellUpdate/CellUpdate.cu b/src/GksGpu/CellUpdate/CellUpdate.cu index 2af0fc30a..a133ad759 100644 --- a/src/GksGpu/CellUpdate/CellUpdate.cu +++ b/src/GksGpu/CellUpdate/CellUpdate.cu @@ -22,6 +22,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void cellUpdateKernel ( DataBaseStruct dataBase, Parameters parameters, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void cellUpdateFunction( DataBaseStruct dataBase, Parameters parameters, uint startIndex, uint index ); @@ -214,3 +216,5 @@ __host__ __device__ inline void cellUpdateFunction(DataBaseStruct dataBase, Para writeCellData(cellIndex, dataBase, cons); } + +} // namespace GksGpu diff --git a/src/GksGpu/CellUpdate/CellUpdate.h b/src/GksGpu/CellUpdate/CellUpdate.h index ce725cdc9..a64613bbe 100644 --- a/src/GksGpu/CellUpdate/CellUpdate.h +++ b/src/GksGpu/CellUpdate/CellUpdate.h @@ -9,6 +9,8 @@ #include "DataBase/DataBase.h" #include "Parameters/Parameters.h" +namespace GksGpu { + class VF_PUBLIC CellUpdate { public: @@ -18,4 +20,6 @@ public: uint level ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/CellUpdate/Reaction.cuh b/src/GksGpu/CellUpdate/Reaction.cuh index 5f7820d31..1e3c7b2f6 100644 --- a/src/GksGpu/CellUpdate/Reaction.cuh +++ b/src/GksGpu/CellUpdate/Reaction.cuh @@ -19,6 +19,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + inline __host__ __device__ real getTurbulentViscosityDeardorff(const DataBaseStruct& dataBase, const Parameters& parameters, const uint cellIndex, const ConservedVariables& cons ) { // See FDS 6 Technical Reference Guide, Section 4.2.3 @@ -184,4 +186,6 @@ __host__ __device__ inline void chemicalReaction(DataBaseStruct dataBase, Parame } #endif // USE_PASSIVE_SCALAR -} \ No newline at end of file +} + +} // namespace GksGpu \ No newline at end of file diff --git a/src/GksGpu/Communication/Communicator.cpp b/src/GksGpu/Communication/Communicator.cpp index bc8ea73e0..3e2eaca36 100644 --- a/src/GksGpu/Communication/Communicator.cpp +++ b/src/GksGpu/Communication/Communicator.cpp @@ -22,6 +22,8 @@ #include "CudaUtility/CudaUtility.h" +namespace GksGpu { + int Communicator::tagSendPositive = 0; int Communicator::tagSendNegative = 1; @@ -95,3 +97,5 @@ void Communicator::recvData( SPtr<DataBase> dataBase, int tag ) #endif // USE_CUDA_AWARE_MPI } + +} // namespace GksGpu diff --git a/src/GksGpu/Communication/Communicator.cu b/src/GksGpu/Communication/Communicator.cu index bf2ca31af..5cdbcd69e 100644 --- a/src/GksGpu/Communication/Communicator.cu +++ b/src/GksGpu/Communication/Communicator.cu @@ -24,6 +24,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + ////////////////////////////////////////////////////////////////////////// __global__ void sendBufferKernel ( const DataBaseStruct dataBase, @@ -158,4 +160,6 @@ __host__ __device__ inline void recvBufferFunction( const DataBaseStruct dataBas dataBase.data[ RHO_S_1(cellIdx, dataBase.numberOfCells) ] = recvBuffer[ RHO_S_1(index, numberOfRecvNodes) ] ; dataBase.data[ RHO_S_2(cellIdx, dataBase.numberOfCells) ] = recvBuffer[ RHO_S_2(index, numberOfRecvNodes) ] ; #endif // USE_PASSIVE_SCALAR -} \ No newline at end of file +} + +} // namespace GksGpu \ No newline at end of file diff --git a/src/GksGpu/Communication/Communicator.h b/src/GksGpu/Communication/Communicator.h index 7434f121f..6aa564ae6 100644 --- a/src/GksGpu/Communication/Communicator.h +++ b/src/GksGpu/Communication/Communicator.h @@ -13,6 +13,9 @@ #include "Core/VectorTypes.h" class GksMeshAdapter; + +namespace GksGpu { + class DataBaseAllocator; struct DataBase; @@ -54,4 +57,6 @@ struct VF_PUBLIC Communicator : public std::enable_shared_from_this<Communicator void recvData( SPtr<DataBase> dataBase, int tag ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Communication/MpiUtility.cpp b/src/GksGpu/Communication/MpiUtility.cpp index 3f7277628..1dbfcaf15 100644 --- a/src/GksGpu/Communication/MpiUtility.cpp +++ b/src/GksGpu/Communication/MpiUtility.cpp @@ -5,6 +5,8 @@ #define ENV_LOCAL_RANK "OMPI_COMM_WORLD_RANK" #define ENV_COMM_WORLD_SIZE "OMPI_COMM_WORLD_SIZE" +namespace GksGpu { + int MpiUtility::getMpiRankBeforeInit() { char * localRankStr = NULL; @@ -34,3 +36,5 @@ int MpiUtility::getMpiWorldSizeBeforeInit() return 1; } } + +} // namespace GksGpu diff --git a/src/GksGpu/Communication/MpiUtility.h b/src/GksGpu/Communication/MpiUtility.h index 18f408ed7..6fbab567a 100644 --- a/src/GksGpu/Communication/MpiUtility.h +++ b/src/GksGpu/Communication/MpiUtility.h @@ -10,6 +10,9 @@ #include "Core/VectorTypes.h" class GksMeshAdapter; + +namespace GksGpu { + class DataBaseAllocator; struct DataBase; @@ -20,4 +23,6 @@ struct VF_PUBLIC MpiUtility static int getMpiWorldSizeBeforeInit(); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/CudaUtility/CudaRunKernel.hpp b/src/GksGpu/CudaUtility/CudaRunKernel.hpp index ded692e4a..91de639cc 100644 --- a/src/GksGpu/CudaUtility/CudaRunKernel.hpp +++ b/src/GksGpu/CudaUtility/CudaRunKernel.hpp @@ -8,6 +8,8 @@ #include "CudaUtility/CudaUtility.h" +namespace GksGpu { + template<typename KernelFunctor, typename FunctionFunctor, typename... TArgs> void runKernel(KernelFunctor kernel, FunctionFunctor function, std::string deviceType, const CudaUtility::CudaGrid& grid, TArgs... args) { @@ -27,4 +29,6 @@ void runKernel(KernelFunctor kernel, FunctionFunctor function, std::string devic } } +} // namespace GksGpu + #endif diff --git a/src/GksGpu/CudaUtility/CudaUtility.cpp b/src/GksGpu/CudaUtility/CudaUtility.cpp index d77c928a8..0cd9e948d 100644 --- a/src/GksGpu/CudaUtility/CudaUtility.cpp +++ b/src/GksGpu/CudaUtility/CudaUtility.cpp @@ -8,6 +8,8 @@ #include "Core/DataTypes.h" #include "Core/Logger/Logger.h" +namespace GksGpu { + cudaStream_t CudaUtility::computeStream = nullptr; cudaStream_t CudaUtility::communicationStream = nullptr; @@ -90,3 +92,5 @@ void CudaUtility::synchronizeCudaStream(cudaStream_t stream) { checkCudaErrors( cudaStreamSynchronize(stream) ); } + +} // namespace GksGpu diff --git a/src/GksGpu/CudaUtility/CudaUtility.h b/src/GksGpu/CudaUtility/CudaUtility.h index 716688d79..2eb425e7c 100644 --- a/src/GksGpu/CudaUtility/CudaUtility.h +++ b/src/GksGpu/CudaUtility/CudaUtility.h @@ -8,6 +8,8 @@ #include "Core/DataTypes.h" +namespace GksGpu { + class VF_PUBLIC CudaUtility { public: @@ -40,4 +42,6 @@ public: static void synchronizeCudaStream( cudaStream_t stream ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/DataBase/DataBase.cpp b/src/GksGpu/DataBase/DataBase.cpp index 36b6194b8..21c51b757 100644 --- a/src/GksGpu/DataBase/DataBase.cpp +++ b/src/GksGpu/DataBase/DataBase.cpp @@ -14,6 +14,8 @@ #include "GksMeshAdapter/GksMeshAdapter.h" #include "Communication/Communicator.h" +namespace GksGpu { + DataBase::DataBase( std::string type ) : myAllocator ( DataBaseAllocator::create( type ) ), numberOfNodes (0), @@ -234,3 +236,5 @@ std::string DataBase::getDeviceType() { return this->myAllocator->getDeviceType(); } + +} // namespace GksGpu diff --git a/src/GksGpu/DataBase/DataBase.h b/src/GksGpu/DataBase/DataBase.h index 5a8820ace..449e1f49b 100644 --- a/src/GksGpu/DataBase/DataBase.h +++ b/src/GksGpu/DataBase/DataBase.h @@ -19,7 +19,9 @@ class GksMeshAdapter; -namespace GksGpu{ struct BoundaryCondition; } +namespace GksGpu { + +struct BoundaryCondition; class DataBaseAllocator; struct DataBase; struct PerLevelCounts; @@ -34,7 +36,7 @@ struct VF_PUBLIC DataBase : public std::enable_shared_from_this<DataBase> SPtr<DataBaseAllocator> myAllocator; - std::vector< SPtr<GksGpu::BoundaryCondition> > boundaryConditions; + std::vector< SPtr<BoundaryCondition> > boundaryConditions; std::vector< std::array< SPtr< Communicator >, 6 > > communicators; @@ -172,4 +174,6 @@ struct VF_PUBLIC PerLevelCounts uint startOfFineToCoarse; }; +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/DataBase/DataBaseAllocator.cpp b/src/GksGpu/DataBase/DataBaseAllocator.cpp index 38e073f16..fc5a8ddf3 100644 --- a/src/GksGpu/DataBase/DataBaseAllocator.cpp +++ b/src/GksGpu/DataBase/DataBaseAllocator.cpp @@ -8,6 +8,8 @@ #include <string> +namespace GksGpu { + std::shared_ptr<DataBaseAllocator> DataBaseAllocator::create(std::string type) { if ( type == "GPU" ) @@ -27,3 +29,5 @@ DataBaseAllocator::DataBaseAllocator() DataBaseAllocator::DataBaseAllocator(const DataBaseAllocator & orig) { } + +} // namespace GksGpu diff --git a/src/GksGpu/DataBase/DataBaseAllocator.h b/src/GksGpu/DataBase/DataBaseAllocator.h index b69058898..305d9e661 100644 --- a/src/GksGpu/DataBase/DataBaseAllocator.h +++ b/src/GksGpu/DataBase/DataBaseAllocator.h @@ -10,8 +10,11 @@ #include "VirtualFluidsDefinitions.h" class GksMeshAdapter; + +namespace GksGpu { + struct DataBase; -namespace GksGpu { struct BoundaryCondition; }; +struct BoundaryCondition; struct Communicator; class VF_PUBLIC DataBaseAllocator { @@ -36,9 +39,9 @@ public: ////////////////////////////////////////////////////////////////////////// - virtual void freeMemory( GksGpu::BoundaryCondition& boundaryCondition ) = 0; + virtual void freeMemory( BoundaryCondition& boundaryCondition ) = 0; - virtual void allocateMemory( SPtr<GksGpu::BoundaryCondition> boundaryCondition, std::vector<uint> ghostCells, std::vector<uint> domainCells, std::vector<uint> secondCells ) = 0; + virtual void allocateMemory( SPtr<BoundaryCondition> boundaryCondition, std::vector<uint> ghostCells, std::vector<uint> domainCells, std::vector<uint> secondCells ) = 0; ////////////////////////////////////////////////////////////////////////// @@ -64,5 +67,7 @@ protected: }; +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/DataBase/DataBaseAllocatorCPU.cpp b/src/GksGpu/DataBase/DataBaseAllocatorCPU.cpp index 8ec4898d3..e1fe121b5 100644 --- a/src/GksGpu/DataBase/DataBaseAllocatorCPU.cpp +++ b/src/GksGpu/DataBase/DataBaseAllocatorCPU.cpp @@ -17,6 +17,8 @@ #include "Definitions/MemoryAccessPattern.h" +namespace GksGpu { + void DataBaseAllocatorCPU::freeMemory( DataBase& dataBase) { dataBase.cellToNode.clear(); @@ -256,3 +258,5 @@ std::string DataBaseAllocatorCPU::getDeviceType() { return std::string("CPU"); } + +} // namespace GksGpu diff --git a/src/GksGpu/DataBase/DataBaseAllocatorCPU.h b/src/GksGpu/DataBase/DataBaseAllocatorCPU.h index 30829ae91..35e89a3d4 100644 --- a/src/GksGpu/DataBase/DataBaseAllocatorCPU.h +++ b/src/GksGpu/DataBase/DataBaseAllocatorCPU.h @@ -8,6 +8,8 @@ #include "VirtualFluidsDefinitions.h" +namespace GksGpu { + class VF_PUBLIC DataBaseAllocatorCPU : public DataBaseAllocator { public: @@ -26,9 +28,9 @@ public: ////////////////////////////////////////////////////////////////////////// - virtual void freeMemory( GksGpu::BoundaryCondition& boundaryCondition ) override; + virtual void freeMemory( BoundaryCondition& boundaryCondition ) override; - virtual void allocateMemory( SPtr<GksGpu::BoundaryCondition> boundaryCondition, std::vector<uint> ghostCells, std::vector<uint> domainCells, std::vector<uint> secondCells ) override; + virtual void allocateMemory( SPtr<BoundaryCondition> boundaryCondition, std::vector<uint> ghostCells, std::vector<uint> domainCells, std::vector<uint> secondCells ) override; ////////////////////////////////////////////////////////////////////////// @@ -46,5 +48,7 @@ public: virtual std::string getDeviceType() override; }; +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/DataBase/DataBaseAllocatorGPU.cpp b/src/GksGpu/DataBase/DataBaseAllocatorGPU.cpp index f5b88d37d..9d1400d6f 100644 --- a/src/GksGpu/DataBase/DataBaseAllocatorGPU.cpp +++ b/src/GksGpu/DataBase/DataBaseAllocatorGPU.cpp @@ -22,6 +22,8 @@ #include "CudaUtility/CudaUtility.h" +namespace GksGpu { + void DataBaseAllocatorGPU::freeMemory( DataBase& dataBase ) { dataBase.cellToNode.clear(); @@ -299,3 +301,5 @@ std::string DataBaseAllocatorGPU::getDeviceType() { return std::string("GPU"); } + +} // namespace GksGpu diff --git a/src/GksGpu/DataBase/DataBaseAllocatorGPU.h b/src/GksGpu/DataBase/DataBaseAllocatorGPU.h index 4f60d1855..ed7418b8c 100644 --- a/src/GksGpu/DataBase/DataBaseAllocatorGPU.h +++ b/src/GksGpu/DataBase/DataBaseAllocatorGPU.h @@ -8,6 +8,8 @@ #include "VirtualFluidsDefinitions.h" +namespace GksGpu { + class VF_PUBLIC DataBaseAllocatorGPU : public DataBaseAllocator { public: @@ -26,9 +28,9 @@ public: ////////////////////////////////////////////////////////////////////////// - virtual void freeMemory( GksGpu::BoundaryCondition& boundaryCondition ) override; + virtual void freeMemory( BoundaryCondition& boundaryCondition ) override; - virtual void allocateMemory( SPtr<GksGpu::BoundaryCondition> boundaryCondition, std::vector<uint> ghostCells, std::vector<uint> domainCells, std::vector<uint> secondCells ) override; + virtual void allocateMemory( SPtr<BoundaryCondition> boundaryCondition, std::vector<uint> ghostCells, std::vector<uint> domainCells, std::vector<uint> secondCells ) override; ////////////////////////////////////////////////////////////////////////// @@ -46,5 +48,7 @@ public: virtual std::string getDeviceType() override; }; +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/DataBase/DataBaseStruct.h b/src/GksGpu/DataBase/DataBaseStruct.h index 00c30f50f..f80871920 100644 --- a/src/GksGpu/DataBase/DataBaseStruct.h +++ b/src/GksGpu/DataBase/DataBaseStruct.h @@ -5,6 +5,8 @@ #include <VirtualFluidsDefinitions.h> +namespace GksGpu{ + struct VF_PUBLIC DataBaseStruct { uint numberOfCells; @@ -38,5 +40,7 @@ struct VF_PUBLIC DataBaseStruct int* crashCellIndex; }; +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/Definitions/AccumulatorDataType.h b/src/GksGpu/Definitions/AccumulatorDataType.h index 41a4170eb..05cdeba8f 100644 --- a/src/GksGpu/Definitions/AccumulatorDataType.h +++ b/src/GksGpu/Definitions/AccumulatorDataType.h @@ -1,7 +1,11 @@ #ifndef AccumulatorDataType_H #define AccumulatorDataType_H +namespace GksGpu { + typedef float realAccumulator; //typedef double realAccumulator; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/FlowStateData/AccessDeviceData.cuh b/src/GksGpu/FlowStateData/AccessDeviceData.cuh index 8d37f14bd..3ff9848f1 100644 --- a/src/GksGpu/FlowStateData/AccessDeviceData.cuh +++ b/src/GksGpu/FlowStateData/AccessDeviceData.cuh @@ -18,6 +18,8 @@ #include "FlowStateData/FlowStateData.cuh" +namespace GksGpu { + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// __host__ __device__ inline void readCellData(const uint cellIdx, const DataBaseStruct& dataBase, ConservedVariables& cellCons) @@ -74,4 +76,6 @@ __host__ __device__ inline void writeCellDataUpdate(const uint cellIdx, const Da #endif // USE_PASSIVE_SCALAR } +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/FlowStateData/FlowStateData.cuh b/src/GksGpu/FlowStateData/FlowStateData.cuh index b7974e069..3ec3a7c9e 100644 --- a/src/GksGpu/FlowStateData/FlowStateData.cuh +++ b/src/GksGpu/FlowStateData/FlowStateData.cuh @@ -13,6 +13,8 @@ #include "Definitions/PassiveScalar.h" +namespace GksGpu { + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -249,5 +251,7 @@ __host__ __device__ inline ConservedVariables operator* ( const real left, const return result; } +} // namespace GksGpu + #endif diff --git a/src/GksGpu/FlowStateData/FlowStateDataConversion.cuh b/src/GksGpu/FlowStateData/FlowStateDataConversion.cuh index 210410c97..c33f02ea3 100644 --- a/src/GksGpu/FlowStateData/FlowStateDataConversion.cuh +++ b/src/GksGpu/FlowStateData/FlowStateDataConversion.cuh @@ -16,6 +16,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/ThermalDependencies.cuh" +namespace GksGpu { + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -76,5 +78,7 @@ __host__ __device__ inline PrimitiveVariables toPrimitiveVariables( const Conser #endif } +} // namespace GksGpu + #endif diff --git a/src/GksGpu/FlowStateData/ThermalDependencies.cuh b/src/GksGpu/FlowStateData/ThermalDependencies.cuh index 5ab85436b..045d0ffb2 100644 --- a/src/GksGpu/FlowStateData/ThermalDependencies.cuh +++ b/src/GksGpu/FlowStateData/ThermalDependencies.cuh @@ -18,6 +18,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/HeatCapacities.cuh" +namespace GksGpu { + #ifdef USE_PASSIVE_SCALAR //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -56,6 +58,8 @@ __host__ __device__ inline void setLambdaFromT( PrimitiveVariables& prim, real T #endif // USE_PASSIVE_SCALAR +} // namespace GksGpu + diff --git a/src/GksGpu/FluxComputation/ApplyFlux.cuh b/src/GksGpu/FluxComputation/ApplyFlux.cuh index 30ca4e734..da9e34b1c 100644 --- a/src/GksGpu/FluxComputation/ApplyFlux.cuh +++ b/src/GksGpu/FluxComputation/ApplyFlux.cuh @@ -10,6 +10,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/AccessDeviceData.cuh" +namespace GksGpu { + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// __host__ __device__ inline void applyFluxToNegCell( const DataBaseStruct& dataBase, @@ -133,4 +135,6 @@ __host__ __device__ inline void applyFluxToPosCell( const DataBaseStruct& dataBa #endif } +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/FluxComputation/AssembleFlux.cuh b/src/GksGpu/FluxComputation/AssembleFlux.cuh index 118a597a7..4b2773275 100644 --- a/src/GksGpu/FluxComputation/AssembleFlux.cuh +++ b/src/GksGpu/FluxComputation/AssembleFlux.cuh @@ -19,6 +19,8 @@ extern __device__ real atomicAdd(real* address, real val); #define NUMBER_OF_MOMENTS 7 +namespace GksGpu { + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -573,4 +575,6 @@ __host__ __device__ inline void assembleFlux( const PrimitiveVariables& facePrim ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/FluxComputation/ExpansionCoefficients.cuh b/src/GksGpu/FluxComputation/ExpansionCoefficients.cuh index f5e6dcf44..52e5133e6 100644 --- a/src/GksGpu/FluxComputation/ExpansionCoefficients.cuh +++ b/src/GksGpu/FluxComputation/ExpansionCoefficients.cuh @@ -10,6 +10,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/AccessDeviceData.cuh" +namespace GksGpu { + __host__ __device__ inline void computeExpansionCoefficients(const PrimitiveVariables & facePrim, const ConservedVariables & gradient, const real K, @@ -53,4 +55,6 @@ __host__ __device__ inline void computeExpansionCoefficients(const PrimitiveVari #endif // USE_PASSIVE_SCALAR } +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/FluxComputation/FluxComputation.cu b/src/GksGpu/FluxComputation/FluxComputation.cu index 087c6e9d2..df2a63bc8 100644 --- a/src/GksGpu/FluxComputation/FluxComputation.cu +++ b/src/GksGpu/FluxComputation/FluxComputation.cu @@ -24,6 +24,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void fluxKernel ( DataBaseStruct dataBase, Parameters parameters, char direction, uint startIndex, uint numberOfEntities ); __host__ __device__ inline void fluxFunction( DataBaseStruct dataBase, Parameters parameters, char direction, uint startIndex, uint index ); @@ -472,3 +474,5 @@ __host__ __device__ inline void fluxFunction(DataBaseStruct dataBase, Parameters } } } + +} // namespace GksGpu diff --git a/src/GksGpu/FluxComputation/FluxComputation.h b/src/GksGpu/FluxComputation/FluxComputation.h index 673dcc929..74bc57621 100644 --- a/src/GksGpu/FluxComputation/FluxComputation.h +++ b/src/GksGpu/FluxComputation/FluxComputation.h @@ -9,6 +9,8 @@ #include "DataBase/DataBase.h" #include "Parameters/Parameters.h" +namespace GksGpu { + class VF_PUBLIC FluxComputation { public: @@ -19,4 +21,6 @@ public: bool evaluateCommFaces = false); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/FluxComputation/Moments.cuh b/src/GksGpu/FluxComputation/Moments.cuh index ba4ef47ce..f0a83b275 100644 --- a/src/GksGpu/FluxComputation/Moments.cuh +++ b/src/GksGpu/FluxComputation/Moments.cuh @@ -12,6 +12,8 @@ #define NUMBER_OF_MOMENTS 7 +namespace GksGpu { + __host__ __device__ inline void computeMoments( const PrimitiveVariables & facePrim, const real K, real momentU [NUMBER_OF_MOMENTS], @@ -46,6 +48,8 @@ __host__ __device__ inline void computeMoments( const PrimitiveVariables & faceP momentXi[6] = ( K + c4o1 ) / ( c2o1 * facePrim.lambda ) * momentXi[4]; } +} // namespace GksGpu + #endif \ No newline at end of file diff --git a/src/GksGpu/FluxComputation/Reconstruction.cuh b/src/GksGpu/FluxComputation/Reconstruction.cuh index 6f7c0b45e..131bd8280 100644 --- a/src/GksGpu/FluxComputation/Reconstruction.cuh +++ b/src/GksGpu/FluxComputation/Reconstruction.cuh @@ -13,6 +13,8 @@ #include "FlowStateData/AccessDeviceData.cuh" #include "FlowStateData/ThermalDependencies.cuh" +namespace GksGpu { + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -250,6 +252,8 @@ __host__ __device__ inline void reconstructFiniteDifferences( const uint faceInd } } +} // namespace GksGpu + diff --git a/src/GksGpu/FluxComputation/Smagorinsky.cuh b/src/GksGpu/FluxComputation/Smagorinsky.cuh index d77eb6b07..f94aeb5c6 100644 --- a/src/GksGpu/FluxComputation/Smagorinsky.cuh +++ b/src/GksGpu/FluxComputation/Smagorinsky.cuh @@ -13,6 +13,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/AccessDeviceData.cuh" +namespace GksGpu { + inline __host__ __device__ real getTurbulentViscositySmagorinsky(const Parameters & parameters, const PrimitiveVariables& facePrim, const ConservedVariables gradX1, @@ -48,4 +50,6 @@ inline __host__ __device__ real getTurbulentViscositySmagorinsky(const Parameter return facePrim.rho * Cs*Cs * parameters.dx*parameters.dx * S; } +} // namespace GksGpu + #endif diff --git a/src/GksGpu/FluxComputation/SutherlandsLaw.cuh b/src/GksGpu/FluxComputation/SutherlandsLaw.cuh index 6587519ab..4f1f94d2a 100644 --- a/src/GksGpu/FluxComputation/SutherlandsLaw.cuh +++ b/src/GksGpu/FluxComputation/SutherlandsLaw.cuh @@ -13,6 +13,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/AccessDeviceData.cuh" +namespace GksGpu { + inline __host__ __device__ real sutherlandsLaw(const Parameters & parameters, const real r) { real S = real( 110.5 ); @@ -24,4 +26,6 @@ inline __host__ __device__ real sutherlandsLaw(const Parameters & parameters, co return parameters.mu * sqrt( r * r * r ) * ( C + c1o1 ) / ( r + C ); } +} // namespace GksGpu + #endif diff --git a/src/GksGpu/FluxComputation/Transformation.cuh b/src/GksGpu/FluxComputation/Transformation.cuh index 027dcb173..26a575c73 100644 --- a/src/GksGpu/FluxComputation/Transformation.cuh +++ b/src/GksGpu/FluxComputation/Transformation.cuh @@ -10,6 +10,8 @@ #include "FlowStateData/FlowStateData.cuh" #include "FlowStateData/AccessDeviceData.cuh" +namespace GksGpu { + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// __host__ __device__ inline void transformGlobalToLocal(Vec3& vector, const char direction) @@ -120,4 +122,6 @@ __host__ __device__ inline void transformLocalToGlobal(PrimitiveVariables& prim, //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Initializer/Initializer.cpp b/src/GksGpu/Initializer/Initializer.cpp index d121262fe..ee1b8e89a 100644 --- a/src/GksGpu/Initializer/Initializer.cpp +++ b/src/GksGpu/Initializer/Initializer.cpp @@ -12,6 +12,8 @@ #include "Definitions/MemoryAccessPattern.h" #include "Definitions/PassiveScalar.h" +namespace GksGpu { + void Initializer::interpret(SPtr<DataBase> dataBase, std::function<ConservedVariables(Vec3)> initialCondition) { for( uint cellIdx = 0; cellIdx < dataBase->numberOfCells; cellIdx++ ){ @@ -33,3 +35,5 @@ void Initializer::interpret(SPtr<DataBase> dataBase, std::function<ConservedVari return; } + +} // namespace GksGpu diff --git a/src/GksGpu/Initializer/Initializer.h b/src/GksGpu/Initializer/Initializer.h index 696a6226f..481d5410c 100644 --- a/src/GksGpu/Initializer/Initializer.h +++ b/src/GksGpu/Initializer/Initializer.h @@ -14,6 +14,8 @@ #include "DataBase/DataBase.h" #include "FlowStateData/FlowStateData.cuh" +namespace GksGpu { + class VF_PUBLIC Initializer { public: @@ -23,4 +25,6 @@ public: static void initializeDataUpdate( SPtr<DataBase> dataBase ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Initializer/InitializerKernel.cu b/src/GksGpu/Initializer/InitializerKernel.cu index 96c338119..a929f3b4f 100644 --- a/src/GksGpu/Initializer/InitializerKernel.cu +++ b/src/GksGpu/Initializer/InitializerKernel.cu @@ -14,6 +14,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + __global__ void initializeDataUpdateKernel ( DataBaseStruct dataBase, uint numberOfEntities ); __host__ __device__ inline void initializeDataUpdateFunction( DataBaseStruct dataBase, uint index ); @@ -63,3 +65,5 @@ __host__ __device__ inline void initializeDataUpdateFunction(DataBaseStruct data dataBase.diffusivity[ index ] = c1o1; } + +} // namespace GksGpu diff --git a/src/GksGpu/Interface/CoarseToFineKernel.cu b/src/GksGpu/Interface/CoarseToFineKernel.cu index 828da1ea5..b6536353f 100644 --- a/src/GksGpu/Interface/CoarseToFineKernel.cu +++ b/src/GksGpu/Interface/CoarseToFineKernel.cu @@ -18,6 +18,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + ////////////////////////////////////////////////////////////////////////// __global__ void coarseToFineKernel ( DataBaseStruct dataBase, uint startIndex, uint numberOfEntities ); @@ -421,3 +423,5 @@ __host__ __device__ inline void coarseToFineFunctionPrimitiveInterpolation( Data writeCellData(childCellIndex, dataBase, childCons); } } + +} // namespace GksGpu diff --git a/src/GksGpu/Interface/FineToCoarseKernel.cu b/src/GksGpu/Interface/FineToCoarseKernel.cu index 5c7b4dc4c..b6b3bc32c 100644 --- a/src/GksGpu/Interface/FineToCoarseKernel.cu +++ b/src/GksGpu/Interface/FineToCoarseKernel.cu @@ -18,6 +18,8 @@ #include "CudaUtility/CudaRunKernel.hpp" +namespace GksGpu { + ////////////////////////////////////////////////////////////////////////// __global__ void fineToCoarseKernel ( DataBaseStruct dataBase, uint startIndex, uint numberOfEntities ); @@ -109,3 +111,5 @@ __host__ __device__ inline void fineToCoarseFunctionPrimitiveInterpolation( Data writeCellData(cellIdx, dataBase, parentCons); } } + +} // namespace GksGpu diff --git a/src/GksGpu/Interface/Interface.h b/src/GksGpu/Interface/Interface.h index 0e2ecbf4c..4e14f9663 100644 --- a/src/GksGpu/Interface/Interface.h +++ b/src/GksGpu/Interface/Interface.h @@ -8,6 +8,8 @@ #include "DataBase/DataBase.h" +namespace GksGpu { + class VF_PUBLIC Interface { public: @@ -16,4 +18,6 @@ public: static void runCoarseToFine( SPtr<DataBase> dataBase, uint level ); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Parameters/Parameters.h b/src/GksGpu/Parameters/Parameters.h index 268856795..c65023c20 100644 --- a/src/GksGpu/Parameters/Parameters.h +++ b/src/GksGpu/Parameters/Parameters.h @@ -6,6 +6,8 @@ #include <VirtualFluidsDefinitions.h> +namespace GksGpu { + enum class VF_PUBLIC ViscosityModel{ constant, sutherlandsLaw @@ -69,4 +71,6 @@ struct VF_PUBLIC Parameters real reactionLimiter = real(1.005); }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/Restart/Restart.cpp b/src/GksGpu/Restart/Restart.cpp index fa7a6044f..0f63e8c8f 100644 --- a/src/GksGpu/Restart/Restart.cpp +++ b/src/GksGpu/Restart/Restart.cpp @@ -11,6 +11,8 @@ #include "Definitions/MemoryAccessPattern.h" +namespace GksGpu { + void Restart::writeRestart( SPtr<DataBase> dataBase, std::string filename, uint iter ) { filename += ".rst"; @@ -89,4 +91,6 @@ bool Restart::readRestart( SPtr<DataBase> dataBase, std::string filename, uint& *logging::out << logging::Logger::INFO_HIGH << "done!\n"; return true; -} \ No newline at end of file +} + +} // namespace GksGpu \ No newline at end of file diff --git a/src/GksGpu/Restart/Restart.h b/src/GksGpu/Restart/Restart.h index 5dcd16771..6eb563620 100644 --- a/src/GksGpu/Restart/Restart.h +++ b/src/GksGpu/Restart/Restart.h @@ -9,6 +9,8 @@ #include "Core/PointerDefinitions.h" #include "Core/DataTypes.h" +namespace GksGpu { + struct DataBase; class VF_PUBLIC Restart @@ -24,5 +26,7 @@ private: ~Restart(){} }; +} // namespace GksGpu + #endif diff --git a/src/GksGpu/TimeStepping/NestedTimeStep.cpp b/src/GksGpu/TimeStepping/NestedTimeStep.cpp index 4653d93b5..516349ff6 100644 --- a/src/GksGpu/TimeStepping/NestedTimeStep.cpp +++ b/src/GksGpu/TimeStepping/NestedTimeStep.cpp @@ -12,6 +12,8 @@ #include "Initializer/Initializer.h" #include "CudaUtility/CudaUtility.h" +namespace GksGpu { + void TimeStepping::nestedTimeStep( SPtr<DataBase> dataBase, Parameters parameters, uint level ) @@ -30,7 +32,7 @@ void TimeStepping::nestedTimeStep( SPtr<DataBase> dataBase, ////////////////////////////////////////////////////////////////////////// - for( SPtr<GksGpu::BoundaryCondition> bc : dataBase->boundaryConditions ) + for( SPtr<BoundaryCondition> bc : dataBase->boundaryConditions ) { bc->runBoundaryConditionKernel( dataBase, parameters, level ); } @@ -101,3 +103,5 @@ void TimeStepping::nestedTimeStep( SPtr<DataBase> dataBase, ////////////////////////////////////////////////////////////////////////// } +} // namespace GksGpu + diff --git a/src/GksGpu/TimeStepping/NestedTimeStep.h b/src/GksGpu/TimeStepping/NestedTimeStep.h index 353613b5a..400a1a904 100644 --- a/src/GksGpu/TimeStepping/NestedTimeStep.h +++ b/src/GksGpu/TimeStepping/NestedTimeStep.h @@ -8,6 +8,7 @@ #include "DataBase/DataBase.h" #include "Parameters/Parameters.h" +namespace GksGpu{ class VF_PUBLIC TimeStepping { @@ -19,4 +20,6 @@ public: }; +} // namespace GksGpu + #endif diff --git a/src/GksVtkAdapter/VTKAdapter.cpp b/src/GksVtkAdapter/VTKAdapter.cpp index d8db04f9d..6e20fdd5a 100644 --- a/src/GksVtkAdapter/VTKAdapter.cpp +++ b/src/GksVtkAdapter/VTKAdapter.cpp @@ -26,7 +26,7 @@ #include "GksGpu/FlowStateData/FlowStateData.cuh" #include "GksGpu/FlowStateData/FlowStateDataConversion.cuh" -vtkGridPtr getVtkUnstructuredOctGrid( SPtr<DataBase> dataBase, bool excludeGhostCells ) +vtkGridPtr getVtkUnstructuredOctGrid( SPtr<GksGpu::DataBase> dataBase, bool excludeGhostCells ) { vtkGridPtr grid = vtkGridPtr::New(); @@ -126,7 +126,7 @@ void addVectorCellData( vtkGridPtr grid, grid->GetCellData()->AddArray( data ); } -void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters) +void addBaseData(vtkGridPtr grid, SPtr<GksGpu::DataBase> dataBase, GksGpu::Parameters parameters) { addScalarIntCellData( grid, dataBase->numberOfCells, "CellIdx", [&] (uint cellIdx) { return cellIdx; @@ -138,7 +138,7 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters addScalarRealCellData( grid, dataBase->numberOfCells, "T", [&] (uint cellIdx) { - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = dataBase->dataHost[ RHO__(cellIdx, dataBase->numberOfCells) ]; cons.rhoU = dataBase->dataHost[ RHO_U(cellIdx, dataBase->numberOfCells) ]; @@ -150,7 +150,7 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters cons.rhoS_2 = dataBase->dataHost[ RHO_S_2(cellIdx, dataBase->numberOfCells) ]; #endif // USE_PASSIVE_SCALAR - PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); + GksGpu::PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); #ifdef USE_PASSIVE_SCALAR return getT(prim); @@ -161,7 +161,7 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters addScalarRealCellData( grid, dataBase->numberOfCells, "lambda", [&] (uint cellIdx) { - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = dataBase->dataHost[ RHO__(cellIdx, dataBase->numberOfCells) ]; cons.rhoU = dataBase->dataHost[ RHO_U(cellIdx, dataBase->numberOfCells) ]; @@ -173,14 +173,14 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters cons.rhoS_2 = dataBase->dataHost[ RHO_S_2(cellIdx, dataBase->numberOfCells) ]; #endif // USE_PASSIVE_SCALAR - PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); + GksGpu::PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); return prim.lambda; } ); addScalarRealCellData( grid, dataBase->numberOfCells, "p", [&] (uint cellIdx) { - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = dataBase->dataHost[ RHO__(cellIdx, dataBase->numberOfCells) ]; cons.rhoU = dataBase->dataHost[ RHO_U(cellIdx, dataBase->numberOfCells) ]; @@ -192,7 +192,7 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters cons.rhoS_2 = dataBase->dataHost[ RHO_S_2(cellIdx, dataBase->numberOfCells) ]; #endif // USE_PASSIVE_SCALAR - PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); + GksGpu::PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); return 0.5 * prim.rho / prim.lambda; } ); @@ -207,7 +207,7 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters addVectorCellData( grid, dataBase->numberOfCells, "Velocity", [&] (uint cellIdx) { - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = dataBase->dataHost[ RHO__(cellIdx, dataBase->numberOfCells) ]; cons.rhoU = dataBase->dataHost[ RHO_U(cellIdx, dataBase->numberOfCells) ]; @@ -215,7 +215,7 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters cons.rhoW = dataBase->dataHost[ RHO_W(cellIdx, dataBase->numberOfCells) ]; cons.rhoE = dataBase->dataHost[ RHO_E(cellIdx, dataBase->numberOfCells) ]; - PrimitiveVariables prim = toPrimitiveVariables( cons, parameters.K ); + GksGpu::PrimitiveVariables prim = toPrimitiveVariables( cons, parameters.K ); return Vec3( prim.U, prim.V, prim.W ); } ); @@ -413,8 +413,8 @@ void writePNG( vtkDataObject * inputData, int nx, int ny, double L, double H, st //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void writeVtkXML(std::shared_ptr<DataBase> dataBase, - Parameters parameters, +void writeVtkXML(std::shared_ptr<GksGpu::DataBase> dataBase, + GksGpu::Parameters parameters, int mode, std::string filename) { @@ -429,7 +429,7 @@ void writeVtkXML(std::shared_ptr<DataBase> dataBase, *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } -void VF_PUBLIC writeVtkXMLParallelSummaryFile(std::shared_ptr<DataBase> dataBase, Parameters parameters, std::string filename, uint mpiWorldSize) +void VF_PUBLIC writeVtkXMLParallelSummaryFile(std::shared_ptr<GksGpu::DataBase> dataBase, GksGpu::Parameters parameters, std::string filename, uint mpiWorldSize) { *logging::out << logging::Logger::INFO_INTERMEDIATE << "Write " << filename << ".pvtu" << " ... \n"; @@ -442,8 +442,8 @@ void VF_PUBLIC writeVtkXMLParallelSummaryFile(std::shared_ptr<DataBase> dataBase *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } -void writeTurbulenceVtkXML(std::shared_ptr<DataBase> dataBase, - std::shared_ptr<TurbulenceAnalyzer> turbulenceAnalyzer, +void writeTurbulenceVtkXML(std::shared_ptr<GksGpu::DataBase> dataBase, + std::shared_ptr<GksGpu::TurbulenceAnalyzer> turbulenceAnalyzer, int mode, std::string filename) { @@ -534,7 +534,7 @@ void writeTurbulenceVtkXML(std::shared_ptr<DataBase> dataBase, *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } -void VF_PUBLIC writeTurbulenceVtkXMLParallelSummaryFile(std::shared_ptr<DataBase> dataBase, std::shared_ptr<TurbulenceAnalyzer> turbulenceAnalyzer,Parameters parameters, std::string filename, uint mpiWorldSize) +void VF_PUBLIC writeTurbulenceVtkXMLParallelSummaryFile(std::shared_ptr<GksGpu::DataBase> dataBase, std::shared_ptr<GksGpu::TurbulenceAnalyzer> turbulenceAnalyzer,GksGpu::Parameters parameters, std::string filename, uint mpiWorldSize) { *logging::out << logging::Logger::INFO_INTERMEDIATE << "Write " << filename << ".pvtu" << " ... \n"; @@ -593,7 +593,7 @@ void VF_PUBLIC writeTurbulenceVtkXMLParallelSummaryFile(std::shared_ptr<DataBase *logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } -void mapFlowField(std::shared_ptr<DataBase> base, std::shared_ptr<DataBase> target) +void mapFlowField(std::shared_ptr<GksGpu::DataBase> base, std::shared_ptr<GksGpu::DataBase> target) { vtkGridPtr gridBase = getVtkUnstructuredOctGrid(base, true); vtkGridPtr gridTarget = getVtkUnstructuredOctGrid(target, true); @@ -616,7 +616,7 @@ void mapFlowField(std::shared_ptr<DataBase> base, std::shared_ptr<DataBase> targ if( base->isGhostCell( cellIdx ) ) continue; - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = base->dataHost[ RHO__(cellIdx, base->numberOfCells) ]; cons.rhoU = base->dataHost[ RHO_U(cellIdx, base->numberOfCells) ]; @@ -712,7 +712,7 @@ void mapFlowField(std::shared_ptr<DataBase> base, std::shared_ptr<DataBase> targ } } -void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, std::shared_ptr<GksGpu::ConcreteHeatFlux> bc, Parameters parameters, int mode, std::string filename) +void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<GksGpu::DataBase> dataBase, std::shared_ptr<GksGpu::ConcreteHeatFlux> bc, GksGpu::Parameters parameters, int mode, std::string filename) { *logging::out << logging::Logger::INFO_INTERMEDIATE << "Write " << filename << ".vtu" << " ... \n"; @@ -729,7 +729,7 @@ void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, s if( bc->domainCellsHost[index] > dataBase->perLevelCount[ dataBase->getCellLevel( bc->domainCellsHost[index] ) ].startOfCells + dataBase->perLevelCount[ dataBase->getCellLevel( bc->domainCellsHost[index] ) ].numberOfBulkCells ) continue; - if( isCellProperties( dataBase->cellPropertiesHost[ bc->domainCellsHost[index] ], CELL_PROPERTIES_FINE_GHOST ) ) continue; + if( GksGpu::isCellProperties( dataBase->cellPropertiesHost[ bc->domainCellsHost[index] ], CELL_PROPERTIES_FINE_GHOST ) ) continue; real dx = bc->L / real(bc->numberOfPoints + 1); @@ -835,12 +835,12 @@ void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, s if( bc->domainCellsHost[cellIdx] > dataBase->perLevelCount[ dataBase->getCellLevel( bc->domainCellsHost[cellIdx] ) ].startOfCells + dataBase->perLevelCount[ dataBase->getCellLevel( bc->domainCellsHost[cellIdx] ) ].numberOfBulkCells ) continue; - if( isCellProperties( dataBase->cellPropertiesHost[ bc->domainCellsHost[cellIdx] ], CELL_PROPERTIES_FINE_GHOST ) ) continue; + if( GksGpu::isCellProperties( dataBase->cellPropertiesHost[ bc->domainCellsHost[cellIdx] ], CELL_PROPERTIES_FINE_GHOST ) ) continue; real T = c0o1; { - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = dataBase->dataHost[RHO__(bc->domainCellsHost[cellIdx], dataBase->numberOfCells)]; cons.rhoU = dataBase->dataHost[RHO_U(bc->domainCellsHost[cellIdx], dataBase->numberOfCells)]; @@ -848,7 +848,7 @@ void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, s cons.rhoW = dataBase->dataHost[RHO_W(bc->domainCellsHost[cellIdx], dataBase->numberOfCells)]; cons.rhoE = dataBase->dataHost[RHO_E(bc->domainCellsHost[cellIdx], dataBase->numberOfCells)]; - PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); + GksGpu::PrimitiveVariables prim = GksGpu::toPrimitiveVariables(cons, parameters.K); #ifdef USE_PASSIVE_SCALAR T += c3o2 * getT(prim); @@ -859,7 +859,7 @@ void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, s } { - ConservedVariables cons; + GksGpu::ConservedVariables cons; cons.rho = dataBase->dataHost[RHO__(bc->secondCellsHost[cellIdx], dataBase->numberOfCells)]; cons.rhoU = dataBase->dataHost[RHO_U(bc->secondCellsHost[cellIdx], dataBase->numberOfCells)]; @@ -867,7 +867,7 @@ void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, s cons.rhoW = dataBase->dataHost[RHO_W(bc->secondCellsHost[cellIdx], dataBase->numberOfCells)]; cons.rhoE = dataBase->dataHost[RHO_E(bc->secondCellsHost[cellIdx], dataBase->numberOfCells)]; - PrimitiveVariables prim = toPrimitiveVariables(cons, parameters.K); + GksGpu::PrimitiveVariables prim = GksGpu::toPrimitiveVariables(cons, parameters.K); #ifdef USE_PASSIVE_SCALAR T -= c1o2 * getT(prim); diff --git a/src/GksVtkAdapter/VTKAdapter.h b/src/GksVtkAdapter/VTKAdapter.h index 6c3070689..d5effc8d8 100644 --- a/src/GksVtkAdapter/VTKAdapter.h +++ b/src/GksVtkAdapter/VTKAdapter.h @@ -41,7 +41,7 @@ struct rgbColor unsigned char b; }; -vtkGridPtr VF_PUBLIC getVtkUnstructuredOctGrid( SPtr<DataBase> dataBase, bool excludeGhostCells = false ); +vtkGridPtr VF_PUBLIC getVtkUnstructuredOctGrid( SPtr<GksGpu::DataBase> dataBase, bool excludeGhostCells = false ); void VF_PUBLIC addScalarIntCellData( vtkGridPtr grid, uint numberOfCells, @@ -58,7 +58,7 @@ void VF_PUBLIC addVectorCellData( vtkGridPtr grid, std::string name, std::function<Vec3(uint)> getData ); -void VF_PUBLIC addBaseData( vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters ); +void VF_PUBLIC addBaseData( vtkGridPtr grid, SPtr<GksGpu::DataBase> dataBase, GksGpu::Parameters parameters ); void VF_PUBLIC writeVtkUnstructuredGrid( vtkGridPtr grid, int mode, std::string filename ); diff --git a/src/GksVtkAdapter/VTKInterface.h b/src/GksVtkAdapter/VTKInterface.h index a25a049f7..1680bd511 100644 --- a/src/GksVtkAdapter/VTKInterface.h +++ b/src/GksVtkAdapter/VTKInterface.h @@ -5,36 +5,38 @@ #include "VirtualFluidsDefinitions.h" +namespace GksGpu{ struct DataBase; class TurbulenceAnalyzer; -namespace GksGpu{ struct ConcreteHeatFlux; } +struct ConcreteHeatFlux; +} -void VF_PUBLIC writeVtkXML(std::shared_ptr<DataBase> dataBase, - Parameters parameters, +void VF_PUBLIC writeVtkXML(std::shared_ptr<GksGpu::DataBase> dataBase, + GksGpu::Parameters parameters, int mode, std::string filename); -void VF_PUBLIC writeVtkXMLParallelSummaryFile(std::shared_ptr<DataBase> dataBase, - Parameters parameters, +void VF_PUBLIC writeVtkXMLParallelSummaryFile(std::shared_ptr<GksGpu::DataBase> dataBase, + GksGpu::Parameters parameters, std::string filename, uint mpiWorldSize); -void VF_PUBLIC writeTurbulenceVtkXML(std::shared_ptr<DataBase> dataBase, - std::shared_ptr<TurbulenceAnalyzer> turbulenceAnalyzer, +void VF_PUBLIC writeTurbulenceVtkXML(std::shared_ptr<GksGpu::DataBase> dataBase, + std::shared_ptr<GksGpu::TurbulenceAnalyzer> turbulenceAnalyzer, int mode, std::string filename); -void VF_PUBLIC writeTurbulenceVtkXMLParallelSummaryFile(std::shared_ptr<DataBase> dataBase, - std::shared_ptr<TurbulenceAnalyzer> turbulenceAnalyzer, - Parameters parameters, +void VF_PUBLIC writeTurbulenceVtkXMLParallelSummaryFile(std::shared_ptr<GksGpu::DataBase> dataBase, + std::shared_ptr<GksGpu::TurbulenceAnalyzer> turbulenceAnalyzer, + GksGpu::Parameters parameters, std::string filename, uint mpiWorldSize); -void VF_PUBLIC mapFlowField( std::shared_ptr<DataBase> base, std::shared_ptr<DataBase> target ); +void VF_PUBLIC mapFlowField( std::shared_ptr<GksGpu::DataBase> base, std::shared_ptr<GksGpu::DataBase> target ); -void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<DataBase> dataBase, +void VF_PUBLIC writeConcreteHeatFluxVtkXML(std::shared_ptr<GksGpu::DataBase> dataBase, std::shared_ptr<GksGpu::ConcreteHeatFlux> bc, - Parameters parameters, + GksGpu::Parameters parameters, int mode, std::string filename); -- GitLab