Peano
Loading...
Searching...
No Matches
ParticleListValidation.cpph
Go to the documentation of this file.
1template <typename T>
4) {
5 for (int i=0; i<TwoPowerD; i++) {
7 vertices(i).isGathered() or vertices(i).empty(),
8 i, vertices(i).toString()
9 );
10 }
11}
12
13
14
15template <typename T>
17 const std::list<T*> activeParticles,
18 const std::vector<int>& numberOfParticlesPerVertexAdded
19) {
20 typename std::list<T*>::const_iterator iterator = activeParticles.begin();
21
22 for (auto chunkSize: numberOfParticlesPerVertexAdded) {
23 T* firstParticleOfThisChunk = *iterator;
24 for (int particleInThisChunk=0; particleInThisChunk<chunkSize; particleInThisChunk++) {
25 assertion(iterator != activeParticles.end());
26 void* iteratorsRawPointer = *iterator;
27 void* arrayRawPointer = firstParticleOfThisChunk + particleInThisChunk;
29 iteratorsRawPointer, arrayRawPointer,
30 (*iterator)->toString(),
31 firstParticleOfThisChunk[particleInThisChunk].toString()
32 );
33 iterator++;
34 }
35 }
36}
#define assertion2(expr, param0, param1)
#define assertion(expr)
#define assertionEquals2(lhs, rhs, a, b)
#define TwoPowerD
Definition Globals.h:19
std::string toString(Filter filter)
Definition convert.cpp:170
void ensureThatParticleListsEncodeContinuousMemoryChunks(const std::list< T * > activeParticles, const std::vector< int > &numberOfParticlesPerVertexAdded)
Validate encoding of particle lists.
void ensureAllParticleListsAreGatheredOrEmpty(peano4::datamanagement::VertexEnumerator< T > vertices)
Check if all particles are either gathered or host the empt set.
Vertex enumerator within array.