Peano 4
Loading...
Searching...
No Matches
ParticleSelfInteraction.cpph
Go to the documentation of this file.
1#include <type_traits>
2
5#include "tarch/logging/Log.h"
6
7
8
9template <typename ParticleContainer>
11 const ParticleContainer& localParticles,
12 const double nparts,
15) {
16
17 /* TODO MLADEN: Document parameters? */
18 for (auto* particle : localParticles) {
19// if (localParticleCanBeUpdatedInVertexKernel(particle) and not particle->getIsBoundaryParticle()) {
21 if (true) {
22 /* Flag if particle is at boundary of the simulation box */
23 /* TODO MLADEN: Boundary particle width shouldn't be hardcoded like this. */
24 const tarch::la::Vector<Dimensions, double> max_dist_boundary = 3. * (domainSize / nparts);
25 const bool isBoundaryParticle = tarch::la::oneSmaller(particle->getX(), domainOffset + max_dist_boundary)
27 oneGreater(particle->getX(), domainOffset + domainSize - max_dist_boundary);
28 particle->setIsBoundaryParticle(isBoundaryParticle);
29 }
30 }
31}
File containing macro-riddled functions related to dimensions.
void flagBoundaryParticles(const ParticleContainer &localParticles, const double nparts)
Flag boundary particles.
bool oneSmaller(const Vector< Size, Scalar > &lhs, const Scalar &cmp, const Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
bool oneGreater(const Vector< Size, Scalar > &lhs, const Scalar &cmp, const Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
Simple vector class.
Definition Vector.h:134