knelli2 / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org/
Other
0 stars 1 forks source link

Quaternion FunctionOfTime is slow #11

Open knelli2 opened 3 years ago

knelli2 commented 3 years ago

While testing control systems, I noticed that the map that uses a QuaternionFunctionOfTime took a lot longer that the map that just uses an angle (rotation about Z). This is most likely due to the fact that the quat FoT has to solve an ODE every time that the map wants to compute something (because it has to get the rotation matrix which uses quaternions).

Not clear at the moment whether this is a real issue or not because so many other things could take longer. An idea to solve this would be to cache the rotation matrix (or the maps themselves) so that we don't have to recompute if the map was already calculated at that time