Peano
Loading...
Searching...
No Matches
toolbox::particles::assignmentchecks::tests::internal Namespace Reference

Functions

bool liftParticle (const tarch::la::Vector< Dimensions, double > particleX, const tarch::la::Vector< Dimensions, double > vertexX, const tarch::la::Vector< Dimensions, double > vertexH, const int depth)
 Does this particle need to be lifted?
bool dropParticle (const tarch::la::Vector< Dimensions, double > particleX, const tarch::la::Vector< Dimensions, double > vertexH, const int depth, const int maxVertexDepth)
 Does this particle need to be dropped?
int findVertexInd (double x, double vertexH)
 Find "index" of vertex with size vertexH covering position x assuming all vertices start at (0, 0, 0).
tarch::la::Vector< Dimensions, double > findVertexX (const tarch::la::Vector< Dimensions, double > x, const tarch::la::Vector< Dimensions, double > vertexH)
 Find position of vertex with size vertexH covering position x assuming all vertices start at (0, 0, 0).
TestParticle * mirrorParticleAlongPeriodicBoundary (TestParticle *original, bool bx, bool by, bool bz, tarch::la::Vector< Dimensions, double > boundary)
 Create a particle mirrored along periodic boundaries.

Function Documentation

◆ dropParticle()

bool toolbox::particles::assignmentchecks::tests::internal::dropParticle ( const tarch::la::Vector< Dimensions, double > particleX,
const tarch::la::Vector< Dimensions, double > vertexH,
const int depth,
const int maxVertexDepth )

Does this particle need to be dropped?

Yes if particleX is located in the square with size 2 vertexH around the closest vertex with size vertexH and while depth doesn't exceed maxVertexDepth.

◆ findVertexInd()

int toolbox::particles::assignmentchecks::tests::internal::findVertexInd ( double x,
double vertexH )

Find "index" of vertex with size vertexH covering position x assuming all vertices start at (0, 0, 0).

◆ findVertexX()

tarch::la::Vector< Dimensions, double > toolbox::particles::assignmentchecks::tests::internal::findVertexX ( const tarch::la::Vector< Dimensions, double > x,
const tarch::la::Vector< Dimensions, double > vertexH )

Find position of vertex with size vertexH covering position x assuming all vertices start at (0, 0, 0).

◆ liftParticle()

bool toolbox::particles::assignmentchecks::tests::internal::liftParticle ( const tarch::la::Vector< Dimensions, double > particleX,
const tarch::la::Vector< Dimensions, double > vertexX,
const tarch::la::Vector< Dimensions, double > vertexH,
const int depth )

Does this particle need to be lifted?

Yes if particleX is not located in the square with size 2 vertexH around the closest vertex with size vertexH, and if we're not at shallowest point in tree (= depth == 0)

◆ mirrorParticleAlongPeriodicBoundary()

TestParticle * toolbox::particles::assignmentchecks::tests::internal::mirrorParticleAlongPeriodicBoundary ( TestParticle * original,
bool bx,
bool by,
bool bz,
tarch::la::Vector< Dimensions, double > boundary )

Create a particle mirrored along periodic boundaries.

Assumes we're at the lower left (0, 0, 0) corner of the simulation box, and applies +boundary correction.

Parameters
originalThe original particle to be mirrored.
bxif true, mirror along x axis
byif true, mirror along y axis
bzif true, mirror along z axis
boundaryposition of the boundary. Essentially equivalent to DomainSize here.