From ac0c1891c2f216ecf9188a5708e6b235247d1f3a Mon Sep 17 00:00:00 2001
From: Sebastian Eibl <sebastian.eibl@fau.de>
Date: Fri, 3 Aug 2018 10:51:22 +0200
Subject: [PATCH] clang-tidy -checks=-*,modernize-use-nullptr

---
 apps/benchmarks/CouetteFlow/CouetteFlow.cpp   |   4 +-
 .../ForcesOnSphereNearPlaneInShearFlow.cpp    |   4 +-
 .../MotionSingleHeavySphere.cpp               |  10 +-
 .../NonUniformGrid/NonUniformGrid.cpp         |   2 +-
 .../PeriodicGranularGas.cpp                   |   8 +-
 .../PoiseuilleChannel/PoiseuilleChannel.cpp   |   4 +-
 .../SchaeferTurek/SchaeferTurek.cpp           |  20 +--
 apps/benchmarks/UniformGrid/UniformGrid.cpp   |   4 +-
 .../BidisperseFluidizedBedDPM.cpp             |   2 +-
 apps/tutorials/pe/01_ConfinedGas.cpp          |   4 +-
 apps/tutorials/pe/02_ConfinedGasExtended.cpp  |  10 +-
 src/blockforest/BlockForest.cpp               |  38 +++---
 src/blockforest/Initialization.cpp            |   4 +-
 src/blockforest/SetupBlockForest.cpp          |  72 +++++-----
 src/blockforest/StructuredBlockForest.cpp     |   4 +-
 src/blockforest/loadbalancing/Cartesian.cpp   |   4 +-
 .../loadbalancing/StaticParMetis.cpp          |   2 +-
 src/core/config/Create.cpp                    |   4 +-
 src/core/math/Parser.cpp                      |   8 +-
 src/core/math/PhysicalCheck.cpp               |   2 +-
 src/core/mpi/BufferSystem.cpp                 |  12 +-
 src/core/mpi/Gatherv.cpp                      |   6 +-
 src/core/mpi/OpenMPBufferSystem.cpp           |   2 +-
 src/core/timing/TimingPool.cpp                |  10 +-
 src/domain_decomposition/BlockStorage.cpp     |   4 +-
 src/field/allocation/AlignedMalloc.cpp        |   4 +-
 src/gather/MPIGatherScheme.cpp                |   6 +-
 src/geometry/structured/extern/lodepng.cpp    | 128 +++++++++---------
 src/gui/Gui.cpp                               |   2 +-
 src/gui/PropertyTree.cpp                      |   4 +-
 src/pe/ccd/HashGrids.cpp                      |  42 +++---
 src/pe/ccd/SimpleCCD.cpp                      |   4 +-
 src/pe/collision/EPA.cpp                      |   4 +-
 src/pe/raytracing/Raytracer.cpp               |  18 +--
 src/pe/rigidbody/EllipsoidFactory.cpp         |   2 +-
 src/pe/rigidbody/RigidBody.cpp                |   2 +-
 src/pe/utility/GetBody.cpp                    |   2 +-
 .../BodyAndVolumeFractionMapping.cpp          |   2 +-
 src/postprocessing/sqlite/SQLite.cpp          |  56 ++++----
 src/python_coupling/helper/ModuleInit.cpp     |   2 +-
 src/timeloop/Timeloop.cpp                     |   2 +-
 src/vtk/VTKOutput.cpp                         |   6 +-
 tests/blockforest/SetupBlockForestTest.cpp    |   2 +-
 tests/core/debug/CheckMacroTest.cpp           |   2 +-
 tests/core/load_balancing/MetisTest.cpp       |   4 +-
 tests/core/load_balancing/ParMetisTest.cpp    |   2 +-
 .../core/load_balancing/PlainParMetisTest.cpp |   8 +-
 .../equation_system/EquationSolverTest.cpp    |   2 +-
 tests/core/mpi/BufferSystemTest.cpp           |   2 +-
 tests/field/FieldTiming.cpp                   |   2 +-
 tests/field/distributors/DistributionTest.cpp |  20 +--
 .../interpolators/FieldInterpolationTest.cpp  |  30 ++--
 tests/mesh/PeVTKMeshWriterTest.cpp            |   6 +-
 tests/pe/BodyFlags.cpp                        |   8 +-
 tests/pe/BodyIterators.cpp                    |   8 +-
 tests/pe/DeleteBody.cpp                       |   6 +-
 tests/pe/DestroyBody.cpp                      |   2 +-
 tests/pe/ForceSync.cpp                        |   4 +-
 tests/pe/HashGrids.cpp                        |   4 +-
 tests/pe/LoadFromConfig.cpp                   |   2 +-
 tests/pe/ParallelEquivalence.cpp              |   4 +-
 tests/pe/PeDocumentationSnippets.cpp          |   8 +-
 tests/pe/Raytracing.cpp                       |  16 +--
 tests/pe/Refinement.cpp                       |   2 +-
 tests/pe/ShadowCopy.cpp                       |   4 +-
 tests/pe/SyncEquivalence.cpp                  |   4 +-
 tests/pe/Synchronization.cpp                  |   2 +-
 tests/pe/SynchronizationDelete.cpp            |   2 +-
 tests/pe/SynchronizationLargeBody.cpp         |  18 +--
 .../HinderedSettlingDynamicsDPM.cpp           |   6 +-
 .../SphereWallCollisionBehaviorDPM.cpp        |   2 +-
 .../BodyAtBlockBoarderCheck.cpp               |   8 +-
 .../BodyMappingTest.cpp                       |  94 ++++++-------
 .../DragForceSphereMEM.cpp                    |   4 +-
 .../DragForceSphereMEMRefinement.cpp          |   4 +-
 ...lobalBodyAsBoundaryMEMStaticRefinement.cpp |   2 +-
 .../LubricationCorrectionMEM.cpp              |  16 +--
 .../PeriodicParticleChannelMEM.cpp            |  24 ++--
 .../SegreSilberbergMEM.cpp                    |  10 +-
 .../SettlingSphereMEM.cpp                     |   6 +-
 .../SettlingSphereMEMDynamicRefinement.cpp    |   6 +-
 .../SettlingSphereMEMStaticRefinement.cpp     |   6 +-
 .../momentum_exchange_method/SquirmerTest.cpp |   4 +-
 .../TaylorCouetteFlowMEM.cpp                  |   4 +-
 .../TorqueSphereMEM.cpp                       |   6 +-
 .../DragForceSpherePSM.cpp                    |   2 +-
 .../DragForceSpherePSMRefinement.cpp          |   2 +-
 .../SegreSilberbergPSM.cpp                    |   6 +-
 .../TorqueSpherePSM.cpp                       |   4 +-
 .../BodiesForceTorqueContainerTest.cpp        |   2 +-
 .../pe_coupling/utility/PeSubCyclingTest.cpp  |   4 +-
 91 files changed, 463 insertions(+), 463 deletions(-)

diff --git a/apps/benchmarks/CouetteFlow/CouetteFlow.cpp b/apps/benchmarks/CouetteFlow/CouetteFlow.cpp
index b28601c50..979a211d0 100644
--- a/apps/benchmarks/CouetteFlow/CouetteFlow.cpp
+++ b/apps/benchmarks/CouetteFlow/CouetteFlow.cpp
@@ -459,7 +459,7 @@ public:
    typedef lbm::PdfField< LatticeModel_T > PdfField_T;
 
    ErrorVTKWriter( const ConstBlockDataID & pdfFieldId, const std::string & id, const Setup & setup ) :
-      vtk::BlockCellDataWriter< OutputType, 3 >( id ), bdid_( pdfFieldId ), pdf_( NULL ), setup_( setup ) {}
+      vtk::BlockCellDataWriter< OutputType, 3 >( id ), bdid_( pdfFieldId ), pdf_( nullptr ), setup_( setup ) {}
 
 protected:
 
@@ -994,7 +994,7 @@ int main( int argc, char **argv )
    //WALBERLA_ROOT_SECTION() { logging::Logging::instance()->setLogLevel( logging::Logging::PROGRESS ); }
 
 #ifdef _OPENMP
-   if( std::getenv( "OMP_NUM_THREADS" ) == NULL )
+   if( std::getenv( "OMP_NUM_THREADS" ) == nullptr )
       WALBERLA_ABORT( "If you are using a version of the program that was compiled with OpenMP you have to "
                       "specify the environment variable \'OMP_NUM_THREADS\' accordingly!" );
 #endif
diff --git a/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp b/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp
index 64bc16481..5e0a0b457 100644
--- a/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp
+++ b/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp
@@ -578,7 +578,7 @@ int main( int argc, char **argv )
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create pe bodies
 
@@ -610,7 +610,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >( MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID ), "boundary handling" );
diff --git a/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp b/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp
index 825af2b2d..4a137fa7b 100644
--- a/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp
+++ b/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp
@@ -806,15 +806,15 @@ int main( int argc, char **argv )
 
    // set up collision response, here DEM solver
    // in this test case, it is only used for the time integration
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
    std::function<void(void)> syncCall;
    if( XBlocks <= uint_t(4) )
-      syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+      syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
    else
-      syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+      syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
 
    real_t xParticle = real_t(0);
@@ -832,7 +832,7 @@ int main( int argc, char **argv )
       else if( int(Galileo) == 250 )
       {
          // add random perturbance for chaotic regime
-         walberla::math::seedRandomGenerator( std::mt19937::result_type(std::time(0)) );
+         walberla::math::seedRandomGenerator( std::mt19937::result_type(std::time(nullptr)) );
          xParticle = real_c( xlength ) * real_t(0.5) + walberla::math::realRandom( real_t(-0.5), real_t(0.5) );
          yParticle = real_c( ylength ) * real_t(0.5) + walberla::math::realRandom( real_t(-0.5), real_t(0.5) );
 
@@ -883,7 +883,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage< FlagField_T >( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add body and volume fraction field
    BlockDataID bodyAndVolumeFractionFieldID = field::addToStorage< BodyAndVolumeFractionField_T >( blocks, "body and volume fraction field",
diff --git a/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp b/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp
index 0602976bc..d427399bf 100644
--- a/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp
+++ b/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp
@@ -1152,7 +1152,7 @@ int main( int argc, char **argv )
    logging::Logging::printHeaderOnStream();
 
 #ifdef _OPENMP
-   if( std::getenv( "OMP_NUM_THREADS" ) == NULL )
+   if( std::getenv( "OMP_NUM_THREADS" ) == nullptr )
       WALBERLA_ABORT( "If you are using a version of the benchmark that was compiled with OpenMP you have to "
                       "specify the environment variable \'OMP_NUM_THREADS\' accordingly!" );
 #endif
diff --git a/apps/benchmarks/PeriodicGranularGas/PeriodicGranularGas.cpp b/apps/benchmarks/PeriodicGranularGas/PeriodicGranularGas.cpp
index c25adf479..875b6bd80 100644
--- a/apps/benchmarks/PeriodicGranularGas/PeriodicGranularGas.cpp
+++ b/apps/benchmarks/PeriodicGranularGas/PeriodicGranularGas.cpp
@@ -77,7 +77,7 @@ int main( int argc, char ** argv )
 
    WALBERLA_LOG_INFO_ON_ROOT("*** READING CONFIG FILE ***");
    auto cfg = env.config();
-   if (cfg == NULL) WALBERLA_ABORT("No config specified!");
+   if (cfg == nullptr) WALBERLA_ABORT("No config specified!");
    const Config::BlockHandle mainConf  = cfg->getBlock( "PeriodicGranularGas" );
 
    int simulationSteps = mainConf.getParameter<int>("simulationSteps", 10 );
@@ -160,11 +160,11 @@ int main( int argc, char ** argv )
    std::function<void(void)> syncCallWithoutTT;
    if (bNN)
    {
-      syncCallWithoutTT = std::bind( pe::syncNextNeighbors<BodyTuple>, boost::ref(*forest), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.1), false );
+      syncCallWithoutTT = std::bind( pe::syncNextNeighbors<BodyTuple>, boost::ref(*forest), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.1), false );
       WALBERLA_LOG_INFO_ON_ROOT("Using NextNeighbor sync!");
    } else if (bSO)
    {
-      syncCallWithoutTT = std::bind( pe::syncShadowOwners<BodyTuple>, boost::ref(*forest), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.1), false );
+      syncCallWithoutTT = std::bind( pe::syncShadowOwners<BodyTuple>, boost::ref(*forest), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.1), false );
       WALBERLA_LOG_INFO_ON_ROOT("Using ShadowOwner sync!");
    } else
    {
@@ -193,7 +193,7 @@ int main( int argc, char ** argv )
       for (auto it = grid_generator::SCIterator(currentBlock.getAABB().getIntersection(generationDomain), Vector3<real_t>(spacing, spacing, spacing) * real_c(0.5), spacing); it != grid_generator::SCIterator(); ++it)
       {
          SphereID sp = pe::createSphere( *globalBodyStorage, *forest, storageID, 0, *it, radius, material);
-         if (sp != NULL) ++numParticles;
+         if (sp != nullptr) ++numParticles;
       }
    }
    mpi::reduceInplace(numParticles, mpi::SUM);
diff --git a/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp b/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp
index bba9184c5..2e31d6064 100644
--- a/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp
+++ b/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp
@@ -589,7 +589,7 @@ public:
    typedef lbm::PdfField< LatticeModel_T > PdfField_T;
 
    ErrorVTKWriter( const ConstBlockDataID & pdfFieldId, const std::string & id, const Setup & setup ) :
-      vtk::BlockCellDataWriter< OutputType, 3 >( id ), bdid_( pdfFieldId ), pdf_( NULL ), setup_( setup ) {}
+      vtk::BlockCellDataWriter< OutputType, 3 >( id ), bdid_( pdfFieldId ), pdf_( nullptr ), setup_( setup ) {}
 
 protected:
 
@@ -1106,7 +1106,7 @@ int main( int argc, char **argv )
    //WALBERLA_ROOT_SECTION() { logging::Logging::instance()->setLogLevel( logging::Logging::PROGRESS ); }
 
 #ifdef _OPENMP
-   if( std::getenv( "OMP_NUM_THREADS" ) == NULL )
+   if( std::getenv( "OMP_NUM_THREADS" ) == nullptr )
       WALBERLA_ABORT( "If you are using a version of the program that was compiled with OpenMP you have to "
                       "specify the environment variable \'OMP_NUM_THREADS\' accordingly!" );
 #endif
