walberla::mesa_pd::domain::internal::ParticleDeleter Class Reference

Detailed Description

Class which gets initialized by BlockForestDataHandling.

This class is needed to delete particles if blocks get destroyed. Since the data of MESA_PD is isolated from the blocks one has to take care of correct removal of particles.

If a block gets moved by the load balancing the remaining block is deleted. Therefore all particles have to be destroyed. However, if the DataHandling is used for checkpointing the particles should not be deleted after serialization. Coupling the deletion to the lifetime of the block solves both problems.

Attention
Has to be defined in the header file since data management of blocks needs complete types.

#include <BlockForestDataHandling.h>

Public Member Functions

 ParticleDeleter (const std::shared_ptr< data::ParticleStorage > &ps, const math::AABB &aabb)
 
 ~ParticleDeleter ()
 

Private Attributes

std::shared_ptr< data::ParticleStorageps_
 
math::AABB aabb_
 AABB of the associated block. More...
 

Friends

bool operator== (const ParticleDeleter &lhs, const ParticleDeleter &rhs)
 

Constructor & Destructor Documentation

◆ ParticleDeleter()

walberla::mesa_pd::domain::internal::ParticleDeleter::ParticleDeleter ( const std::shared_ptr< data::ParticleStorage > &  ps,
const math::AABB aabb 
)

◆ ~ParticleDeleter()

walberla::mesa_pd::domain::internal::ParticleDeleter::~ParticleDeleter ( )

Friends And Related Function Documentation

◆ operator==

bool operator== ( const ParticleDeleter lhs,
const ParticleDeleter rhs 
)
friend

Member Data Documentation

◆ aabb_

math::AABB walberla::mesa_pd::domain::internal::ParticleDeleter::aabb_
private

AABB of the associated block.

◆ ps_

std::shared_ptr<data::ParticleStorage> walberla::mesa_pd::domain::internal::ParticleDeleter::ps_
private

The documentation for this class was generated from the following files: