Peano
Loading...
Searching...
No Matches
TracerInteraction.py
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
import
jinja2
4
5
6
def
perserveCartesianTracerLayout(solver, particle_spacing):
7
"""
8
9
This constraint is used in combination particle-particle interaction
10
for tracers. A typical invocation resembles
11
12
project.add_action_set_to_timestepping( peano4.api.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles(
13
particle_set = tracer_particles,
14
cell_compute_kernel = exahype2.tracer.perserveCartesianTracerLayout(thesolver,particle_spacing),
15
additional_includes = "#include "toolbox/particles/potentials/Springs.h"
16
))
17
18
"""
19
return
(
20
"""
21
//Run over local set
22
for (auto* p: localParticles) {
23
if ( marker.isContained( p->getX() ) ) {
24
tarch::la::Vector<Dimensions,double> updatedX = p->getX();
25
for (auto* pp: activeParticles) {
26
if (p->getNumber()!=pp->getNumber()) {
27
updatedX += repositories::"""
28
+ solver.get_name_of_global_instance()
29
+
""" benutze den Time Stamp vom Cell Marker hier!.getMaxTimeStepSize()
30
* toolbox::particles::potentials::springPotential(p->getX(), pp->getX(), """
31
+ str(particle_spacing)
32
+
""" );
33
}
34
}
35
p->setX(updatedX);
36
}
37
}
38
"""
39
)
python
exahype2
tracer
TracerInteraction.py
Generated on Wed Nov 4 2026 08:20:47 for Peano by
1.9.8