Commit 57642cdb authored by Markus Holzer's avatar Markus Holzer
Browse files

test PDF field

parent 2bb498e7
Pipeline #38696 failed with stages
in 20 minutes and 18 seconds
......@@ -108,20 +108,20 @@ class PdfFieldHandling : public field::BlockDataHandling< PdfField< LatticeModel
void packLatticeModel(IBlock* const block, const BlockDataID& id, mpi::SendBuffer& buffer) const
{
const PdfField_T* field = block->template getData< PdfField_T >(id);
WALBERLA_CHECK_NOT_NULLPTR(field);
WALBERLA_CHECK_NOT_NULLPTR(field)
buffer << field->latticeModel();
}
void unpackLatticeModel(IBlock* const block, const BlockDataID& id, mpi::RecvBuffer& buffer) const
{
PdfField_T* field = block->template getData< PdfField_T >(id);
WALBERLA_CHECK_NOT_NULLPTR(field);
WALBERLA_CHECK_NOT_NULLPTR(field)
LatticeModel_T latticeModel = field->latticeModel();
buffer >> latticeModel;
auto blocks = blocks_.lock();
WALBERLA_CHECK_NOT_NULLPTR(blocks);
WALBERLA_CHECK_NOT_NULLPTR(blocks)
latticeModel.configure(*block, *blocks);
field->resetLatticeModel(latticeModel);
......@@ -130,10 +130,10 @@ class PdfFieldHandling : public field::BlockDataHandling< PdfField< LatticeModel
PdfField< LatticeModel_T >* allocateDispatch(IBlock* const block, const bool _initialize,
const real_t initialDensity)
{
WALBERLA_ASSERT_NOT_NULLPTR(block);
WALBERLA_ASSERT_NOT_NULLPTR(block)
auto blocks = blocks_.lock();
WALBERLA_CHECK_NOT_NULLPTR(blocks);
WALBERLA_CHECK_NOT_NULLPTR(blocks)
latticeModel_.configure(*block, *blocks);
......
......@@ -300,7 +300,7 @@ PdfField< LatticeModel_T >::PdfField( const uint_t _xSize, const uint_t _ySize,
const uint_t ghostLayers, const field::Layout & _layout,
const shared_ptr< field::FieldAllocator<real_t> > & alloc ) :
GhostLayerField< real_t, Stencil::Size >( _xSize, _ySize, _zSize, LatticeModel_T::Stencil::Size, ghostLayers, _layout, alloc ),
GhostLayerField< real_t, Stencil::Size >( _xSize, _ySize, _zSize, ghostLayers, _layout, alloc ),
latticeModel_( _latticeModel )
{
#ifdef _OPENMP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment