We already have a correct implementation for the line cooling in Magrittetorch, so it might be useful to port this implementation to c++.