Peano
Loading...
Searching...
No Matches
ParticleSet.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include <list>
7
8#include "SieveParticles.h"
10
11namespace toolbox {
12 namespace particles {
13 template <typename T>
14 class ParticleSet;
15 } // namespace particles
16} // namespace toolbox
17
18
65template <typename T>
67public:
68 typedef T DoFType;
69 typedef std::list<T*> ParticleList;
70
72
73#if PeanoDebug >= 1
74 void setDebugX(const tarch::la::Vector<Dimensions, double>& data);
75 void setDebugH(const tarch::la::Vector<Dimensions, double>& data);
78#endif
79
80 std::string toString(bool addBrackets = true) const;
81
96 static void clearReassignmentStatistics();
97
106 static void clearParticleStateStatistics();
107
111 static void reduceParticleStateStatistics();
112 static std::string printParticleStateStatistics();
113
114 static void reduceReassignmentStatistics();
115 static std::string printReassignmentStatistics();
116
117 static void updateLiftDropStatistics(
118 int numberOfLiftsInThisTree,
119 int numberOfDropsInThisTree,
120 int numberOfReassignmentsInThisTree,
121 int numberOfLiftsIntoSieveSetInThisTree,
122 int numberOfDropsFromSieveSetInThisTree,
123 int numberOfDropsIntoHorizontalTreeDecomposition
124 );
125
127 int numberOfRemainingLocalParticles,
128 int numberOfExpiredHaloParticles,
129 int numberOfParticlesThatHaveLeftTheirDomain
130 );
131
141
145 static bool registeredAnyResorting();
146
147#ifdef Parallel
148 static void initDatatype();
149
150 static void shutdownDatatype();
151#endif
152
160 static void finishedTraversal(
161 const tarch::la::Vector<Dimensions,double> domainOffset,
163 const std::bitset<Dimensions> periodicBC
164 );
165
170
201 );
202
211
218
225
226private:
228
229protected:
231
244 static int _numberOfLifts;
245
258 static int _numberOfDrops;
259
273
289
296
303
310
322
332
342
354
373
374#if PeanoDebug >= 1
377#endif
378};
379
380
381#include "ParticleSet.cpph"
std::bitset< Dimensions > periodicBC
Definition main.cpp:19
Log Device.
Definition Log.h:516
Abstract base class for all flavours of particle sets.
Definition ParticleSet.h:66
static int _numberOfLiftsIntoSieveSet
Sorting statistics.
static void reduceParticleStateStatistics()
Reduces and prints the global statistics.
static int getNumberOfDropsIntoHorizontalTreeDecomposition()
Return number of drops into cuts recorded.
static ParticleList getParticlesToBeSievedIntoVertex(const peano4::datamanagement::VertexMarker &marker)
Make routine from SieveParticles public.
static int _numberOfRemainingLocalParticles
Set by parallel state analysis.
static int _numberOfReplacedVirtualParticlesAlongBoundary
Replace virtual particles are those where we have a copy and receive an update.
static tarch::multicore::BooleanSemaphore _statisticsSemaphore
static std::string printParticleStateStatistics()
static int _numberOfLifts
Sorting statistics.
static int _numberOfDropsIntoHorizontalTreeDecomposition
static bool hasParticlesToBeSievedIntoVertices()
Make routine from SieveParticles public.
static void clearParticleStateStatistics()
Clear stats.
static int _numberOfDroppedIncomingVirtualParticles
Number of incoming halo particles which are not worked in.
static int _numberOfDrops
Sorting statistics.
static tarch::logging::Log _log
std::string toString(bool addBrackets=true) const
SieveParticles< T > SieveParticles
Definition ParticleSet.h:71
static int _numberOfAddedVirtualParticlesAlongBoundary
Newly "discovered" virtual particles.
static bool registeredAnyResorting()
Returns true if there have been any lifts, drops, reassignments, ...
static void updateLiftDropStatistics(int numberOfLiftsInThisTree, int numberOfDropsInThisTree, int numberOfReassignmentsInThisTree, int numberOfLiftsIntoSieveSetInThisTree, int numberOfDropsFromSieveSetInThisTree, int numberOfDropsIntoHorizontalTreeDecomposition)
static int getNumberOfRemainingLocalParticles()
Return global sum of the particles that did remain within their partition at a time.
static int getNumberOfParticlesThatHaveBeSievedIntoVertices()
Return total number of particles to be sieved.
static SieveParticles cloneParticlesToBeSieved()
static void finishedTraversal(const tarch::la::Vector< Dimensions, double > domainOffset, const tarch::la::Vector< Dimensions, double > domainSize, const std::bitset< Dimensions > periodicBC)
Finish traversal.
static SieveParticles _sieveParticles
Map of persistent particles that have to be sieved.
static int _numberOfAddedLocalParticlesAlongBoundary
static void updateNumberOfLocalAndExpiredParticles(int numberOfRemainingLocalParticles, int numberOfExpiredHaloParticles, int numberOfParticlesThatHaveLeftTheirDomain)
static int _numberOfReassignments
Sorting statistics.
static void clearReassignmentStatistics()
Clear stats of all counters that have to do with resorting.
static int _numberOfExpiredHaloParticles
Set by parallel state analysis.
static int _numberOfParticlesThatHaveLeftTheirDomain
Set by parallel state analysis.
static std::string printReassignmentStatistics()
static int _numberOfRedundantlySharedLocalParticles
Particles which are local here and local somewhere else.
Vertex marker to provide information about selected vertex.
Simple vector class.
Definition Vector.h:150