09 October 2013 10:11:00 PM RK4_PRB C++ version Test the RK4 library. TEST01 RK4 takes one Runge Kutta step for a scalar ODE. T U[T] 0 0.5 0.1 0.552493 0.2 0.609889 0.3 0.671912 0.4 0.738061 0.5 0.807573 0.6 0.879409 0.7 0.952248 0.8 1.0245 0.9 1.09437 1 1.15989 1.1 1.21904 1.2 1.26984 1.3 1.3105 1.4 1.33951 1.5 1.35574 1.6 1.35856 1.7 1.34786 1.8 1.32406 1.9 1.28808 2 1.24129 2.1 1.18538 2.2 1.12226 2.3 1.05396 2.4 0.982471 2.5 0.909668 2.6 0.837239 2.7 0.766617 2.8 0.698962 2.9 0.635147 3 0.575781 3.1 0.521229 3.2 0.471648 3.3 0.427034 3.4 0.387249 3.5 0.352068 3.6 0.321208 3.7 0.294351 3.8 0.271171 3.9 0.251349 4 0.234582 4.1 0.220596 4.2 0.209146 4.3 0.200025 4.4 0.193061 4.5 0.18812 4.6 0.185104 4.7 0.183954 4.8 0.184647 4.9 0.187196 5 0.191653 5.1 0.198104 5.2 0.206676 5.3 0.217531 5.4 0.230868 5.5 0.246921 5.6 0.265959 5.7 0.288277 5.8 0.314193 5.9 0.344031 6 0.378113 6.1 0.416733 6.2 0.460134 6.3 0.508478 6.4 0.561806 6.5 0.620005 6.6 0.682764 6.7 0.749538 6.8 0.819522 6.9 0.891627 7 0.964485 7.1 1.03647 7.2 1.10575 7.3 1.17033 7.4 1.22821 7.5 1.27743 7.6 1.31623 7.7 1.34315 7.8 1.35716 7.9 1.3577 8 1.34475 8.1 1.31883 8.2 1.28093 8.3 1.23247 8.4 1.17522 8.5 1.11109 8.6 1.04211 8.7 0.970272 8.8 0.897421 8.9 0.825202 9 0.755006 9.1 0.687943 9.2 0.624841 9.3 0.566265 9.4 0.512542 9.5 0.463802 9.6 0.420011 9.7 0.381018 9.8 0.346585 9.9 0.316421 10 0.290205 10.1 0.267612 10.2 0.248324 10.3 0.232043 10.4 0.218499 10.5 0.207455 10.6 0.198707 10.7 0.192092 10.8 0.18748 10.9 0.184781 11 0.183942 11.1 0.184945 11.2 0.18781 11.3 0.192595 11.4 0.199393 11.5 0.208337 11.6 0.219594 11.7 0.23337 11.8 0.249906 11.9 0.269474 12 0.292374 12.1 0.318927 12.2 0.349456 12.3 0.384282 12.4 0.423691 12.5 0.467915 12.6 0.517097 12.7 0.571257 12.8 0.630251 12.9 0.69373 13 0.761108 13.1 0.831531 13.2 0.903866 13.3 0.976698 13.4 1.04836 13.5 1.11699 13.6 1.18059 13.7 1.23715 13.8 1.28473 13.9 1.32162 14 1.34643 14.1 1.3582 14.2 1.35646 14.3 1.34128 14.4 1.31326 14.5 1.27347 14.6 1.22341 14.7 1.16486 14.8 1.09977 14.9 1.03018 15 0.958046 15.1 0.885192 15.2 0.813224 15.3 0.743485 15.4 0.677037 15.5 0.614664 15.6 0.556887 15.7 0.503997 15.8 0.456095 15.9 0.413125 16 0.374917 16.1 0.341223 16.2 0.311745 16.3 0.286161 16.4 0.264146 16.5 0.245384 16.6 0.229581 16.7 0.216473 16.8 0.205828 16.9 0.19745 17 0.191179 17.1 0.186894 17.2 0.184511 17.3 0.183981 17.4 0.185295 17.5 0.188478 17.6 0.193594 17.7 0.200743 17.8 0.210063 17.9 0.221728 18 0.23595 18.1 0.252976 18.2 0.273083 18.3 0.296575 18.4 0.323773 18.5 0.355003 18.6 0.390581 18.7 0.430785 18.8 0.475836 18.9 0.525858 19 0.580846 19.1 0.640624 19.2 0.704806 19.3 0.772763 19.4 0.843596 19.5 0.91612 19.6 0.988878 19.7 1.06017 19.8 1.12809 19.9 1.19065 20 1.24582 20.1 1.29172 20.2 1.32667 20.3 1.34934 20.4 1.35886 20.5 1.35484 20.6 1.33744 20.7 1.30735 20.8 1.26573 20.9 1.21411 21 1.15432 21.1 1.08833 21.2 1.01818 21.3 0.945799 21.4 0.872989 21.5 0.801309 21.6 0.732057 21.7 0.666247 21.8 0.604617 21.9 0.547647 22 0.495594 22.1 0.448528 22.2 0.406373 22.3 0.368944 22.4 0.33598 22.5 0.30718 22.6 0.282219 22.7 0.260772 22.8 0.242527 22.9 0.227195 23 0.214517 23.1 0.204266 23.2 0.196252 23.3 0.190323 23.4 0.186362 23.5 0.184293 23.6 0.184073 23.7 0.185698 23.8 0.189201 23.9 0.194651 24 0.202154 24.1 0.211855 24.2 0.223934 24.3 0.23861 24.4 0.256133 24.5 0.276788 24.6 0.30088 24.7 0.328733 24.8 0.360673 24.9 0.39701 25 0.438016 25.1 0.483897 25.2 0.534759 25.3 0.59057 25.4 0.651121 25.5 0.71599 25.6 0.784501 25.7 0.855708 25.8 0.928381 25.9 1.00102 26 1.07188 26.1 1.13904 26.2 1.20049 26.3 1.25424 26.4 1.29841 26.5 1.33137 26.6 1.35188 26.7 1.35913 26.8 1.35284 26.9 1.33324 27 1.30112 27.1 1.2577 27.2 1.20457 27.3 1.1436 27.4 1.07677 27.5 1.00611 27.6 0.933541 27.7 0.860818 27.8 0.789463 27.9 0.720727 28 0.655575 28.1 0.594702 28.2 0.538546 28.3 0.487331 28.4 0.4411 28.5 0.399755 28.6 0.363096 28.7 0.330855 28.8 0.302723 28.9 0.278375 29 0.257488 29.1 0.239753 29.2 0.224884 29.3 0.212629 29.4 0.202766 29.5 0.195113 29.6 0.189522 29.7 0.185884 29.8 0.184127 29.9 0.184217 30 0.186154 30.1 0.189979 30.2 0.195765 30.3 0.203627 30.4 0.213714 30.5 0.226214 30.6 0.24135 30.7 0.259379 30.8 0.28059 30.9 0.305292 31 0.333809 31.1 0.366468 31.2 0.403572 31.3 0.445386 31.4 0.4921 31.5 0.5438 31.6 0.600428 31.7 0.661742 31.8 0.727277 31.9 0.796316 32 0.867863 32.1 0.940642 32.2 1.01311 32.3 1.08348 32.4 1.14983 32.5 1.21012 32.6 1.26238 32.7 1.30477 32.8 1.33572 32.9 1.35404 33 1.35902 33.1 1.35046 33.2 1.32869 33.3 1.29457 33.4 1.2494 33.5 1.19482 33.6 1.13272 33.7 1.06511 33.8 0.993991 33.9 0.921279 34 0.848687 34.1 0.777693 34.2 0.709499 34.3 0.645026 34.4 0.584921 34.5 0.529586 34.6 0.47921 34.7 0.433811 34.8 0.39327 34.9 0.357374 35 0.325846 35.1 0.298373 35.2 0.27463 35.3 0.254294 35.4 0.23706 35.5 0.222647 35.6 0.210809 35.7 0.201329 35.8 0.194032 35.9 0.188776 36 0.185458 36.1 0.184013 36.2 0.184413 36.3 0.186664 36.4 0.190812 36.5 0.196938 36.6 0.205163 36.7 0.215642 36.8 0.228568 36.9 0.244172 37 0.262715 37.1 0.28449 37.2 0.309811 37.3 0.339003 37.4 0.372388 37.5 0.410267 37.6 0.452894 37.7 0.500444 TEST02 RK4VEC takes a Runge Kutta step for a vector ODE. T U[0] U[1] 0 0 1 0.2 0.198667 0.980067 0.4 0.389413 0.921062 0.6 0.564635 0.825339 0.8 0.717347 0.696713 1 0.841462 0.540312 1.2 0.932031 0.362371 1.4 0.985444 0.169985 1.6 0.999571 -0.0291784 1.8 0.973849 -0.227178 2 0.909304 -0.416121 2.2 0.808509 -0.588475 2.4 0.675483 -0.737368 2.6 0.515528 -0.856866 2.8 0.335021 -0.942204 3 0.141158 -0.98998 3.2 -0.0583317 -0.99829 3.4 -0.255496 -0.966802 3.6 -0.442474 -0.896772 3.8 -0.611813 -0.790992 4 -0.756761 -0.653678 4.2 -0.871541 -0.490304 4.4 -0.951575 -0.307385 4.6 -0.993674 -0.112211 4.8 -0.99616 0.0874352 5 -0.958932 0.283596 5.2 -0.883477 0.468451 5.4 -0.7728 0.63463 5.6 -0.631316 0.77551 5.8 -0.464664 0.885473 6 -0.279488 0.960136 6.2 -0.0831695 0.996522 6.4 0.116464 0.993181 6.6 0.311454 0.950246 6.8 0.494028 0.869429 7 0.656907 0.753951 7.2 0.793598 0.608417 7.4 0.898651 0.438628 7.6 0.967878 0.251352 7.8 0.998521 0.0540569 8 0.989356 -0.145393 8.2 0.94075 -0.339047 8.4 0.85464 -0.519185 8.6 0.73446 -0.678624 8.8 0.585 -0.81101 9 0.412218 -0.911063 9.2 0.223003 -0.974797 9.4 0.0248984 -0.999669 9.6 -0.174199 -0.984689 9.8 -0.366351 -0.930453 10 -0.543899 -0.839124 10.2 -0.699763 -0.714343 10.4 -0.827731 -0.561085 10.6 -0.9227 -0.385458 10.8 -0.980885 -0.194465 11 -0.999967 0.00428102 11.2 -0.979183 0.202856 11.4 -0.919364 0.393343 11.6 -0.822894 0.56815 11.8 -0.693619 0.720306 12 -0.536692 0.843747 12.2 -0.358369 0.933551 12.4 -0.16576 0.986138 12.6 0.0334566 0.999412 12.8 0.23134 0.972844 13 0.42 0.907492 13.2 0.591916 0.805963 13.4 0.740236 0.672304 13.6 0.859045 0.511842 13.8 0.943607 0.330976 14 0.990552 0.136915 14.2 0.998007 -0.0626035 14.4 0.965676 -0.259626 14.6 0.894848 -0.446299 14.8 0.788346 -0.615179 15 0.650416 -0.759535 15.2 0.486557 -0.87361 15.4 0.303301 -0.952859 15.6 0.107954 -0.994121 15.8 -0.0916969 -0.995752 16 -0.287692 -0.957686 16.2 -0.472217 -0.881441 16.4 -0.637918 -0.770058 16.6 -0.778187 -0.627975 16.8 -0.887432 -0.460857 17 -0.9613 -0.275368 17.2 -0.996844 -0.0789006 17.4 -0.992649 0.120712 17.6 -0.948881 0.315512 17.8 -0.867285 0.497734 18 -0.751114 0.660113 18.2 -0.604999 0.796176 18.4 -0.434766 0.900498 18.6 -0.2472 0.968922 18.8 -0.0497804 0.998719 19 0.149624 0.9887 19.2 0.343063 0.939267 19.4 0.522826 0.852389 19.6 0.681746 0.73153 19.8 0.813487 0.581508 20 0.912798 0.408304 20.2 0.975719 0.218823 20.4 0.999742 0.020618 20.6 0.98391 -0.178408 20.8 0.928854 -0.370322 21 0.836768 -0.547473 21.2 0.711324 -0.702798 21.4 0.557522 -0.830105 21.6 0.381495 -0.924319 21.8 0.190259 -0.981685 22 -0.00856175 -0.999915 22.2 -0.207041 -0.978282 22.4 -0.397266 -0.91765 22.6 -0.571653 -0.820434 22.8 -0.723251 -0.690512 23 -0.846016 -0.533062 23.2 -0.935054 -0.354361 23.4 -0.986815 -0.161533 23.6 -0.999236 0.037734 23.8 -0.971821 0.235497 24 -0.905664 0.423871 24.2 -0.803402 0.595347 24.4 -0.669112 0.743089 24.6 -0.508147 0.861207 24.8 -0.326925 0.944992 25 -0.13267 0.991104 25.2 0.0668739 0.997706 25.4 0.263752 0.964532 25.6 0.450115 0.892907 25.8 0.618533 0.785686 26 0.762294 0.647143 26.2 0.875664 0.482801 26.4 0.954126 0.299212 26.6 0.99455 0.103694 26.8 0.995326 -0.0959566 27 0.956422 -0.291782 27.2 0.87939 -0.475975 27.4 0.767301 -0.641193 27.6 0.624622 -0.780849 27.8 0.457043 -0.889376 28 0.271243 -0.962447 28.2 0.0746304 -0.997149 28.4 -0.124957 -0.992099 28.6 -0.319564 -0.947498 28.8 -0.50143 -0.865125 29 -0.663306 -0.748262 29.2 -0.798739 -0.60157 29.4 -0.90233 -0.430896 29.6 -0.969948 -0.243044 29.8 -0.998898 -0.0455032 30 -0.988027 0.153852 30.2 -0.937767 0.347073 30.4 -0.850122 0.526458 30.6 -0.728587 0.684855 30.8 -0.578006 0.815949 31 -0.404383 0.914515 31.2 -0.214638 0.976623 31.4 -0.0163374 0.999797 31.6 0.182615 0.983114 31.8 0.374286 0.927237 32 0.551037 0.834396 32.2 0.705819 0.708291 32.4 0.832464 0.55395 32.6 0.925922 0.377525 32.8 0.982467 0.18605 33 0.999845 -0.0128421 33.2 0.977363 -0.211222 33.4 0.915918 -0.401181 33.6 0.81796 -0.575147 33.8 0.687392 -0.726183 34 0.529422 -0.84827 34.2 0.350346 -0.93654 34.4 0.157303 -0.987473 34.6 -0.0420105 -0.999041 34.8 -0.239649 -0.97078 35 -0.427734 -0.903819 35.2 -0.598766 -0.800827 35.4 -0.745929 -0.665908 35.6 -0.863353 -0.504444 35.8 -0.94636 -0.322869 36 -0.991639 -0.128423 36.2 -0.997386 0.0711428 36.4 -0.963371 0.267872 36.6 -0.890951 0.453922 36.8 -0.783012 0.621876 37 -0.643858 0.765038 37.2 -0.479036 0.877702 37.4 -0.295117 0.955375 37.6 -0.0994331 0.994961 37.8 0.100214 0.994882 RK4_PRB Normal end of execution. 09 October 2013 10:11:00 PM