Commit 5b861115 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[UPDATE] omit recreation of BlockForestDomain

BlockForestDomain is now passed via argument rather than
recreated in every call.
parent 9a833c9f
......@@ -52,6 +52,7 @@ void correctParticlePosition(Vec3& pt,
void SyncNextNeighborsBlockForest::operator()(data::ParticleStorage& ps,
const std::shared_ptr<blockforest::BlockForest>& bf,
const std::shared_ptr<domain::BlockForestDomain>& domain,
const real_t dx) const
{
if (numProcesses_ == 1) return;
......@@ -79,14 +80,13 @@ void SyncNextNeighborsBlockForest::operator()(data::ParticleStorage& ps,
// Receiving the updates for the remote rigid bodies from the connected processes
WALBERLA_LOG_DETAIL( "Parsing of particle synchronization response starts..." );
ParseMessage parseMessage;
domain::BlockForestDomain domain(bf);
for( auto it = bs.begin(); it != bs.end(); ++it )
{
walberla::uint8_t tmp;
it.buffer() >> tmp;
while( !it.buffer().isEmpty() )
{
parseMessage(it.rank(), it.buffer(), ps, domain);
parseMessage(it.rank(), it.buffer(), ps, *domain);
}
}
WALBERLA_LOG_DETAIL( "Parsing of particle synchronization response ended." );
......
......@@ -29,7 +29,7 @@
#include <mesa_pd/data/DataTypes.h>
#include <mesa_pd/data/Flags.h>
#include <mesa_pd/data/ParticleStorage.h>
#include <mesa_pd/domain/IDomain.h>
#include <mesa_pd/domain/BlockForestDomain.h>
#include <mesa_pd/mpi/notifications/PackNotification.h>
#include <mesa_pd/mpi/notifications/ParseMessage.h>
#include <mesa_pd/mpi/notifications/ParticleCopyNotification.h>
......@@ -57,6 +57,7 @@ class SyncNextNeighborsBlockForest
public:
void operator()(data::ParticleStorage& ps,
const std::shared_ptr<blockforest::BlockForest>& blockforest,
const std::shared_ptr<domain::BlockForestDomain>& domain,
const real_t dx = real_t(0)) const;
int64_t getBytesSent() const { return bs.getBytesSent(); }
......
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