walberla::mesa_pd::sorting::HilbertCompareFunctor Class Reference

Detailed Description

Compare functor which sorts particles according to the hilbert space filling curve.

#include <HilbertCompareFunctor.h>

Public Member Functions

 HilbertCompareFunctor (const math::AABB &domain, const uint_t cells)
 Subdivides a domain into cells and arranges the cells according to the sfc. More...
 
bool operator() (const data::Particle bd1, const data::Particle bd2) const
 
double getWeight (const data::Particle p1) const
 

Private Member Functions

uint_t discretize (const Vec3 &pos) const
 
void initializeLookup ()
 

Private Attributes

math::AABB domain_
 
const uint_t cells_
 
Vec3 inverse_dx
 
std::vector< uint_thilbertLookup_
 

Constructor & Destructor Documentation

◆ HilbertCompareFunctor()

walberla::mesa_pd::sorting::HilbertCompareFunctor::HilbertCompareFunctor ( const math::AABB domain,
const uint_t  cells 
)

Subdivides a domain into cells and arranges the cells according to the sfc.

The position within the sfc gives the particles their weight.

Parameters
domaindomain which should be partitioned into cells
cellsnumber of cells in every direction.
Attention
cells has to be a power of 2!

Member Function Documentation

◆ discretize()

uint_t walberla::mesa_pd::sorting::HilbertCompareFunctor::discretize ( const Vec3 pos) const
private

◆ getWeight()

double walberla::mesa_pd::sorting::HilbertCompareFunctor::getWeight ( const data::Particle  p1) const
inline

◆ initializeLookup()

void walberla::mesa_pd::sorting::HilbertCompareFunctor::initializeLookup ( )
private

◆ operator()()

bool walberla::mesa_pd::sorting::HilbertCompareFunctor::operator() ( const data::Particle  bd1,
const data::Particle  bd2 
) const

Member Data Documentation

◆ cells_

const uint_t walberla::mesa_pd::sorting::HilbertCompareFunctor::cells_
private

◆ domain_

math::AABB walberla::mesa_pd::sorting::HilbertCompareFunctor::domain_
private

◆ hilbertLookup_

std::vector<uint_t> walberla::mesa_pd::sorting::HilbertCompareFunctor::hilbertLookup_
private

◆ inverse_dx

Vec3 walberla::mesa_pd::sorting::HilbertCompareFunctor::inverse_dx
private

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