19 January 2020 11:30:34 AM FD1D_BURGERS_LEAP: C version Solve the non-viscous time-dependent Burgers equation, using the leap-frog method. Equation to be solved: du/dt + u * du/dx = 0 for x in [ a, b ], for t in [t_init, t_last] with initial conditions: u(x,o) = u_init and boundary conditions: u(a,t) = u_a(t), u(b,t) = u_b(t) -1.000000 <= X <= 1.000000 Number of nodes = 21 DX = 0.100000 0.000000 <= T <= 3.000000 Number of time steps = 30 DT = 0.100000 X: -1.000000 -0.900000 -0.800000 -0.700000 -0.600000 -0.500000 -0.500000 -0.400000 -0.300000 -0.200000 -0.100000 0.000000 0.000000 0.100000 0.200000 0.300000 0.400000 0.500000 0.500000 0.600000 0.700000 0.800000 0.900000 1.000000 1.000000 STEP = 0 TIME = 0.000000 0.500000 0.466525 0.429553 0.388800 0.344042 0.295167 0.242238 0.185547 0.125666 0.063451 0.000000 -0.063451 -0.125666 -0.185547 -0.242238 -0.295167 -0.344042 -0.388800 -0.429553 -0.466525 -0.500000 STEP = 1 TIME = 0.100000 0.500000 0.482957 0.446247 0.405424 0.360149 0.310192 0.255515 0.196362 0.133338 0.067438 0.000000 -0.067438 -0.133338 -0.196362 -0.255515 -0.310192 -0.360149 -0.405424 -0.446247 -0.482957 -0.500000 STEP = 2 TIME = 0.200000 0.500000 0.492485 0.464152 0.423706 0.378339 0.327624 0.271323 0.209538 0.142856 0.072443 0.000000 -0.072443 -0.142856 -0.209538 -0.271323 -0.327624 -0.378339 -0.423706 -0.464152 -0.492485 -0.500000 STEP = 3 TIME = 0.300000 0.500000 0.500611 0.478171 0.441783 0.396500 0.345253 0.287554 0.223281 0.152922 0.077787 0.000000 -0.077787 -0.152922 -0.223281 -0.287554 -0.345253 -0.396500 -0.441783 -0.478171 -0.500611 -0.500000 STEP = 4 TIME = 0.400000 0.500000 0.503413 0.492282 0.459787 0.416614 0.365238 0.306397 0.239599 0.165106 0.084338 0.000000 -0.084338 -0.165106 -0.239599 -0.306397 -0.365238 -0.416614 -0.459787 -0.492282 -0.503413 -0.500000 STEP = 5 TIME = 0.500000 0.500000 0.504497 0.499647 0.476575 0.435891 0.385508 0.326050 0.257134 0.178557 0.091712 0.000000 -0.091712 -0.178557 -0.257134 -0.326050 -0.385508 -0.435891 -0.476575 -0.499647 -0.504497 -0.500000 STEP = 6 TIME = 0.600000 0.500000 0.503591 0.506233 0.490171 0.456309 0.407582 0.348253 0.277524 0.194643 0.100714 0.000000 -0.100714 -0.194643 -0.277524 -0.348253 -0.407582 -0.456309 -0.490171 -0.506233 -0.503591 -0.500000 STEP = 7 TIME = 0.700000 0.500000 0.501358 0.506440 0.501046 0.473577 0.429550 0.371343 0.299764 0.212972 0.111315 0.000000 -0.111315 -0.212972 -0.299764 -0.371343 -0.429550 -0.473577 -0.501046 -0.506440 -0.501358 -0.500000 STEP = 8 TIME = 0.800000 0.500000 0.500362 0.506391 0.506638 0.490168 0.451497 0.396448 0.324998 0.234777 0.124421 0.000000 -0.124421 -0.234777 -0.324998 -0.396448 -0.451497 -0.490168 -0.506638 -0.506391 -0.500362 -0.500000 STEP = 9 TIME = 0.900000 0.500000 0.498160 0.503263 0.509266 0.500605 0.471864 0.421493 0.352307 0.260063 0.140526 0.000000 -0.140526 -0.260063 -0.352307 -0.421493 -0.471864 -0.500605 -0.509266 -0.503263 -0.498160 -0.500000 STEP = 10 TIME = 1.000000 0.500000 0.498737 0.500802 0.507991 0.508891 0.488827 0.446841 0.381871 0.289854 0.160967 0.000000 -0.160967 -0.289854 -0.381871 -0.446841 -0.488827 -0.508891 -0.507991 -0.500802 -0.498737 -0.500000 STEP = 11 TIME = 1.100000 0.500000 0.497760 0.498628 0.505156 0.510357 0.502196 0.469285 0.412256 0.324093 0.187183 0.000000 -0.187183 -0.324093 -0.412256 -0.469285 -0.502196 -0.510357 -0.505156 -0.498628 -0.497760 -0.500000 STEP = 12 TIME = 1.200000 0.500000 0.499420 0.497114 0.502066 0.510402 0.509454 0.489048 0.441728 0.362798 0.221631 0.000000 -0.221631 -0.362798 -0.441728 -0.489048 -0.509454 -0.510402 -0.502066 -0.497114 -0.499420 -0.500000 STEP = 13 TIME = 1.300000 0.500000 0.499201 0.497313 0.498485 0.506587 0.513075 0.502406 0.468024 0.403943 0.267590 0.000000 -0.267590 -0.403943 -0.468024 -0.502406 -0.513075 -0.506587 -0.498485 -0.497313 -0.499201 -0.500000 STEP = 14 TIME = 1.400000 0.500000 0.500761 0.497470 0.497443 0.503011 0.511598 0.511682 0.487811 0.443762 0.329722 0.000000 -0.329722 -0.443762 -0.487811 -0.511682 -0.511598 -0.503011 -0.497443 -0.497470 -0.500761 -0.500000 STEP = 15 TIME = 1.500000 0.500000 0.500468 0.498963 0.495728 0.499466 0.508639 0.514578 0.501156 0.474097 0.413909 0.000000 -0.413909 -0.474097 -0.501156 -0.514578 -0.508639 -0.499466 -0.495728 -0.498963 -0.500468 -0.500000 STEP = 16 TIME = 1.600000 0.500000 0.501280 0.499835 0.497194 0.496563 0.503912 0.515532 0.508098 0.485126 0.525955 0.000000 -0.525955 -0.485126 -0.508098 -0.515532 -0.503912 -0.496563 -0.497194 -0.499835 -0.501280 -0.500000 STEP = 17 TIME = 1.700000 0.500000 0.500551 0.501006 0.497356 0.496130 0.499080 0.512420 0.516606 0.465434 0.669063 0.000000 -0.669063 -0.465434 -0.516606 -0.512420 -0.499080 -0.496130 -0.497356 -0.501006 -0.500551 -0.500000 STEP = 18 TIME = 1.800000 0.500000 0.500776 0.501436 0.499618 0.495707 0.495782 0.506552 0.532371 0.414167 0.837360 0.000000 -0.837360 -0.414167 -0.532371 -0.506552 -0.495782 -0.495707 -0.499618 -0.501436 -0.500776 -0.500000 STEP = 19 TIME = 1.900000 0.500000 0.499832 0.501587 0.500218 0.498032 0.493703 0.493886 0.565789 0.339118 1.015870 0.000000 -1.015870 -0.339118 -0.565789 -0.493886 -0.493703 -0.498032 -0.500218 -0.501587 -0.499832 -0.500000 STEP = 20 TIME = 2.000000 0.500000 0.499983 0.501242 0.501396 0.498952 0.497829 0.470950 0.619937 0.261536 1.181860 0.000000 -1.181860 -0.261536 -0.619937 -0.470950 -0.497829 -0.498952 -0.501396 -0.501242 -0.499983 -0.500000 STEP = 21 TIME = 2.100000 0.500000 0.499211 0.500878 0.501366 0.499812 0.507643 0.436379 0.695612 0.192155 1.324969 0.000000 -1.324969 -0.192155 -0.695612 -0.436379 -0.507643 -0.499812 -0.501366 -0.500878 -0.499211 -0.500000 STEP = 22 TIME = 2.200000 0.500000 0.499545 0.500163 0.501931 0.495814 0.530031 0.388924 0.789823 0.140602 1.436459 0.000000 -1.436459 -0.140602 -0.789823 -0.388924 -0.530031 -0.495814 -0.501931 -0.500163 -0.499545 -0.500000 STEP = 23 TIME = 2.300000 0.500000 0.499129 0.499685 0.503549 0.485880 0.564298 0.335340 0.891742 0.101236 1.526939 0.000000 -1.526939 -0.101236 -0.891742 -0.335340 -0.564298 -0.485880 -0.503549 -0.499685 -0.499129 -0.500000 STEP = 24 TIME = 2.400000 0.500000 0.499702 0.497954 0.508883 0.466297 0.614980 0.279119 0.998583 0.076298 1.591040 0.000000 -1.591040 -0.076298 -0.998583 -0.279119 -0.614980 -0.466297 -0.508883 -0.497954 -0.499702 -0.500000 STEP = 25 TIME = 2.500000 0.500000 0.500152 0.495113 0.519658 0.436407 0.679409 0.228269 1.094276 0.056033 1.648331 0.000000 -1.648331 -0.056033 -1.094276 -0.228269 -0.679409 -0.436407 -0.519658 -0.495113 -0.500152 -0.500000 STEP = 26 TIME = 2.600000 0.500000 0.502146 0.488296 0.539390 0.396581 0.756391 0.184418 1.187056 0.045252 1.683401 0.000000 -1.683401 -0.045252 -1.187056 -0.184418 -0.756391 -0.396581 -0.539390 -0.488296 -0.502146 -0.500000 STEP = 27 TIME = 2.700000 0.500000 0.506029 0.476927 0.569129 0.350348 0.839887 0.148846 1.259474 0.033572 1.724509 0.000000 -1.724509 -0.033572 -1.259474 -0.148846 -0.839887 -0.350348 -0.569129 -0.476927 -0.506029 -0.500000 STEP = 28 TIME = 2.800000 0.500000 0.513822 0.458202 0.611430 0.301721 0.925630 0.121964 1.332241 0.029640 1.741297 0.000000 -1.741297 -0.029640 -1.332241 -0.121964 -0.925630 -0.301721 -0.611430 -0.458202 -0.513822 -0.500000 STEP = 29 TIME = 2.900000 0.500000 0.527505 0.432203 0.664806 0.255547 1.006276 0.099254 1.382472 0.021448 1.776121 0.000000 -1.776121 -0.021448 -1.382472 -0.099254 -1.006276 -0.255547 -0.664806 -0.432203 -0.527505 -0.500000 STEP = 30 TIME = 3.000000 0.500000 0.549585 0.398860 0.728872 0.214460 1.082904 0.084625 1.439806 0.021197 1.779391 0.000000 -1.779391 -0.021197 -1.439806 -0.084625 -1.082904 -0.214460 -0.728872 -0.398860 -0.549585 -0.500000 FD1D_BURGERS_LEAP: Normal end of execution. 19 January 2020 11:30:34 AM