Peano 4
Loading...
Searching...
No Matches
Statistics.cpph
Go to the documentation of this file.
2
3template <typename Particle>
5 // @todo Nicht so schoen, weil wir ja schon eigentlich eine Reduktion ueber das lokale set erst mal machen sollten
6/*
7 if (not particles.empty()) {
8 double vMin = std::numeric_limits<double>::max();
9 double vMax = 0.0;
10 double rMin = std::numeric_limits<double>::max();
11 double rMax = 0.0;
12 for (const auto* particle : particles) {
13 vMin = std::min(vMin, tarch::la::norm2(particle->getV()));
14 vMax = std::max(vMax, tarch::la::norm2(particle->getV()));
15 rMin = std::min(rMin, particle->getSearchRadius());
16 rMax = std::max(rMax, particle->getSearchRadius());
17 }
18 Particle::getSpecies().setVelocity(vMin, vMax, rMin, rMax);
19 }
20*/
21 Particle::getSpecies().setVelocity(
22 tarch::la::norm2(particle->getV()),
23 tarch::la::norm2(particle->getV()),
24 particle->getSearchRadius(),
25 particle->getSearchRadius()
26 );
27}
void reduceVelocityAndSearchRadius_without_check(Particle *particle)
Reduce velocity and search radius stats into species information.
Scalar norm2(const Vector< Size, Scalar > &vector)
Computes the 2-norm of the vector, i.e.