4 #include "sll_memory.h"
5 #include "sll_working_precision.h"
264 sll_real64,
dimension(:),
intent(in):: uxn, uyn
265 sll_real64,
intent(in) :: dt
266 sll_real64,
intent(in) :: x1, x2
267 sll_real64,
intent(out) :: y1, y2
268 sll_int32,
intent(in) :: i
335 subroutine compute_characteristic_leapfrog_2d_hex(x1, x2, uxn, uyn, dxux, dyux, dxuy, dyuy, i, y1, y2, dt)
337 sll_real64,
dimension(:),
intent(in):: uxn, uyn, dxux, dyux, dxuy, dyuy
338 sll_real64,
intent(in) :: dt
339 sll_real64,
intent(in) :: x1, x2
340 sll_real64,
intent(out) :: y1, y2
341 sll_int32,
intent(in) :: i
342 sll_real64 :: d1x, d1y, dij0, dij1
347 dij0 = d1x - dt*(d1x*dxux(i) + d1y*dyux(i))
348 dij1 = d1y - dt*(d1y*dyuy(i) + d1x*dxuy(i))
350 y1 = x1 - 2._f64*dij0
351 y2 = x2 - 2._f64*dij1
356 dxuxn, dyuxn, dxuyn, dyuyn, i, y1, y2, dt)
357 sll_real64,
dimension(:),
intent(in):: uxn, uyn, uxn_1, uyn_1
358 sll_real64,
dimension(:),
intent(in):: dxuxn, dyuxn, dxuyn, dyuyn
359 sll_real64,
intent(in) :: dt
360 sll_real64,
intent(in) :: x1, x2
361 sll_real64,
intent(out) :: y1, y2
362 sll_int32,
intent(in) :: i
363 sll_real64 :: d1x, d1y, dij0, dij1, uxn1, uyn1
365 uxn1 = 2._f64*uxn(i) - uxn_1(i)
366 uyn1 = 2._f64*uyn(i) - uyn_1(i)
368 d1x = 0.5_f64*dt*(uxn1 + uxn(i))
369 d1y = 0.5_f64*dt*(uyn1 + uyn(i))
371 dij0 = d1x - 0.5_f64*dt*(d1x*dxuxn(i) + d1y*dyuxn(i))
372 dij1 = d1y - 0.5_f64*dt*(d1x*dxuyn(i) + d1y*dyuyn(i))
380 uxn_2, uyn_2, dxuxn, dyuxn, dxuyn, dyuyn, i, y1, y2, dt)
381 sll_real64,
dimension(:),
intent(in):: uxn, uyn, uxn_1, uyn_1, uxn_2, uyn_2
382 sll_real64,
dimension(:),
intent(in):: dxuxn, dyuxn, dxuyn, dyuyn
383 sll_real64,
intent(in) :: dt
384 sll_real64,
intent(in) :: x1, x2
385 sll_real64,
intent(out) :: y1, y2
386 sll_int32,
intent(in) :: i
387 sll_real64 :: d1x, d1y, dij0, dij1, uxn1, uyn1, erreur
388 sll_real64 :: a, b, c, d, det, gx, gy, xn, yn, xn_1, yn_1
389 sll_real64 :: uxn_loc, uyn_loc, uxn_1_loc, uyn_1_loc
390 sll_real64 :: dxuxn_loc, dyuxn_loc, dxuyn_loc, dyuyn_loc
391 sll_real64 :: dxuxn_1_loc, dyuxn_1_loc, dxuyn_1_loc, dyuyn_1_loc
395 dummy = dxuxn(1) + dxuyn(1) + dyuxn(1) + dyuyn(1)
398 uxn1 = 3._f64*uxn(i) - 3._f64*uxn_1(i) + uxn_2(i)
399 uyn1 = 3._f64*uyn(i) - 3._f64*uyn_1(i) + uyn_2(i)
404 d1x = dt*(5._f64*uxn1 + 8._f64*uxn_1(i) - uxn_2(i))/12._f64
405 d1y = dt*(5._f64*uyn1 + 8._f64*uyn_1(i) - uyn_2(i))/12._f64
409 do while (erreur > 1.e-12)
417 xn_1 = x1 - 2._f64*dt*(uxn1 + 2*uxn_loc) + 4._f64*d1x
418 yn_1 = x2 - 2._f64*dt*(uyn1 + 2*uyn_loc) + 4._f64*d1y
423 a = 1._f64 + dt*(2._f64*dxuxn_loc - dxuxn_1_loc)/3._f64
424 b = dt*(2._f64*dyuxn_loc - dyuxn_1_loc)/3._f64
425 c = dt*(2._f64*dxuyn_loc - dxuyn_1_loc)/3._f64
426 d = 1._f64 + dt*(2._f64*dyuyn_loc - dyuyn_1_loc)/3._f64
435 gx = d1x - dt*(8._f64*uxn_loc - uxn_1_loc + 5._f64*uxn1)/12._f64
436 gy = d1y - dt*(8._f64*uyn_loc - uyn_1_loc + 5._f64*uyn1)/12._f64
438 dij0 = d1x - (+d*gx - b*gy)
439 dij1 = d1y - (-c*gx + a*gy)
441 erreur = abs(gx) + abs(gy)
453 uxn_2, uyn_2, uxn_3, uyn_3, dxuxn, dyuxn, dxuyn, dyuyn, i, y1, y2, dt)
454 sll_real64,
dimension(:),
intent(in):: uxn, uyn, uxn_1, uyn_1, uxn_2, uyn_2
455 sll_real64,
dimension(:),
intent(in):: uxn_3, uyn_3
456 sll_real64,
dimension(:),
intent(in):: dxuxn, dyuxn, dxuyn, dyuyn
457 sll_real64,
intent(in) :: dt
458 sll_real64,
intent(in) :: x1, x2
459 sll_real64,
intent(out) :: y1, y2
460 sll_int32,
intent(in) :: i
461 sll_real64 :: d1x, d1y, dij0, dij1, uxn1, uyn1, erreur
462 sll_real64 :: a, b, c, d, det, gx, gy, xn, yn, xn_1, yn_1
463 sll_real64 :: xn_2, yn_2
464 sll_real64 :: uxn_loc, uyn_loc, uxn_1_loc, uyn_1_loc, uxn_2_loc, uyn_2_loc
465 sll_real64 :: dxuxn_loc, dyuxn_loc, dxuyn_loc, dyuyn_loc
466 sll_real64 :: dxuxn_1_loc, dyuxn_1_loc, dxuyn_1_loc, dyuyn_1_loc
467 sll_real64 :: dxuxn_2_loc, dyuxn_2_loc, dxuyn_2_loc, dyuyn_2_loc
470 dummy = dxuxn(1) + dxuyn(1) + dyuxn(1) + dyuyn(1) + uyn_3(1)
473 uxn1 = 4._f64*uxn(i) - 6._f64*uxn_1(i) + 4._f64*uxn_2(i) - uxn_3(i)
474 uyn1 = 4._f64*uyn(i) - 6._f64*uyn_1(i) + 4._f64*uxn_2(i) - uxn_3(i)
476 d1x = dt*(9._f64*uxn1 + 19._f64*uxn(i) - 5._f64*uxn_1(i) + uxn_2(i))/24._f64
477 d1y = dt*(9._f64*uyn1 + 19._f64*uyn(i) - 5._f64*uyn_1(i) + uyn_2(i))/24._f64
481 do while (erreur > 1.e-12)
488 xn_1 = x1 + 4._f64*d1x - 2._f64*dt*(2._f64*uxn_loc + uxn1)
489 yn_1 = y2 + 4._f64*d1y - 2._f64*dt*(2._f64*uyn_loc + uyn1)
495 xn_2 = x1 + 27._f64*d1x - dt*(18._f64*uxn_loc + 12._f64*uxn1)
496 yn_2 = x2 + 27._f64*d1y - dt*(18._f64*uyn_loc + 12._f64*uyn1)
500 a = 1._f64 + dt*(19._f64*dxuxn_loc + 20._f64*dxuxn_1_loc &
501 - 9._f64*dxuxn_2_loc)/24._f64
502 b = dt*(19._f64*dyuxn_loc + 20._f64*dyuxn_1_loc &
503 - 9._f64*dyuxn_2_loc)/24._f64
504 c = dt*(19._f64*dxuyn_loc + 20._f64*dxuyn_1_loc &
505 - 9._f64*dxuyn_2_loc)/24._f64
506 d = 1._f64 + dt*(19._f64*dyuyn_loc + 20._f64*dyuyn_1_loc &
507 - 9._f64*dyuyn_2_loc)/24._f64
516 gx = d1x - dt*(9.*uxn1 + 19.*uxn_loc - 5.*uxn_1_loc + uxn_2_loc)/24._f64
517 gy = d1y - dt*(9.*uyn1 + 19.*uyn_loc - 5.*uyn_1_loc + uyn_2_loc)/24._f64
519 dij0 = d1x - (+d*gx - b*gy)
520 dij1 = d1y - (-c*gx + a*gy)
522 erreur = abs(gx) + abs(gy)
subroutine, public sll_s_compute_characteristic_adams2_2d_hex(x1, x2, uxn, uyn, uxn_1, uyn_1, dxuxn, dyuxn, dxuyn, dyuyn, i, y1, y2, dt)
subroutine, public sll_s_compute_characteristic_euler_2d_hex(x1, x2, uxn, uyn, i, y1, y2, dt)
subroutine compute_characteristic_leapfrog_2d_hex(x1, x2, uxn, uyn, dxux, dyux, dxuy, dyuy, i, y1, y2, dt)
subroutine compute_characteristic_adams4_2d_hex(x1, x2, uxn, uyn, uxn_1, uyn_1, uxn_2, uyn_2, uxn_3, uyn_3, dxuxn, dyuxn, dxuyn, dyuyn, i, y1, y2, dt)
subroutine compute_characteristic_adams3_2d_hex(x1, x2, uxn, uyn, uxn_1, uyn_1, uxn_2, uyn_2, dxuxn, dyuxn, dxuyn, dyuyn, i, y1, y2, dt)