Peano 4
Loading...
Searching...
No Matches
Leapfrog.cpph
Go to the documentation of this file.
2
3
4template <typename Particle>
7 Particle& particle
8) {
9 double timeStepSize = Particle::getSpecies().getMinTimeStepSize();
10
12 particle.setX( particle.getX() + timeStepSize * particle.getV() );
13 assertion1(tarch::la::isEntryFinite(particle.getX()), particle.toString());
14 particle.setMoveState(Particle::MoveState::Moved);
15 }
16}
17
18
19
20template <typename Particle>
23 Particle& particle
24) {
25 double timeStepSize = 0.5 * Particle::getSpecies().getMinTimeStepSize();
26
28 particle.setV( particle.getV() + timeStepSize * particle.getA() );
29 }
30}
31
#define assertion1(expr, param)
bool localParticleCanBeUpdatedInVertexKernel(const peano4::datamanagement::VertexMarker &marker, const Particle &localParticle)
Can we do work on this particle during a vertex kernel sweep stage?
bool localParticleCanBeUpdatedAndMovedInVertexKernel(const peano4::datamanagement::VertexMarker &marker, const Particle &localParticle)
Can we move (drift) this particle?
void leapfrogDriftWithGlobalTimeStepSize(const peano4::datamanagement::VertexMarker &marker, Particle &localParticle)
Drift step.
Definition Leapfrog.cpph:5
void leapfrogKickWithGlobalTimeStepSize(const peano4::datamanagement::VertexMarker &marker, Particle &localParticle)
Kick steps.
Definition Leapfrog.cpph:21
int isEntryFinite(const Vector< Size, Scalar > &vector)
Vertex marker to provide information about selected vertex.