diff --git a/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp b/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp
index b7f9d2997..714e7d1a9 100644
--- a/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp
+++ b/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp
@@ -1101,7 +1101,7 @@ void VorticityRefinement< VectorField_T, Filter_T, Pseudo2D >::operator()( std::
       const Block * const block = it->first;
       const VectorField_T * u = block->template getData< VectorField_T >( fieldId_ );
 
-      if( u == NULL )
+      if( u == nullptr )
       {
          it->second = uint_t(0);
          continue;
@@ -1532,7 +1532,7 @@ void Evaluation< LatticeModel_T >::operator()()
    if( setup_.evaluateStrouhal )
    {
       auto block = blocks->getBlock( setup_.pStrouhal );
-      if( block != NULL )
+      if( block != nullptr )
       {
          const PdfField_T * const pdfField = block->template getData< PdfField_T >( pdfFieldId_ );
          const auto cell = blocks->getBlockLocalCell( *block, setup_.pStrouhal );
@@ -2012,7 +2012,7 @@ void Evaluation< LatticeModel_T >::refresh()
       int omega( 0 );
 
       auto block = blocks->getBlock( setup_.pAlpha );
-      if( block != NULL )
+      if( block != nullptr )
       {
          const FlagField_T * const flagField = block->template getData< FlagField_T >( flagFieldId_ );
 
@@ -2036,7 +2036,7 @@ void Evaluation< LatticeModel_T >::refresh()
       }
 
       block = blocks->getBlock( setup_.pOmega );
-      if( block != NULL )
+      if( block != nullptr )
       {
          const FlagField_T * const flagField = block->template getData< FlagField_T >( flagFieldId_ );
 
@@ -2065,7 +2065,7 @@ void Evaluation< LatticeModel_T >::refresh()
       if( alpha == 0 )
       {
          block = blocks->getBlock( setup_.pAlpha );
-         if( block != NULL )
+         if( block != nullptr )
          {
             const FlagField_T * const flagField = block->template getData< FlagField_T >( flagFieldId_ );
 
@@ -2085,7 +2085,7 @@ void Evaluation< LatticeModel_T >::refresh()
       if( omega == 0 )
       {
          block = blocks->getBlock( setup_.pOmega );
-         if( block != NULL )
+         if( block != nullptr )
          {
             const FlagField_T * const flagField = block->template getData< FlagField_T >( flagFieldId_ );
 
@@ -2121,7 +2121,7 @@ void Evaluation< LatticeModel_T >::refresh()
       int strouhal( 0 );
 
       auto block = blocks->getBlock( setup_.pStrouhal );
-      if( block != NULL )
+      if( block != nullptr )
       {
          const FlagField_T * const flagField = block->template getData< FlagField_T >( flagFieldId_ );
 
@@ -2181,7 +2181,7 @@ void Evaluation< LatticeModel_T >::evaluate( real_t & cDRealArea, real_t & cLRea
    if( setup_.evaluatePressure )
    {
       auto block = blocks->getBlock( setup_.pAlpha );
-      if( block != NULL )
+      if( block != nullptr )
       {
          const PdfField_T * const pdfField = block->template getData< PdfField_T >( pdfFieldId_ );
          const auto cell = blocks->getBlockLocalCell( *block, setup_.pAlpha );
@@ -2190,7 +2190,7 @@ void Evaluation< LatticeModel_T >::evaluate( real_t & cDRealArea, real_t & cLRea
       }
 
       block = blocks->getBlock( setup_.pOmega );
-      if( block != NULL )
+      if( block != nullptr )
       {
          const PdfField_T * const pdfField = block->template getData< PdfField_T >( pdfFieldId_ );
          const auto cell = blocks->getBlockLocalCell( *block, setup_.pOmega );
@@ -3007,7 +3007,7 @@ int main( int argc, char **argv )
    //WALBERLA_ROOT_SECTION() { logging::Logging::instance()->setLogLevel( logging::Logging::PROGRESS ); }
 
 #ifdef _OPENMP
-   if( std::getenv( "OMP_NUM_THREADS" ) == NULL )
+   if( std::getenv( "OMP_NUM_THREADS" ) == nullptr )
       WALBERLA_ABORT( "If you are using a version of the program that was compiled with OpenMP you have to "
                       "specify the environment variable \'OMP_NUM_THREADS\' accordingly!" );
 #endif
diff --git a/apps/benchmarks/UniformGrid/UniformGrid.cpp b/apps/benchmarks/UniformGrid/UniformGrid.cpp
index 396faa830..d3be97872 100644
--- a/apps/benchmarks/UniformGrid/UniformGrid.cpp
+++ b/apps/benchmarks/UniformGrid/UniformGrid.cpp
@@ -286,7 +286,7 @@ void createSetupBlockForest( blockforest::SetupBlockForest & sforest, const Conf
    {
       MPIManager::instance()->useWorldComm();
 
-      sforest.balanceLoad( blockforest::CartesianDistribution( numberOfXProcesses, numberOfYProcesses, numberOfZProcesses, NULL ),
+      sforest.balanceLoad( blockforest::CartesianDistribution( numberOfXProcesses, numberOfYProcesses, numberOfZProcesses, nullptr ),
                            numberOfXProcesses * numberOfYProcesses * numberOfZProcesses, real_t(0), 0, true );
    }
 
@@ -847,7 +847,7 @@ int main( int argc, char **argv )
    //WALBERLA_ROOT_SECTION() { logging::Logging::instance()->setLogLevel( logging::Logging::PROGRESS ); }
 
 #ifdef _OPENMP
-   if( std::getenv( "OMP_NUM_THREADS" ) == NULL )
+   if( std::getenv( "OMP_NUM_THREADS" ) == nullptr )
       WALBERLA_ABORT( "If you are using a version of the benchmark that was compiled with OpenMP you have to "
                       "specify the environment variable \'OMP_NUM_THREADS\' accordingly!" );
 #endif
diff --git a/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp b/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp
index b175c7c1d..4673d9627 100644
--- a/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp
+++ b/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp
@@ -890,7 +890,7 @@ int main( int argc, char **argv ) {
    // connect to pe
    const real_t overlap = real_t(1.5) * dx;
    auto syncCall = std::bind(pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()),
-                               bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+                               bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    shared_ptr<CollisionPropertiesEvaluator> collisionPropertiesEvaluator = walberla::make_shared<CollisionPropertiesEvaluator>(*cr);
 
    // create the spheres
diff --git a/apps/tutorials/pe/01_ConfinedGas.cpp b/apps/tutorials/pe/01_ConfinedGas.cpp
index 27507f9ed..ad29563e6 100644
--- a/apps/tutorials/pe/01_ConfinedGas.cpp
+++ b/apps/tutorials/pe/01_ConfinedGas.cpp
@@ -120,8 +120,8 @@ int main( int argc, char ** argv )
       {
          SphereID sp = createSphere( *globalBodyStorage, *forest, storageID, 0, *it, radius, material);
          Vec3 rndVel(math::realRandom<real_t>(-vMax, vMax), math::realRandom<real_t>(-vMax, vMax), math::realRandom<real_t>(-vMax, vMax));
-         if (sp != NULL) sp->setLinearVel(rndVel);
-         if (sp != NULL) ++numParticles;
+         if (sp != nullptr) sp->setLinearVel(rndVel);
+         if (sp != nullptr) ++numParticles;
       }
    }
    WALBERLA_LOG_INFO_ON_ROOT("#particles created: " << numParticles);
diff --git a/apps/tutorials/pe/02_ConfinedGasExtended.cpp b/apps/tutorials/pe/02_ConfinedGasExtended.cpp
index 2e0ed571f..014bda1a8 100644
--- a/apps/tutorials/pe/02_ConfinedGasExtended.cpp
+++ b/apps/tutorials/pe/02_ConfinedGasExtended.cpp
@@ -66,7 +66,7 @@ int main( int argc, char ** argv )
 
    WALBERLA_LOG_INFO_ON_ROOT("*** READING CONFIG FILE ***");
    auto cfg = env.config();
-   if (cfg == NULL) WALBERLA_ABORT("No config specified!");
+   if (cfg == nullptr) WALBERLA_ABORT("No config specified!");
    const Config::BlockHandle mainConf  = cfg->getBlock( "ConfinedGasExtended" );
 
    const std::string sqlFile = mainConf.getParameter< std::string >( "sqlFile", "ConfinedGas.sqlite" );
@@ -164,10 +164,10 @@ int main( int argc, char ** argv )
    std::function<void(void)> syncCallWithoutTT;
    if (!syncShadowOwners)
    {
-      syncCallWithoutTT = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(*forest), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+      syncCallWithoutTT = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(*forest), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
    } else
    {
-      syncCallWithoutTT = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(*forest), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+      syncCallWithoutTT = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(*forest), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
    }
    //! [Bind Sync Call]
    
@@ -216,8 +216,8 @@ int main( int argc, char ** argv )
       {
          SphereID sp = pe::createSphere( *globalBodyStorage, *forest, storageID, 0, *it, radius, material);
          Vec3 rndVel(math::realRandom<real_t>(-vMax, vMax), math::realRandom<real_t>(-vMax, vMax), math::realRandom<real_t>(-vMax, vMax));
-         if (sp != NULL) sp->setLinearVel(rndVel);
-         if (sp != NULL) ++numParticles;
+         if (sp != nullptr) sp->setLinearVel(rndVel);
+         if (sp != nullptr) ++numParticles;
       }
    }
    mpi::reduceInplace(numParticles, mpi::SUM);
diff --git a/src/blockforest/BlockForest.cpp b/src/blockforest/BlockForest.cpp
index e6c19cbc1..e13ff9706 100644
--- a/src/blockforest/BlockForest.cpp
+++ b/src/blockforest/BlockForest.cpp
@@ -164,7 +164,7 @@ bool BlockForest::BlockInformation::getId( BlockID & id, const real_t x, const r
 const BlockForest::BlockInformation::Node * BlockForest::BlockInformation::getNode( const BlockID & id ) const
 {
    if( nodes_.empty() )
-      return NULL;
+      return nullptr;
 
    const uint_t treeIdDigits = forest_.getTreeIdDigits();
 
@@ -185,13 +185,13 @@ const BlockForest::BlockInformation::Node * BlockForest::BlockInformation::getNo
    const uint_t index = blockId.getTreeIndex();
 
    if( index >= nodes_.size() || !(nodes_[index]) )
-      return NULL;
+      return nullptr;
 
    auto node = nodes_[index];
 
    for( uint_t i = 0; i != levels; ++i ) {
       if( node->children_.empty() )
-         return NULL;
+         return nullptr;
       WALBERLA_ASSERT_NOT_NULLPTR( node->children_[ branchId[i] ] );
       node = node->children_[ branchId[i] ];
    }
@@ -206,7 +206,7 @@ const BlockForest::BlockInformation::Node * BlockForest::BlockInformation::getNo
    const AABB & domain = forest_.getDomain();
 
    if( nodes_.empty() || !domain.contains(x,y,z) )
-      return NULL;
+      return nullptr;
 
    const real_t rootBlockXSize =  forest_.getRootBlockXSize();
    const real_t rootBlockYSize =  forest_.getRootBlockYSize();
@@ -225,7 +225,7 @@ const BlockForest::BlockInformation::Node * BlockForest::BlockInformation::getNo
    auto node = nodes_[index];
 
    if( !node )
-      return NULL;
+      return nullptr;
 
    AABB aabb = AABB::createFromMinMaxCorner( domain.xMin() + static_cast< real_t >( xi ) * rootBlockXSize,
                                              domain.yMin() + static_cast< real_t >( yi ) * rootBlockYSize,
@@ -647,7 +647,7 @@ void BlockForest::getBlockID( IBlockID& id, const real_t x, const real_t y, cons
    }
    else {
       const Block* const block = getBlock(x,y,z);
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting block ID failed: Locally, there exists no block at global location (" << x << "," << y << "," << z <<")!\n"
                          "                         (for simulation global information you have to explicitly construct the block forest to "
                          "contain global knowledge)");
@@ -671,7 +671,7 @@ void BlockForest::getAABB( AABB& aabb, const IBlockID& id ) const {
    }
    else {
       const Block* const block = getBlock( id );
-      if( block == NULL ) 
+      if( block == nullptr ) 
       {
          const BlockID& bid = *static_cast< const BlockID* >( &id );
          aabb = getAABBFromBlockId( bid );
@@ -696,7 +696,7 @@ void BlockForest::getState( Set<SUID>& state, const IBlockID& id ) const {
    }
    else {
       const Block* const block = getBlock( id );
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting block state failed: Locally, there exists no block with block ID \'" << id << "\'\n"
                          "                            (for simulation global information you have to explicitly construct "
                          "the block forest to contain global knowledge)" );
@@ -718,7 +718,7 @@ void BlockForest::getProcessRank( uint_t& rank, const IBlockID& id ) const {
    }
    else {
       const Block* const block = getBlock( id );
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting block process rank failed: Locally, there exists no block with block ID \'" << id << "\'\n"
                          "                                   (for simulation global information you have to explicitly construct "
                          "the block forest to contain global knowledge)" );
@@ -750,7 +750,7 @@ void BlockForest::getRootBlockAABB( AABB& aabb, const uint_t x, const uint_t y,
    }
    else {
       const Block* const block = getRootBlock(x,y,z);
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting root block AABB failed: Locally, there exists no root block [" << x << "," << y << "," << z <<"]!\n"
                          "                                (for simulation global information you have to explicitly construct "
                          "the block forest to contain global knowledge)" );
@@ -770,7 +770,7 @@ void BlockForest::getRootBlockState( Set<SUID>& state, const uint_t x, const uin
    }
    else {
       const Block* const block = getRootBlock(x,y,z);
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting root block state failed: Locally, there exists no root block [" << x << "," << y << "," << z <<"]!\n"
                          "                                 (for simulation global information you have to explicitly construct "
                          "the block forest to contain global knowledge)" );
@@ -790,7 +790,7 @@ void BlockForest::getRootBlockProcessRank( uint_t& rank, const uint_t x, const u
    }
    else {
       const Block* const block = getRootBlock(x,y,z);
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting root block process rank failed: Locally, there exists no root block [" << x << "," << y << "," << z <<"]!\n"
                          "                                        (for simulation global information you have to explicitly construct "
                          "the block forest to contain global knowledge)" );
@@ -1208,7 +1208,7 @@ void BlockForest::restoreSnapshot( const SnapshotRestorenFunction & processMappi
                }
                else
                {
-                  addBlockData( block, dataItem->getId(), NULL );
+                  addBlockData( block, dataItem->getId(), nullptr );
                }
             }
          }
@@ -1419,7 +1419,7 @@ void BlockForest::constructBlockInformation( const SetupBlockForest & forest )
          if( index.size() == 1 ) {
             node->setChild( index.top(), make_shared< BlockInformation::Node >( block->getProcess(), block->getState() ) );
          }
-         else if( index.top() >= node->children_.size() || node->children_[ index.top() ] == NULL ) {
+         else if( index.top() >= node->children_.size() || node->children_[ index.top() ] == nullptr ) {
             node->setChild( index.top(), make_shared< BlockInformation::Node >() );
          }
 
@@ -1475,7 +1475,7 @@ void BlockForest::constructBlockInformation( const std::vector< BlockID > & ids,
          if( index.size() == 1 ) {
             node->setChild( index.top(), nodes[i] );
          }
-         else if( index.top() >= node->children_.size() || node->children_[ index.top() ] == NULL ) {
+         else if( index.top() >= node->children_.size() || node->children_[ index.top() ] == nullptr ) {
             node->setChild( index.top(), make_shared< BlockInformation::Node >() );
          }
 
@@ -2545,7 +2545,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
          {
             auto & bufferPtrs = blocksToUnpack[ block ];
             if( bufferPtrs.empty() )
-               bufferPtrs.resize( uint_t(8), std::make_pair( Set<SUID>::emptySet(), static_cast< mpi::RecvBuffer * >(NULL) ) );
+               bufferPtrs.resize( uint_t(8), std::make_pair( Set<SUID>::emptySet(), static_cast< mpi::RecvBuffer * >(nullptr) ) );
             WALBERLA_ASSERT_EQUAL( sId.getUsedBits(), rId.getUsedBits() + uint_t(3) );
             bufferPtrs[ sId.getBranchId() ] = std::make_pair( state, &(*buffer) );
          }
@@ -2627,7 +2627,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
                if( blockDataHandlingWrapper )
                   addBlockData( block, dataItem->getId(), blockDataHandlingWrapper->deserialize( block ) );
                else
-                  addBlockData( block, dataItem->getId(), NULL );
+                  addBlockData( block, dataItem->getId(), nullptr );
             }
             // fill with sent data
             {
@@ -2664,7 +2664,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
                   addBlockData( block, dataItem->getId(), downcastBlockDataHandlingWrapper->deserializeCoarseToFine( block ) );
                }
                else
-                  addBlockData( block, dataItem->getId(), NULL );
+                  addBlockData( block, dataItem->getId(), nullptr );
             }
             // fill with sent data
             {
@@ -2712,7 +2712,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
                   addBlockData( block, dataItem->getId(), downcastBlockDataHandlingWrapper->deserializeFineToCoarse( block ) );
                }
                else
-                  addBlockData( block, dataItem->getId(), NULL );
+                  addBlockData( block, dataItem->getId(), nullptr );
             }
             // fill with sent data
             for( uint_t c = uint_t(0); c != uint_t(8); ++c )
diff --git a/src/blockforest/Initialization.cpp b/src/blockforest/Initialization.cpp
index dea96fed6..5e3f7cfd2 100644
--- a/src/blockforest/Initialization.cpp
+++ b/src/blockforest/Initialization.cpp
@@ -220,7 +220,7 @@ createBlockForest(      const AABB& domainAABB,
 
    // if possible, create Cartesian MPI communicator
 
-   std::vector< uint_t >* processIdMap = NULL;
+   std::vector< uint_t >* processIdMap = nullptr;
 
    WALBERLA_MPI_SECTION()
    {
@@ -249,7 +249,7 @@ createBlockForest(      const AABB& domainAABB,
    sforest.balanceLoad( blockforest::CartesianDistribution( numberOfXProcesses, numberOfYProcesses, numberOfZProcesses, processIdMap ),
                         numberOfXProcesses * numberOfYProcesses * numberOfZProcesses );
 
-   if( processIdMap != NULL ) delete processIdMap;
+   if( processIdMap != nullptr ) delete processIdMap;
 
    // create StructuredBlockForest (encapsulates a newly created BlockForest)
 
diff --git a/src/blockforest/SetupBlockForest.cpp b/src/blockforest/SetupBlockForest.cpp
index 3c4b40652..21876b83d 100644
--- a/src/blockforest/SetupBlockForest.cpp
+++ b/src/blockforest/SetupBlockForest.cpp
@@ -73,7 +73,7 @@ uint_t SetupBlockForest::getNumberOfBlocks( const uint_t level ) const
 
    for( uint_t i = 0; i != forest_.size(); ++i ) {
 
-      if( forest_[i] == NULL )
+      if( forest_[i] == nullptr )
          continue;
 
       std::stack< SetupBlock* > stack;
@@ -103,12 +103,12 @@ uint_t SetupBlockForest::getNumberOfBlocks( const uint_t level ) const
 
 const SetupBlock* SetupBlockForest::getFirstBlock() const {
 
-   SetupBlock* block = NULL;
-   for( uint_t i = 0; i != forest_.size() && block == NULL; ++i )
+   SetupBlock* block = nullptr;
+   for( uint_t i = 0; i != forest_.size() && block == nullptr; ++i )
       block = forest_[i];
 
-   if( block == NULL )
-      return NULL;
+   if( block == nullptr )
+      return nullptr;
 
    while( block->hasChildren() )
       block = block->getChild(0);
@@ -120,12 +120,12 @@ const SetupBlock* SetupBlockForest::getFirstBlock() const {
 
 SetupBlock* SetupBlockForest::getFirstBlock() {
 
-   SetupBlock* block = NULL;
-   for( uint_t i = 0; i != forest_.size() && block == NULL; ++i )
+   SetupBlock* block = nullptr;
+   for( uint_t i = 0; i != forest_.size() && block == nullptr; ++i )
       block = forest_[i];
 
-   if( block == NULL )
-      return NULL;
+   if( block == nullptr )
+      return nullptr;
 
    while( block->hasChildren() )
       block = block->getChild(0);
@@ -137,8 +137,8 @@ SetupBlock* SetupBlockForest::getFirstBlock() {
 
 const SetupBlock* SetupBlockForest::getNextBlock( const SetupBlock* block ) const {
 
-   if( block == NULL )
-      return NULL;
+   if( block == nullptr )
+      return nullptr;
 
    // ASCEND
 
@@ -162,10 +162,10 @@ const SetupBlock* SetupBlockForest::getNextBlock( const SetupBlock* block ) cons
       WALBERLA_ASSERT_LESS( treeIndex-1 ,forest_.size() );
       WALBERLA_ASSERT_EQUAL( block, forest_[ treeIndex-1 ] );
 
-      while( treeIndex < forest_.size() && forest_[ treeIndex ] == NULL ) ++treeIndex;
+      while( treeIndex < forest_.size() && forest_[ treeIndex ] == nullptr ) ++treeIndex;
 
       if( treeIndex == forest_.size() )
-         return NULL;
+         return nullptr;
 
       block = forest_[ treeIndex ];
    }
@@ -184,8 +184,8 @@ const SetupBlock* SetupBlockForest::getNextBlock( const SetupBlock* block ) cons
 
 SetupBlock* SetupBlockForest::getNextBlock( const SetupBlock* block ) {
 
-   if( block == NULL )
-      return NULL;
+   if( block == nullptr )
+      return nullptr;
 
    // ASCEND
 
@@ -209,10 +209,10 @@ SetupBlock* SetupBlockForest::getNextBlock( const SetupBlock* block ) {
       WALBERLA_ASSERT_LESS( treeIndex-1, forest_.size() );
       WALBERLA_ASSERT_EQUAL( block, forest_[ treeIndex-1 ] );
 
-      while( treeIndex < forest_.size() && forest_[ treeIndex ] == NULL ) ++treeIndex;
+      while( treeIndex < forest_.size() && forest_[ treeIndex ] == nullptr ) ++treeIndex;
 
       if( treeIndex == forest_.size() )
-         return NULL;
+         return nullptr;
 
       block = forest_[ treeIndex ];
    }
@@ -269,7 +269,7 @@ void SetupBlockForest::getBlocks( std::vector< const SetupBlock* >& blocks ) con
 
    for( uint_t i = 0; i != forest_.size(); ++i ) {
 
-      if( forest_[i] == NULL )
+      if( forest_[i] == nullptr )
          continue;
 
       // depth-first search
@@ -302,7 +302,7 @@ void SetupBlockForest::getBlocks( std::vector< SetupBlock* >& blocks ) {
 
    for( uint_t i = 0; i != forest_.size(); ++i ) {
 
-      if( forest_[i] == NULL )
+      if( forest_[i] == nullptr )
          continue;
 
       // depth-first search
@@ -335,7 +335,7 @@ void SetupBlockForest::getBlocks( std::vector< const SetupBlock* >& blocks, cons
 
    for( uint_t i = 0; i != forest_.size(); ++i ) {
 
-      if( forest_[i] == NULL )
+      if( forest_[i] == nullptr )
          continue;
 
       std::stack< SetupBlock* > stack;
@@ -367,7 +367,7 @@ void SetupBlockForest::getBlocks( std::vector< SetupBlock* >& blocks, const uint
 
    for( uint_t i = 0; i != forest_.size(); ++i ) {
 
-      if( forest_[i] == NULL )
+      if( forest_[i] == nullptr )
          continue;
 
       std::stack< SetupBlock* > stack;
@@ -413,7 +413,7 @@ void SetupBlockForest::getHilbertOrder( std::vector< SetupBlock* >& blocks ) {
 
             SetupBlock* root = forest_[ z*size_[0]*size_[1] + y*size_[0] + x ];
 
-            if( root != NULL ) {
+            if( root != nullptr ) {
 
                std::stack< SetupBlock* > stack;
                std::stack< uint_t > orientation;
@@ -486,7 +486,7 @@ void SetupBlockForest::getBlocksOverlappedByAABB( std::vector< SetupBlock* >& bl
       for( uint_t y = max[1]; y-- != min[1]; ) {
          for( uint_t x = max[0]; x-- != min[0]; ) {
             SetupBlock* const block = forest_[ mapForestCoordinatesToTreeIndex(x,y,z) ];
-            if( block != NULL && block->getAABB().intersects( aabb ) )
+            if( block != nullptr && block->getAABB().intersects( aabb ) )
                stack.push( block );
          }
       }
@@ -524,7 +524,7 @@ void SetupBlockForest::getBlocks( std::vector< SetupBlock* >& blocks, const uint
       for( uint_t y = ymax; y-- != ymin; ) {
          for( uint_t x = xmax; x-- != xmin; ) {
             SetupBlock* const block = forest_[ mapForestCoordinatesToTreeIndex(x,y,z) ];
-            if( block != NULL ) stack.push( block );
+            if( block != nullptr ) stack.push( block );
          }
       }
    }
@@ -596,7 +596,7 @@ void SetupBlockForest::mapAABBToBoundingForestCoordinates( const AABB& aabb, uin
 
          // shouldn't happen, but might happen due to floating point inaccuracy?
          SetupBlock* block = forest_[ mapForestCoordinatesToTreeIndex( min[0], min[1], min[2] ) ];
-         if( block != NULL ) {
+         if( block != nullptr ) {
             const AABB& tree = block->getAABB();
             if( aabb.min(i) < tree.min(i) ) --min[i];
             else if( aabb.min(i) >= tree.max(i) ) ++min[i];
@@ -611,7 +611,7 @@ void SetupBlockForest::mapAABBToBoundingForestCoordinates( const AABB& aabb, uin
 
          // shouldn't happen, but might happen due to floating point inaccuracy?
          SetupBlock* block = forest_[ mapForestCoordinatesToTreeIndex( max[0], max[1], max[2] ) ];
-         if( block != NULL ) {
+         if( block != nullptr ) {
             const AABB& tree = block->getAABB();
             if( aabb.max(i) <= tree.min(i) ) --max[i];
             else if( aabb.max(i) > tree.max(i) ) ++max[i];
@@ -673,7 +673,7 @@ void SetupBlockForest::init( const AABB& domain, const uint_t xSize, const uint_
 
    if( !forest_.empty() ) {
       for( uint_t i = 0; i != forest_.size(); ++i ) {
-         if( forest_[i] != NULL ) delete forest_[i];
+         if( forest_[i] != nullptr ) delete forest_[i];
       }
       forest_.clear();
    }
@@ -725,7 +725,7 @@ void SetupBlockForest::init( const AABB& domain, const uint_t xSize, const uint_
 
    WALBERLA_LOG_PROGRESS( "Initializing SetupBlockForest: Allocating root blocks ..." );
 
-   forest_.resize( size, NULL );
+   forest_.resize( size, nullptr );
    numberOfRootBlocks_ = uint_c(0);
 
    AABB aabb;
@@ -740,7 +740,7 @@ void SetupBlockForest::init( const AABB& domain, const uint_t xSize, const uint_
             {
                getRootBlockAABB( aabb, x, y, z );
 
-               forest_[ treeIndex ] = new SetupBlock( NULL, BlockID( treeIndex, treeIdMarker ),
+               forest_[ treeIndex ] = new SetupBlock( nullptr, BlockID( treeIndex, treeIdMarker ),
                                                       aabb.xMin(), aabb.yMin(), aabb.zMin(), aabb.xMax(), aabb.yMax(), aabb.zMax(), 0 );
                ++numberOfRootBlocks_;
             }
@@ -769,7 +769,7 @@ void SetupBlockForest::init( const AABB& domain, const uint_t xSize, const uint_
 
             WALBERLA_ASSERT_LESS( treeIndex, forest_.size() );
 
-            if( forest_[ treeIndex ] != NULL ) {
+            if( forest_[ treeIndex ] != nullptr ) {
 
                for( uint_t w = 0; w != 3; ++w ) {
                   for( uint_t v = 0; v != 3; ++v ) {
@@ -797,7 +797,7 @@ void SetupBlockForest::init( const AABB& domain, const uint_t xSize, const uint_
                         WALBERLA_ASSERT_LESS( n, 26 );
                         WALBERLA_ASSERT_LESS( nIndex, forest_.size() );
 
-                        if( forest_[ nIndex ] != NULL )
+                        if( forest_[ nIndex ] != nullptr )
                            forest_[ treeIndex ]->addNeighbor( n, forest_[ nIndex ] );
                      }
                   }
@@ -987,13 +987,13 @@ void SetupBlockForest::updateNeighborhood( std::vector< SetupBlock* >& blocks )
             if( z <  domain_.zMin() && periodic_[2] ) z = domain_.zMax() - domain_.zMin() + z;
             if( z >= domain_.zMax() && periodic_[2] ) z = domain_.zMin() - domain_.zMax() + z;
 
-            SetupBlock* neighbor = NULL;
+            SetupBlock* neighbor = nullptr;
 
-            for( uint_t j = 0; j != neighborhood.size() && neighbor == NULL; ++j ) {
+            for( uint_t j = 0; j != neighborhood.size() && neighbor == nullptr; ++j ) {
                if( neighborhood[j]->getAABB().contains( x, y, z ) )
                   neighbor = mapPointToBlock( neighborhood[j], x, y, z );
             }
-            if( neighbor == NULL && block->hasFather() && block->getFather()->getAABB().contains( x, y, z ) )
+            if( neighbor == nullptr && block->hasFather() && block->getFather()->getAABB().contains( x, y, z ) )
                neighbor = mapPointToBlock( block->getFather(), x, y, z );
 
             if( neighborhoodSectionBlocks.empty() || neighborhoodSectionBlocks.back() != neighbor )
@@ -1008,7 +1008,7 @@ void SetupBlockForest::updateNeighborhood( std::vector< SetupBlock* >& blocks )
 #endif
 
          block->clearNeighborhoodSection(n);
-         if( neighborhoodSectionBlocks.back() != NULL ) {
+         if( neighborhoodSectionBlocks.back() != nullptr ) {
 
 #ifndef NDEBUG
             if( neighborhoodSectionBlocks.back()->getLevel() > block->getLevel() )
@@ -1082,7 +1082,7 @@ void SetupBlockForest::createNeighborhood() {
 #endif
 
          block->clearNeighborhoodSection(n);
-         if( neighborhoodSectionBlocks.back() != NULL ) {
+         if( neighborhoodSectionBlocks.back() != nullptr ) {
 
 #ifndef NDEBUG
             if( neighborhoodSectionBlocks.back()->getLevel() > block->getLevel() )
diff --git a/src/blockforest/StructuredBlockForest.cpp b/src/blockforest/StructuredBlockForest.cpp
index ca37814fd..034feb827 100644
--- a/src/blockforest/StructuredBlockForest.cpp
+++ b/src/blockforest/StructuredBlockForest.cpp
@@ -43,7 +43,7 @@ bool StructuredBlockForest::blockExists( const Cell& cell, const uint_t level )
    }
 
    const IBlock* block = getBlock(x,y,z);
-   if( block == NULL )
+   if( block == nullptr )
       return false;
 
    WALBERLA_ASSERT_EQUAL( dynamic_cast< const Block* >( block ), block );
@@ -68,7 +68,7 @@ void StructuredBlockForest::getBlockID( IBlockID& id, const Cell& cell, const ui
    }
    else {
       const IBlock* const block = getBlock(x,y,z);
-      if( block == NULL ) {
+      if( block == nullptr ) {
          WALBERLA_ABORT( "Getting block ID failed: Locally, there exists no block at global cell " << cell << " on level " << level << "!\n"
                          "                         (for simulation global information you have to explicitly construct the block forest to "
                          "contain global knowledge)");
diff --git a/src/blockforest/loadbalancing/Cartesian.cpp b/src/blockforest/loadbalancing/Cartesian.cpp
index 780461adf..13dbf50b7 100644
--- a/src/blockforest/loadbalancing/Cartesian.cpp
+++ b/src/blockforest/loadbalancing/Cartesian.cpp
@@ -48,7 +48,7 @@ uint_t CartesianDistribution::operator()( SetupBlockForest & forest, const uint_
       WALBERLA_ABORT( "Load balancing failed: \'Number of processes in z-direction\' must be in (0," << forest.getZSize() << "]. "
                       "You specified \'" << numberOfZProcesses_ << "\'." );
 
-   if( processIdMap_ != NULL )
+   if( processIdMap_ != nullptr )
       WALBERLA_CHECK_EQUAL( processIdMap_->size(), numberOfProcesses );
 
    uint_t partitions[3];
@@ -84,7 +84,7 @@ uint_t CartesianDistribution::operator()( SetupBlockForest & forest, const uint_
             {
                const uint_t index = z * partitions[0] * partitions[1] + y * partitions[0] + x;
 
-               (*block)->assignTargetProcess( ( processIdMap_ != NULL ) ? (*processIdMap_)[ index ] : index );
+               (*block)->assignTargetProcess( ( processIdMap_ != nullptr ) ? (*processIdMap_)[ index ] : index );
             }
          }
       }
diff --git a/src/blockforest/loadbalancing/StaticParMetis.cpp b/src/blockforest/loadbalancing/StaticParMetis.cpp
index 0ab962013..10345343d 100644
--- a/src/blockforest/loadbalancing/StaticParMetis.cpp
+++ b/src/blockforest/loadbalancing/StaticParMetis.cpp
@@ -43,7 +43,7 @@ template< typename T >
 T * ptr( std::vector<T> & v )
 {
    if( v.empty() )
-      return NULL;
+      return nullptr;
    else
       return &( v.front() );
 }
diff --git a/src/core/config/Create.cpp b/src/core/config/Create.cpp
index 1886a5be4..03de639d0 100644
--- a/src/core/config/Create.cpp
+++ b/src/core/config/Create.cpp
@@ -154,7 +154,7 @@ namespace config {
 
             if ( blockName.empty() )
             {
-               currentBlock = NULL;
+               currentBlock = nullptr;
                WALBERLA_LOG_WARNING("Ignoring Parameter '" << *param << "' empty block name");
                break;
             }
@@ -162,7 +162,7 @@ namespace config {
             currentBlock->getWritableBlocks( blockName, possibleBlocks );
             if ( possibleBlocks.size() > 1 )
             {
-               currentBlock = NULL;
+               currentBlock = nullptr;
                WALBERLA_LOG_WARNING("Ignoring Parameter '" << *param << "' since block is ambiguous: " << blockName );
                break;
             }
diff --git a/src/core/math/Parser.cpp b/src/core/math/Parser.cpp
index 523048e20..a2d480443 100644
--- a/src/core/math/Parser.cpp
+++ b/src/core/math/Parser.cpp
@@ -66,8 +66,8 @@ namespace math {
 
 
 FunctionParser::FunctionParser() 
-   : expression_ ( 0 ),
-     symbolTable_( 0 ),
+   : expression_ ( nullptr ),
+     symbolTable_( nullptr ),
      isConstant_(false),
      isZero_(false)
 {
@@ -125,7 +125,7 @@ void FunctionParser::parse( const std::string & eq )
 
 double FunctionParser::evaluate( const std::map<std::string,double> & symbolTable) const
 {
-   if( expression_ == 0 )
+   if( expression_ == nullptr )
    {
       WALBERLA_ASSERT_NULLPTR( symbolTable_ );
       WALBERLA_ABORT( "Error: You are trying to evaluate an expression which you never have parsed!" );
@@ -149,7 +149,7 @@ double FunctionParser::evaluate( const std::map<std::string,double> & symbolTabl
 
 bool FunctionParser::symbolExists(const std::string & symbol) const
 {
-   if( expression_ == 0 )
+   if( expression_ == nullptr )
    {
       WALBERLA_ASSERT_NULLPTR( symbolTable_ );
       WALBERLA_ABORT( "Error: You are trying to evaluate an expression which you never have parsed!" );
diff --git a/src/core/math/PhysicalCheck.cpp b/src/core/math/PhysicalCheck.cpp
index 321890603..d87a0ad18 100644
--- a/src/core/math/PhysicalCheck.cpp
+++ b/src/core/math/PhysicalCheck.cpp
@@ -318,7 +318,7 @@ namespace math {
       if( !isDefined(varName) )
       {
          WALBERLA_ABORT( "Error in PhysicalCheck::getVarUnit(). Variable not found: " << varName );
-         return 0;
+         return nullptr;
       }
 
       std::stringstream num, denom;
diff --git a/src/core/mpi/BufferSystem.cpp b/src/core/mpi/BufferSystem.cpp
index 1cabacc1d..551fce3e6 100644
--- a/src/core/mpi/BufferSystem.cpp
+++ b/src/core/mpi/BufferSystem.cpp
@@ -41,7 +41,7 @@ std::set<int> BufferSystem::activeTags_;
 
 
 BufferSystem::iterator::iterator( BufferSystem & bufferSystem, bool begin )
-    : bufferSystem_( bufferSystem), currentRecvBuffer_( NULL ), currentSenderRank_( -1 )
+    : bufferSystem_( bufferSystem), currentRecvBuffer_( nullptr ), currentSenderRank_( -1 )
 {
    if ( begin ) // init iterator
       ++(*this);
@@ -86,7 +86,7 @@ BufferSystem::BufferSystem( const MPI_Comm & communicator, int tag )
    : knownSizeComm_  ( communicator, tag ),
      unknownSizeComm_( communicator, tag ),
      noMPIComm_( communicator, tag ),
-     currentComm_    ( NULL ),
+     currentComm_    ( nullptr ),
      sizeChangesEverytime_( true ),
      communicationRunning_( false )
 {
@@ -97,7 +97,7 @@ BufferSystem::BufferSystem( const BufferSystem &other )
    : knownSizeComm_  ( other.knownSizeComm_.getCommunicator(), other.knownSizeComm_.getTag() ),
      unknownSizeComm_( other.knownSizeComm_.getCommunicator(), other.knownSizeComm_.getTag() ),
      noMPIComm_      ( other.knownSizeComm_.getCommunicator(), other.knownSizeComm_.getTag() ),
-     currentComm_ ( NULL ),
+     currentComm_ ( nullptr ),
      sizeChangesEverytime_( other.sizeChangesEverytime_ ),
      communicationRunning_( other.communicationRunning_ ),
      recvInfos_( other.recvInfos_ ),
@@ -111,7 +111,7 @@ BufferSystem::BufferSystem( const BufferSystem &other )
    else if ( other.currentComm_ == &other.noMPIComm_ )
       currentComm_ = &noMPIComm_;
    else
-      currentComm_ = NULL; // receiver information not yet set
+      currentComm_ = nullptr; // receiver information not yet set
 }
 
 
@@ -131,7 +131,7 @@ BufferSystem & BufferSystem::operator=( const BufferSystem & other )
    else if ( other.currentComm_ == &other.noMPIComm_ )
       currentComm_ = &noMPIComm_;
    else
-      currentComm_ = NULL; // receiver information not yet set
+      currentComm_ = nullptr; // receiver information not yet set
 
    return *this;
 }
@@ -419,7 +419,7 @@ RecvBuffer * BufferSystem::waitForNext( MPIRank & fromRank )
    else
    {
       endCommunication();
-      return NULL;
+      return nullptr;
    }
 
 }
diff --git a/src/core/mpi/Gatherv.cpp b/src/core/mpi/Gatherv.cpp
index d2576987d..af9aea36c 100644
--- a/src/core/mpi/Gatherv.cpp
+++ b/src/core/mpi/Gatherv.cpp
@@ -112,7 +112,7 @@ void gathervBuffer( const mpi::SendBuffer & sendBuffer, mpi::RecvBuffer & recvBu
 
    // Gather the message sizes on root process
    MPI_Gather( &sendBufferSize,                   1, MPITrait<int>::type(),
-               isGatherProcess? &sizes[0] : NULL, 1, MPITrait<int>::type(),
+               isGatherProcess? &sizes[0] : nullptr, 1, MPITrait<int>::type(),
                targetRank, comm );
 
    int totalSize = 0;
@@ -128,8 +128,8 @@ void gathervBuffer( const mpi::SendBuffer & sendBuffer, mpi::RecvBuffer & recvBu
 
    MPI_Gatherv( sendBuffer.ptr(), int_c( sendBuffer.size() ), MPITrait< mpi::SendBuffer::ElementType >::type(),
                 recvBuffer.ptr(),
-                isGatherProcess? &sizes[0] : NULL,
-                isGatherProcess? &displacements[0] : NULL,
+                isGatherProcess? &sizes[0] : nullptr,
+                isGatherProcess? &displacements[0] : nullptr,
                 MPITrait< mpi::RecvBuffer::ElementType >::type(), targetRank, comm );
 }
 
diff --git a/src/core/mpi/OpenMPBufferSystem.cpp b/src/core/mpi/OpenMPBufferSystem.cpp
index 54471ccf4..417d74a39 100644
--- a/src/core/mpi/OpenMPBufferSystem.cpp
+++ b/src/core/mpi/OpenMPBufferSystem.cpp
@@ -184,7 +184,7 @@ void OpenMPBufferSystem::waitOpenMP()
    for( int i = 0; i < numReceives; ++i )
    {
       MPIRank recvRank = INVALID_RANK;
-      RecvBuffer * recvBuffer = NULL;
+      RecvBuffer * recvBuffer = nullptr;
 
       #ifdef _OPENMP
       #pragma omp critical
diff --git a/src/core/timing/TimingPool.cpp b/src/core/timing/TimingPool.cpp
index 97dfc1a89..372a81b6a 100644
--- a/src/core/timing/TimingPool.cpp
+++ b/src/core/timing/TimingPool.cpp
@@ -163,11 +163,11 @@ void TimingPool<TP>::mpiReduce( std::vector<double> & min,
 
    if( targetRank >= 0 )
    {
-      void * minTarget = targetRank == rank ? &minRed.front() : NULL;
-      void * maxTarget = targetRank == rank ? &maxRed.front() : NULL;
-      void * sumTarget = targetRank == rank ? &sumRed.front() : NULL;
-      void * sumSqTarget = targetRank == rank ? &sumSqRed.front() : NULL;
-      void * countTarget = targetRank == rank ? &countRed.front() : NULL;
+      void * minTarget = targetRank == rank ? &minRed.front() : nullptr;
+      void * maxTarget = targetRank == rank ? &maxRed.front() : nullptr;
+      void * sumTarget = targetRank == rank ? &sumRed.front() : nullptr;
+      void * sumSqTarget = targetRank == rank ? &sumSqRed.front() : nullptr;
+      void * countTarget = targetRank == rank ? &countRed.front() : nullptr;
 
       MPI_Reduce( &min.front(), minTarget,
                   int_c(min.size()), MPITrait<double>::type(), MPI_MIN, targetRank,MPI_COMM_WORLD );
diff --git a/src/domain_decomposition/BlockStorage.cpp b/src/domain_decomposition/BlockStorage.cpp
index 9ee33473a..407756295 100644
--- a/src/domain_decomposition/BlockStorage.cpp
+++ b/src/domain_decomposition/BlockStorage.cpp
@@ -109,7 +109,7 @@ BlockDataID BlockStorage::addBlockData( const internal::SelectableBlockDataHandl
       if( dh )
          block->addData( id, dh->initialize( block.get() ) );
       else
-         block->addData( id, NULL );
+         block->addData( id, nullptr );
    }
 
    return id;
@@ -229,7 +229,7 @@ BlockDataID BlockStorage::loadBlockData( const std::string & file, const interna
          dh->deserialize( block, id, buffer );
       }
       else
-         block->addData( id, NULL );
+         block->addData( id, nullptr );
    }
 
    return id;   
diff --git a/src/field/allocation/AlignedMalloc.cpp b/src/field/allocation/AlignedMalloc.cpp
index 1e14ff21e..578bcfd9f 100644
--- a/src/field/allocation/AlignedMalloc.cpp
+++ b/src/field/allocation/AlignedMalloc.cpp
@@ -43,7 +43,7 @@ namespace field {
 
       pa=std::malloc((size+alignment-1)+sizeof(void *));
       if(!pa)
-         return 0;
+         return nullptr;
 
       // Find next aligned position, starting at pa+sizeof(void*)-1
       ptr=(void*)( ((size_t)pa+sizeof(void *)+alignment-1) & ~(alignment-1));
@@ -75,7 +75,7 @@ namespace field {
 
       pa=std::malloc( (size+2*alignment-1 )+sizeof(void *));
       if(!pa)
-         return 0;
+         return nullptr;
 
       // Find next aligned position, starting at pa+sizeof(void*)-1
       ptr=(void*)( ((size_t)pa+sizeof(void *)+alignment-1) & ~(alignment-1));
diff --git a/src/gather/MPIGatherScheme.cpp b/src/gather/MPIGatherScheme.cpp
index 9775cce2b..c40a63c69 100644
--- a/src/gather/MPIGatherScheme.cpp
+++ b/src/gather/MPIGatherScheme.cpp
@@ -137,7 +137,7 @@ void MPIGatherScheme::runSetupPhase()
          recvBuffer.resize( uint_c( nrOfGatherProcesses ) );
 
       MPI_Gather( & bytesToSend_,   1, MPITrait<decltype(bytesToSend_)>::type(),
-                  recvBuffer.empty()? NULL : & recvBuffer[0],  1, MPITrait<decltype(bytesToSend_)>::type(),
+                  recvBuffer.empty()? nullptr : & recvBuffer[0],  1, MPITrait<decltype(bytesToSend_)>::type(),
                   gatherRank_, gatherCommunicator_  );
 
       WALBERLA_ASSERT_EQUAL( displacementVector_.size(), 0 );
@@ -193,8 +193,8 @@ void MPIGatherScheme::communicate()
 
    mpi::GenericRecvBuffer<unsigned char>  recvBuffer;
 
-   int * displacementVectorPtr = NULL;
-   int * sendBytesPerProcessPtr = NULL;
+   int * displacementVectorPtr = nullptr;
+   int * sendBytesPerProcessPtr = nullptr;
    if ( mpiManager->rank() == gatherRankInGlobalComm_  ) {
       recvBuffer.resize( uint_c( gatherMsgSize_ ) );
       displacementVectorPtr  = &displacementVector_[0];
diff --git a/src/geometry/structured/extern/lodepng.cpp b/src/geometry/structured/extern/lodepng.cpp
index 2191deaa1..3355007e4 100644
--- a/src/geometry/structured/extern/lodepng.cpp
+++ b/src/geometry/structured/extern/lodepng.cpp
@@ -156,7 +156,7 @@ static void uivector_cleanup(void* p)
 {
   ((uivector*)p)->size = ((uivector*)p)->allocsize = 0;
   lodepng_free(((uivector*)p)->data);
-  ((uivector*)p)->data = NULL;
+  ((uivector*)p)->data = nullptr;
 }
 
 /*returns 1 if success, 0 if failure ==> nothing done*/
@@ -189,7 +189,7 @@ static unsigned uivector_resizev(uivector* p, size_t size, unsigned value)
 
 static void uivector_init(uivector* p)
 {
-  p->data = NULL;
+  p->data = nullptr;
   p->size = p->allocsize = 0;
 }
 
@@ -257,12 +257,12 @@ static void ucvector_cleanup(void* p)
 {
   ((ucvector*)p)->size = ((ucvector*)p)->allocsize = 0;
   lodepng_free(((ucvector*)p)->data);
-  ((ucvector*)p)->data = NULL;
+  ((ucvector*)p)->data = nullptr;
 }
 
 static void ucvector_init(ucvector* p)
 {
-  p->data = NULL;
+  p->data = nullptr;
   p->size = p->allocsize = 0;
 }
 
@@ -312,13 +312,13 @@ static unsigned string_resize(char** out, size_t size)
     data[size] = 0; /*null termination char*/
     *out = data;
   }
-  return data != 0;
+  return data != nullptr;
 }
 
 /*init a {char*, size_t} pair for use as string*/
 static void string_init(char** out)
 {
-  *out = NULL;
+  *out = nullptr;
   string_resize(out, 0);
 }
 
@@ -326,7 +326,7 @@ static void string_init(char** out)
 static void string_cleanup(char** out)
 {
   lodepng_free(*out);
-  *out = NULL;
+  *out = nullptr;
 }
 
 static void string_set(char** out, const char* in)
@@ -381,7 +381,7 @@ unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* fil
   long size;
 
   /*provide some proper output values if error will happen*/
-  *out = 0;
+  *out = nullptr;
   *outsize = 0;
 
   file = fopen(filename, "rb");
@@ -536,9 +536,9 @@ static void HuffmanTree_draw(HuffmanTree* tree)
 
 static void HuffmanTree_init(HuffmanTree* tree)
 {
-  tree->tree2d = 0;
-  tree->tree1d = 0;
-  tree->lengths = 0;
+  tree->tree2d = nullptr;
+  tree->tree1d = nullptr;
+  tree->lengths = nullptr;
 }
 
 static void HuffmanTree_cleanup(HuffmanTree* tree)
@@ -990,10 +990,10 @@ static unsigned getTreeInflateDynamic(HuffmanTree* tree_ll, HuffmanTree* tree_d,
   size_t inbitlength = inlength * 8;
 
   /*see comments in deflateDynamic for explanation of the context and these variables, it is analogous*/
-  unsigned* bitlen_ll = 0; /*lit,len code lengths*/
-  unsigned* bitlen_d = 0; /*dist code lengths*/
+  unsigned* bitlen_ll = nullptr; /*lit,len code lengths*/
+  unsigned* bitlen_d = nullptr; /*dist code lengths*/
   /*code length code lengths ("clcl"), the bit lengths of the huffman tree used to compress bitlen_ll and bitlen_d*/
-  unsigned* bitlen_cl = 0;
+  unsigned* bitlen_cl = nullptr;
   HuffmanTree tree_cl; /*the code tree for code length codes (the huffman tree for compressed huffman trees)*/
 
   if((*bp) >> 3 >= inlength - 2) return 49; /*error: the bit pointer is or will go past the memory*/
@@ -2162,7 +2162,7 @@ unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsig
   ucvector outv;
   size_t i;
   unsigned error;
-  unsigned char* deflatedata = 0;
+  unsigned char* deflatedata = nullptr;
   size_t deflatesize = 0;
 
   unsigned ADLER32;
@@ -2250,12 +2250,12 @@ void lodepng_compress_settings_init(LodePNGCompressSettings* settings)
   settings->nicematch = 128;
   settings->lazymatching = 1;
 
-  settings->custom_zlib = 0;
-  settings->custom_deflate = 0;
-  settings->custom_context = 0;
+  settings->custom_zlib = nullptr;
+  settings->custom_deflate = nullptr;
+  settings->custom_context = nullptr;
 }
 
-const LodePNGCompressSettings lodepng_default_compress_settings = {2, 1, DEFAULT_WINDOWSIZE, 3, 128, 1, 0, 0, 0};
+const LodePNGCompressSettings lodepng_default_compress_settings = {2, 1, DEFAULT_WINDOWSIZE, 3, 128, 1, nullptr, nullptr, nullptr};
 
 
 #endif /*LODEPNG_COMPILE_ENCODER*/
@@ -2266,12 +2266,12 @@ void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings)
 {
   settings->ignore_adler32 = 0;
 
-  settings->custom_zlib = 0;
-  settings->custom_inflate = 0;
-  settings->custom_context = 0;
+  settings->custom_zlib = nullptr;
+  settings->custom_inflate = nullptr;
+  settings->custom_context = nullptr;
 }
 
-const LodePNGDecompressSettings lodepng_default_decompress_settings = {0, 0, 0, 0};
+const LodePNGDecompressSettings lodepng_default_decompress_settings = {0, nullptr, nullptr, nullptr};
 
 #endif /*LODEPNG_COMPILE_DECODER*/
 
@@ -2544,7 +2544,7 @@ void lodepng_color_mode_init(LodePNGColorMode* info)
   info->key_r = info->key_g = info->key_b = 0;
   info->colortype = LCT_RGBA;
   info->bitdepth = 8;
-  info->palette = 0;
+  info->palette = nullptr;
   info->palettesize = 0;
 }
 
@@ -2590,7 +2590,7 @@ static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColo
 void lodepng_palette_clear(LodePNGColorMode* info)
 {
   if(info->palette) lodepng_free(info->palette);
-  info->palette = 0;
+  info->palette = nullptr;
   info->palettesize = 0;
 }
 
@@ -2673,7 +2673,7 @@ size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colorty
 static void LodePNGUnknownChunks_init(LodePNGInfo* info)
 {
   unsigned i;
-  for(i = 0; i < 3; i++) info->unknown_chunks_data[i] = 0;
+  for(i = 0; i < 3; i++) info->unknown_chunks_data[i] = nullptr;
   for(i = 0; i < 3; i++) info->unknown_chunks_size[i] = 0;
 }
 
@@ -2709,8 +2709,8 @@ static unsigned LodePNGUnknownChunks_copy(LodePNGInfo* dest, const LodePNGInfo*
 static void LodePNGText_init(LodePNGInfo* info)
 {
   info->text_num = 0;
-  info->text_keys = NULL;
-  info->text_strings = NULL;
+  info->text_keys = nullptr;
+  info->text_strings = nullptr;
 }
 
 static void LodePNGText_cleanup(LodePNGInfo* info)
@@ -2728,8 +2728,8 @@ static void LodePNGText_cleanup(LodePNGInfo* info)
 static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source)
 {
   size_t i = 0;
-  dest->text_keys = 0;
-  dest->text_strings = 0;
+  dest->text_keys = nullptr;
+  dest->text_strings = nullptr;
   dest->text_num = 0;
   for(i = 0; i < source->text_num; i++)
   {
@@ -2772,10 +2772,10 @@ unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str)
 static void LodePNGIText_init(LodePNGInfo* info)
 {
   info->itext_num = 0;
-  info->itext_keys = NULL;
-  info->itext_langtags = NULL;
-  info->itext_transkeys = NULL;
-  info->itext_strings = NULL;
+  info->itext_keys = nullptr;
+  info->itext_langtags = nullptr;
+  info->itext_transkeys = nullptr;
+  info->itext_strings = nullptr;
 }
 
 static void LodePNGIText_cleanup(LodePNGInfo* info)
@@ -2797,10 +2797,10 @@ static void LodePNGIText_cleanup(LodePNGInfo* info)
 static unsigned LodePNGIText_copy(LodePNGInfo* dest, const LodePNGInfo* source)
 {
   size_t i = 0;
-  dest->itext_keys = 0;
-  dest->itext_langtags = 0;
-  dest->itext_transkeys = 0;
-  dest->itext_strings = 0;
+  dest->itext_keys = nullptr;
+  dest->itext_langtags = nullptr;
+  dest->itext_transkeys = nullptr;
+  dest->itext_strings = nullptr;
   dest->itext_num = 0;
   for(i = 0; i < source->itext_num; i++)
   {
@@ -2938,7 +2938,7 @@ struct ColorTree
 static void color_tree_init(ColorTree* tree)
 {
   int i;
-  for(i = 0; i < 16; i++) tree->children[i] = 0;
+  for(i = 0; i < 16; i++) tree->children[i] = nullptr;
   tree->index = -1;
 }
 
@@ -3965,7 +3965,7 @@ unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state,
                          const unsigned char* in, size_t insize)
 {
   LodePNGInfo* info = &state->info_png;
-  if(insize == 0 || in == 0)
+  if(insize == 0 || in == nullptr)
   {
     CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/
   }
@@ -4103,7 +4103,7 @@ static unsigned unfilter(unsigned char* out, const unsigned char* in, unsigned w
   */
 
   unsigned y;
-  unsigned char* prevline = 0;
+  unsigned char* prevline = nullptr;
 
   /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/
   size_t bytewidth = (bpp + 7) / 8;
@@ -4361,7 +4361,7 @@ static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, siz
 static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
 {
   unsigned error = 0;
-  char *key = 0, *str = 0;
+  char *key = nullptr, *str = nullptr;
   unsigned i;
 
   while(!error) /*not really a while loop, only used to break on error*/
@@ -4408,7 +4408,7 @@ static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecompressSetting
   unsigned i;
 
   unsigned length, string2_begin;
-  char *key = 0;
+  char *key = nullptr;
   ucvector decoded;
 
   ucvector_init(&decoded);
@@ -4457,7 +4457,7 @@ static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompressSetting
   unsigned i;
 
   unsigned length, begin, compressed;
-  char *key = 0, *langtag = 0, *transkey = 0;
+  char *key = nullptr, *langtag = nullptr, *transkey = nullptr;
   ucvector decoded;
   ucvector_init(&decoded);
 
@@ -4588,7 +4588,7 @@ static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h,
 #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
 
   /*provide some proper output values if error will happen*/
-  *out = 0;
+  *out = nullptr;
 
   state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameters in state->info_png*/
   if(state->error) return;
@@ -4753,7 +4753,7 @@ unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h,
                         LodePNGState* state,
                         const unsigned char* in, size_t insize)
 {
-  *out = 0;
+  *out = nullptr;
   decodeGeneric(out, w, h, state, in, insize);
   if(state->error) return state->error;
   if(!state->decoder.color_convert || lodepng_color_mode_equal(&state->info_raw, &state->info_png.color))
@@ -5015,7 +5015,7 @@ static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t d
 static unsigned addChunk_IEND(ucvector* out)
 {
   unsigned error = 0;
-  error = addChunk(out, "IEND", 0, 0);
+  error = addChunk(out, "IEND", nullptr, 0);
   return error;
 }
 
@@ -5257,7 +5257,7 @@ static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w,
   size_t linebytes = (w * bpp + 7) / 8;
   /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/
   size_t bytewidth = (bpp + 7) / 8;
-  const unsigned char* prevline = 0;
+  const unsigned char* prevline = nullptr;
   unsigned x, y;
   unsigned error = 0;
   LodePNGFilterStrategy strategy = settings->filter_strategy;
@@ -5426,8 +5426,8 @@ static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w,
     zlibsettings.btype = 1;
     /*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG
     images only, so disable it*/
-    zlibsettings.custom_zlib = 0;
-    zlibsettings.custom_deflate = 0;
+    zlibsettings.custom_zlib = nullptr;
+    zlibsettings.custom_deflate = nullptr;
     for(type = 0; type < 5; type++)
     {
       ucvector_init(&attempt[type]);
@@ -5442,7 +5442,7 @@ static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w,
 
         filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
         size[type] = 0;
-        dummy = 0;
+        dummy = nullptr;
         zlib_compress(&dummy, &size[type], attempt[type].data, testsize, &zlibsettings);
         lodepng_free(dummy);
         /*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/
@@ -5679,11 +5679,11 @@ unsigned lodepng_encode(unsigned char** out, size_t* outsize,
 {
   LodePNGInfo info;
   ucvector outv;
-  unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/
+  unsigned char* data = nullptr; /*uncompressed version of the IDAT chunk data*/
   size_t datasize = 0;
 
   /*provide some proper output values if error will happen*/
-  *out = 0;
+  *out = nullptr;
   *outsize = 0;
   state->error = 0;
 
@@ -5922,7 +5922,7 @@ void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings)
   settings->filter_strategy = LFS_MINSUM;
   settings->auto_convert = LAC_AUTO;
   settings->force_palette = 0;
-  settings->predefined_filters = 0;
+  settings->predefined_filters = nullptr;
 #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
   settings->add_id = 0;
   settings->text_compression = 1;
@@ -6069,7 +6069,7 @@ void load_file(std::vector<unsigned char>& buffer, const std::string& filename)
 void save_file(const std::vector<unsigned char>& buffer, const std::string& filename)
 {
   std::ofstream file(filename.c_str(), std::ios::out|std::ios::binary);
-  file.write(buffer.empty() ? 0 : (char*)&buffer[0], std::streamsize(buffer.size()));
+  file.write(buffer.empty() ? nullptr : (char*)&buffer[0], std::streamsize(buffer.size()));
 }
 #endif //LODEPNG_COMPILE_DISK
 
@@ -6078,7 +6078,7 @@ void save_file(const std::vector<unsigned char>& buffer, const std::string& file
 unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
                     const LodePNGDecompressSettings& settings)
 {
-  unsigned char* buffer = 0;
+  unsigned char* buffer = nullptr;
   size_t buffersize = 0;
   unsigned error = zlib_decompress(&buffer, &buffersize, in, insize, &settings);
   if(buffer)
@@ -6092,7 +6092,7 @@ unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, si
 unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
                     const LodePNGDecompressSettings& settings)
 {
-  return decompress(out, in.empty() ? 0 : &in[0], in.size(), settings);
+  return decompress(out, in.empty() ? nullptr : &in[0], in.size(), settings);
 }
 #endif //LODEPNG_COMPILE_DECODER
 
@@ -6100,7 +6100,7 @@ unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned
 unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
                   const LodePNGCompressSettings& settings)
 {
-  unsigned char* buffer = 0;
+  unsigned char* buffer = nullptr;
   size_t buffersize = 0;
   unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings);
   if(buffer)
@@ -6114,7 +6114,7 @@ unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size
 unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
                   const LodePNGCompressSettings& settings)
 {
-  return compress(out, in.empty() ? 0 : &in[0], in.size(), settings);
+  return compress(out, in.empty() ? nullptr : &in[0], in.size(), settings);
 }
 #endif //LODEPNG_COMPILE_ENCODER
 #endif //LODEPNG_COMPILE_ZLIB
@@ -6166,7 +6166,7 @@ unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h, const
 unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
                 const std::vector<unsigned char>& in, LodePNGColorType colortype, unsigned bitdepth)
 {
-  return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth);
+  return decode(out, w, h, in.empty() ? nullptr : &in[0], (unsigned)in.size(), colortype, bitdepth);
 }
 
 unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
@@ -6188,7 +6188,7 @@ unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
                 State& state,
                 const std::vector<unsigned char>& in)
 {
-  return decode(out, w, h, state, in.empty() ? 0 : &in[0], in.size());
+  return decode(out, w, h, state, in.empty() ? nullptr : &in[0], in.size());
 }
 
 #ifdef LODEPNG_COMPILE_DISK
@@ -6222,7 +6222,7 @@ unsigned encode(std::vector<unsigned char>& out,
                 LodePNGColorType colortype, unsigned bitdepth)
 {
   if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84;
-  return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth);
+  return encode(out, in.empty() ? nullptr : &in[0], w, h, colortype, bitdepth);
 }
 
 unsigned encode(std::vector<unsigned char>& out,
@@ -6245,7 +6245,7 @@ unsigned encode(std::vector<unsigned char>& out,
                 State& state)
 {
   if(lodepng_get_raw_size(w, h, &state.info_raw) > in.size()) return 84;
-  return encode(out, in.empty() ? 0 : &in[0], w, h, state);
+  return encode(out, in.empty() ? nullptr : &in[0], w, h, state);
 }
 
 #ifdef LODEPNG_COMPILE_DISK
@@ -6264,7 +6264,7 @@ unsigned encode(const std::string& filename,
                 LodePNGColorType colortype, unsigned bitdepth)
 {
   if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84;
-  return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth);
+  return encode(filename, in.empty() ? nullptr : &in[0], w, h, colortype, bitdepth);
 }
 #endif //LODEPNG_COMPILE_DISK
 #endif //LODEPNG_COMPILE_ENCODER
diff --git a/src/gui/Gui.cpp b/src/gui/Gui.cpp
index 57650f2d5..414aa029a 100644
--- a/src/gui/Gui.cpp
+++ b/src/gui/Gui.cpp
@@ -212,7 +212,7 @@ void GUI::breakpoint( const std::string & comment, const std::string & file, int
 namespace walberla {
 namespace gui {
 
-GUI * GUI::lastInstance_ = NULL;
+GUI * GUI::lastInstance_ = nullptr;
 
 GUI::GUI(timeloop::ITimeloop & timeloop, const shared_ptr<StructuredBlockForest> & blockForest, int& , char ** )
    :  timeloop_(timeloop),
diff --git a/src/gui/PropertyTree.cpp b/src/gui/PropertyTree.cpp
index 562c73f7e..5ac247c1e 100644
--- a/src/gui/PropertyTree.cpp
+++ b/src/gui/PropertyTree.cpp
@@ -118,7 +118,7 @@ namespace gui {
 namespace walberla {
 namespace gui {
    PropertyTree::PropertyTree()
-      : model_(0), lastBlock_(0)
+      : model_(nullptr), lastBlock_(nullptr)
    {}
 
 
@@ -138,7 +138,7 @@ namespace gui {
 
    PropertyTree::ItemID PropertyTree::addItem(const std::string & , ItemID )
    {
-      return 0;
+      return nullptr;
    }
 } // namespace gui
 } // namespace walberla
diff --git a/src/pe/ccd/HashGrids.cpp b/src/pe/ccd/HashGrids.cpp
index 3eee9158b..b73a25548 100644
--- a/src/pe/ccd/HashGrids.cpp
+++ b/src/pe/ccd/HashGrids.cpp
@@ -65,7 +65,7 @@ HashGrids::HashGrid::HashGrid( real_t cellSpan )
    // Initialization of each cell - i.e., initially setting the pointer to the body container to
    // NULL (=> no bodies are assigned to this hash grid yet!) and ...
    for( Cell* c  = cell_; c < cell_ + xyzCellCount_; ++c ) {
-      c->bodies_ = NULL;
+      c->bodies_ = nullptr;
    }
    // ... setting up the neighborhood relationship (using the offset array).
    initializeNeighborOffsets();
@@ -215,7 +215,7 @@ void HashGrids::HashGrid::clear()
 {
    for( auto cellIt = occupiedCells_.begin(); cellIt < occupiedCells_.end(); ++cellIt ) {
       delete (*cellIt)->bodies_;
-      (*cellIt)->bodies_ = NULL;
+      (*cellIt)->bodies_ = nullptr;
    }
    occupiedCells_.clear();
    bodyCount_ = 0;
@@ -392,7 +392,7 @@ void HashGrids::HashGrid::add( BodyID body, Cell* cell )
    // (i.e., allocated) and properly initialized (i.e., sufficient initial storage capacity must be
    // reserved). Furthermore, the cell must be inserted into the grid-global vector 'occupiedCells_'
    // in which all cells that are currently occupied by bodies are recorded.
-   if( cell->bodies_ == NULL )
+   if( cell->bodies_ == nullptr )
    {
       cell->bodies_ = new BodyVector;
       cell->bodies_->reserve( cellVectorSize );
@@ -436,7 +436,7 @@ void HashGrids::HashGrid::remove( BodyID body, Cell* cell )
 
       // ... the cell's body container is destroyed and ...
       delete cell->bodies_;
-      cell->bodies_ = NULL;
+      cell->bodies_ = nullptr;
       cell->lastNonFixedBody_ = -1;
 
       // ... the cell is removed from the grid-global vector 'occupiedCells_' that records all
@@ -542,7 +542,7 @@ void HashGrids::HashGrid::enlarge()
 
    // ... initialized, and finally ...
    for( Cell* c  = cell_; c < cell_ + xyzCellCount_; ++c ) {
-      c->bodies_ = NULL;
+      c->bodies_ = nullptr;
       c->lastNonFixedBody_ = -1;
    }
    initializeNeighborOffsets();
@@ -673,7 +673,7 @@ void HashGrids::add( BodyID body )
    // The body is marked as being added to 'bodiesToAdd_' by setting the grid pointer to NULL and
    // setting the cell-ID to '0'. Additionally, the hash value is used to memorize the body's
    // index position in the 'bodiesToAdd_' vector.
-   body->setGrid  ( NULL );
+   body->setGrid  ( nullptr );
    body->setHash  ( bodiesToAdd_.size() );
    body->setCellId( 0 );
 
@@ -700,7 +700,7 @@ void HashGrids::remove( BodyID body )
    HashGrid* grid = static_cast<HashGrid*>( body->getGrid() );
 
    // The body is stored in a hash grid from which it must be removed.
-   if( grid != NULL ) {
+   if( grid != nullptr ) {
       grid->remove( body );
    }
    // The body's grid pointer is equal to NULL.
@@ -786,7 +786,7 @@ void HashGrids::update(WcTimingTree* tt)
 {
    // ----- UPDATE PHASE ----- //
 
-   if (tt != NULL) tt->start("AddNewBodies");
+   if (tt != nullptr) tt->start("AddNewBodies");
    // Finally add all bodies that were temporarily stored in 'bodiesToAdd_' to the data structure.
    if( bodiesToAdd_.size() > 0 )
    {
@@ -797,9 +797,9 @@ void HashGrids::update(WcTimingTree* tt)
       }
       bodiesToAdd_.clear();
    }
-   if (tt != NULL) tt->stop("AddNewBodies");
+   if (tt != nullptr) tt->stop("AddNewBodies");
 
-   if (tt != NULL) tt->start("Update");
+   if (tt != nullptr) tt->start("Update");
    // Update the data structure (=> adapt to the current body distribution) by taking care of
    // moved, rotated and/or deformed bodies.
    if( gridActive_ )
@@ -876,7 +876,7 @@ void HashGrids::update(WcTimingTree* tt)
          {
             HashGrid* grid = static_cast<HashGrid*>( body.getGrid() );
 
-            if( grid != NULL )
+            if( grid != nullptr )
             {
                real_t size     = body.getAABBSize();
                real_t cellSpan = grid->getCellSpan();
@@ -897,7 +897,7 @@ void HashGrids::update(WcTimingTree* tt)
          {
             HashGrid* grid = static_cast<HashGrid*>( body.getGrid() );
 
-            if( grid != NULL )
+            if( grid != nullptr )
             {
                real_t size     = body.getAABBSize();
                real_t cellSpan = grid->getCellSpan();
@@ -913,7 +913,7 @@ void HashGrids::update(WcTimingTree* tt)
          }
       }
    }
-   if (tt != NULL) tt->stop("Update");
+   if (tt != nullptr) tt->stop("Update");
 }
 
 //**Implementation of ICCD interface ********************************************************
@@ -927,7 +927,7 @@ void HashGrids::update(WcTimingTree* tt)
  */
 PossibleContacts& HashGrids::generatePossibleContacts( WcTimingTree* tt )
 {
-   if (tt != NULL) tt->start("CCD");
+   if (tt != nullptr) tt->start("CCD");
 
    contacts_.clear();
 
@@ -935,7 +935,7 @@ PossibleContacts& HashGrids::generatePossibleContacts( WcTimingTree* tt )
 
    update(tt);
 
-   if (tt != NULL) tt->start("Detection");
+   if (tt != nullptr) tt->start("Detection");
    // ----- DETECTION STEP ----- //
 
    // Contact generation by traversing through all hash grids (which are sorted in ascending order
@@ -943,7 +943,7 @@ PossibleContacts& HashGrids::generatePossibleContacts( WcTimingTree* tt )
    for( auto gridIt = gridList_.begin(); gridIt != gridList_.end(); ++gridIt ) {
 
       // Contact generation for all bodies stored in the currently processed grid 'grid'.
-      BodyID* bodies     = NULL;
+      BodyID* bodies     = nullptr;
       size_t  bodyCount = (*gridIt)->process( &bodies, contacts_ );
 
       if( bodyCount > 0 ) {
@@ -981,7 +981,7 @@ PossibleContacts& HashGrids::generatePossibleContacts( WcTimingTree* tt )
          collide( *aIt, &(*bIt), contacts_ );
       }
    }
-   if (tt != NULL) tt->stop("Detection");
+   if (tt != nullptr) tt->stop("Detection");
 
    WALBERLA_LOG_DETAIL_SECTION()
    {
@@ -997,7 +997,7 @@ PossibleContacts& HashGrids::generatePossibleContacts( WcTimingTree* tt )
       WALBERLA_LOG_DETAIL( log.str() );
    }
 
-   if (tt != NULL) tt->stop("CCD");
+   if (tt != nullptr) tt->stop("CCD");
 
    return contacts_;
 }
@@ -1025,7 +1025,7 @@ void HashGrids::addGrid( BodyID body )
    // If the body is finite in size, it must be assigned to a grid with suitably sized cells.
    if( size > 0 )
    {
-      HashGrid* grid = NULL;
+      HashGrid* grid = nullptr;
 
       if( gridList_.empty() )
       {
@@ -1077,7 +1077,7 @@ void HashGrids::addGrid( BodyID body )
    // the grid pointer to NULL and setting the cell-ID to '1'. Additionally, the hash value is used
    // to memorize the body's index position in the 'nonGridBodies_' vector.
 
-   body->setGrid  ( NULL );
+   body->setGrid  ( nullptr );
    body->setHash  ( nonGridBodies_.size() );
    body->setCellId( 1 );
 
@@ -1142,7 +1142,7 @@ void HashGrids::addList( BodyID body )
    // setting the cell-ID to '1'. Additionally, the hash value is used to memorize the body's index
    // position in the 'nonGridBodies_' vector.
 
-   body->setGrid  ( NULL );
+   body->setGrid  ( nullptr );
    body->setHash  ( nonGridBodies_.size() );
    body->setCellId( 1 );
 
diff --git a/src/pe/ccd/SimpleCCD.cpp b/src/pe/ccd/SimpleCCD.cpp
index 2fcb2b9e6..9c992738a 100644
--- a/src/pe/ccd/SimpleCCD.cpp
+++ b/src/pe/ccd/SimpleCCD.cpp
@@ -55,7 +55,7 @@ SimpleCCD::~SimpleCCD()
 PossibleContacts& SimpleCCD::generatePossibleContacts( WcTimingTree* tt ){
    contacts_.clear();
 
-   if (tt != NULL) tt->start("SimpleCCD");
+   if (tt != nullptr) tt->start("SimpleCCD");
    for (auto it1 = bodies_.begin(); it1 != bodies_.end(); ++it1){
       for (auto it2 = it1 + 1; it2 !=bodies_.end(); ++it2)
       {
@@ -79,7 +79,7 @@ PossibleContacts& SimpleCCD::generatePossibleContacts( WcTimingTree* tt ){
          }
       }
    }
-   if (tt != NULL) tt->stop("SimpleCCD");
+   if (tt != nullptr) tt->stop("SimpleCCD");
 
    return contacts_;
 }
diff --git a/src/pe/collision/EPA.cpp b/src/pe/collision/EPA.cpp
index 415ef46d5..e8a200048 100644
--- a/src/pe/collision/EPA.cpp
+++ b/src/pe/collision/EPA.cpp
@@ -93,7 +93,7 @@ inline EPA::EPA_Triangle::EPA_Triangle( size_t a, size_t b, size_t c,
    sqrDist_ = closest_.sqrLength();
 
    //adjoined triangles not set yet
-   adjTriangle_[0] = adjTriangle_[1] = adjTriangle_[2] = NULL;
+   adjTriangle_[0] = adjTriangle_[1] = adjTriangle_[2] = nullptr;
    adjEdges_[0]    = adjEdges_[1]    = adjEdges_[2] = 4;
 
    obsolete_ = false;
@@ -269,7 +269,7 @@ bool EPA::doEPA( GeomPrimitive &geom1, GeomPrimitive &geom2, const GJK& gjk, Vec
    }
 
    std::make_heap(entryHeap.begin(), entryHeap.end(), EPA::EPA_TriangleComp());
-   EPA_Triangle* current = NULL;
+   EPA_Triangle* current = nullptr;
 
    numIterations_ = 0;
    //EPA Main-Loop
diff --git a/src/pe/raytracing/Raytracer.cpp b/src/pe/raytracing/Raytracer.cpp
index 59320cc4a..1f88525b3 100644
--- a/src/pe/raytracing/Raytracer.cpp
+++ b/src/pe/raytracing/Raytracer.cpp
@@ -338,7 +338,7 @@ void Raytracer::syncImageUsingMPIReduce(std::vector<BodyIntersectionInfo>& inter
    }
    
    WALBERLA_MPI_BARRIER();
-   if (tt != NULL) tt->start("Reduction");
+   if (tt != nullptr) tt->start("Reduction");
    int rank = mpi::MPIManager::instance()->rank();
 
    const int recvRank = 0;
@@ -348,13 +348,13 @@ void Raytracer::syncImageUsingMPIReduce(std::vector<BodyIntersectionInfo>& inter
                  bodyIntersectionInfo_mpi_type, bodyIntersectionInfo_reduction_op,
                  recvRank, MPI_COMM_WORLD);
    } else {
-      MPI_Reduce(&intersectionsBuffer[0], 0, int_c(intersectionsBuffer.size()),
+      MPI_Reduce(&intersectionsBuffer[0], nullptr, int_c(intersectionsBuffer.size()),
                  bodyIntersectionInfo_mpi_type, bodyIntersectionInfo_reduction_op,
                  recvRank, MPI_COMM_WORLD);
    }
    
    WALBERLA_MPI_BARRIER();
-   if (tt != NULL) tt->stop("Reduction");
+   if (tt != nullptr) tt->stop("Reduction");
 }
   
 /*!\brief Conflate the intersectionsBuffer of each process onto the root process using MPI_Gather.
@@ -366,7 +366,7 @@ void Raytracer::syncImageUsingMPIReduce(std::vector<BodyIntersectionInfo>& inter
  */
 void Raytracer::syncImageUsingMPIGather(std::vector<BodyIntersectionInfo>& intersections, std::vector<BodyIntersectionInfo>& intersectionsBuffer, WcTimingTree* tt) {
    WALBERLA_MPI_BARRIER();
-   if (tt != NULL) tt->start("Reduction");
+   if (tt != nullptr) tt->start("Reduction");
    
    mpi::SendBuffer sendBuffer;
    for (auto& info: intersections) {
@@ -398,27 +398,27 @@ void Raytracer::syncImageUsingMPIGather(std::vector<BodyIntersectionInfo>& inter
    }
    
    WALBERLA_MPI_BARRIER();
-   if (tt != NULL) tt->stop("Reduction");
+   if (tt != nullptr) tt->stop("Reduction");
 }
 
 void Raytracer::localOutput(const std::vector<BodyIntersectionInfo>& intersectionsBuffer, size_t timestep, WcTimingTree* tt) {
    if (getImageOutputEnabled()) {
       if (getLocalImageOutputEnabled()) {
-         if (tt != NULL) tt->start("Local Output");
+         if (tt != nullptr) tt->start("Local Output");
          writeImageToFile(intersectionsBuffer, timestep);
-         if (tt != NULL) tt->stop("Local Output");
+         if (tt != nullptr) tt->stop("Local Output");
       }
    }
 }
 
 void Raytracer::output(const std::vector<BodyIntersectionInfo>& intersectionsBuffer, size_t timestep, WcTimingTree* tt) {
-   if (tt != NULL) tt->start("Output");
+   if (tt != nullptr) tt->start("Output");
    WALBERLA_ROOT_SECTION() {
       if (getImageOutputEnabled()) {
          writeImageToFile(intersectionsBuffer, timestep, true);
       }
    }
-   if (tt != NULL) tt->stop("Output");
+   if (tt != nullptr) tt->stop("Output");
 }
 
 } //namespace raytracing
diff --git a/src/pe/rigidbody/EllipsoidFactory.cpp b/src/pe/rigidbody/EllipsoidFactory.cpp
index 8e8835b23..a5e46b350 100644
--- a/src/pe/rigidbody/EllipsoidFactory.cpp
+++ b/src/pe/rigidbody/EllipsoidFactory.cpp
@@ -65,7 +65,7 @@ EllipsoidID createEllipsoid( BodyStorage& globalStorage, BlockStorage& blocks, B
       }
    }
 
-   if (ellipsoid != NULL)
+   if (ellipsoid != nullptr)
    {
       // Logging the successful creation of the Ellipsoid
       WALBERLA_LOG_DETAIL(
diff --git a/src/pe/rigidbody/RigidBody.cpp b/src/pe/rigidbody/RigidBody.cpp
index f23bde4e0..ac99d0d5f 100644
--- a/src/pe/rigidbody/RigidBody.cpp
+++ b/src/pe/rigidbody/RigidBody.cpp
@@ -47,7 +47,7 @@ RigidBody::RigidBody( id_t const typeID, id_t sid, id_t uid )
    , Iinv_( real_c(0) )       // Inverse moment of inertia
    , q_()                     // Orientation of the body frame
    , R_()                     // Rigid body rotation
-   , manager_(0)              // The rigid body manager responsible for the rigid body
+   , manager_(nullptr)              // The rigid body manager responsible for the rigid body
    , finite_ (true)           // Finiteness flag
    , visible_(true)           // Visibility flag
    , remote_ (false)          // Remote flag
diff --git a/src/pe/utility/GetBody.cpp b/src/pe/utility/GetBody.cpp
index 6d0b695f8..bc5f5c153 100644
--- a/src/pe/utility/GetBody.cpp
+++ b/src/pe/utility/GetBody.cpp
@@ -58,7 +58,7 @@ BodyID getBody(BodyStorage& globalStorage, BlockStorage& blocks, BlockDataID sto
       }
    }
 
-   return NULL;
+   return nullptr;
 }
 
 }  // namespace pe
diff --git a/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp b/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp
index 75ea1ed2f..adf675597 100644
--- a/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp
+++ b/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp
@@ -72,7 +72,7 @@ void BodyAndVolumeFractionMapping::initialize()
    {
       BodyAndVolumeFractionField_T * bodyAndVolumeFractionField = blockIt->getData< BodyAndVolumeFractionField_T >( bodyAndVolumeFractionFieldID_ );
 
-      if( updatedBodyAndVolumeFractionField_ == NULL )
+      if( updatedBodyAndVolumeFractionField_ == nullptr )
       {
          // hold internally an identical field for swapping
          updatedBodyAndVolumeFractionField_ = shared_ptr<BodyAndVolumeFractionField_T>( bodyAndVolumeFractionField->cloneUninitialized() );
diff --git a/src/postprocessing/sqlite/SQLite.cpp b/src/postprocessing/sqlite/SQLite.cpp
index e83aa46e1..5e27286ef 100644
--- a/src/postprocessing/sqlite/SQLite.cpp
+++ b/src/postprocessing/sqlite/SQLite.cpp
@@ -35,7 +35,7 @@ namespace postprocessing {
 
 
 SQLiteDB::SQLiteDB( const string & dbFile, const int busyTimeout )
-   : valid_(true), dbHandle_(NULL), file_( dbFile )
+   : valid_(true), dbHandle_(nullptr), file_( dbFile )
 {
    static const char * CREATE_RUN_TABLE =
          "CREATE TABLE IF NOT EXISTS runs ("
@@ -52,11 +52,11 @@ SQLiteDB::SQLiteDB( const string & dbFile, const int busyTimeout )
    }
 
    sqlite3_busy_timeout( dbHandle_, busyTimeout*1000 );
-   sqlite3_exec( dbHandle_, "PRAGMA foreign_keys = ON;",0,0,0 );
-   sqlite3_exec( dbHandle_, CREATE_RUN_TABLE, 0,0,0);
+   sqlite3_exec( dbHandle_, "PRAGMA foreign_keys = ON;",nullptr,nullptr,nullptr );
+   sqlite3_exec( dbHandle_, CREATE_RUN_TABLE, nullptr,nullptr,nullptr);
 
    static const char* UPDATE_RUN_TABLE_CMD = "ALTER TABLE runs ADD COLUMN uuid STRING;";
-   sqlite3_exec( dbHandle_, UPDATE_RUN_TABLE_CMD, 0, 0, 0 );
+   sqlite3_exec( dbHandle_, UPDATE_RUN_TABLE_CMD, nullptr, nullptr, nullptr );
 
 }
 
@@ -89,7 +89,7 @@ uint_t storeRunImpl( sqlite3 * dbHandle, std::string & filename,
 {
    WALBERLA_ASSERT_NOT_NULLPTR( dbHandle );
 
-   sqlite3_exec( dbHandle, "BEGIN;",0,0,0 );
+   sqlite3_exec( dbHandle, "BEGIN;",nullptr,nullptr,nullptr );
 
    string insertRunCommand = "INSERT INTO runs (timestamp, uuid ";
    std::stringstream values;
@@ -101,7 +101,7 @@ uint_t storeRunImpl( sqlite3 * dbHandle, std::string & filename,
       insertRunCommand += "," + i->first;
       values  << ", " << i->second;
       string command = "ALTER TABLE runs ADD COLUMN " + i->first + " INTEGER ";
-      sqlite3_exec ( dbHandle, command.c_str(), 0,0,0 ); // ignore errors (column can exist already)
+      sqlite3_exec ( dbHandle, command.c_str(), nullptr,nullptr,nullptr ); // ignore errors (column can exist already)
    }
 
    // Add columns for string properties
@@ -110,7 +110,7 @@ uint_t storeRunImpl( sqlite3 * dbHandle, std::string & filename,
       insertRunCommand += "," + i->first;
       values << ", " << "\"" << i->second << "\"";
       string command = "ALTER TABLE runs ADD COLUMN " + i->first + " TEXT ";
-      sqlite3_exec ( dbHandle, command.c_str(), 0,0,0 ); // ignore errors (column can exist already)
+      sqlite3_exec ( dbHandle, command.c_str(), nullptr,nullptr,nullptr ); // ignore errors (column can exist already)
 
    }
 
@@ -122,7 +122,7 @@ uint_t storeRunImpl( sqlite3 * dbHandle, std::string & filename,
          insertRunCommand += "," + i->first;
          values << ", " << i->second;
          string command = "ALTER TABLE runs ADD COLUMN " + i->first + " DOUBLE ";
-         sqlite3_exec( dbHandle, command.c_str(), 0, 0, 0 ); // ignore errors (column can exist already)
+         sqlite3_exec( dbHandle, command.c_str(), nullptr, nullptr, nullptr ); // ignore errors (column can exist already)
       }
       else
       {
@@ -138,20 +138,20 @@ uint_t storeRunImpl( sqlite3 * dbHandle, std::string & filename,
       values << " ,1";
       // no boolean in sqlite3, use integer instead
       string command = "ALTER TABLE runs ADD COLUMN " + i->getIdentifier() + " INTEGER ";
-      sqlite3_exec ( dbHandle, command.c_str(), 0,0,0 ); // ignore errors (column can exist already)
+      sqlite3_exec ( dbHandle, command.c_str(), nullptr,nullptr,nullptr ); // ignore errors (column can exist already)
    }
 
    insertRunCommand += " )  ";
    values << "); ";
    insertRunCommand += values.str();
 
-   int ret = sqlite3_exec ( dbHandle, insertRunCommand.c_str(), 0, 0, 0 );
+   int ret = sqlite3_exec ( dbHandle, insertRunCommand.c_str(), nullptr, nullptr, nullptr );
    if ( ret != SQLITE_OK) {
       WALBERLA_LOG_WARNING( "Failed to insert a row into run table of sqlite3 database: " << sqlite3_errmsg(dbHandle) << "\n sql command: " << insertRunCommand.c_str() );
    }
    uint_t generatedPrimaryKey = uint_c ( sqlite3_last_insert_rowid( dbHandle ) );
 
-   sqlite3_exec( dbHandle, "END TRANSACTION;",0,0,0 );
+   sqlite3_exec( dbHandle, "END TRANSACTION;",nullptr,nullptr,nullptr );
 
    return generatedPrimaryKey;
 }
@@ -172,14 +172,14 @@ void storeAdditionalRunInfoImpl( sqlite3 * dbHandle,
                                  const map<string, string > & stringProperties ,
                                  const map<string, double > & realProperties )
 {
-   sqlite3_exec( dbHandle, "BEGIN;",0,0,0 );
+   sqlite3_exec( dbHandle, "BEGIN;",nullptr,nullptr,nullptr );
    std::string CREATE_TABLE =
          "CREATE TABLE IF NOT EXISTS " + tableName +
          " (runId     INTEGER, "
          " FOREIGN KEY (runId) REFERENCES runs(runId) "
          " );" ;
 
-   sqlite3_exec( dbHandle, CREATE_TABLE.c_str(), 0,0,0);
+   sqlite3_exec( dbHandle, CREATE_TABLE.c_str(), nullptr,nullptr,nullptr);
 
    string insertRunCommand = "INSERT INTO " + tableName + "( runId";
    std::stringstream values;
@@ -190,7 +190,7 @@ void storeAdditionalRunInfoImpl( sqlite3 * dbHandle,
       insertRunCommand += "," + i->first;
       values  << ", " << i->second;
       string command = "ALTER TABLE " + tableName + " ADD COLUMN " + i->first + " INTEGER ";
-      sqlite3_exec ( dbHandle, command.c_str(), 0,0,0 ); // ignore errors (column can exist already)
+      sqlite3_exec ( dbHandle, command.c_str(), nullptr,nullptr,nullptr ); // ignore errors (column can exist already)
    }
 
    // Add columns for string properties
@@ -199,7 +199,7 @@ void storeAdditionalRunInfoImpl( sqlite3 * dbHandle,
       insertRunCommand += "," + i->first;
       values << ", " << "\"" << i->second << "\"";
       string command = "ALTER TABLE " + tableName + " ADD COLUMN " + i->first + " TEXT ";
-      sqlite3_exec ( dbHandle, command.c_str(), 0,0,0 ); // ignore errors (column can exist already)
+      sqlite3_exec ( dbHandle, command.c_str(), nullptr,nullptr,nullptr ); // ignore errors (column can exist already)
 
    }
 
@@ -209,18 +209,18 @@ void storeAdditionalRunInfoImpl( sqlite3 * dbHandle,
       insertRunCommand += "," + i->first;
       values << ", " << i->second ;
       string command = "ALTER TABLE " + tableName + " ADD COLUMN " + i->first + " DOUBLE ";
-      sqlite3_exec ( dbHandle, command.c_str(), 0,0,0 ); // ignore errors (column can exist already)
+      sqlite3_exec ( dbHandle, command.c_str(), nullptr,nullptr,nullptr ); // ignore errors (column can exist already)
    }
 
    insertRunCommand += " )  ";
    values << "); ";
    insertRunCommand += values.str();
 
-   int ret = sqlite3_exec ( dbHandle, insertRunCommand.c_str(), 0, 0, 0 );
+   int ret = sqlite3_exec ( dbHandle, insertRunCommand.c_str(), nullptr, nullptr, nullptr );
    if ( ret != SQLITE_OK) {
       WALBERLA_LOG_WARNING( "Failed to insert a row into run table of sqlite3 database: " << sqlite3_errmsg(dbHandle) << "\n sql command: " << insertRunCommand.c_str() );
    }
-   sqlite3_exec( dbHandle, "END TRANSACTION;",0,0,0 );
+   sqlite3_exec( dbHandle, "END TRANSACTION;",nullptr,nullptr,nullptr );
 }
 
 
@@ -293,7 +293,7 @@ void SQLiteDB::storeTimingPool ( uint_t runId,
                                  const WcTimingPool & tp,
                                  const std::string & timingPoolName )
 {
-   sqlite3_exec( dbHandle_, "BEGIN;",0,0,0 );
+   sqlite3_exec( dbHandle_, "BEGIN;",nullptr,nullptr,nullptr );
 
    assert ( timingPoolName.length() > 0 && timingPoolName.length() < 255 );
 
@@ -316,10 +316,10 @@ void SQLiteDB::storeTimingPool ( uint_t runId,
          " INSERT INTO timingPool (runId,name,sweep,average,min,max,count,variance,percentage) "
          " VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ? )";
 
-   sqlite3_exec( dbHandle_, CREATE_TIMINGPOOL_TABLE, 0,0,0 );
+   sqlite3_exec( dbHandle_, CREATE_TIMINGPOOL_TABLE, nullptr,nullptr,nullptr );
 
-   sqlite3_stmt *stmt = NULL;
-   auto retVal = sqlite3_prepare_v2(dbHandle_, INSERT_STATEMENT, -1, &stmt, 0 );
+   sqlite3_stmt *stmt = nullptr;
+   auto retVal = sqlite3_prepare_v2(dbHandle_, INSERT_STATEMENT, -1, &stmt, nullptr );
    if ( retVal != SQLITE_OK ) {
       WALBERLA_LOG_WARNING( "Failed to prepare SQL Insert statement." << file_ );
       return;
@@ -346,7 +346,7 @@ void SQLiteDB::storeTimingPool ( uint_t runId,
       sqlite3_step ( stmt );  // execute statement
       sqlite3_reset ( stmt ); // undo binding
    }
-   sqlite3_exec( dbHandle_, "END TRANSACTION;",0,0,0 );
+   sqlite3_exec( dbHandle_, "END TRANSACTION;",nullptr,nullptr,nullptr );
 
    sqlite3_finalize( stmt ); // free prepared statement
 }
@@ -365,7 +365,7 @@ void SQLiteDB::storeTimingTree ( uint_t runId,
                                  const WcTimingTree & tt,
                                  const std::string & timingTreeName )
 {
-   sqlite3_exec( dbHandle_, "BEGIN;",0,0,0 );
+   sqlite3_exec( dbHandle_, "BEGIN;",nullptr,nullptr,nullptr );
 
    assert ( timingTreeName.length() > 0 && timingTreeName.length() < 255 );
 
@@ -385,7 +385,7 @@ void SQLiteDB::storeTimingTree ( uint_t runId,
          " FOREIGN KEY (runId) REFERENCES runs(runId)  "
          " );" ;
 
-   sqlite3_exec( dbHandle_, CREATE_TIMINGTREE_TABLE, 0,0,0 );
+   sqlite3_exec( dbHandle_, CREATE_TIMINGTREE_TABLE, nullptr,nullptr,nullptr );
 
    double totalTime = 0.0;
    for (auto it = tt.getRawData().tree_.begin(); it != tt.getRawData().tree_.end(); ++it)
@@ -395,7 +395,7 @@ void SQLiteDB::storeTimingTree ( uint_t runId,
 
    storeTimingNode(runId, std::numeric_limits<int>::max(), tt.getRawData(), timingTreeName, "Total", totalTime);
 
-   sqlite3_exec( dbHandle_, "END TRANSACTION;",0,0,0 );
+   sqlite3_exec( dbHandle_, "END TRANSACTION;",nullptr,nullptr,nullptr );
 }
 
 //*******************************************************************************************************************
@@ -418,8 +418,8 @@ void SQLiteDB::storeTimingNode ( const uint_t runId,
          " INSERT INTO timingTree (runId,name,parentId,sweep,average,min,max,count,variance,percentage) "
          " VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )";
 
-   sqlite3_stmt *stmt = NULL;
-   auto retVal = sqlite3_prepare_v2(dbHandle_, INSERT_STATEMENT, -1, &stmt, 0 );
+   sqlite3_stmt *stmt = nullptr;
+   auto retVal = sqlite3_prepare_v2(dbHandle_, INSERT_STATEMENT, -1, &stmt, nullptr );
    if ( retVal != SQLITE_OK ) {
       WALBERLA_LOG_WARNING( "Failed to prepare SQL Insert statement (" << retVal << ")." );
       return;
diff --git a/src/python_coupling/helper/ModuleInit.cpp b/src/python_coupling/helper/ModuleInit.cpp
index 60b18f57d..0058c7a71 100644
--- a/src/python_coupling/helper/ModuleInit.cpp
+++ b/src/python_coupling/helper/ModuleInit.cpp
@@ -54,7 +54,7 @@ void initWalberlaForPythonModule()
 
    Abort::instance()->resetAbortFunction( Abort::exceptionAbort );
 
-   mpi::MPIManager::instance()->initializeMPI( 0,0 );
+   mpi::MPIManager::instance()->initializeMPI( nullptr,nullptr );
    mpi::MPIManager::instance()->useWorldComm();
 }
 
diff --git a/src/timeloop/Timeloop.cpp b/src/timeloop/Timeloop.cpp
index dea97c057..d0641f9ca 100644
--- a/src/timeloop/Timeloop.cpp
+++ b/src/timeloop/Timeloop.cpp
@@ -179,7 +179,7 @@ void Timeloop::executeSelectable( const selectable::SetSelectableObject<VoidFctN
 {
    std::string objectName;
    const VoidFctNoArguments * exe = selectable.getUnique( selector,objectName );
-   if( exe == NULL )
+   if( exe == nullptr )
       WALBERLA_ABORT( "Trying to selecting " << what << ": "
                       << "Multiple Matches found! Check your selector " << selector << std::endl
                       << "All registered objects: " << std::endl << selectable << std::endl );
diff --git a/src/vtk/VTKOutput.cpp b/src/vtk/VTKOutput.cpp
index 7e660ac31..3661f7ad9 100644
--- a/src/vtk/VTKOutput.cpp
+++ b/src/vtk/VTKOutput.cpp
@@ -45,7 +45,7 @@ VTKOutput::VTKOutput( const BlockStorage & bs, const std::string & identifier, c
                       const uint_t initialExecutionCount ) :
 
    unstructuredBlockStorage_( &bs ),
-   blockStorage_( NULL ),
+   blockStorage_( nullptr ),
    baseFolder_( baseFolder ), executionFolder_( executionFolder ),
    executionCounter_(initialExecutionCount), initialWriteCallsToSkip_(0), writeFrequency_( writeFrequency ), continuousNumbering_( continuousNumbering ),
    pvdEnd_(-2), binary_( binary ), format_( binary ? std::string("binary") : std::string("ascii") ),
@@ -86,7 +86,7 @@ VTKOutput::VTKOutput( const shared_ptr< PointDataSource > pds, const std::string
                       const bool continuousNumbering, const bool binary, const bool littleEndian, const bool useMPIIO,
                       const uint_t initialExecutionCount ) :
 
-   unstructuredBlockStorage_(NULL), blockStorage_( NULL ), pointDataSource_( pds ),
+   unstructuredBlockStorage_(nullptr), blockStorage_( nullptr ), pointDataSource_( pds ),
    baseFolder_( baseFolder ), executionFolder_( executionFolder ),
    executionCounter_(initialExecutionCount), initialWriteCallsToSkip_(0), writeFrequency_( writeFrequency ), continuousNumbering_( continuousNumbering ),
    pvdEnd_(-2), binary_( binary ), format_( binary ? std::string("binary") : std::string("ascii") ),
@@ -107,7 +107,7 @@ VTKOutput::VTKOutput( const shared_ptr< PolylineDataSource > pds, const std::str
                       const bool continuousNumbering, const bool binary, const bool littleEndian, const bool useMPIIO,
                       const uint_t initialExecutionCount ) :
 
-   unstructuredBlockStorage_(NULL), blockStorage_( NULL ), polylineDataSource_( pds ),
+   unstructuredBlockStorage_(nullptr), blockStorage_( nullptr ), polylineDataSource_( pds ),
    baseFolder_( baseFolder ), executionFolder_( executionFolder ),
    executionCounter_(initialExecutionCount), initialWriteCallsToSkip_(0), writeFrequency_( writeFrequency ), continuousNumbering_( continuousNumbering ),
    pvdEnd_(-2), binary_( binary ), format_( binary ? std::string("binary") : std::string("ascii") ),
diff --git a/tests/blockforest/SetupBlockForestTest.cpp b/tests/blockforest/SetupBlockForestTest.cpp
index d2f1a73c0..f910fe4ec 100644
--- a/tests/blockforest/SetupBlockForestTest.cpp
+++ b/tests/blockforest/SetupBlockForestTest.cpp
@@ -173,7 +173,7 @@ static void checkNeighborhoodConsistency( const SetupBlockForest& forest ) {
 
             // either one neighbor must be hit OR the block is located at the border of the (non-periodic) simulation domain
             if( noHit )
-               WALBERLA_CHECK( forest.getBlock(x,y,z) == NULL );
+               WALBERLA_CHECK( forest.getBlock(x,y,z) == nullptr );
          }
 
          // every neighbor must be hit by at least one point
diff --git a/tests/core/debug/CheckMacroTest.cpp b/tests/core/debug/CheckMacroTest.cpp
index c4401e169..d2e4cf7a8 100644
--- a/tests/core/debug/CheckMacroTest.cpp
+++ b/tests/core/debug/CheckMacroTest.cpp
@@ -54,7 +54,7 @@ int main()
 
    {
       // Pointers
-      int* nullPointer = 0;
+      int* nullPointer = nullptr;
       shared_ptr<int> sharedNullPointer;
       WALBERLA_CHECK_NULLPTR(nullPointer);
       WALBERLA_CHECK_NULLPTR(sharedNullPointer);
diff --git a/tests/core/load_balancing/MetisTest.cpp b/tests/core/load_balancing/MetisTest.cpp
index a460077c2..22038220a 100644
--- a/tests/core/load_balancing/MetisTest.cpp
+++ b/tests/core/load_balancing/MetisTest.cpp
@@ -116,8 +116,8 @@ int main( int argc, char * argv[] )
    int64_t edgecut;
    std::vector< int64_t > part( numeric_cast<size_t>( nvtxs ) );
 
-   int result =  core::METIS_PartGraphRecursive( &nvtxs, &ncon, &(xadj.front()), &(adjncy.front()), NULL, NULL, NULL,
-                                                 &nparts, NULL, NULL, NULL, &edgecut, &(part.front()) );
+   int result =  core::METIS_PartGraphRecursive( &nvtxs, &ncon, &(xadj.front()), &(adjncy.front()), nullptr, nullptr, nullptr,
+                                                 &nparts, nullptr, nullptr, nullptr, &edgecut, &(part.front()) );
 
    WALBERLA_CHECK_EQUAL( result, core::METIS_OK );  
 
diff --git a/tests/core/load_balancing/ParMetisTest.cpp b/tests/core/load_balancing/ParMetisTest.cpp
index 0b9643961..fd7206100 100644
--- a/tests/core/load_balancing/ParMetisTest.cpp
+++ b/tests/core/load_balancing/ParMetisTest.cpp
@@ -136,7 +136,7 @@ int main( int argc, char * argv[] )
    std::vector< int64_t > part( fieldSize[0] * fieldSize[1] );
    MPI_Comm comm = MPIManager::instance()->comm();
 
-   int result = core::ParMETIS_V3_PartKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), NULL, NULL, &wgtflag, &numflag, &ncon, &nparts,
+   int result = core::ParMETIS_V3_PartKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), nullptr, nullptr, &wgtflag, &numflag, &ncon, &nparts,
                                             &(tpwgts.front()), &(ubvec.front()), options, &edgecut, &(part.front()), &comm );
 
 
diff --git a/tests/core/load_balancing/PlainParMetisTest.cpp b/tests/core/load_balancing/PlainParMetisTest.cpp
index 4419b3c0d..3da514b38 100644
--- a/tests/core/load_balancing/PlainParMetisTest.cpp
+++ b/tests/core/load_balancing/PlainParMetisTest.cpp
@@ -171,22 +171,22 @@ int main( int argc, char * argv[] )
    MPI_Comm comm = MPI_COMM_WORLD;
 
    std::cout << "ParMETIS_V3_PartKway" << std::endl;
-   WALBERLA_CHECK_EQUAL( ParMETIS_V3_PartKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), NULL, NULL, &wgtflag, &numflag, &ncon, &nparts,
+   WALBERLA_CHECK_EQUAL( ParMETIS_V3_PartKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), nullptr, nullptr, &wgtflag, &numflag, &ncon, &nparts,
                                 &(tpwgts.front()), &(ubvec.front()), options, &edgecut, &(part.front()), &comm ),
                          METIS_OK );
    std::cout << "ParMETIS_V3_PartGeomKway" << std::endl;
-   WALBERLA_CHECK_EQUAL( ParMETIS_V3_PartGeomKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), NULL, NULL, &wgtflag, &numflag, &ndims, &(xyz.front()), &ncon, &nparts,
+   WALBERLA_CHECK_EQUAL( ParMETIS_V3_PartGeomKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), nullptr, nullptr, &wgtflag, &numflag, &ndims, &(xyz.front()), &ncon, &nparts,
                                 &(tpwgts.front()), &(ubvec.front()), options, &edgecut, &(part.front()), &comm ),
                          METIS_OK );
    std::cout << "ParMETIS_V3_PartGeom" << std::endl;
    WALBERLA_CHECK_EQUAL( ParMETIS_V3_PartGeom( &(vtxdist.front()), &ndims, &(xyz.front()), &(part.front()), &comm ),
                          METIS_OK );
    std::cout << "ParMETIS_V3_AdaptiveRepart" << std::endl;
-   WALBERLA_CHECK_EQUAL( ParMETIS_V3_AdaptiveRepart( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), NULL, NULL, NULL, &wgtflag, &numflag, &ncon, &nparts,
+   WALBERLA_CHECK_EQUAL( ParMETIS_V3_AdaptiveRepart( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), nullptr, nullptr, nullptr, &wgtflag, &numflag, &ncon, &nparts,
                                 &(tpwgts.front()), &(ubvec.front()), &ipc2redist, options, &edgecut, &(part.front()), &comm ),
                          METIS_OK );
    std::cout << "ParMETIS_V3_RefineKway" << std::endl;
-   WALBERLA_CHECK_EQUAL( ParMETIS_V3_RefineKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), NULL, NULL, &wgtflag, &numflag, &ncon, &nparts,
+   WALBERLA_CHECK_EQUAL( ParMETIS_V3_RefineKway( &(vtxdist.front()), &(xadj.front()), &(adjncy.front()), nullptr, nullptr, &wgtflag, &numflag, &ncon, &nparts,
                                 &(tpwgts.front()), &(ubvec.front()), options, &edgecut, &(part.front()), &comm ),
                          METIS_OK );
 
diff --git a/tests/core/math/equation_system/EquationSolverTest.cpp b/tests/core/math/equation_system/EquationSolverTest.cpp
index 4d4fec40c..29ec4ed31 100644
--- a/tests/core/math/equation_system/EquationSolverTest.cpp
+++ b/tests/core/math/equation_system/EquationSolverTest.cpp
@@ -171,7 +171,7 @@ int unitTest(double v)
 }
 
 int unitTests(unsigned int count){
-   srand( static_cast<unsigned int>(time(NULL)) );
+   srand( static_cast<unsigned int>(time(nullptr)) );
 
    double values[] = {0.0, 1.0, 1e-15, 1e+15};
    unsigned int size = 4;
diff --git a/tests/core/mpi/BufferSystemTest.cpp b/tests/core/mpi/BufferSystemTest.cpp
index a6104a87e..358f801c4 100644
--- a/tests/core/mpi/BufferSystemTest.cpp
+++ b/tests/core/mpi/BufferSystemTest.cpp
@@ -55,7 +55,7 @@ void randomSleep( int maxTimeInMs = 20 )
    counter += 100;
 
    int rank          = MPIManager::instance()->worldRank();
-   unsigned int seed = static_cast<unsigned int>(std::time(0)) + static_cast<unsigned int>(rank*1000) + counter;
+   unsigned int seed = static_cast<unsigned int>(std::time(nullptr)) + static_cast<unsigned int>(rank*1000) + counter;
    generator.seed(seed);
 
    std::uniform_int_distribution<> uni_dist(0,maxTimeInMs);
diff --git a/tests/field/FieldTiming.cpp b/tests/field/FieldTiming.cpp
index 98271eec2..8017e48c3 100644
--- a/tests/field/FieldTiming.cpp
+++ b/tests/field/FieldTiming.cpp
@@ -85,7 +85,7 @@ double sumHandWrittenPlusIf(const DoubleField & field)
             const double* end   = &field.get(cell_idx_c(field.xSize())-1,y,z,f)+1;
             for(; begin!=end; ++begin) {
                sum += *begin;
-               if(begin == 0) // Artificial if condition to simulate iterators
+               if(begin == nullptr) // Artificial if condition to simulate iterators
                   cout << "Should not happen" << endl;
             }
          }
diff --git a/tests/field/distributors/DistributionTest.cpp b/tests/field/distributors/DistributionTest.cpp
index 3b9a69398..0be91bc26 100644
--- a/tests/field/distributors/DistributionTest.cpp
+++ b/tests/field/distributors/DistributionTest.cpp
@@ -249,7 +249,7 @@ void testNearestNeighborDistributor( const shared_ptr<StructuredBlockStorage> &
       Vector3<real_t> distributionPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       real_t distributionValue(real_t(100));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          auto distPtr = containingBlockID->getData<ScalarDistributor_T>(scalarDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
@@ -268,7 +268,7 @@ void testNearestNeighborDistributor( const shared_ptr<StructuredBlockStorage> &
       Vector3<real_t> distributionPoint(real_t(5.4),real_t(2.1),real_t(3.2));
       Vector3<real_t> distributionValue(real_t(100), real_t(-10), real_t(1));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          auto distPtr = containingBlockID->getData<Vec3Distributor_T>(vectorDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
@@ -296,7 +296,7 @@ void testNearestNeighborDistributor( const shared_ptr<StructuredBlockStorage> &
       distributionValue[1] = real_t(-10);
       distributionValue[2] = real_t(1);
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          auto distPtr = containingBlockID->getData<MultiComponentDistributor_T>(multiComponentDistributorID);
          distPtr->distribute(distributionPoint, distributionValue.begin());
@@ -334,7 +334,7 @@ void testKernelDistributor( const shared_ptr<StructuredBlockStorage> & blocks, c
       Vector3<real_t> distributionPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       real_t distributionValue(real_t(100));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          auto distPtr = containingBlockID->getData<ScalarDistributor_T>(scalarDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
@@ -353,7 +353,7 @@ void testKernelDistributor( const shared_ptr<StructuredBlockStorage> & blocks, c
       Vector3<real_t> distributionPoint(real_t(5.4),real_t(2.1),real_t(3.2));
       Vector3<real_t> distributionValue(real_t(100), real_t(-10), real_t(1));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          auto distPtr = containingBlockID->getData<Vec3Distributor_T>(vectorDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
@@ -381,7 +381,7 @@ void testKernelDistributor( const shared_ptr<StructuredBlockStorage> & blocks, c
       distributionValue[1] = real_t(-10);
       distributionValue[2] = real_t(1);
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          auto distPtr = containingBlockID->getData<MultiComponentDistributor_T>(multiComponentDistributorID);
          distPtr->distribute(distributionPoint, distributionValue.begin());
@@ -415,7 +415,7 @@ void testNearestNeighborDistributorAtBoundary( const shared_ptr<StructuredBlockS
       Vector3<real_t> distributionPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       real_t distributionValue(real_t(100));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          auto distPtr = containingBlockID->getData<ScalarDistributor_T>(scalarDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
       }
@@ -433,7 +433,7 @@ void testNearestNeighborDistributorAtBoundary( const shared_ptr<StructuredBlockS
       Vector3<real_t> distributionPoint(real_t(2.7), real_t(2.1), real_t(1.1));
       real_t distributionValue(real_t(100));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          auto distPtr = containingBlockID->getData<ScalarDistributor_T>(scalarDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
       }
@@ -459,7 +459,7 @@ void testKernelDistributorAtBoundary( const shared_ptr<StructuredBlockStorage> &
       Vector3<real_t> distributionPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       real_t distributionValue(real_t(100));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          auto distPtr = containingBlockID->getData<ScalarDistributor_T>(scalarDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
       }
@@ -477,7 +477,7 @@ void testKernelDistributorAtBoundary( const shared_ptr<StructuredBlockStorage> &
       Vector3<real_t> distributionPoint(real_t(2.7), real_t(2.1), real_t(1.1));
       real_t distributionValue(real_t(100));
       auto containingBlockID = blocks->getBlock(distributionPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          auto distPtr = containingBlockID->getData<ScalarDistributor_T>(scalarDistributorID);
          distPtr->distribute(distributionPoint, &distributionValue);
       }
diff --git a/tests/field/interpolators/FieldInterpolationTest.cpp b/tests/field/interpolators/FieldInterpolationTest.cpp
index a98842aec..119322156 100644
--- a/tests/field/interpolators/FieldInterpolationTest.cpp
+++ b/tests/field/interpolators/FieldInterpolationTest.cpp
@@ -129,7 +129,7 @@ void testNearestNeighborFieldInterpolator( const shared_ptr<StructuredBlockStora
    {
       Vector3<real_t> interpolationPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
@@ -142,7 +142,7 @@ void testNearestNeighborFieldInterpolator( const shared_ptr<StructuredBlockStora
    {
       Vector3<real_t> interpolationPoint(real_t(5.4),real_t(2.1),real_t(3.2));
       auto containingBlockID = blocks->getBlock( interpolationPoint );
-      if( containingBlockID != NULL ) {
+      if( containingBlockID != nullptr ) {
          Vector3<real_t> interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<Vec3FieldInterpolator_T>(vectorFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -156,7 +156,7 @@ void testNearestNeighborFieldInterpolator( const shared_ptr<StructuredBlockStora
    {
       Vector3<real_t> interpolationPoint(real_t(4.4),real_t(2.1),real_t(3.2));
       auto containingBlockID = blocks->getBlock( interpolationPoint );
-      if( containingBlockID != NULL ) {
+      if( containingBlockID != nullptr ) {
          std::vector<real_t> interpolatedValue(3, real_t(0));
          auto interPtr = containingBlockID->getData<MultiComponentFieldInterpolator_T>(multiComponentFieldInterpolatorID);
          interPtr->get(interpolationPoint, interpolatedValue.begin());
@@ -182,7 +182,7 @@ void testTrilinearFieldInterpolator( const shared_ptr<StructuredBlockStorage> &
    {
       Vector3<real_t> interpolationPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
@@ -195,7 +195,7 @@ void testTrilinearFieldInterpolator( const shared_ptr<StructuredBlockStorage> &
    {
       Vector3<real_t> interpolationPoint(real_t(5.4),real_t(2.1),real_t(3.2));
       auto containingBlockID = blocks->getBlock( interpolationPoint );
-      if( containingBlockID != NULL ) {
+      if( containingBlockID != nullptr ) {
          Vector3<real_t> interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<Vec3FieldInterpolator_T>(vectorFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -209,7 +209,7 @@ void testTrilinearFieldInterpolator( const shared_ptr<StructuredBlockStorage> &
    {
       Vector3<real_t> interpolationPoint(real_t(4.4),real_t(2.1),real_t(3.2));
       auto containingBlockID = blocks->getBlock( interpolationPoint );
-      if( containingBlockID != NULL ) {
+      if( containingBlockID != nullptr ) {
          std::vector<real_t> interpolatedValue(3, real_t(0));
          auto interPtr = containingBlockID->getData<MultiComponentFieldInterpolator_T>(multiComponentFieldInterpolatorID);
          interPtr->get(interpolationPoint, interpolatedValue.begin());
@@ -235,7 +235,7 @@ void testKernelFieldInterpolator( const shared_ptr<StructuredBlockStorage> & blo
    {
       Vector3<real_t> interpolationPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if( containingBlockID != NULL )
+      if( containingBlockID != nullptr )
       {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
@@ -248,7 +248,7 @@ void testKernelFieldInterpolator( const shared_ptr<StructuredBlockStorage> & blo
    {
       Vector3<real_t> interpolationPoint(real_t(5.4),real_t(2.1),real_t(3.2));
       auto containingBlockID = blocks->getBlock( interpolationPoint );
-      if( containingBlockID != NULL ) {
+      if( containingBlockID != nullptr ) {
          Vector3<real_t> interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<Vec3FieldInterpolator_T>(vectorFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -262,7 +262,7 @@ void testKernelFieldInterpolator( const shared_ptr<StructuredBlockStorage> & blo
    {
       Vector3<real_t> interpolationPoint(real_t(4.4),real_t(2.1),real_t(3.2));
       auto containingBlockID = blocks->getBlock( interpolationPoint );
-      if( containingBlockID != NULL ) {
+      if( containingBlockID != nullptr ) {
          std::vector<real_t> interpolatedValue(3, real_t(0));
          auto interPtr = containingBlockID->getData<MultiComponentFieldInterpolator_T>(multiComponentFieldInterpolatorID);
          interPtr->get(interpolationPoint, interpolatedValue.begin());
@@ -284,7 +284,7 @@ void testNearestNeighborFieldInterpolatorAtBoundary( const shared_ptr<Structured
    {
       Vector3<real_t> interpolationPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -297,7 +297,7 @@ void testNearestNeighborFieldInterpolatorAtBoundary( const shared_ptr<Structured
    {
       Vector3<real_t> interpolationPoint(real_t(2.7), real_t(2.1), real_t(1.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -317,7 +317,7 @@ void testTrilinearFieldInterpolatorAtBoundary( const shared_ptr<StructuredBlockS
    {
       Vector3<real_t> interpolationPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -330,7 +330,7 @@ void testTrilinearFieldInterpolatorAtBoundary( const shared_ptr<StructuredBlockS
    {
       Vector3<real_t> interpolationPoint(real_t(2.7), real_t(2.1), real_t(1.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -350,7 +350,7 @@ void testKernelFieldInterpolatorAtBoundary( const shared_ptr<StructuredBlockStor
    {
       Vector3<real_t> interpolationPoint(real_t(1.9), real_t(2.1), real_t(2.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
@@ -367,7 +367,7 @@ void testKernelFieldInterpolatorAtBoundary( const shared_ptr<StructuredBlockStor
    {
       Vector3<real_t> interpolationPoint(real_t(2.7), real_t(2.1), real_t(1.1));
       auto containingBlockID = blocks->getBlock(interpolationPoint);
-      if (containingBlockID != NULL) {
+      if (containingBlockID != nullptr) {
          real_t interpolatedValue(real_t(0));
          auto interPtr = containingBlockID->getData<ScalarFieldInterpolator_T>(scalarFieldInterpolatorID);
          interPtr->get(interpolationPoint, &interpolatedValue);
diff --git a/tests/mesh/PeVTKMeshWriterTest.cpp b/tests/mesh/PeVTKMeshWriterTest.cpp
index 5399af727..48d975110 100644
--- a/tests/mesh/PeVTKMeshWriterTest.cpp
+++ b/tests/mesh/PeVTKMeshWriterTest.cpp
@@ -143,7 +143,7 @@ int main( int argc, char ** argv )
    cr.setRelaxationParameter( real_t(0.7) );
    cr.setGlobalLinearAcceleration( Vec3(0,0,5) );
 
-   std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(*forest), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+   std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(*forest), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
 
    typedef mesh::FloatPolyMesh OutputMeshType;
    typedef mesh::pe::DefaultTesselation<OutputMeshType> TesselationType;
@@ -191,8 +191,8 @@ int main( int argc, char ** argv )
          //BoxID sp = pe::createBox(  *globalBodyStorage, *forest, storageID, 0, *it, Vec3(radius), material );
          mesh::pe::ConvexPolyhedronID sp = mesh::pe::createConvexPolyhedron(  *globalBodyStorage, *forest, storageID, 0, *it, pointCloud, material );
          Vec3 rndVel(math::realRandom<real_t>(-vMax, vMax), math::realRandom<real_t>(-vMax, vMax), math::realRandom<real_t>(-vMax, vMax));
-         if (sp != NULL) sp->setLinearVel(rndVel);
-         if (sp != NULL) ++numParticles;
+         if (sp != nullptr) sp->setLinearVel(rndVel);
+         if (sp != nullptr) ++numParticles;
       }
    }
    mpi::reduceInplace(numParticles, mpi::SUM);
diff --git a/tests/pe/BodyFlags.cpp b/tests/pe/BodyFlags.cpp
index 0c39b0d43..dbd673567 100644
--- a/tests/pe/BodyFlags.cpp
+++ b/tests/pe/BodyFlags.cpp
@@ -66,7 +66,7 @@ int main( int argc, char ** argv )
    auto fcdID               = forest->addBlockData(fcd::createGenericFCDDataHandling<BodyTuple, fcd::AnalyticCollideFunctor>(), "FCD");
 
    //cr::DEM    cr(globalStorage, forest->getBlockStorage(), storageID, ccdID, fcdID, NULL );
-   cr::HCSITS cr(globalStorage, forest->getBlockStoragePointer(), storageID, ccdID, fcdID, NULL );
+   cr::HCSITS cr(globalStorage, forest->getBlockStoragePointer(), storageID, ccdID, fcdID, nullptr );
 
    MaterialID iron = Material::find("iron");
 
@@ -78,11 +78,11 @@ int main( int argc, char ** argv )
    Sphere refFixedSphere(2, 0, Vec3(9,9,14), Vec3(0,0,0), Quat(), 3, iron, false, false, true);
    SphereID fixedSphere = createSphere( *globalStorage, forest->getBlockStorage(), storageID, 0, Vec3(9,9,14), 3, iron, false, false, true);
    walberla::id_t fixedSphereID = 0;
-   if (fixedSphere != NULL) fixedSphereID = fixedSphere->getSystemID();
+   if (fixedSphere != nullptr) fixedSphereID = fixedSphere->getSystemID();
    mpi::allReduceInplace(fixedSphereID, mpi::SUM);
 
    // synchronize particles
-   syncShadowOwners<BodyTuple>( forest->getBlockForest(), storageID, NULL, real_c(0.0), true);
+   syncShadowOwners<BodyTuple>( forest->getBlockForest(), storageID, nullptr, real_c(0.0), true);
 
    cr.setGlobalLinearAcceleration(Vec3(0, 0, real_c(-9.81)));
 
@@ -104,7 +104,7 @@ int main( int argc, char ** argv )
 
    WALBERLA_LOG_PROGRESS_ON_ROOT("*** SIMULATION - START ***");
    cr.timestep( real_c(1.0) );
-   syncShadowOwners<BodyTuple>( forest->getBlockForest(), storageID, NULL, real_c(0.0), false);
+   syncShadowOwners<BodyTuple>( forest->getBlockForest(), storageID, nullptr, real_c(0.0), false);
    WALBERLA_LOG_PROGRESS_ON_ROOT("*** SIMULATION - END ***");
 
    refGlobalSphere.setPosition(Vec3(11,11,11));
diff --git a/tests/pe/BodyIterators.cpp b/tests/pe/BodyIterators.cpp
index 232378417..48f4bd5d8 100644
--- a/tests/pe/BodyIterators.cpp
+++ b/tests/pe/BodyIterators.cpp
@@ -73,13 +73,13 @@ int main( int argc, char **argv )
 
     uint_t sphereCount = 0;
 
-    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(25), real_t(25), real_t(50) ), 1) != NULL)
+    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(25), real_t(25), real_t(50) ), 1) != nullptr)
         ++sphereCount;
-    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(99), real_t(25), real_t(50) ), 2) != NULL)
+    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(99), real_t(25), real_t(50) ), 2) != nullptr)
         ++sphereCount;
-    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(101), real_t(25), real_t(50) ), 2) != NULL)
+    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(101), real_t(25), real_t(50) ), 2) != nullptr)
         ++sphereCount;
-    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(125), real_t(25), real_t(50) ), 1) != NULL)
+    if (pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), storageID, 0, Vec3( real_t(125), real_t(25), real_t(50) ), 1) != nullptr)
         ++sphereCount;
 
     syncShadowOwners<BodyTuple>( blocks->getBlockForest(), storageID);
diff --git a/tests/pe/DeleteBody.cpp b/tests/pe/DeleteBody.cpp
index bd47954f0..d552a7426 100644
--- a/tests/pe/DeleteBody.cpp
+++ b/tests/pe/DeleteBody.cpp
@@ -71,7 +71,7 @@ int main( int argc, char** argv )
     SetBodyTypeIDs<BodyTuple>::execute();
 
     auto storageID           = forest->addBlockData(createStorageDataHandling<BodyTuple>(), "Storage");
-    Storage* firstStorage = NULL, *secondStorage = NULL;
+    Storage* firstStorage = nullptr, *secondStorage = nullptr;
     for (auto it = forest->begin(); it != forest->end(); ++it)
     {
        IBlock & currentBlock = *it;
@@ -85,10 +85,10 @@ int main( int argc, char** argv )
     std::function<void(void)> syncCall;
     if (!syncShadowOwners)
     {
-       syncCall = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+       syncCall = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
     } else
     {
-       syncCall = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+       syncCall = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
     }
 
     pe::createSphere(*globalBodyStorage, forest->getBlockStorage(), storageID, 0, Vec3(5,5,5), 2);
diff --git a/tests/pe/DestroyBody.cpp b/tests/pe/DestroyBody.cpp
index ccef444fb..f8e33d563 100644
--- a/tests/pe/DestroyBody.cpp
+++ b/tests/pe/DestroyBody.cpp
@@ -56,7 +56,7 @@ int main( int argc, char** argv )
     SetBodyTypeIDs<BodyTuple>::execute();
 
     auto storageID           = forest->addBlockData(createStorageDataHandling<BodyTuple>(), "Storage");
-    Storage* firstStorage = NULL, *secondStorage = NULL;
+    Storage* firstStorage = nullptr, *secondStorage = nullptr;
     for (auto it = forest->begin(); it != forest->end(); ++it)
     {
        IBlock & currentBlock = *it;
diff --git a/tests/pe/ForceSync.cpp b/tests/pe/ForceSync.cpp
index 44acba816..d19422354 100644
--- a/tests/pe/ForceSync.cpp
+++ b/tests/pe/ForceSync.cpp
@@ -112,9 +112,9 @@ int main( int argc, char ** argv )
    SphereID sp1 = static_cast<SphereID> (getBody(*globalStorage, forest->getBlockStorage(), storageID_, id1));
    SphereID sp2 = static_cast<SphereID> (getBody(*globalStorage, forest->getBlockStorage(), storageID_, id2));
 
-   if ( (sp1 != NULL) && (!sp1->isRemote() ))
+   if ( (sp1 != nullptr) && (!sp1->isRemote() ))
       WALBERLA_ASSERT_FLOAT_EQUAL(sp1->getForce(), Vec3(1,0,0));
-   if ( (sp2 != NULL) && (!sp2->isRemote() ))
+   if ( (sp2 != nullptr) && (!sp2->isRemote() ))
       WALBERLA_ASSERT_FLOAT_EQUAL(sp2->getForce(), Vec3(1,1,0));
 
 //   for (auto it = forest->begin(); it != forest->end(); ++it){
diff --git a/tests/pe/HashGrids.cpp b/tests/pe/HashGrids.cpp
index afefe3ce5..7d83456a0 100644
--- a/tests/pe/HashGrids.cpp
+++ b/tests/pe/HashGrids.cpp
@@ -66,7 +66,7 @@ int main( int argc, char** argv )
     auto sccdID              = forest->addBlockData(ccd::createSimpleCCDDataHandling( globalBodyStorage, storageID ), "SCCD");
     auto hccdID              = forest->addBlockData(ccd::createHashGridsDataHandling( globalBodyStorage, storageID ), "HCCD");
     auto fcdID               = forest->addBlockData(fcd::createGenericFCDDataHandling<BodyTuple, fcd::AnalyticCollideFunctor>(), "FCD");
-    cr::PlainIntegrator cr(globalBodyStorage, forest->getBlockStoragePointer(), storageID, NULL);
+    cr::PlainIntegrator cr(globalBodyStorage, forest->getBlockStoragePointer(), storageID, nullptr);
 
     pe::createPlane( *globalBodyStorage, 0, Vec3(0, +1, 0), Vec3(5, 0,5), iron);
     pe::createPlane( *globalBodyStorage, 0, Vec3(0, -1, 0), Vec3(5,30,5), iron);
@@ -107,7 +107,7 @@ int main( int argc, char** argv )
     {
        SphereID sp = pe::createSphere(*globalBodyStorage, forest->getBlockStorage(), storageID, i,
                         Vec3(math::realRandom<real_t>(real_c(0), real_c(30)), math::realRandom<real_t>(real_c(0), real_c(30)), math::realRandom<real_t>(real_c(0), real_c(30))), real_c(0.4));
-      if (sp != NULL) sp->setLinearVel(Vec3(math::realRandom<real_t>(-dv, dv), math::realRandom<real_t>(-dv, dv), math::realRandom<real_t>(-dv, dv)));
+      if (sp != nullptr) sp->setLinearVel(Vec3(math::realRandom<real_t>(-dv, dv), math::realRandom<real_t>(-dv, dv), math::realRandom<real_t>(-dv, dv)));
     }
 
     pe::createSphere(*globalBodyStorage, forest->getBlockStorage(), storageID, 999999999,
diff --git a/tests/pe/LoadFromConfig.cpp b/tests/pe/LoadFromConfig.cpp
index b1d381b63..7e3236205 100644
--- a/tests/pe/LoadFromConfig.cpp
+++ b/tests/pe/LoadFromConfig.cpp
@@ -40,7 +40,7 @@ int main( int argc, char ** argv )
    Environment env(argc, argv);
    //! [Load Config]
    auto cfg = env.config();
-   if (cfg == NULL) WALBERLA_ABORT("No config specified!");
+   if (cfg == nullptr) WALBERLA_ABORT("No config specified!");
    const Config::BlockHandle configBlock  = cfg->getBlock( "LoadFromConfig" );
    //! [Load Config]
 
diff --git a/tests/pe/ParallelEquivalence.cpp b/tests/pe/ParallelEquivalence.cpp
index 5ccc4b961..712779131 100644
--- a/tests/pe/ParallelEquivalence.cpp
+++ b/tests/pe/ParallelEquivalence.cpp
@@ -104,7 +104,7 @@ void sim(shared_ptr< StructuredBlockForest > forest, std::vector<BodyData>& res,
    }
    auto fcdID_               = forest->addBlockData(fcd::createGenericFCDDataHandling<BodyTuple, fcd::AnalyticCollideFunctor>(), "FCD");
 
-   cr::DEM cr( globalStorage, forest->getBlockStoragePointer(), storageID_, ccdID_, fcdID_, NULL);
+   cr::DEM cr( globalStorage, forest->getBlockStoragePointer(), storageID_, ccdID_, fcdID_, nullptr);
 
 //   auto vtkOutput_   = make_shared<DefaultBodyVTKOutput>(storageID_, *forest) ;
 //   auto vtkWriter_   = vtk::createVTKOutput_PointData(vtkOutput_, "Bodies", 1);
@@ -132,7 +132,7 @@ void sim(shared_ptr< StructuredBlockForest > forest, std::vector<BodyData>& res,
             SphereID sp = pe::createSphere( *globalStorage, forest->getBlockStorage(), storageID_,
                               ++counter, Vec3(real_c(x) + real_c(0.5), real_c(y) + real_c(0.5), real_c(z) + real_c(0.5)), real_c(0.3));
             Vec3 randVel = Vec3(math::realRandom<real_t>(-dv, dv), math::realRandom<real_t>(-dv, dv), math::realRandom<real_t>(-dv, dv));
-            if (sp != NULL) sp->setLinearVel(randVel);
+            if (sp != nullptr) sp->setLinearVel(randVel);
          }
 
    WALBERLA_CHECK_EQUAL(globalStorage->size(), 6);
diff --git a/tests/pe/PeDocumentationSnippets.cpp b/tests/pe/PeDocumentationSnippets.cpp
index 5c9b15724..baf33aa07 100644
--- a/tests/pe/PeDocumentationSnippets.cpp
+++ b/tests/pe/PeDocumentationSnippets.cpp
@@ -97,14 +97,14 @@ int main( int argc, char ** argv )
    // simulation. The function returns a handle to the newly created box, which can
    // be used to for instance rotate the box around the global y-axis.
    BoxID box = createBox( *globalBodyStorage, forest->getBlockStorage(), storageID, 1, Vec3(2,3,4), Vec3(2.5,2.5,2.5) );
-   if (box != NULL)
+   if (box != nullptr)
       box->rotate( 0.0, real_c(math::PI/3.0), 0.0 );
    //! [Create a Box]
 
    //! [Create a Capsule]
    // Create a capsule and rotate it after successfull creation.
    CapsuleID capsule = createCapsule( *globalBodyStorage, forest->getBlockStorage(), storageID, 1, Vec3(2,3,4), real_t(1), real_t(1) );
-   if (capsule != NULL)
+   if (capsule != nullptr)
       capsule->rotate( 0.0, real_c(math::PI/3.0), 0.0 );
    //! [Create a Capsule]
 
@@ -117,14 +117,14 @@ int main( int argc, char ** argv )
    //! [Create a Sphere]
    // Create a sphere and rotate it after successfull creation.
    SphereID sphere = createSphere( *globalBodyStorage, forest->getBlockStorage(), storageID, 1, Vec3(2,3,4), real_t(1) );
-   if (sphere != NULL)
+   if (sphere != nullptr)
       sphere->rotate( 0.0, real_c(math::PI/3.0), 0.0 );
    //! [Create a Sphere]
 
    //! [Create a Union]
    // Create a union and add a box, capsule and sphere.
    UnionID un = createUnion<UnionTypeTuple>( *globalBodyStorage, forest->getBlockStorage(), storageID, 1, Vec3(2,3,4) );
-   if (un != NULL)
+   if (un != nullptr)
    {
       createBox    ( un, 1, Vec3(2,3,4), Vec3(2.5,2.5,2.5) );
       createCapsule( un, 1, Vec3(3,3,4), real_t(1), real_t(1) );
diff --git a/tests/pe/Raytracing.cpp b/tests/pe/Raytracing.cpp
index 49e4a277e..36aa2ca93 100644
--- a/tests/pe/Raytracing.cpp
+++ b/tests/pe/Raytracing.cpp
@@ -308,7 +308,7 @@ void RaytracerTest(Raytracer::Algorithm raytracingAlgorithm = Raytracer::RAYTRAC
    createSphere(*globalBodyStorage, *forest, storageID, 3, Vec3(4,real_t(5.5),5), real_t(1));
    createSphere(*globalBodyStorage, *forest, storageID, 6, Vec3(3,real_t(8.5),5), real_t(1));
    BoxID box = createBox(*globalBodyStorage, *forest, storageID, 7, Vec3(5,real_t(6.5),5), Vec3(2,4,3));
-   if (box != NULL) box->rotate(0,math::M_PI/4,math::M_PI/4);
+   if (box != nullptr) box->rotate(0,math::M_PI/4,math::M_PI/4);
    createBox(*globalBodyStorage, *forest, storageID, 8, Vec3(5,1,8), Vec3(2,2,2));
    // Test scene v1 end
    
@@ -316,7 +316,7 @@ void RaytracerTest(Raytracer::Algorithm raytracingAlgorithm = Raytracer::RAYTRAC
    createBox(*globalBodyStorage, *forest, storageID, 9, Vec3(9,9,5), Vec3(1,1,10));
    createCapsule(*globalBodyStorage, *forest, storageID, 10, Vec3(3, 9, 1), real_t(0.5), real_t(7), iron);
    CapsuleID capsule = createCapsule(*globalBodyStorage, *forest, storageID, 11, Vec3(7, real_t(3.5), real_t(7.5)), real_t(1), real_t(2), iron);
-   if (capsule != NULL) capsule->rotate(0,math::M_PI/3,math::M_PI/4-math::M_PI/8);
+   if (capsule != nullptr) capsule->rotate(0,math::M_PI/3,math::M_PI/4-math::M_PI/8);
    // Test scene v2 end
    
    // Test scene v3 additions start
@@ -456,7 +456,7 @@ void HashGridsTest(Raytracer::Algorithm raytracingAlgorithm, walberla::uint8_t a
       real_t z = math::realRandom(forestAABB.zMin(), forestAABB.zMax());
       walberla::id_t id = walberla::id_t(i);
       BoxID box_ = createBox(*globalBodyStorage, *forest, storageID, id, Vec3(x, y, z), Vec3(len, len, len));
-      WALBERLA_CHECK(box_ != NULL);
+      WALBERLA_CHECK(box_ != nullptr);
       if (boxRotation) {
          box_->rotate(0, math::realRandom(real_t(0), real_t(1))*math::M_PI, math::realRandom(real_t(0), real_t(1))*math::M_PI);
       }
@@ -472,7 +472,7 @@ void HashGridsTest(Raytracer::Algorithm raytracingAlgorithm, walberla::uint8_t a
       real_t z = math::realRandom(forestAABB.zMin(), forestAABB.zMax());
       walberla::id_t id = walberla::id_t(boxes+i);
       CapsuleID capsule = createCapsule(*globalBodyStorage, *forest, storageID, id, Vec3(x, y, z), radius, len);
-      WALBERLA_CHECK(capsule != NULL);
+      WALBERLA_CHECK(capsule != nullptr);
       capsule->rotate(0, math::realRandom(real_t(0), real_t(1))*math::M_PI, math::realRandom(real_t(0), real_t(1))*math::M_PI);
       bodies.push_back(capsule);
       bodySIDs.push_back(capsule->getSystemID());
@@ -485,7 +485,7 @@ void HashGridsTest(Raytracer::Algorithm raytracingAlgorithm, walberla::uint8_t a
       real_t z = math::realRandom(forestAABB.zMin(), forestAABB.zMax());
       walberla::id_t id = walberla::id_t(boxes+capsules+i);
       SphereID sphere = createSphere(*globalBodyStorage, *forest, storageID, id, Vec3(x, y, z), radius);
-      WALBERLA_CHECK(sphere != NULL);
+      WALBERLA_CHECK(sphere != nullptr);
       bodies.push_back(sphere);
       bodySIDs.push_back(sphere->getSystemID());
    }
@@ -661,7 +661,7 @@ void HashGridsArtifactsTest(Raytracer::Algorithm raytracingAlgorithm, walberla::
       }
       walberla::id_t id = walberla::id_t(i);
       BoxID box_ = createBox(*globalBodyStorage, *forest, storageID, id, Vec3(x_min, y_min, z_min), Vec3(len, len, len));
-      WALBERLA_CHECK(box_ != NULL);
+      WALBERLA_CHECK(box_ != nullptr);
    }
    
    raytraceArtifactsForest(raytracingAlgorithm, antiAliasFactor,
@@ -706,7 +706,7 @@ void HashGridsFromNegativeArtifactsTest(Raytracer::Algorithm raytracingAlgorithm
       //real_t z_min = len+0.1;
       walberla::id_t id = walberla::id_t(i);
       BoxID box_ = createBox(*globalBodyStorage, *forest, storageID, id, Vec3(x_min, y_min, z_min), Vec3(len, len, len));
-      WALBERLA_CHECK(box_ != NULL);
+      WALBERLA_CHECK(box_ != nullptr);
    }
    
    raytraceArtifactsForest(raytracingAlgorithm, antiAliasFactor,
@@ -749,7 +749,7 @@ void HashGridsFromNegativeXArtifactsTest(Raytracer::Algorithm raytracingAlgorith
       //real_t z_min = len+0.1;
       walberla::id_t id = walberla::id_t(i);
       BoxID box_ = createBox(*globalBodyStorage, *forest, storageID, id, Vec3(x_min, y_min, z_min), Vec3(len, len, len));
-      WALBERLA_CHECK(box_ != NULL);
+      WALBERLA_CHECK(box_ != nullptr);
    }
    
    raytraceArtifactsForest(raytracingAlgorithm, antiAliasFactor,
diff --git a/tests/pe/Refinement.cpp b/tests/pe/Refinement.cpp
index c53907e41..361cc322e 100644
--- a/tests/pe/Refinement.cpp
+++ b/tests/pe/Refinement.cpp
@@ -141,7 +141,7 @@ int main( int argc, char ** argv )
    auto fcdID               = forest->addBlockData(fcd::createGenericFCDDataHandling<BodyTuple, fcd::AnalyticCollideFunctor>(), "FCD");
 
    //cr::DEM    cr(globalStorage, forest->getBlockStorage(), storageID, ccdID, fcdID, NULL );
-   cr::HCSITS cr(globalStorage, forest->getBlockStoragePointer(), storageID, ccdID, fcdID, NULL );
+   cr::HCSITS cr(globalStorage, forest->getBlockStoragePointer(), storageID, ccdID, fcdID, nullptr );
 
    auto vtkOutput   = make_shared<DefaultBodyVTKOutput>(storageID, forest->getBlockStorage()) ;
    auto vtkWriter   = vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, "vtk", "simulation_step", false, false);
diff --git a/tests/pe/ShadowCopy.cpp b/tests/pe/ShadowCopy.cpp
index 359582c33..8b1e82027 100644
--- a/tests/pe/ShadowCopy.cpp
+++ b/tests/pe/ShadowCopy.cpp
@@ -81,10 +81,10 @@ int main( int argc, char** argv )
    std::function<void(void)> syncCall;
    if (!syncShadowOwners)
    {
-      syncCall = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+      syncCall = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
    } else
    {
-      syncCall = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(NULL), real_c(0.0), false );
+      syncCall = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(forest->getBlockForest()), storageID, static_cast<WcTimingTree*>(nullptr), real_c(0.0), false );
    }
 
    WALBERLA_LOG_PROGRESS_ON_ROOT( " *** SPHERE *** ");
diff --git a/tests/pe/SyncEquivalence.cpp b/tests/pe/SyncEquivalence.cpp
index a4400e0ce..0ebfe4778 100644
--- a/tests/pe/SyncEquivalence.cpp
+++ b/tests/pe/SyncEquivalence.cpp
@@ -126,8 +126,8 @@ void createSimulation(math::AABB& simulationDomain,
         {
             SphereID sp = pe::createSphere( *(info.globalBodyStorage.get()), info.forest->getBlockStorage(), info.storageID, static_cast<walberla::id_t>(mpi::MPIManager::instance()->worldRank() * 1000000 + numParticles), *it, radius);
             Vec3 rndVel(math::realRandom<real_t>(-vMax, vMax, generator), math::realRandom<real_t>(-vMax, vMax, generator), math::realRandom<real_t>(-vMax, vMax, generator));
-            if (sp != NULL) sp->setLinearVel(rndVel);
-            if (sp != NULL) ++numParticles;
+            if (sp != nullptr) sp->setLinearVel(rndVel);
+            if (sp != nullptr) ++numParticles;
         }
     }
     WALBERLA_LOG_INFO_ON_ROOT(numParticles << " particles created on root");
diff --git a/tests/pe/Synchronization.cpp b/tests/pe/Synchronization.cpp
index f718d492f..180ca7747 100644
--- a/tests/pe/Synchronization.cpp
+++ b/tests/pe/Synchronization.cpp
@@ -124,7 +124,7 @@ int main( int argc, char ** argv )
    SphereID sphere = createSphere( globalStorage, forest->getBlockStorage(), storageID, 0, gpos, 3);
    int sphereRank = -1;
 
-   if (sphere != NULL)
+   if (sphere != nullptr)
    {
       sphere->setLinearVel(4, 5, 6);
       sphere->setAngularVel( 1, 2, 3);
diff --git a/tests/pe/SynchronizationDelete.cpp b/tests/pe/SynchronizationDelete.cpp
index b3eb8f929..29645627c 100644
--- a/tests/pe/SynchronizationDelete.cpp
+++ b/tests/pe/SynchronizationDelete.cpp
@@ -104,7 +104,7 @@ int main( int argc, char ** argv )
             if ((fabs(x) > 0.1) || (fabs(y) > 0.1) || (fabs(z) > 0.1))
             {
                SphereID sp = createSphere( *globalBodyStorage, forest->getBlockStorage(), storageID, 0, Vec3(15,15,15), 3);
-               if (sp != NULL) sp->setLinearVel(Vec3(x, y, z));
+               if (sp != nullptr) sp->setLinearVel(Vec3(x, y, z));
             }
          }
 
diff --git a/tests/pe/SynchronizationLargeBody.cpp b/tests/pe/SynchronizationLargeBody.cpp
index 607db910f..158d56a30 100644
--- a/tests/pe/SynchronizationLargeBody.cpp
+++ b/tests/pe/SynchronizationLargeBody.cpp
@@ -167,10 +167,10 @@ int main( int argc, char ** argv )
 
    SphereID sphere = createSphere( *globalStorage, forest->getBlockStorage(), storageID, 0, gpos, r);
    walberla::id_t sphereID = 789456123;
-   if (sphere != NULL) sphereID = sphere->getSystemID();
+   if (sphere != nullptr) sphereID = sphere->getSystemID();
    int sphereRank = -1;
 
-   if (sphere != NULL)
+   if (sphere != nullptr)
    {
       sphere->setLinearVel(4, 5, 6);
       sphere->setAngularVel( 1, 2, 3);
@@ -212,10 +212,10 @@ int main( int argc, char ** argv )
 
    //test with dx
    real_t dx = real_c(0.5);
-   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, NULL, dx);
-   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, NULL, dx);
-   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, NULL, dx);
-   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, NULL, dx);
+   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, nullptr, dx);
+   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, nullptr, dx);
+   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, nullptr, dx);
+   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, nullptr, dx);
 
    for (auto dir = stencil::D3Q27::beginNoCenter(); dir != stencil::D3Q27::end(); ++dir)
    {
@@ -223,19 +223,19 @@ int main( int argc, char ** argv )
       Vec3 delta = Vec3( real_c(dir.cx()), real_c(dir.cy()), real_c(dir.cz()) ) / real_c(3.0);
       for (int i = 0; i < 21; ++i)
       {
-         syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, NULL, dx);
+         syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, nullptr, dx);
          Vec3 pos = refSphere.getPosition() + delta;
          if (!forest->getDomain().contains( pos, real_c(0.5) ))
             forest->mapToPeriodicDomain(pos);
          checkSphere(*forest, storageID, sid, &refSphere, pos, dx);
       }
    }
-   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, NULL, dx);
+   syncShadowOwners<BodyTuple>(forest->getBlockForest(), storageID, nullptr, dx);
    WALBERLA_LOG_PROGRESS("TEST WITH DX ... finished");
 
    sphere = static_cast<SphereID> (getBody(*globalStorage, forest->getBlockStorage(), storageID, sphereID));
 
-   if (sphere != NULL)
+   if (sphere != nullptr)
    {
       //      WALBERLA_LOG_DEVEL("pos: " << sphere->getPosition());
       //      WALBERLA_LOG_DEVEL("aabb: " << sphere->getAABB());
diff --git a/tests/pe_coupling/discrete_particle_methods/HinderedSettlingDynamicsDPM.cpp b/tests/pe_coupling/discrete_particle_methods/HinderedSettlingDynamicsDPM.cpp
index ca71c9f03..cede11322 100644
--- a/tests/pe_coupling/discrete_particle_methods/HinderedSettlingDynamicsDPM.cpp
+++ b/tests/pe_coupling/discrete_particle_methods/HinderedSettlingDynamicsDPM.cpp
@@ -273,7 +273,7 @@ uint_t createSpheresRandomly( StructuredBlockForest & forest, pe::BodyStorage &
 
 
       pe::SphereID sp = pe::createSphere( globalBodyStorage, forest.getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( xParticle, yParticle, zParticle ), diameter * real_t(0.5), material );
-      if( sp != NULL )
+      if( sp != nullptr )
       {
          sp->setLinearVel(Vector3<real_t>(real_t(0),real_t(0),initialZVelocity));
       }
@@ -302,7 +302,7 @@ uint_t createSphereLattice( StructuredBlockForest & forest, pe::BodyStorage & gl
    {
       pe::SphereID sp = pe::createSphere( globalBodyStorage, forest.getBlockStorage(), bodyStorageID, 0, *it, diameter * real_t(0.5), material );
 
-      if( sp != NULL )
+      if( sp != nullptr )
       {
          sp->setLinearVel(Vector3<real_t>(real_t(0),real_t(0),initialZVelocity));
          ++numSpheres;
@@ -852,7 +852,7 @@ int main( int argc, char **argv )
 
    // connect to pe
    const real_t overlap = real_t( 1.5 ) * dx;
-   auto syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   auto syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
    shared_ptr<CollisionPropertiesEvaluator> collisionPropertiesEvaluator = walberla::make_shared<CollisionPropertiesEvaluator>( *cr );
 
    // create the spheres
diff --git a/tests/pe_coupling/discrete_particle_methods/SphereWallCollisionBehaviorDPM.cpp b/tests/pe_coupling/discrete_particle_methods/SphereWallCollisionBehaviorDPM.cpp
index 052676d3f..1ed4cbb0f 100644
--- a/tests/pe_coupling/discrete_particle_methods/SphereWallCollisionBehaviorDPM.cpp
+++ b/tests/pe_coupling/discrete_particle_methods/SphereWallCollisionBehaviorDPM.cpp
@@ -699,7 +699,7 @@ int main( int argc, char **argv )
 
    // connect to pe
    const real_t overlap = real_t( 1.5 ) * dx;
-   auto syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   auto syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create the sphere
    const real_t restitutionCoeff = real_t(0.97);
diff --git a/tests/pe_coupling/momentum_exchange_method/BodyAtBlockBoarderCheck.cpp b/tests/pe_coupling/momentum_exchange_method/BodyAtBlockBoarderCheck.cpp
index bbf5224bf..5457aee89 100644
--- a/tests/pe_coupling/momentum_exchange_method/BodyAtBlockBoarderCheck.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/BodyAtBlockBoarderCheck.cpp
@@ -282,18 +282,18 @@ int main( int argc, char **argv )
 
    // connect to pe
    const real_t overlap = real_c( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    auto sphereMaterialID = pe::createMaterial( "sphereMat", real_c(1) , real_c(0.3), real_c(0.2), real_c(0.2), real_c(0.24), real_c(200), real_c(200), real_c(0), real_c(0) );
    // create two spheres: one which overlaps with a block boundary and one inside the block
    pe::Vec3 referenceVelocity( real_c(0.1), real_c(0), real_c(0) );
    auto sphereAtBorder = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_c(31), real_c(31), real_c(31) ), radius, sphereMaterialID );
-   if( sphereAtBorder != NULL )
+   if( sphereAtBorder != nullptr )
    {
       sphereAtBorder->setLinearVel( referenceVelocity );
    }
    auto sphereInInner = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_c(7), real_c(7), real_c(7) ), radius, sphereMaterialID );
-   if( sphereInInner != NULL )
+   if( sphereInInner != nullptr )
    {
       sphereInInner->setLinearVel( referenceVelocity );
    }
@@ -315,7 +315,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/momentum_exchange_method/BodyMappingTest.cpp b/tests/pe_coupling/momentum_exchange_method/BodyMappingTest.cpp
index 0c527317c..81c65a694 100644
--- a/tests/pe_coupling/momentum_exchange_method/BodyMappingTest.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/BodyMappingTest.cpp
@@ -457,7 +457,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID ), "boundary handling" );
@@ -504,7 +504,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectRegularBodies );
 
@@ -517,7 +517,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    /////////////////////
@@ -529,7 +529,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectGlobalBodies );
 
@@ -542,7 +542,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////
@@ -554,7 +554,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, false, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectFixedBodies );
 
@@ -567,7 +567,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
    }
 
    //////////////////////////////////
@@ -583,7 +583,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectRegularBodies );
 
@@ -596,7 +596,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    /////////////////////
@@ -608,7 +608,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectGlobalBodies );
 
@@ -621,7 +621,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////
@@ -633,7 +633,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, false, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectFixedBodies );
 
@@ -646,7 +646,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
    }
 
    /////////////////////////////////////
@@ -662,7 +662,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtPeriodicBoarder, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectRegularBodies );
 
@@ -675,7 +675,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    /////////////////////
@@ -693,7 +693,7 @@ int main( int argc, char **argv )
       pe::SphereID sp2 = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                           positionAtPeriodicBoarderCopy, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectGlobalBodies );
 
@@ -707,7 +707,7 @@ int main( int argc, char **argv )
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp2->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////
@@ -719,7 +719,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtPeriodicBoarder, radius, sphereMaterialID, false, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
 
       pe_coupling::mapBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, NoSlip_Flag, pe_coupling::selectFixedBodies );
 
@@ -732,7 +732,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
    }
 
    //////////////////////////
@@ -752,7 +752,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectRegularBodies );
 
@@ -766,7 +766,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////////
@@ -778,7 +778,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       for( auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt ) regularBodyMapper(&(*blockIt));
 
@@ -792,7 +792,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    /////////////////////
@@ -804,7 +804,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectGlobalBodies );
 
@@ -818,7 +818,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////////
@@ -830,7 +830,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       for( auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt ) globalBodyMapper(&(*blockIt));
 
@@ -844,7 +844,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////
@@ -856,7 +856,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionInsideBlock, radius, sphereMaterialID, false, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectFixedBodies );
 
@@ -870,7 +870,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
    }
 
    //////////////////////////////////
@@ -886,7 +886,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectRegularBodies );
 
@@ -900,7 +900,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////////
@@ -912,7 +912,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       for( auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt ) regularBodyMapper(&(*blockIt));
 
@@ -926,7 +926,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    /////////////////////
@@ -938,7 +938,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectGlobalBodies );
 
@@ -952,7 +952,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////////
@@ -964,7 +964,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       for( auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt ) globalBodyMapper(&(*blockIt));
 
@@ -978,7 +978,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////
@@ -990,7 +990,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtBlockBoarder, radius, sphereMaterialID, false, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectFixedBodies );
 
@@ -1004,7 +1004,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
    }
 
    /////////////////////////////////////
@@ -1020,7 +1020,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtPeriodicBoarder, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectRegularBodies );
 
@@ -1034,7 +1034,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////////
@@ -1046,7 +1046,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtPeriodicBoarder, radius, sphereMaterialID, false, true, false);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       for( auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt ) regularBodyMapper(&(*blockIt));
 
@@ -1060,7 +1060,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    /////////////////////
@@ -1078,7 +1078,7 @@ int main( int argc, char **argv )
       pe::SphereID sp2 = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                           positionAtPeriodicBoarderCopy, radius, sphereMaterialID, true, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectGlobalBodies );
 
@@ -1093,7 +1093,7 @@ int main( int argc, char **argv )
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp2->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, false);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, false);
    }
 
    //////////////////
@@ -1105,7 +1105,7 @@ int main( int argc, char **argv )
       pe::SphereID sp = pe::createSphere(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0,
                                          positionAtPeriodicBoarder, radius, sphereMaterialID, false, false, true);
 
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
 
       pe_coupling::mapMovingBodies< BoundaryHandling_T >(*blocks, boundaryHandlingID, bodyStorageID, *globalBodyStorage, bodyFieldID, MO_Flag, pe_coupling::selectFixedBodies );
 
@@ -1119,7 +1119,7 @@ int main( int argc, char **argv )
       WALBERLA_LOG_DEVEL(testIdentifier << " - ended");
 
       pe::destroyBodyBySID(*globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, sp->getSystemID());
-      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(NULL), overlap, true);
+      pe::syncNextNeighbors<BodyTypeTuple>(blocks->getBlockForest(), bodyStorageID, static_cast<WcTimingTree *>(nullptr), overlap, true);
    }
 
 
diff --git a/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEM.cpp b/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEM.cpp
index c1d3d69a0..4a7ddd4d9 100644
--- a/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEM.cpp
@@ -480,7 +480,7 @@ int main( int argc, char **argv )
 
    // synchronize often enough for large bodies
    for( uint_t i = 0; i < XBlocks / 2; ++i)
-      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, NULL, overlap);
+      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, nullptr, overlap);
 
    ///////////////////////
    // ADD DATA TO BLOCKS //
@@ -502,7 +502,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEMRefinement.cpp b/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEMRefinement.cpp
index 33371ade9..4664929da 100644
--- a/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEMRefinement.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/DragForceSphereMEMRefinement.cpp
@@ -522,7 +522,7 @@ int main( int argc, char **argv )
 
    // synchronize often enough for large bodies
    for( uint_t i = 0; i < std::max( uint_c(1), XBlocks / uint_c(2) ) * ( uint_t(1) << ( setup.levels - uint_t(1) ) ); ++i)
-      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, NULL, overlap);
+      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, nullptr, overlap);
 
    ///////////////////////
    // ADD DATA TO BLOCKS //
@@ -540,7 +540,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/momentum_exchange_method/GlobalBodyAsBoundaryMEMStaticRefinement.cpp b/tests/pe_coupling/momentum_exchange_method/GlobalBodyAsBoundaryMEMStaticRefinement.cpp
index 393df5213..c8a320987 100644
--- a/tests/pe_coupling/momentum_exchange_method/GlobalBodyAsBoundaryMEMStaticRefinement.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/GlobalBodyAsBoundaryMEMStaticRefinement.cpp
@@ -379,7 +379,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >( MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID ), "boundary handling" );
diff --git a/tests/pe_coupling/momentum_exchange_method/LubricationCorrectionMEM.cpp b/tests/pe_coupling/momentum_exchange_method/LubricationCorrectionMEM.cpp
index 787718266..dd78fba43 100644
--- a/tests/pe_coupling/momentum_exchange_method/LubricationCorrectionMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/LubricationCorrectionMEM.cpp
@@ -788,11 +788,11 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_c( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create the material
    const auto myMat = pe::createMaterial( "myMat", real_c(1.4), real_t(0), real_t(1), real_t(1), real_t(0), real_t(1), real_t(1), real_t(0), real_t(0) );
@@ -808,9 +808,9 @@ int main( int argc, char **argv )
 
       // create two approaching spheres
       auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, id1, Vector3<real_t> (real_c(50.0), real_c(64.0), real_c(64.0)), radius, myMat );
-      if ( sphere != NULL ) sphere->setLinearVel( velocity);
+      if ( sphere != nullptr ) sphere->setLinearVel( velocity);
       sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, id2, Vector3<real_t> (real_c(78.0), real_c(64.0), real_c(64.0)), radius, myMat );
-      if ( sphere != NULL ) sphere->setLinearVel(-velocity);
+      if ( sphere != nullptr ) sphere->setLinearVel(-velocity);
    }
 
    // sphere-wall test
@@ -828,7 +828,7 @@ int main( int argc, char **argv )
       // <19.2,64,64> // <25.6,64,64> // <28.8,64,64>  // <38.4,64,64>    //1st: <41.765,64,64> // <27.205,64,64> // <20.88,64,64> (chosen s.th. last gap: 0.05 and initial s=1.1 ) // like Ding: <17,64,64>
       //  6           // 8            // 9             // 12              //1st  // 13.05       // 8.5            // 6.525                                                          // like Ding: 4.25
       auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, id1, Vector3<real_t> (real_c(38.4), real_c(64.0), real_c(64.0)), radius, myMat );
-      if ( sphere != NULL ) sphere->setLinearVel( velocity);
+      if ( sphere != nullptr ) sphere->setLinearVel( velocity);
    }
 
    if ( funcTest )
@@ -841,9 +841,9 @@ int main( int argc, char **argv )
 
       // create two approaching spheres
       auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, id1, Vector3<real_t> (real_c( 6.0) , real_c(6.0), real_c(6.0)), radius, myMat );
-      if ( sphere != NULL ) sphere->setLinearVel( velocity);
+      if ( sphere != nullptr ) sphere->setLinearVel( velocity);
       sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, id2, Vector3<real_t> (real_c(12.0) , real_c(6.0), real_c(6.0)), radius, myMat );
-      if ( sphere != NULL ) sphere->setLinearVel( -velocity);
+      if ( sphere != nullptr ) sphere->setLinearVel( -velocity);
 
       // set the same boundary handling as for the sphere-sphereTest
       sphSphTest = true;
@@ -908,7 +908,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling & initialize outer domain boundaries (moving walls on the front, back, top, and bottom plane)
    BlockDataID boundaryHandlingID;
diff --git a/tests/pe_coupling/momentum_exchange_method/PeriodicParticleChannelMEM.cpp b/tests/pe_coupling/momentum_exchange_method/PeriodicParticleChannelMEM.cpp
index bbf831d83..774d993fa 100644
--- a/tests/pe_coupling/momentum_exchange_method/PeriodicParticleChannelMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/PeriodicParticleChannelMEM.cpp
@@ -410,11 +410,11 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_c( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create pe bodies
    const auto material = pe::createMaterial( "granular", real_c(1.2), real_c(0.25), real_c(0.4), real_c(0.4), real_c(0.35), real_c(1.39e11), real_c(5.18e7), real_c(1.07e2), real_c(1.07e2) );
@@ -439,31 +439,31 @@ int main( int argc, char **argv )
    const real_t radius = real_t(10);
 
    auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(15), real_t(50), real_t(35) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(15), real_t(35), real_t(50) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(15), real_t(65), real_t(50) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(15), real_t(50), real_t(65) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(35), real_t(35), real_t(35) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(35), real_t(65), real_t(35) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(35), real_t(35), real_t(65) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(35), real_t(65), real_t(65) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, Vector3<real_t>( real_t(50), real_t(50), real_t(50) ), radius, material );
-   if( sphere != NULL ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
+   if( sphere != nullptr ) sphere->setLinearVel( velocity, real_t(0), real_t(0) );
 
    //synchronize the pe set up on all processes
    syncCall();
@@ -486,7 +486,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling & initialize outer domain boundaries (moving walls on the front, back, top, and bottom plane)
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/momentum_exchange_method/SegreSilberbergMEM.cpp b/tests/pe_coupling/momentum_exchange_method/SegreSilberbergMEM.cpp
index c05c2636c..a83aa7f56 100644
--- a/tests/pe_coupling/momentum_exchange_method/SegreSilberbergMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/SegreSilberbergMEM.cpp
@@ -544,17 +544,17 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
    std::function<void(void)> syncCall;
    if (!syncShadowOwners)
    {
-      syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+      syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
    } else
    {
-      syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+      syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
    }
 
    // create pe bodies
@@ -568,7 +568,7 @@ int main( int argc, char **argv )
    const auto sphereMaterial = pe::createMaterial( "mySphereMat", setup.rho_p , real_t(0.5), real_t(0.1), real_t(0.1), real_t(0.24), real_t(200), real_t(200), real_t(0), real_t(0) );
    Vector3<real_t> position( real_c(setup.xlength) * real_t(0.5), real_c(setup.ylength) * real_t(0.5), real_c(setup.zlength) * real_t(0.5) - real_t(1) );
    auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, position, particleRadius, sphereMaterial );
-   if( sphere != NULL )
+   if( sphere != nullptr )
    {
       real_t height = real_t( 0.5 ) * real_c( setup.zlength );
       // set sphere velocity to undisturbed fluid velocity at sphere center
@@ -601,7 +601,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEM.cpp b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEM.cpp
index 9a8f53528..178ca2e62 100644
--- a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEM.cpp
@@ -455,11 +455,11 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
 
    // create pe bodies
@@ -495,7 +495,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >( MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID ), "boundary handling" );
diff --git a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp
index 6ebde5403..0684d1b49 100644
--- a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp
@@ -675,11 +675,11 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create pe bodies
 
@@ -715,7 +715,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addBlockData( make_shared< MyBoundaryHandling >( blocks, flagFieldID, pdfFieldID, bodyFieldID ),
diff --git a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMStaticRefinement.cpp b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMStaticRefinement.cpp
index aa9ef62e7..6c2202535 100644
--- a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMStaticRefinement.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMStaticRefinement.cpp
@@ -542,11 +542,11 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
 
    // create pe bodies
@@ -584,7 +584,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field", FieldGhostLayers );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf, FieldGhostLayers );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf, FieldGhostLayers );
 
    // add boundary handling
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >( MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID ), "boundary handling" );
diff --git a/tests/pe_coupling/momentum_exchange_method/SquirmerTest.cpp b/tests/pe_coupling/momentum_exchange_method/SquirmerTest.cpp
index 08a7ad4d2..61e99ab65 100644
--- a/tests/pe_coupling/momentum_exchange_method/SquirmerTest.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/SquirmerTest.cpp
@@ -292,7 +292,7 @@ int main(int argc, char **argv) {
 
    std::function<void(void)> syncCall = std::bind(pe::syncShadowOwners<BodyTypeTuple>,
                                                       std::ref(blocks->getBlockForest()), bodyStorageID,
-                                                      static_cast<WcTimingTree *>(NULL), overlap, false);
+                                                      static_cast<WcTimingTree *>(nullptr), overlap, false);
 
    const auto myMat = pe::createMaterial("myMat", real_c(1), real_t(0), real_t(1), real_t(1), real_t(0), real_t(1),
                                          real_t(1), real_t(0), real_t(0));
@@ -325,7 +325,7 @@ int main(int argc, char **argv) {
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>(blocks, "flag field");
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<PeBodyField_T>(blocks, "body field", NULL, field::zyxf);
+   BlockDataID bodyFieldID = field::addToStorage<PeBodyField_T>(blocks, "body field", nullptr, field::zyxf);
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData<BoundaryHandling_T>(
diff --git a/tests/pe_coupling/momentum_exchange_method/TaylorCouetteFlowMEM.cpp b/tests/pe_coupling/momentum_exchange_method/TaylorCouetteFlowMEM.cpp
index 54cf9698e..aad525dc6 100644
--- a/tests/pe_coupling/momentum_exchange_method/TaylorCouetteFlowMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/TaylorCouetteFlowMEM.cpp
@@ -305,7 +305,7 @@ int main( int argc, char **argv )
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create pe bodies
    const auto material = pe::createMaterial( "granular", real_t(1.2), real_t(0.25), real_t(0.4), real_t(0.4), real_t(0.35), real_t(1.39e11), real_t(5.18e7), real_t(1.07e2), real_t(1.07e2) );
@@ -333,7 +333,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling & initialize outer domain boundaries (moving walls on the front, back, top, and bottom plane)
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/momentum_exchange_method/TorqueSphereMEM.cpp b/tests/pe_coupling/momentum_exchange_method/TorqueSphereMEM.cpp
index 2ff3f3c98..7512c6bfb 100644
--- a/tests/pe_coupling/momentum_exchange_method/TorqueSphereMEM.cpp
+++ b/tests/pe_coupling/momentum_exchange_method/TorqueSphereMEM.cpp
@@ -421,14 +421,14 @@ int main( int argc, char **argv )
    // create the sphere in the middle of the domain
    Vector3<real_t> position (real_c(setup.length) * real_c(0.5));
    auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, position, setup.radius );
-   if ( sphere != NULL )
+   if ( sphere != nullptr )
    {
       sphere->setAngularVel( real_c(0), setup.angularVel, real_c(0) );
    }
 
    // synchronize often enough for large bodies
    for( uint_t i = 0; i < XBlocks / 2; ++i)
-      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, NULL, overlap);
+      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, nullptr, overlap);
 
 
    ///////////////////////
@@ -452,7 +452,7 @@ int main( int argc, char **argv )
    BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
 
    // add body field
-   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", NULL, field::zyxf );
+   BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
 
    // add boundary handling & initialize outer domain boundaries
    BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
diff --git a/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSM.cpp b/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSM.cpp
index 1547b5baa..3b2ba12a1 100644
--- a/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSM.cpp
+++ b/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSM.cpp
@@ -415,7 +415,7 @@ int main( int argc, char **argv )
 
    // synchronize often enough for large bodies
    for( uint_t i = 0; i < XBlocks / 2; ++i)
-      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, NULL, overlap);
+      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, nullptr, overlap);
 
    ///////////////////////
    // ADD DATA TO BLOCKS //
diff --git a/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSMRefinement.cpp b/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSMRefinement.cpp
index d3b4fce22..d403e0a24 100644
--- a/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSMRefinement.cpp
+++ b/tests/pe_coupling/partially_saturated_cells_method/DragForceSpherePSMRefinement.cpp
@@ -527,7 +527,7 @@ int main( int argc, char **argv )
 
    // synchronize often enough for large bodies
    for( uint_t i = 0; i < std::max( uint_c(1), XBlocks / uint_c(2) ) * ( uint_t(1) << ( setup.levels - uint_t(1) ) ); ++i)
-      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, NULL, overlap);
+      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, nullptr, overlap);
 
    ///////////////////////
    // ADD DATA TO BLOCKS //
diff --git a/tests/pe_coupling/partially_saturated_cells_method/SegreSilberbergPSM.cpp b/tests/pe_coupling/partially_saturated_cells_method/SegreSilberbergPSM.cpp
index f0153483f..f16525daa 100644
--- a/tests/pe_coupling/partially_saturated_cells_method/SegreSilberbergPSM.cpp
+++ b/tests/pe_coupling/partially_saturated_cells_method/SegreSilberbergPSM.cpp
@@ -500,11 +500,11 @@ int main( int argc, char **argv )
    auto fcdID          = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
 
    // set up collision response, here DEM solver
-   pe::cr::DEM cr( globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL );
+   pe::cr::DEM cr( globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr );
 
    // set up synchronization procedure
    const real_t overlap = real_c( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncShadowOwners<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // create pe bodies
 
@@ -517,7 +517,7 @@ int main( int argc, char **argv )
    const auto sphereMaterial = pe::createMaterial( "mySphereMat", setup.rho_p , real_c(0.5), real_c(0.1), real_c(0.1), real_c(0.24), real_c(200), real_c(200), real_c(0), real_c(0) );
    Vector3<real_t> position( real_c(setup.xlength) * real_c(0.5), real_c(setup.ylength) * real_c(0.5), real_c(setup.zlength) * real_c(0.5) - real_c(1) );
    auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, position, particleRadius, sphereMaterial );
-   if( sphere != NULL )
+   if( sphere != nullptr )
    {
       real_t height = real_c( 0.5 ) * real_c( setup.zlength );
       // set sphere velocity to undisturbed fluid velocity at sphere center
diff --git a/tests/pe_coupling/partially_saturated_cells_method/TorqueSpherePSM.cpp b/tests/pe_coupling/partially_saturated_cells_method/TorqueSpherePSM.cpp
index f91b5566e..33a6d9876 100644
--- a/tests/pe_coupling/partially_saturated_cells_method/TorqueSpherePSM.cpp
+++ b/tests/pe_coupling/partially_saturated_cells_method/TorqueSpherePSM.cpp
@@ -355,14 +355,14 @@ int main( int argc, char **argv )
    // create the sphere in the middle of the domain
    Vector3<real_t> position (real_c(setup.length) * real_c(0.5));
    auto sphere = pe::createSphere( *globalBodyStorage, blocks->getBlockStorage(), bodyStorageID, 0, position, setup.radius );
-   if ( sphere != NULL )
+   if ( sphere != nullptr )
    {
       sphere->setAngularVel( real_c(0), setup.angularVel, real_c(0) );
    }
 
    // synchronize often enough for large bodies
    for( uint_t i = 0; i < XBlocks / 2; ++i)
-      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, NULL, overlap);
+      pe::syncShadowOwners<BodyTypeTuple>( blocks->getBlockForest(), bodyStorageID, nullptr, overlap);
 
 
    ///////////////////////
diff --git a/tests/pe_coupling/utility/BodiesForceTorqueContainerTest.cpp b/tests/pe_coupling/utility/BodiesForceTorqueContainerTest.cpp
index ed015b72f..5b98ed977 100644
--- a/tests/pe_coupling/utility/BodiesForceTorqueContainerTest.cpp
+++ b/tests/pe_coupling/utility/BodiesForceTorqueContainerTest.cpp
@@ -90,7 +90,7 @@ int main( int argc, char **argv )
 
    // pe coupling
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, boost::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, boost::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
    // sphere positions for test scenarios
    Vector3<real_t> positionInsideBlock(real_t(10), real_t(10), real_t(10));
diff --git a/tests/pe_coupling/utility/PeSubCyclingTest.cpp b/tests/pe_coupling/utility/PeSubCyclingTest.cpp
index c21cdff12..11b84d160 100644
--- a/tests/pe_coupling/utility/PeSubCyclingTest.cpp
+++ b/tests/pe_coupling/utility/PeSubCyclingTest.cpp
@@ -95,11 +95,11 @@ int main( int argc, char **argv )
 
    auto ccdID = blocks->addBlockData(pe::ccd::createHashGridsDataHandling( globalBodyStorage, bodyStorageID ), "CCD");
    auto fcdID = blocks->addBlockData(pe::fcd::createGenericFCDDataHandling<BodyTypeTuple, pe::fcd::AnalyticCollideFunctor>(), "FCD");
-   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, NULL);
+   pe::cr::DEM cr(globalBodyStorage, blocks->getBlockStoragePointer(), bodyStorageID, ccdID, fcdID, nullptr);
 
    // set up synchronization procedure
    const real_t overlap = real_t( 1.5 ) * dx;
-   std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, boost::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(NULL), overlap, false );
+   std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, boost::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
 
 
    // sphere positions for test scenarios
-- 
GitLab