Peano
Loading...
Searching...
No Matches
Tracer.h
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#pragma once
4
7
8// #include <concepts>
9
10namespace toolbox {
11 namespace particles {
19 template <typename Particle>
20 void staticPosition(const Particle& particle, double timeStepSize) {}
21
25 template <typename ParticleAccessor>
26 concept ParticleTimeSteppingAccessor = requires { typename ParticleAccessor::Particle; };
27
28 /*
29
30 //(ParticleAccessor accessor, ) {
31
32 accessor.x(Particle&) -> tarch::la::Vector< Dimensions, double>&;
33 accessor.x(const Particle&) -> const tarch::la::Vector< Dimensions, double>&;
34
35 accessor.v(Particle&) -> tarch::la::Vector< Dimensions, double>&;
36 accessor.v(const Particle&) -> const tarch::la::Vector< Dimensions, double>&;
37 */
38 // };
39
40 template <typename Particle>
42 static tarch::la::Vector<Dimensions, double>& x(Particle& particle) { return particle.x(); }
43
44 static const tarch::la::Vector<Dimensions, double>& x(const Particle& particle) { return particle.x(); }
45
46 static tarch::la::Vector<Dimensions, double>& v(Particle& particle) { return particle.v(); }
47
48 static const tarch::la::Vector<Dimensions, double>& v(const Particle& particle) { return particle.v(); }
49 };
50
83 template <typename Particle>
84 void explicitEuler(Particle& particle, double timeStepSize);
85 } // namespace particles
86} // namespace toolbox
87
88// #include "Tracer.cpph"
void explicitEuler(Particle &particle, double timeStepSize)
Simple explicit Euler.
Definition Tracer.cpph:2
void staticPosition(const Particle &particle, double timeStepSize)
Leave the tracer particles where they are.
Definition Tracer.h:20
Simple vector class.
Definition Vector.h:150
static const tarch::la::Vector< Dimensions, double > & v(const Particle &particle)
Definition Tracer.h:48
static tarch::la::Vector< Dimensions, double > & v(Particle &particle)
Definition Tracer.h:46
static const tarch::la::Vector< Dimensions, double > & x(const Particle &particle)
Definition Tracer.h:44
static tarch::la::Vector< Dimensions, double > & x(Particle &particle)
Definition Tracer.h:42