This code is a direct translation from a C# code (https://github.com/tclaro/ipen), which was a direct translation from a Pascal code written decades ago, so please don't expect it to look Swift-ish yet, maybe at some point in the future when (if) I fully understand the math behind it.
The goal here is to use numerical method for solving first-order differential equation, when using multi-compartment models to calculate radiation dosimetry.
For more details please check this paper written by my professor and friend Thiago Claro: http://www.teses.usp.br/teses/disponiveis/85/85131/tde-20122011-090939/pt-br.php
Please also check the original Github repository above mentioned.