EmelineBolmont / mercury-90

Automatically exported from code.google.com/p/mercury-90
3 stars 2 forks source link

increase speed of mfo_user #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
the same calculation seems to be done several times per time(step?). Since for 
a given time positions of the planets might not change, maybe we can test 
'time' and see if, regarding a previous value stored with the 'save' command we 
could reuse old values. 

A problem that might occure is that we can't store an array whose size is given 
in parameter of the subroutine. 

To be tested when I'll have time.

The motivation for the implementation is that for a given time, mfo_user is 
called more than 10 times (I think). This can easilly be seen by using a 
counter and writing some outputs including time and the counter.

Original issue reported on code.google.com by ccos...@gmail.com on 2 Sep 2011 at 12:16

GoogleCodeExporter commented 9 years ago
we can store an array if she is define as a global variable of the module. 
Thus, we can allocate or whatever and store values.

Original comment by ccos...@gmail.com on 7 Sep 2011 at 10:06

GoogleCodeExporter commented 9 years ago
The problem might occurs only for some algorithms that change timestep and redo 
integration for a given timestep when the accuracy is not sufficient. 

Thus, It might not be relevant to store all thoses informations for all 
algorithms, and might not be relevant at all to test this to try to improve 
speed since calculation are done several time only when the accuracy is not 
good, the rest of the time, I don't see any reasons to do the same timestep 
more than once.

Priority is passed to very low, and I don't thing I will ever do this thing.

Original comment by ccos...@gmail.com on 23 Sep 2011 at 9:30