123 Create a repository of algorithmic steps which are then
124 ordered into the actual time stepping sequence.
134 name=
"ForceCalculation",
135 dependencies=AlgorithmStep.Dependencies.NEIGHBOURS,
136 effect=AlgorithmStep.Effect.ALTER_LOCAL_STATE,
137 touch_vertex_first_time_kernel=
"",
139 touch_vertex_last_time_kernel=
"",
143 dependencies=AlgorithmStep.Dependencies.SELF,
144 effect=AlgorithmStep.Effect.ALTER_LOCAL_STATE,
145 touch_vertex_first_time_kernel=f
"""::swift2::kernels::forAllParticles( marker, assignedParticles, numberOfCoalescedAssignedParticles, ::swift2::timestepping::leapfrogKickWithGlobalTimeStepSize<globaldata::{PARTICLE}> );""",
146 prepare_traversal_kernel=f
"""::swift2::timestepping::computeAdmissibleTimeStepSizeFromGlobalMeshSizeAndMaximumVelocity<globaldata::{PARTICLE}>({CFL_FACTOR},{TIME_STEP_SIZE});""",
148 #include "swift2/timestepping/Leapfrog.h"
149 #include "swift2/timestepping/GlobalTimeStepping.h"
150 #include "swift2/timestepping/TimeStepping.h"
155 dependencies=AlgorithmStep.Dependencies.SELF,
156 effect=AlgorithmStep.Effect.CHANGE_POSITION_OR_INTERACTION_RADIUS,
157 touch_vertex_first_time_kernel=f
"""::swift2::kernels::forAllParticles( marker, assignedParticles, numberOfCoalescedAssignedParticles, ::swift2::timestepping::resetMovedParticleMarker<globaldata::{PARTICLE}> );""",
158 touch_vertex_last_time_kernel=f
"""
159 auto oldParticlePositions = ::toolbox::particles::assignmentchecks::recordParticlePositions(assignedParticles);
160 ::swift2::kernels::forAllParticles( marker, assignedParticles, numberOfCoalescedAssignedParticles, ::swift2::timestepping::leapfrogDriftWithGlobalTimeStepSize<globaldata::{PARTICLE}> );
161 ::toolbox::particles::assignmentchecks::traceParticleMovements(assignedParticles, oldParticlePositions, marker.x(), marker.h(), _spacetreeId);
164 #include "swift2/timestepping/Leapfrog.h"
165 #include "swift2/timestepping/GlobalTimeStepping.h"
166 #include "swift2/timestepping/TimeStepping.h"
170 name=
"ReduceVelocityAndDetermineTimeStepSize",
171 dependencies=AlgorithmStep.Dependencies.SELF,
172 effect=AlgorithmStep.Effect.CHANGE_POSITION_OR_INTERACTION_RADIUS,
173 prepare_traversal_kernel=f
"""::swift2::timestepping::computeAdmissibleTimeStepSizeFromGlobalMeshSizeAndMaximumVelocity<globaldata::{PARTICLE}>({CFL_FACTOR},{TIME_STEP_SIZE});""",
175 #include "swift2/timestepping/Euler.h"
176 #include "swift2/timestepping/GlobalTimeStepping.h"
177 #include "swift2/timestepping/TimeStepping.h"
181 name=
"ReduceGlobalQuantities",
182 dependencies=AlgorithmStep.Dependencies.SELF,
183 effect=AlgorithmStep.Effect.ALTER_GLOBAL_STATE,
184 touch_vertex_first_time_kernel=f
"""::swift2::kernels::forAllParticles( marker, assignedParticles, numberOfCoalescedAssignedParticles, ::swift2::statistics::reduceVelocityAndSearchRadius<globaldata::{PARTICLE}> );""",
185 prepare_traversal_kernel=f
"""
186 globaldata::{PARTICLE}::getSpecies().clearSearchRadius();
187 globaldata::{PARTICLE}::getSpecies().clearVelocity();
189 unprepare_traversal_kernel=f
"""
190 globaldata::{PARTICLE}::getSpecies().allReduce();
191 globaldata::{PARTICLE}::getSpecies().setTimeStamp( globaldata::{PARTICLE}::getSpecies().getMinTimeStamp() + globaldata::{PARTICLE}::getSpecies().getMinTimeStepSize(), false );
192 ::swift2::statistics::reportSearchRadiusVTDt<globaldata::{PARTICLE}>( "{PARTICLE}" );
195 #include "swift2/statistics/Reports.h"
196 #include "swift2/statistics/Statistics.h"