walberla::mesa_pd::sorting::LinearizedCompareFunctor Class Reference

Detailed Description

Compare functor which sorts particles along the x, y and z axes.

#include <LinearizedCompareFunctor.h>

Public Member Functions

 LinearizedCompareFunctor (const math::AABB &domain, const Vector3< uint_t > cells)
 Subdivides a domain into cells and arranges the cells in a linearized fashion. 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 Vector3< uint_tcells_
 
Vec3 inverse_dx
 
std::vector< uint_thilbertLookup_
 

Constructor & Destructor Documentation

◆ LinearizedCompareFunctor()

walberla::mesa_pd::sorting::LinearizedCompareFunctor::LinearizedCompareFunctor ( const math::AABB domain,
const Vector3< uint_t cells 
)

Subdivides a domain into cells and arranges the cells in a linearized fashion.

The position within the linearization gives the particles their weight.

Parameters
domaindomain which should be partitioned into cells
cellsnumber of cells in every direction.

Member Function Documentation

◆ discretize()

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

◆ getWeight()

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

◆ initializeLookup()

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

◆ operator()()

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

Member Data Documentation

◆ cells_

const Vector3<uint_t> walberla::mesa_pd::sorting::LinearizedCompareFunctor::cells_
private

◆ domain_

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

◆ hilbertLookup_

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

◆ inverse_dx

Vec3 walberla::mesa_pd::sorting::LinearizedCompareFunctor::inverse_dx
private

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