32 initial_time_step_size,
33 particle_particle_interaction_over_particle_sets_kernel="",
34 touch_particles_of_set_first_time_kernel="",
35 touch_particles_of_set_last_time_kernel="",
36 number_of_interaction_partners=64,
41 super(ExplicitEulerDynamicSearchRadius, self).
__init__(
57 particle_particle_interaction_over_particle_sets_kernel
60 touch_particles_of_set_first_time_kernel
63 touch_particles_of_set_last_time_kernel
72 The explicit Euler basically consists of two steps per particle. We first
73 determine the force. For this, we need access to the neighbours. The step
74 solely alters the individual particle's state. In the next algorithm step,
75 we need this state, as well as global data (the admissible time step size)
76 to update position and velocity. We also determine the CFL condition here.
87 name=
"DensityCalculation",
88 dependencies=AlgorithmStep.Dependencies.NEIGHBOURS,
89 effect=AlgorithmStep.Effect.CHANGE_POSITION_OR_INTERACTION_RADIUS,
90 touch_vertex_first_time_kernel=
"",
92 ::exaparty::kernels::adoptSearchRadiusAndTriggerRerun<globaldata::{PARTICLE}>(
95 {NR_INTERACTION_PARTNERS}
98 touch_vertex_last_time_kernel=
"",
99 prepare_traversal_kernel=f
"globaldata::{PARTICLE}::getSpecies().clearRerunPreviousGridSweepFlag();",
100 unprepare_traversal_kernel=f
"globaldata::{PARTICLE}::getSpecies().allReduce();",
102 #include "exaparty/kernels/ParticleSearchRadiusCalculation.h"
106 name=
"ForceCalculation",
107 dependencies=AlgorithmStep.Dependencies.NEIGHBOURS,
108 effect=AlgorithmStep.Effect.ALTER_LOCAL_STATE,
111 ::exaparty::kernels::genericInteraction<globaldata::{PARTICLE}>(
114 [&] (globaldata::{PARTICLE}* localParticle, const globaldata::{PARTICLE} * const globalParticle) -> void {{
115 {self.particle_particle_interaction_over_particle_sets_kernel}
121 #include "exaparty/kernels/ParticleParticleInteraction.h"
125 name=
"UpdatePositionAndVelocity",
126 dependencies=AlgorithmStep.Dependencies.SELF,
127 effect=AlgorithmStep.Effect.CHANGE_POSITION_OR_INTERACTION_RADIUS,
128 touch_vertex_first_time_kernel=
"""::exaparty::timestepping::resetMovedParticleMarker(assignedParticles);""",
129 touch_vertex_last_time_kernel=
"""::exaparty::timestepping::computeExplicitEulerWithGlobalTimeStepSize( assignedParticles );""",
130 prepare_traversal_kernel=f
"""::exaparty::timestepping::computeAdmissibleTimeStepSizeFromGlobalMeshSizeAndMaximumVelocity<globaldata::{PARTICLE}>({CFL_FACTOR},{TIME_STEP_SIZE});""",
132 #include "exaparty/timestepping/Euler.h"
133 #include "exaparty/timestepping/GlobalTimeStepping.h"
134 #include "exaparty/timestepping/TimeStepping.h"
138 name=
"ReduceGlobalQuantities",
139 dependencies=AlgorithmStep.Dependencies.SELF,
140 effect=AlgorithmStep.Effect.ALTER_GLOBAL_STATE,
141 cell_kernel=
"""::exaparty::statistics::reduceVelocityAndSearchRadius( localParticles );""",
142 prepare_traversal_kernel=
"""
143 globaldata::{PARTICLE}::getSpecies().clearSearchRadius();
144 globaldata::{PARTICLE}::getSpecies().clearVelocity();
146 unprepare_traversal_kernel=f
"""
147 globaldata::{PARTICLE}::getSpecies().allReduce();
148 globaldata::{PARTICLE}::getSpecies().setTimeStamp( globaldata::{PARTICLE}::getSpecies().getMinTimeStamp() + globaldata::{PARTICLE}::getSpecies().getMinTimeStepSize(), false );
149 ::exaparty::statistics::reportSearchRadiusVTDt<globaldata::{PARTICLE}>( "{PARTICLE}" );
152 #include "exaparty/statistics/Reports.h"
153 #include "exaparty/statistics/Statistics.h"