pauleaster / rns.rs

Rust port of the RNS C code. This code calculates the rotation profiles of rapidly rotating neutron stars.
0 stars 1 forks source link

iterp is called with same state and recalculates, should mut parameters be used? #3

Closed pauleaster closed 2 years ago

pauleaster commented 2 years ago

Is it worth pulling out the nearest value returned from hun within intep()? To be consistent with rust idioms and program consistency, it is better to add this to the return value, even though the code may be more complex. The other solution is to follow the C code more closely and make nearest mutable. So far I have been able to resist mut parameters with the exception of arrays in tov(). I will attempt to convert the mut parameters to return values.

pauleaster commented 2 years ago

Decided to pull out the nearest grid points and refactored the code accordingly.