Maximilian Reininghaus @zv2315 · 3 months ago
Owner
Furthermore, we should investigate whether the compiler creates vectorized instructions (depends strongly on the compilation options, like -march or -O1/2/3) and write our code appropriately to be "vectorization-friendly".
The eigen library probably does something very similar to our "demo/modular/template". At some point it will become quite complex for us to replicate a lot of this, but if we really need it we have to think of using e.g. eigen as an external library.
e46991e9 introduces the pure virtual class BaseTrajectory and functionality to parametrize trajectories with start/end times as well as with numbers from [0;1].
But BaseTrajector is not complete at this moment. This is just an interface definition of GetPosition(time), but this does not define a trajectory.
A trajectory has a start and an end point, so it must provide something like this:
GetStartPoint
GetEndPoint
GetPoint(double where) with where 0...1 (0->StartPoint, 1->EndPoint)
GetDistance(double where1, double where2)
And eventually the same with "where" replaceed by "time", but then we also need "GetStartTime" and "GetEndTime" and any calls outside 0<where<1 and outside start/end time should fail, probably with an exception.
The main importance of Trajectory will be for integration. We will need to integrate matter densities along a trajectory (and similar) using a general RungeKutta/Newton (or whatever) integrator interface.
Did you check the Trajectory class? BaseTrajectory defines just the abstract interface of GetPosition(TimeType) while Trajectory implements almost all of the functions you mentioned on top of that.
...So a Line, and a Helix are not by default Trajectories, they are simple and well defined geometric objects. A trajectory must be more than just that, see previous comment. This also mean we have to rename the current "LineTrajectory" class into just "Line", since there is a concept behind trajectory, which is not present in the LineTrajectory right now (and also should not).
Hi Max, I see... this is almost perfect. Then we can consider this Issue closed. I was confused by the name BaseTrajectory, and in fact I will open a new Issue to rename that...