From 1bb2c7ab36f650ce05ffc2c9c8d1a4a6a98e8994 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Fri, 18 Jun 2021 09:56:07 +0200 Subject: [PATCH 1/2] leave registerCell cell empty --- src/lbm/boundary/SimpleDiffusionDirichlet.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/lbm/boundary/SimpleDiffusionDirichlet.h b/src/lbm/boundary/SimpleDiffusionDirichlet.h index 81805c5b8..5a2780ff4 100644 --- a/src/lbm/boundary/SimpleDiffusionDirichlet.h +++ b/src/lbm/boundary/SimpleDiffusionDirichlet.h @@ -141,15 +141,6 @@ template< typename LatticeModel_T, typename flag_t > inline void SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::registerCell( const flag_t, const cell_idx_t, const cell_idx_t, const cell_idx_t, const BoundaryConfiguration & bc ) { - WALBERLA_ASSERT_EQUAL( dynamic_cast< const ScalarConfiguration * >( &bc ), &bc ); - - const ScalarConfiguration & sclConfig = dynamic_cast< const ScalarConfiguration & >( bc ); - - if( init_ ) - WALBERLA_ASSERT_FLOAT_EQUAL( val_, sclConfig.val() ); - - init_ = true; - val_ = sclConfig.val(); } -- GitLab From ea228c60b026bf0199e6d0b7231b5b3b646e68a6 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Fri, 18 Jun 2021 08:26:17 +0000 Subject: [PATCH 2/2] remove unused parameter --- src/lbm/boundary/SimpleDiffusionDirichlet.h | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lbm/boundary/SimpleDiffusionDirichlet.h b/src/lbm/boundary/SimpleDiffusionDirichlet.h index 5a2780ff4..5fa9db33d 100644 --- a/src/lbm/boundary/SimpleDiffusionDirichlet.h +++ b/src/lbm/boundary/SimpleDiffusionDirichlet.h @@ -1,15 +1,15 @@ //====================================================================================================================== // -// This file is part of waLBerla. waLBerla is free software: you can +// This file is part of waLBerla. waLBerla is free software: you can // redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of +// License as published by the Free Software Foundation, either version 3 of // the License, or (at your option) any later version. -// -// waLBerla is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// +// waLBerla is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. -// +// // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // @@ -108,9 +108,9 @@ private: template< typename LatticeModel_T, typename flag_t > inline SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::SimpleDiffusionDirichlet( const BoundaryUID& boundaryUID, const FlagUID& uid, PDFField* const pdfField, const real_t val ) : - Boundary( boundaryUID ), uid_( uid ), pdfField_( pdfField ), val_( val ), init_(false) + Boundary( boundaryUID ), uid_( uid ), pdfField_( pdfField ), val_( val ), init_(false) { - WALBERLA_ASSERT_NOT_NULLPTR( pdfField_ ); + WALBERLA_ASSERT_NOT_NULLPTR( pdfField_ ); } @@ -139,7 +139,7 @@ inline void SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::registerCell( Bu template< typename LatticeModel_T, typename flag_t > inline void SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::registerCell( const flag_t, const cell_idx_t, const cell_idx_t, const cell_idx_t, - const BoundaryConfiguration & bc ) + const BoundaryConfiguration & ) { } @@ -174,7 +174,7 @@ inline void SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::treatDirection( WALBERLA_ASSERT_EQUAL( ny, y + cell_idx_c( stencil::cy[ dir ] ) ); WALBERLA_ASSERT_EQUAL( nz, z + cell_idx_c( stencil::cz[ dir ] ) ); WALBERLA_ASSERT_UNEQUAL( mask & this->mask_, numeric_cast(0) ); - WALBERLA_ASSERT_EQUAL ( mask & this->mask_, this->mask_ ); + WALBERLA_ASSERT_EQUAL ( mask & this->mask_, this->mask_ ); // only true if "this->mask_" only contains one single flag, which is the case for the current implementation of this boundary condition (SimpleDiffusionDirichlet) pdfField_->get( nx, ny, nz, Stencil::invDirIdx(dir) ) = real_t(2) * val_ * LatticeModel_T::w[Stencil::idx[dir]] - pdfField_->get( x, y, z, Stencil::idx[dir] ); -- GitLab