Peano
Loading...
Searching...
No Matches
TestHelpers.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#include "tarch/la/Vector.h"
6#include "tarch/logging/Log.h"
8#include "TestParticle.h"
9
10namespace toolbox {
11 namespace particles {
12 namespace assignmentchecks {
13 namespace tests {
14
15 class TestHelpers;
16
17 namespace internal {
18
29 const int depth
30 );
31
41 const int depth,
42 const int maxVertexDepth
43 );
44
49 int findVertexInd(double x, double vertexH);
50
58 );
59
73 TestParticle* original,
74 bool bx,
75 bool by,
76 bool bz,
78 );
79
80
81 } // namespace internal
82 } // namespace tests
83 } // namespace assignmentchecks
84 } // namespace particles
85} // namespace toolbox
86
87
Represents one test case.
Definition TestCase.h:57
void testSieveSet()
Test particle assignments to sieve sets.
void testParticleWalk()
Test a particle walking through the box using lift-drop vertex assignments.
void testParticleWalkSameTreeLevel()
Test a particle walking from vertex to vertex on the same depth of the tree, i.e.
void testParticleLiftDrop()
Test a particle being assigned up and down the vertex hierarchy.
void testPeriodicBoundaryConditionsCorner()
Test the periodic boundary conditions of a particle in a corner, being replicated to any other corner...
void testTruthTableSearchAndIDKeys()
Test whether ParticleIdentifier and ParticleSearchIdentifier work as intended in a map for a fuzzy se...
void testAddingSweepsToDatabase()
Make sure that adding mesh sweeps to the database works.
void testAddingParticleMovingEvents(int nsweeps=100, int nEventsToKeep=1000)
Test the adding of particle events to the database with a moving particle.
void testParticleMoveEvents()
Test adding move events of particles.
virtual void run() override
This routine is triggered by the TestCaseCollection.
void testAddingParticleEvents()
Test the adding of particle events to the database.
void testPeriodicBoundaryConditions()
Particles are identified in the events database using their unique ID.
void testRemovingParticleEvents()
Test the removal of particle events once their history gets too long.
tarch::la::Vector< Dimensions, double > findVertexX(const tarch::la::Vector< Dimensions, double > x, const tarch::la::Vector< Dimensions, double > vertexH)
Find position of vertex with size vertexH covering position x assuming all vertices start at (0,...
bool dropParticle(const tarch::la::Vector< Dimensions, double > particleX, const tarch::la::Vector< Dimensions, double > vertexH, const int depth, const int maxVertexDepth)
Does this particle need to be dropped? Yes if particleX is located in the square with size 2 vertexH ...
int findVertexInd(double x, double vertexH)
Find "index" of vertex with size vertexH covering position x assuming all vertices start at (0,...
TestParticle * mirrorParticleAlongPeriodicBoundary(TestParticle *original, bool bx, bool by, bool bz, tarch::la::Vector< Dimensions, double > boundary)
Create a particle mirrored along periodic boundaries.
bool liftParticle(const tarch::la::Vector< Dimensions, double > particleX, const tarch::la::Vector< Dimensions, double > vertexX, const tarch::la::Vector< Dimensions, double > vertexH, const int depth)
Does this particle need to be lifted? Yes if particleX is not located in the square with size 2 verte...
Simple vector class.
Definition Vector.h:159