From 934a270b053b0a48b8438ddcf0d9caffbd0f29bf Mon Sep 17 00:00:00 2001
From: Christoph Rettinger <christoph.rettinger@fau.de>
Date: Tue, 20 Feb 2018 18:07:22 +0100
Subject: [PATCH] Added assert in reconstructor

---
 .../momentum_exchange_method/restoration/Reconstructor.h        | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h b/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h
index 7f9ce1017..b8fb7affb 100644
--- a/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h
+++ b/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h
@@ -120,6 +120,8 @@ void EquilibriumReconstructor< LatticeModel_T, BoundaryHandling_T >
 
    real_t cx, cy, cz;
    blockStorage_->getBlockLocalCellCenter( *block, Cell(x,y,z), cx, cy, cz );
+
+   WALBERLA_ASSERT_NOT_NULLPTR( (*bodyField)(x,y,z) );
    const auto velocity = (*bodyField)(x,y,z)->velFromWF(cx,cy,cz);
 
    pdfField->setToEquilibrium( x, y, z, Vector3< real_t >( velocity[0], velocity[1], velocity[2] ), averageDensity );
-- 
GitLab