Peano
Loading...
Searching...
No Matches
Euler.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 particle.setV( particle.getV() + timeStepSize * particle.getA() );
14 particle.setMoveState(Particle::MoveState::Moved);
15 }
16}
17
18
19template <typename Particle>
22 Particle& particle
23) {
24 double timeStepSize = Particle::getSpecies().getMinTimeStepSize();
25
27 particle.setV( particle.getV() + timeStepSize * particle.getA() );
28 particle.setX( particle.getX() + timeStepSize * particle.getV() );
29 particle.setMoveState(Particle::MoveState::Moved);
30 }
31}
32
bool localParticleCanBeUpdatedAndMovedInVertexKernel(const peano4::datamanagement::VertexMarker &marker, const Particle &localParticle)
Can we move (drift) this particle?
void computeExplicitEulerWithGlobalTimeStepSize(const peano4::datamanagement::VertexMarker &marker, Particle &particle)
Update a particle with the explicit Euler.
Definition Euler.cpph:5
void computeExplicitEulerCromerWithGlobalTimeStepSize(const peano4::datamanagement::VertexMarker &marker, Particle &particle)
Definition Euler.cpph:20
Vertex marker to provide information about selected vertex.