arrays - 'Repa' performance for planetary simulation -


i have written simulation of outer planets of solar system using euler symplectic method , implemented a) using repa , b) using yarr.

yarr seems perform x30 quicker repa.

given this, didn't try use parallelism. there obvious performance problems in repa code? repository @ github. can produce cut-down repa-only version if helpful, won't performance comparison against yarr.

alternatively, how debug performance issues in repa?

most euler numeric integration methods suffer cumulative round-off error cause simulation "blow up". may want investigate advanced numerical integration methods, such 4th-order runge-kutta or predictor-corrector.

another place n-body problem simulations become sticky when 2 bodies close, such moon eccentric orbit planet. if 1 uses fixed time increments simulation, error during large changes of angular velocity can lead division-by-zero errors or division small values result in simulation blowing up. use of variable delta-t depends on angular velocity can beneficial.

these suggestions based on running many such simulations project undergraduate physics course took in 1973, while testing various numerical integration methods. runge-kutta , predictor corrector methods have been around since dawn of digital computing , number of books available. see, e.g., numerical recipes: art of scientific computing william h. press, brian p. flannery, saul a. teukolsky , william t. vetterling. (cambridge university press, 1989)


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -