Peano
Loading...
Searching...
No Matches
SieveParticles.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#include <map>
8
9#include "tarch/logging/Log.h"
11
13
14
15namespace toolbox {
16 namespace particles {
17 template <typename T>
18 class SieveParticles;
19 } // namespace particles
20} // namespace toolbox
21
22
94template <typename T>
96public:
97 typedef T DoFType;
98
99 typedef std::list<T*> ParticleList;
100
101 SieveParticles() = default;
102
116 virtual ~SieveParticles();
117
121 void deleteParticles();
122
175 const tarch::la::Vector<Dimensions,double> domainOffset,
177 const std::bitset<Dimensions> periodicBC
178 );
179
195
201
254 bool removeReturnedParticlesFromSet,
255 bool onlyReturnParticlesThatWillBeLocal,
256 bool lockSemaphore
257 );
258
268
274
278 std::string toString() const;
279
280private:
282
283 static void deleteParticles(ParticleList& list);
284
291
314
316
329};
330
331
332#include "SieveParticles.cpph"
std::bitset< Dimensions > periodicBC
Definition main.cpp:19
Log Device.
Definition Log.h:516
Utility class for global sorting for all flavours of particle sets.
static tarch::multicore::BooleanSemaphore _particlesToBeSievedSemaphore
SieveParticles< T > cloneParticlesToBeSieved()
Clone object, but let it contain only the delivering part, i.e.
ParticleList getParticlesToBeSievedIntoVertex(const peano4::datamanagement::VertexMarker &marker, bool removeReturnedParticlesFromSet, bool onlyReturnParticlesThatWillBeLocal, bool lockSemaphore)
Get particles that are to be sieved into one vertex.
void addParticleThatCanNotBeLiftedWithinItsTree(T *)
Add a particle to the list of particles which cannot be lifted.
int getNumberOfParticlesThatHaveBeSievedIntoVertices() const
hasParticlesToBeSievedIntoVertices() is equivalent to checking if this routine returns something grea...
static tarch::multicore::BooleanSemaphore _particlesThatCanNotBeLiftedWithinTheirTreeSemaphore
Semaphores.
ParticleList _particlesThatCanNotBeLiftedWithinTheirTree
void exchangeSieveListsGlobally(const tarch::la::Vector< Dimensions, double > domainOffset, const tarch::la::Vector< Dimensions, double > domainSize, const std::bitset< Dimensions > periodicBC)
Get all the global sieve data consistent.
bool hasParticlesToBeSievedIntoVertices() const
Fine out how many particles still to sieve.
static int _SieveReductionTag
Reduction tag.
static tarch::logging::Log _log
ParticleList _particlesThatHaveToBeSieved
Particles that should be sieved.
Vertex marker to provide information about selected vertex.
Simple vector class.
Definition Vector.h:150