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
88
89#if PeanoDebug >= 1
90 void setDebugX(const tarch::la::Vector<Dimensions, double>& data);
91 void setDebugH(const tarch::la::Vector<Dimensions, double>& data);
94#endif
95
96 std::string toString(bool addBrackets = true) const;
97
113
123
128 static std::string printParticleStateStatistics();
129
131 static std::string printReassignmentStatistics();
132
134 int numberOfLiftsInThisTree,
135 int numberOfDropsInThisTree,
136 int numberOfReassignmentsInThisTree,
137 int numberOfLiftsIntoSieveSetInThisTree,
138 int numberOfDropsFromSieveSetInThisTree,
139 int numberOfDropsIntoHorizontalTreeDecomposition
140 );
141
143 int numberOfRemainingLocalParticles,
144 int numberOfExpiredHaloParticles,
145 int numberOfParticlesThatHaveLeftTheirDomain
146 );
147
157
162
163#ifdef Parallel
164 static void initDatatype();
165
166 static void shutdownDatatype();
167#endif
168
176 static void finishedTraversal(
177 const tarch::la::Vector<Dimensions,double> domainOffset,
179 const std::bitset<Dimensions> periodicBC
180 );
181
186
217 );
218
227
234
241
242private:
244
245protected:
247
260 static int _numberOfLifts;
261
274 static int _numberOfDrops;
275
289
305
312
319
326
338
348
358
370
389
390#if PeanoDebug >= 1
393#endif
394};
395
396
397#include "ParticleSet.cpph"
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 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 ParticleList getParticlesToBeSievedIntoVertex(const peano4::datamanagement::VertexMarker &marker)
Make routine from SieveParticles public.
static void clearReassignmentStatistics()
Clear stats of all counters that have to do with resorting.
static std::string printReassignmentStatistics()
static SieveParticles _sieveParticles
Map of persistent particles that have to be sieved.
static int _numberOfLifts
Sorting statistics.
static int _numberOfDropsIntoHorizontalTreeDecomposition
static void clearParticleStateStatistics()
Clear stats.
static int _numberOfDroppedIncomingVirtualParticles
Number of incoming halo particles which are not worked in.
static void reduceReassignmentStatistics()
static int _numberOfDrops
Sorting statistics.
static bool registeredAnyResorting()
Returns true if there have been any lifts, drops, reassignments, ...
static tarch::logging::Log _log
std::string toString(bool addBrackets=true) const
static int getNumberOfParticlesThatHaveBeSievedIntoVertices()
Return total number of particles to be sieved.
static int _numberOfAddedVirtualParticlesAlongBoundary
Newly "discovered" virtual particles.
static int getNumberOfRemainingLocalParticles()
Return global sum of the particles that did remain within their partition at a time.
static void updateLiftDropStatistics(int numberOfLiftsInThisTree, int numberOfDropsInThisTree, int numberOfReassignmentsInThisTree, int numberOfLiftsIntoSieveSetInThisTree, int numberOfDropsFromSieveSetInThisTree, int numberOfDropsIntoHorizontalTreeDecomposition)
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 bool hasParticlesToBeSievedIntoVertices()
Make routine from SieveParticles public.
static int _numberOfAddedLocalParticlesAlongBoundary
static SieveParticles cloneParticlesToBeSieved()
static int getNumberOfDropsIntoHorizontalTreeDecomposition()
Return number of drops into cuts recorded.
static int _numberOfReassignments
Sorting statistics.
static void updateNumberOfLocalAndExpiredParticles(int numberOfRemainingLocalParticles, int numberOfExpiredHaloParticles, int numberOfParticlesThatHaveLeftTheirDomain)
static int _numberOfExpiredHaloParticles
Set by parallel state analysis.
static int _numberOfParticlesThatHaveLeftTheirDomain
Set by parallel state analysis.
static std::string printParticleStateStatistics()
static int _numberOfRedundantlySharedLocalParticles
Particles which are local here and local somewhere else.
static void reduceParticleStateStatistics()
Reduces and prints the global statistics.
Utility class for global sorting for all flavours of particle sets.
Vertex marker to provide information about selected vertex.
Simple vector class.
Definition Vector.h:159