Commit 47c60d32 authored by Markus Holzer's avatar Markus Holzer
Browse files

Merge master into branch

parents 033ef4fb 09281516
...@@ -14,7 +14,9 @@ Ehsan Fattahi ...@@ -14,7 +14,9 @@ Ehsan Fattahi
Felix Winterhalter Felix Winterhalter
Florian Schornbaum Florian Schornbaum
Frederik Hennig Frederik Hennig
Grigorii Drozdov
Helen Schottenhamml Helen Schottenhamml
Igor Ostanin
Jan Götz Jan Götz
Jan Hönig Jan Hönig
João Victor Tozatti Risso João Victor Tozatti Risso
......
...@@ -225,16 +225,21 @@ else() ...@@ -225,16 +225,21 @@ else()
endif() endif()
mark_as_advanced ( WALBERLA_CXX_COMPILER_IS_CLANG ) mark_as_advanced ( WALBERLA_CXX_COMPILER_IS_CLANG )
# Check for Cray compiler
if( CMAKE_CXX_COMPILER_ID MATCHES Cray ) if( CMAKE_CXX_COMPILER_ID MATCHES Cray )
option ( WALBERLA_CXX_COMPILER_IS_CRAY "Use Cray compiler" ON ) option ( WALBERLA_CXX_COMPILER_IS_CRAY "Use Cray compiler" ON )
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.4)
message( FATAL_ERROR "Insufficient Cray Compiler Environment version" )
endif()
else() else()
option ( WALBERLA_CXX_COMPILER_IS_CRAY "Use Cray compiler" OFF ) option ( WALBERLA_CXX_COMPILER_IS_CRAY "Use Cray compiler" OFF )
endif() endif()
mark_as_advanced ( WALBERLA_CXX_COMPILER_IS_CRAY ) mark_as_advanced ( WALBERLA_CXX_COMPILER_IS_CRAY )
if( CMAKE_CXX_COMPILER MATCHES "pgc\\+\\+" OR CMAKE_CXX_COMPILER_ARG1 MATCHES "pgc\\+\\+" )
option ( WALBERLA_CXX_COMPILER_IS_PGI "Use PGI compiler" ON )
else()
option ( WALBERLA_CXX_COMPILER_IS_PGI "Use PGI compiler" OFF )
endif()
mark_as_advanced ( WALBERLA_CXX_COMPILER_IS_PGI )
# Check for MPI wrapper # Check for MPI wrapper
get_filename_component( CXX_COMPILER_WITHOUT_PATH ${CMAKE_CXX_COMPILER} NAME ) get_filename_component( CXX_COMPILER_WITHOUT_PATH ${CMAKE_CXX_COMPILER} NAME )
if( CXX_COMPILER_WITHOUT_PATH MATCHES "mpi" OR CMAKE_CXX_COMPILER_ARG1 MATCHES "mpi" ) if( CXX_COMPILER_WITHOUT_PATH MATCHES "mpi" OR CMAKE_CXX_COMPILER_ARG1 MATCHES "mpi" )
...@@ -333,6 +338,21 @@ if( WALBERLA_CXX_COMPILER_IS_CRAY ) ...@@ -333,6 +338,21 @@ if( WALBERLA_CXX_COMPILER_IS_CRAY )
add_flag ( CMAKE_CXX_FLAGS "-DSQLITE_HAVE_ISNAN" ) # SQLite will not work correctly with the -ffast-math option of GCC. add_flag ( CMAKE_CXX_FLAGS "-DSQLITE_HAVE_ISNAN" ) # SQLite will not work correctly with the -ffast-math option of GCC.
endif() endif()
# Silences compiler and linker warnings and information with the PGI compiler
if( WALBERLA_CXX_COMPILER_IS_PGI )
add_flag ( CMAKE_CXX_FLAGS "--display_error_number" )
add_flag ( CMAKE_C_FLAGS "--display_error_number" )
if( CMAKE_VERSION VERSION_LESS "3.19" )
# https://github.com/Kitware/CMake/commit/52eee1938919deb59cc2b51d44f365f0d9a418e5
set( CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION "--c++${CMAKE_CXX_STANDARD}" )
endif()
add_flag ( CMAKE_CXX_FLAGS "--diag_suppress=1" ) # last line of file ends without a newline
add_flag ( CMAKE_CXX_FLAGS "--diag_suppress=111" ) # statement is unreachable
add_flag ( CMAKE_C_FLAGS "--diag_suppress=111" ) # statement is unreachable
add_flag ( CMAKE_C_FLAGS "--diag_suppress=550" ) # variable [...] was set but never used
add_flag ( CMAKE_C_FLAGS "--diag_suppress=191" ) # type qualifier is meaningless on cast type
endif()
# architecture optimization # architecture optimization
if( WALBERLA_OPTIMIZE_FOR_LOCALHOST ) if( WALBERLA_OPTIMIZE_FOR_LOCALHOST )
if( WALBERLA_CXX_COMPILER_IS_GNU OR WALBERLA_CXX_COMPILER_IS_INTEL OR WALBERLA_CXX_COMPILER_IS_CLANG ) if( WALBERLA_CXX_COMPILER_IS_GNU OR WALBERLA_CXX_COMPILER_IS_INTEL OR WALBERLA_CXX_COMPILER_IS_CLANG )
...@@ -690,8 +710,14 @@ endif( Boost_FOUND ) ...@@ -690,8 +710,14 @@ endif( Boost_FOUND )
## ##
############################################################################################################################ ############################################################################################################################
if ( NOT WIN32 ) set( THREADS_PREFER_PTHREAD_FLAG TRUE )
add_flag( CMAKE_CXX_FLAGS "-pthread" ) find_package(Threads)
if ( Threads_FOUND )
if( CMAKE_USE_PTHREADS_INIT )
add_flag( CMAKE_CXX_FLAGS "-pthread" )
else()
add_flag( CMAKE_CXX_FLAGS "${CMAKE_THREAD_LIBS_INIT}" )
endif()
endif() endif()
...@@ -975,10 +1001,7 @@ endif() ...@@ -975,10 +1001,7 @@ endif()
option ( WALBERLA_THREAD_SAFE_LOGGING "Enables/Disables thread-safe logging" ON ) option ( WALBERLA_THREAD_SAFE_LOGGING "Enables/Disables thread-safe logging" ON )
if ( WALBERLA_BUILD_WITH_OPENMP ) if ( WALBERLA_BUILD_WITH_OPENMP )
if ( WALBERLA_CXX_COMPILER_IS_INTEL AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "16.0.3" ) if ( WALBERLA_CXX_COMPILER_IS_NEC )
add_flag ( CMAKE_C_FLAGS "-openmp" )
add_flag ( CMAKE_CXX_FLAGS "-openmp" )
elseif ( WALBERLA_CXX_COMPILER_IS_NEC )
add_flag ( CMAKE_C_FLAGS "-Popenmp" ) add_flag ( CMAKE_C_FLAGS "-Popenmp" )
add_flag ( CMAKE_CXX_FLAGS "-Popenmp" ) add_flag ( CMAKE_CXX_FLAGS "-Popenmp" )
else() else()
...@@ -1089,31 +1112,7 @@ endif() ...@@ -1089,31 +1112,7 @@ endif()
## ##
############################################################################################################################ ############################################################################################################################
if ( WALBERLA_BUILD_WITH_LTO ) if ( WALBERLA_BUILD_WITH_LTO )
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
if( WALBERLA_CXX_COMPILER_IS_INTEL )
add_flag( CMAKE_CXX_FLAGS_RELEASE "-ip -ipo3" )
add_flag( CMAKE_C_FLAGS_RELEASE "-ip -ipo3" )
endif()
if ( CMAKE_COMPILER_IS_GNUCXX )
add_flag ( CMAKE_C_FLAGS_RELEASE "-flto=3" )
add_flag ( CMAKE_CXX_FLAGS_RELEASE "-flto=3" )
add_flag ( CMAKE_EXE_LINKER_FLAGS "-fuse-linker-plugin" )
endif ( )
if( WALBERLA_CXX_COMPILER_IS_MSVC )
add_flag ( CMAKE_CXX_FLAGS_RELEASE "/GL" )
add_flag ( CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG" )
add_flag ( CMAKE_SHARED_LINKER_FLAGS_RELEASE "/LTCG" )
add_flag ( CMAKE_MODULE_LINKER_FLAGS_RELEASE "/LTCG" )
endif ( )
if( WALBERLA_CXX_COMPILER_IS_IBM )
add_flag ( CMAKE_C_FLAGS_RELEASE "-qipa" )
add_flag ( CMAKE_CXX_FLAGS_RELEASE "-qipa" )
add_flag ( CMAKE_EXE_LINKER_FLAGS "-qipa" )
endif( )
endif ( ) endif ( )
############################################################################################################################ ############################################################################################################################
......
# waLBerla # waLBerla
waLBerla (widely applicable Lattice Boltzmann from Erlangen) is a massively waLBerla (widely applicable Lattice Boltzmann from Erlangen) is a massively
parallel framework for multi physics applications. Besides its original parallel framework for multi physics applications. Besides its original
objective, Lattice Boltzmann solvers for hydrodynamics, it now contains objective, Lattice Boltzmann solvers for hydrodynamics, it now contains
modules for other applications like Multigrid and rigid body dynamics modules for other applications like Multigrid and rigid body dynamics
as well. Great emphasis is placed on the interoperability between the modules as well. Great emphasis is placed on the interoperability between the modules
in particular the fluid-particle coupling. in particular the fluid-particle coupling.
It scales from laptops to current and future supercomputers while maintaining It scales from laptops to current and future supercomputers while maintaining
near-perfect efficiency. near-perfect efficiency.
See https://www.walberla.net/ for more information and a showcase of applications. See https://www.walberla.net/ for more information and a showcase of applications.
...@@ -47,15 +47,30 @@ Many thanks go to waLBerla's [contributors](AUTHORS.txt) ...@@ -47,15 +47,30 @@ Many thanks go to waLBerla's [contributors](AUTHORS.txt)
If you use waLBerla in a publication, please cite the following articles: If you use waLBerla in a publication, please cite the following articles:
- C. Godenschwager, F. Schornbaum, M. Bauer, H. Köstler, and U. Rüde. A Overview:
framework for hybrid parallel flow simulations with a trillion cells in complex - M. Bauer et al, *waLBerla: A block-structured high-performance framework for
geometries. In: Proceedings of the International Conference on High Performance multiphysics simulations*. Computers & Mathematics with Applications, 2020.
Computing, Networking, Storage and Analysis, page 35. ACM, 2013. https://doi.org/10.1016/j.camwa.2020.01.007.
- M. Bauer, S. Eibl, C. Godenschwager, N. Kohl, M. Kuron, C. Rettinger,
F. Schornbaum, C. Schwarzmeier, D. Thönnes, H. Köstler, and U. Rüde. waLBerla: Grid Refinement:
A block-structured high-performance framework for multiphysics simulations. In: - F. Schornbaum and U. Rüde, *Massively parallel algorithms for the lattice boltzmann
Computers & Mathematics with Applications, doi:10.1016/j.camwa.2020.01.007. method on nonuniform grids*. SIAM Journal on Scientific Computing, 2016.
Elsevier, 2020. https://doi.org/10.1137/15M1035240
LBM - Particle Coupling:
- C. Rettinger and U. Rüde, *A comparative study of fluid-particle coupling methods for
fully resolved lattice Boltzmann simulations*. Computers & Fluids, 2017.
https://doi.org/10.1016/j.compfluid.2017.05.033
MESA-PD:
- S. Eibl and U. Rüde, *A Modular and Extensible Software Architecture for Particle Dynamics*.
Proceedings Of The 8Th International Conference On Discrete Element Methods.
https://mercurylab.co.uk/dem8/full-papers/#page-content
Carbon Nanotubes:
- G. Drozdov et al, *Densification of single-walled carbon nanotube films:
Mesoscopic distinct element method simulations and experimental validation*.
Journal of Applied Physics, 2020. https://doi.org/10.1063/5.0025505
## License ## License
......
add_subdirectory( AdaptiveMeshRefinementFluidParticleCoupling ) add_subdirectory( AdaptiveMeshRefinementFluidParticleCoupling )
add_subdirectory( ComplexGeometry ) add_subdirectory( ComplexGeometry )
add_subdirectory( DEM ) add_subdirectory( DEM )
add_subdirectory( FieldCommunication )
add_subdirectory( MeshDistance ) add_subdirectory( MeshDistance )
add_subdirectory( CouetteFlow ) add_subdirectory( CouetteFlow )
add_subdirectory( FluidParticleCoupling ) add_subdirectory( FluidParticleCoupling )
...@@ -15,10 +14,20 @@ add_subdirectory( PoiseuilleChannel ) ...@@ -15,10 +14,20 @@ add_subdirectory( PoiseuilleChannel )
add_subdirectory( ProbeVsExtraMessage ) add_subdirectory( ProbeVsExtraMessage )
add_subdirectory( SchaeferTurek ) add_subdirectory( SchaeferTurek )
add_subdirectory( UniformGrid ) add_subdirectory( UniformGrid )
if ( WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_PYTHON )
add_subdirectory( UniformGridGenerated ) if ( WALBERLA_BUILD_WITH_PYTHON )
add_subdirectory( PhaseFieldAllenCahn ) add_subdirectory( FieldCommunication )
endif()
if ( WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_CUDA ) if ( WALBERLA_BUILD_WITH_CODEGEN )
add_subdirectory( UniformGridGPU ) add_subdirectory( UniformGridGenerated )
add_subdirectory( PhaseFieldAllenCahn )
endif()
if ( WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_CUDA )
add_subdirectory( UniformGridGPU )
endif()
endif() endif()
waLBerla_link_files_to_builddir( "*.prm" ) waLBerla_link_files_to_builddir( "*.prm" )
waLBerla_link_files_to_builddir( "*.py" )
waLBerla_link_files_to_builddir( "simulation_setup" ) waLBerla_link_files_to_builddir( "simulation_setup" )
......
...@@ -3,6 +3,6 @@ add_subdirectory( CombinedResolvedUnresolved ) ...@@ -3,6 +3,6 @@ add_subdirectory( CombinedResolvedUnresolved )
add_subdirectory( HeatConduction ) add_subdirectory( HeatConduction )
add_subdirectory( Mixer ) add_subdirectory( Mixer )
add_subdirectory( PegIntoSphereBed ) add_subdirectory( PegIntoSphereBed )
if ( WALBERLA_BUILD_WITH_CODEGEN) if ( WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_PYTHON )
add_subdirectory( PhaseFieldAllenCahn ) add_subdirectory( PhaseFieldAllenCahn )
endif() endif()
...@@ -36,7 +36,7 @@ namespace lbm ...@@ -36,7 +36,7 @@ namespace lbm
namespace internal_boundary_contact namespace internal_boundary_contact
{ {
static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_indexVector, double* RESTRICT _data_phase, static FUNC_PREFIX void contact_angle_treatment(uint8_t* WALBERLA_RESTRICT const _data_indexVector, double* WALBERLA_RESTRICT _data_phase,
int64_t const _stride_phase_0, int64_t const _stride_phase_1, int64_t const _stride_phase_0, int64_t const _stride_phase_1,
int64_t const _stride_phase_2, int64_t indexVectorSize, double alpha) int64_t const _stride_phase_2, int64_t indexVectorSize, double alpha)
{ {
...@@ -58,8 +58,8 @@ static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_in ...@@ -58,8 +58,8 @@ static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_in
const double a = cos(alpha); const double a = cos(alpha);
const double W = 5; const double W = 5;
double* RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z; double* WALBERLA_RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z;
double* RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1; double* WALBERLA_RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1;
if (h < 0.001) { _phase_wall[_stride_phase_0 * x] = 1.0; } if (h < 0.001) { _phase_wall[_stride_phase_0 * x] = 1.0; }
else if (a > 1e-8 || a < -1e-8) else if (a > 1e-8 || a < -1e-8)
{ {
...@@ -98,7 +98,7 @@ void contact::run(IBlock* block, IndexVectors::Type type) ...@@ -98,7 +98,7 @@ void contact::run(IBlock* block, IndexVectors::Type type)
auto& alpha = this->alpha_; auto& alpha = this->alpha_;
WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(phaseField->nrOfGhostLayers())) WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(phaseField->nrOfGhostLayers()))
double* RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0); double* WALBERLA_RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0);
const auto _stride_pdfs_0 = int64_t(phaseField->xStride()); const auto _stride_pdfs_0 = int64_t(phaseField->xStride());
const auto _stride_pdfs_1 = int64_t(phaseField->yStride()); const auto _stride_pdfs_1 = int64_t(phaseField->yStride());
const auto _stride_pdfs_2 = int64_t(phaseField->zStride()); const auto _stride_pdfs_2 = int64_t(phaseField->zStride());
......
...@@ -31,14 +31,6 @@ ...@@ -31,14 +31,6 @@
#include <set> #include <set>
#include <vector> #include <vector>
#ifdef __GNUC__
# define RESTRICT __restrict__
#elif _MSC_VER
# define RESTRICT __restrict
#else
# define RESTRICT
#endif
namespace walberla namespace walberla
{ {
namespace lbm namespace lbm
......
...@@ -41,25 +41,25 @@ namespace lbm ...@@ -41,25 +41,25 @@ namespace lbm
namespace internal_boundary_contact namespace internal_boundary_contact
{ {
static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_indexVector, double* RESTRICT _data_phase, static FUNC_PREFIX void contact_angle_treatment(uint8_t* WALBERLA_RESTRICT const _data_indexVector, double* WALBERLA_RESTRICT _data_phase,
int64_t const _stride_phase_0, int64_t const _stride_phase_1, int64_t const _stride_phase_0, int64_t const _stride_phase_1,
int64_t const _stride_phase_2, int64_t indexVectorSize, double alpha) int64_t const _stride_phase_2, int64_t indexVectorSize, double alpha)
{ {
if (blockDim.x * blockIdx.x + threadIdx.x < indexVectorSize) if (blockDim.x * blockIdx.x + threadIdx.x < indexVectorSize)
{ {
uint8_t* RESTRICT _data_indexVector_10 = _data_indexVector; uint8_t* WALBERLA_RESTRICT _data_indexVector_10 = _data_indexVector;
const int32_t x = *((int32_t*) (&_data_indexVector_10[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t x = *((int32_t*) (&_data_indexVector_10[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x]));
uint8_t* RESTRICT _data_indexVector_14 = _data_indexVector + 4; uint8_t* WALBERLA_RESTRICT _data_indexVector_14 = _data_indexVector + 4;
const int32_t y = *((int32_t*) (&_data_indexVector_14[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t y = *((int32_t*) (&_data_indexVector_14[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x]));
uint8_t* RESTRICT _data_indexVector_18 = _data_indexVector + 8; uint8_t* WALBERLA_RESTRICT _data_indexVector_18 = _data_indexVector + 8;
const int32_t z = *((int32_t*) (&_data_indexVector_18[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t z = *((int32_t*) (&_data_indexVector_18[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x]));
uint8_t* RESTRICT _data_indexVector_112 = _data_indexVector + 12; uint8_t* WALBERLA_RESTRICT _data_indexVector_112 = _data_indexVector + 12;
const int32_t nx = *((int32_t*) (&_data_indexVector_112[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t nx = *((int32_t*) (&_data_indexVector_112[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x]));
const int32_t x1 = x + nx; const int32_t x1 = x + nx;
uint8_t* RESTRICT _data_indexVector_116 = _data_indexVector + 16; uint8_t* WALBERLA_RESTRICT _data_indexVector_116 = _data_indexVector + 16;
const int32_t ny = *((int32_t*) (&_data_indexVector_116[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t ny = *((int32_t*) (&_data_indexVector_116[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x]));
const int32_t y1 = y + ny; const int32_t y1 = y + ny;
uint8_t* RESTRICT _data_indexVector_200 = _data_indexVector + 20; uint8_t* WALBERLA_RESTRICT _data_indexVector_200 = _data_indexVector + 20;
const int32_t nz = *((int32_t*) (&_data_indexVector_200[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t nz = *((int32_t*) (&_data_indexVector_200[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x]));
const int32_t z1 = z + nz; const int32_t z1 = z + nz;
...@@ -67,8 +67,8 @@ static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_in ...@@ -67,8 +67,8 @@ static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_in
const double a = cos(alpha); const double a = cos(alpha);
const double W = 5; const double W = 5;
double* RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z; double* WALBERLA_RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z;
double* RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1; double* WALBERLA_RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1;
if (h < 0.001) { _phase_wall[_stride_phase_0 * x] = 1.0; } if (h < 0.001) { _phase_wall[_stride_phase_0 * x] = 1.0; }
else if (a > 1e-8 || a < -1e-8) else if (a > 1e-8 || a < -1e-8)
{ {
...@@ -107,7 +107,7 @@ void contact::run(IBlock* block, IndexVectors::Type type, cudaStream_t stream) ...@@ -107,7 +107,7 @@ void contact::run(IBlock* block, IndexVectors::Type type, cudaStream_t stream)
auto& alpha = this->alpha_; auto& alpha = this->alpha_;
WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(phaseField->nrOfGhostLayers())) WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(phaseField->nrOfGhostLayers()))
double* RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0); double* WALBERLA_RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0);
const auto _stride_pdfs_0 = int64_t(phaseField->xStride()); const auto _stride_pdfs_0 = int64_t(phaseField->xStride());
const auto _stride_pdfs_1 = int64_t(phaseField->yStride()); const auto _stride_pdfs_1 = int64_t(phaseField->yStride());
const auto _stride_pdfs_2 = int64_t(phaseField->zStride()); const auto _stride_pdfs_2 = int64_t(phaseField->zStride());
......
...@@ -32,14 +32,6 @@ ...@@ -32,14 +32,6 @@
#include <set> #include <set>
#include <vector> #include <vector>
#ifdef __GNUC__
# define RESTRICT __restrict__
#elif _MSC_VER
# define RESTRICT __restrict
#else
# define RESTRICT
#endif
namespace walberla namespace walberla
{ {
namespace lbm namespace lbm
......
...@@ -1661,7 +1661,7 @@ bool BlockForest::determineBlockTargetLevels( bool & additionalRefreshCycleRequi ...@@ -1661,7 +1661,7 @@ bool BlockForest::determineBlockTargetLevels( bool & additionalRefreshCycleRequi
minTargetLevels[id] = minTargetLevel; minTargetLevels[id] = minTargetLevel;
} }
} }
#ifndef NDEBUF #ifndef NDEBUG
else else
{ {
WALBERLA_ASSERT_LESS_EQUAL( minTargetLevel, level + uint_t(1) ); WALBERLA_ASSERT_LESS_EQUAL( minTargetLevel, level + uint_t(1) );
......
...@@ -135,11 +135,9 @@ void BlockID::toByteArray( std::vector< uint8_t >& array, const uint_t offset, c ...@@ -135,11 +135,9 @@ void BlockID::toByteArray( std::vector< uint8_t >& array, const uint_t offset, c
#else #else
#ifdef WALBERLA_CXX_COMPILER_IS_MSVC namespace internal {
namespace { char dummy; } // disable MSVC warning LNK4221: This object file does not define any previously char dummy; // silence linker warning about object file with no symbols
// undefined public symbols, so it will not be used by any link operation that }
// consumes this library
#endif
#endif #endif
......
...@@ -2230,7 +2230,7 @@ inline void BoundaryHandling< FlagField_T, Stencil, Boundaries... >::operator()( ...@@ -2230,7 +2230,7 @@ inline void BoundaryHandling< FlagField_T, Stencil, Boundaries... >::operator()(
WALBERLA_ASSERT( checkConsistency( localCells ) ); WALBERLA_ASSERT( checkConsistency( localCells ) );
#ifdef _OPENMP #if defined(_OPENMP) && !(defined(_MSC_VER) && _MSC_VER < 1925)
const int zMin = int_c( localCells.zMin() ); const int zMin = int_c( localCells.zMin() );
const int zMax = int_c( localCells.zMax() ); const int zMax = int_c( localCells.zMax() );
#pragma omp parallel for schedule(static) if(threadSafeBCs_) #pragma omp parallel for schedule(static) if(threadSafeBCs_)
......
...@@ -35,34 +35,8 @@ namespace walberla{ ...@@ -35,34 +35,8 @@ namespace walberla{
class NonCreateable { class NonCreateable {
#ifndef _MSC_VER public:
NonCreateable() = delete;
// non-MSVC-Build
private:
NonCreateable();
~NonCreateable();
NonCreateable(const NonCreateable&);
NonCreateable& operator=(const NonCreateable&);
#else
// MSVC-Build (eliminating warning C4624)
private:
NonCreateable();
NonCreateable(const NonCreateable&);
NonCreateable& operator=(const NonCreateable&);
protected:
~NonCreateable();
#endif
}; };
......
...@@ -21,16 +21,15 @@ ...@@ -21,16 +21,15 @@
#pragma once #pragma once
#if (( defined WALBERLA_CXX_COMPILER_IS_CLANG ) && ( __clang_major__ >=4 ) ) \ #if defined(WALBERLA_CXX_COMPILER_IS_CLANG) || defined(WALBERLA_CXX_COMPILER_IS_GNU)
|| (( defined WALBERLA_CXX_COMPILER_IS_GNU ) && ( __GNUC__ >= 5 ) )
# define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) # define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
#else #else
# define ATTRIBUTE_NO_SANITIZE_ADDRESS # define ATTRIBUTE_NO_SANITIZE_ADDRESS
#endif #endif
#if ( ( defined WALBERLA_CXX_COMPILER_IS_GNU ) && ( __GNUC__ >= 5 ) ) #if defined(WALBERLA_CXX_COMPILER_IS_GNU)
# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined)) # define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined))
#elif (( defined WALBERLA_CXX_COMPILER_IS_CLANG ) && ( __clang_major__ >= 4 ) ) #elif defined(WALBERLA_CXX_COMPILER_IS_CLANG)
# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) # define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
#else #else
# define ATTRIBUTE_NO_SANITIZE_UNDEFINED # define ATTRIBUTE_NO_SANITIZE_UNDEFINED
......
<
...@@ -22,36 +22,13 @@ ...@@ -22,36 +22,13 @@
#include "Sleep.h" #include "Sleep.h"
#include "waLBerlaDefinitions.h" #include "waLBerlaDefinitions.h"
#ifdef WALBERLA_CXX_COMPILER_IS_MSVC #include <thread>
#include <windows.h>
namespace walberla { namespace walberla {
void sleep( uint_t seconds ) void sleep( uint_t seconds )
{ {
::Sleep( static_cast<DWORD>( uint_t(1000) * seconds ) ); std::this_thread::sleep_for(std::chrono::seconds(static_cast<int>(seconds)));
}
} }
#else
#ifdef WALBERLA_CXX_COMPILER_IS_IBM
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#endif
#endif
#include <unistd.h>
namespace walberla {
void sleep( uint_t seconds )
{
::sleep( static_cast<unsigned int>(seconds) );
}
} }