25 #include "sll_errors.h"
26 #include "sll_memory.h"
27 #include "sll_working_precision.h"
64 sll_real64,
dimension(:),
pointer :: eta_coords
65 sll_real64,
dimension(:),
pointer :: charac_feet
66 sll_real64,
dimension(:),
pointer :: charac_feet_inside
70 sll_real64,
dimension(:, :),
pointer :: deriv
72 sll_int32 :: csl_degree
74 procedure, pass(adv) :: initialize => &
76 procedure, pass(adv) :: advect_1d => &
78 procedure, pass(adv) :: advect_1d_constant => &
96 sll_int32,
intent(in) :: npts
97 sll_real64,
intent(in),
optional :: eta_min
98 sll_real64,
intent(in),
optional :: eta_max
99 sll_real64,
dimension(:),
pointer,
optional :: eta_coords
100 sll_int32,
intent(in),
optional :: csl_degree
103 sll_allocate(adv, ierr)
129 sll_int32,
intent(in) :: npts
130 sll_real64,
intent(in),
optional :: eta_min
131 sll_real64,
intent(in),
optional :: eta_max
132 sll_real64,
dimension(:),
pointer,
optional :: eta_coords
133 sll_int32,
optional :: csl_degree
136 sll_real64 :: delta_eta
141 if (
present(csl_degree))
then
142 adv%csl_degree = csl_degree
150 sll_allocate(adv%eta_coords(npts), ierr)
152 sll_allocate(adv%charac_feet(npts), ierr)
153 sll_allocate(adv%charac_feet_inside(npts), ierr)
157 sll_allocate(adv%deriv(2, npts - 1), ierr)
161 if (
present(eta_min) .and.
present(eta_max))
then
162 if (
present(eta_coords))
then
163 print *,
'#provide either eta_coords or eta_min and eta_max'
164 print *,
'#and not both in subroutine initialize_BSL_1d_advector'
167 delta_eta = (eta_max - eta_min)/real(npts - 1, f64)
169 adv%eta_coords(i) = eta_min + real(i - 1, f64)*delta_eta
172 else if (
present(eta_coords))
then
173 if (
size(eta_coords) < npts)
then
174 print *,
'#bad size for eta_coords in initialize_BSL_1d_advector'
177 adv%eta_coords(1:npts) = eta_coords(1:npts)
180 print *,
'#Warning, we assume eta_min = 0._f64 eta_max = 1._f64'
181 delta_eta = 1._f64/real(npts - 1, f64)
183 adv%eta_coords(i) = real(i - 1, f64)*delta_eta
248 sll_real64,
dimension(:),
intent(in) :: a
249 sll_real64,
intent(in) :: dt
250 sll_real64,
dimension(:),
intent(in) :: input
251 sll_real64,
dimension(:),
intent(out) :: output
254 call adv%charac%compute_characteristics( &
266 adv%charac_feet_inside(i) = &
268 adv%charac_feet(i), &
270 adv%eta_coords(adv%Npts))
272 call adv%interp%compute_interpolants(input)
281 adv%eta_coords(adv%Npts))
290 adv%eta_coords(adv%Npts), &
344 sll_real64,
intent(in) :: a
345 sll_real64,
intent(in) :: dt
346 sll_real64,
dimension(:),
intent(in) :: input
347 sll_real64,
dimension(:),
intent(out) :: output
348 sll_real64,
dimension(:),
allocatable :: a1
353 sll_allocate(a1(adv%Npts), ierr)
357 call adv%charac%compute_characteristics( &
370 call adv%interp%interpolate_array( &
376 sll_deallocate_array(a1, ierr)
383 sll_deallocate(adv%eta_coords, ierr)
384 sll_deallocate(adv%charac_feet, ierr)
392 sll_real64,
dimension(:),
intent(in) :: origin
393 sll_real64,
dimension(:),
intent(inout) :: feet
394 sll_int32,
intent(in) :: npts
395 sll_real64,
intent(in),
optional :: epsilon
397 sll_real64 :: gap_min
398 sll_real64 :: gap_max
402 if (
size(origin) < npts)
then
403 sll_error(
"check_charac_feet",
"bad size for origin")
405 if (
size(feet) < npts)
then
406 sll_error(
"check_charac_feet",
"bad size for feet")
408 length = origin(npts) - origin(1)
409 feet(npts) = feet(1) + length
410 if (abs(length - (feet(npts) - feet(1))) > 1.e-12_f64)
then
411 print *,
'origin', origin
412 print *,
'feet', feet
413 print *, feet(npts) - feet(1), origin(npts) - origin(1)
414 sll_error(
"check_charac_feet",
"bad length")
417 if (
present(epsilon))
then
427 if (gap_min <= eps)
then
428 sll_error(
"check_charac_feet",
"bad gap_min")
434 if (gap_min <= eps)
then
435 sll_error(
"check_charac_feet",
"pb for charac_feet")
441 sll_real64,
dimension(:),
intent(in) :: input
442 sll_int32,
intent(in) :: npts
447 if (
size(input) <= 1)
then
448 sll_error(
"compute_gap_min",
"bad size for input")
450 res = input(2) - input(1)
452 val = input(i + 1) - input(i)
461 sll_real64,
dimension(:),
intent(in) :: input
462 sll_int32,
intent(in) :: npts
467 if (
size(input) <= 1)
then
468 sll_error(
"compute_gap_max",
"bad size for input")
470 res = input(2) - input(1)
472 val = input(i + 1) - input(i)
481 sll_int32,
intent(in) :: d
482 sll_int32,
intent(in) :: n
483 sll_real64,
dimension(:),
intent(out) :: output
484 sll_real64 :: w_left(-d/2:(d + 1)/2)
485 sll_real64 :: w_right((-d + 1)/2:d/2 + 1)
495 sll_error(
"csl_hermite_mat",
"bad size of N")
499 sll_error(
"csl_hermite_mat",
"bad size of d")
502 if (
size(output) < n)
then
503 sll_error(
"csl_hermite_mat",
"bad size of output")
517 if ((2*(d/2) - d) == 0)
then
518 w_right(r_right:s_right) = w_left(r_left:s_left)
520 w_right(r_right:s_right) = -w_left(s_left:r_left:-1)
523 do i = r_left, s_left
524 ind = 1 + modulo(i, n)
525 ind = 1 + modulo(n - ind, n)
526 output(ind) = output(ind) + w_left(i)/12._f64
528 do i = r_right, s_right
529 ind = 1 + modulo(i, n)
530 ind = 1 + modulo(n - ind, n)
531 output(ind) = output(ind) - w_right(i)/12._f64
537 sll_int32,
intent(in) :: n
538 sll_real64,
dimension(:),
intent(inout) :: mat
546 sll_error(
"csl_hermite_mat",
"bad size of N")
548 if (
size(mat) < n)
then
550 print *,
'#size(mat)=',
size(mat)
551 sll_error(
"csl_hermite_mat",
"bad size of mat")
554 mat(1) = 1._f64/(mat(1)*real(n, f64))
558 val = 1._f64/((rea**2 + ima**2)*real(n, f64))
560 mat(2*i + 1) = -ima*val
562 if (mod(n, 2) == 0)
then
564 if (abs(mat(n)) < 1.e-12)
then
568 if (abs(mat(n)) < 1.e-6)
then
569 print *,
'#mat(N)=', mat(n)
570 sll_warning(
"compute_inverse_csl_hermite_mat",
"mat(N) small")
572 mat(n) = 1._f64/(mat(n)*real(n, f64))
579 sll_int32,
intent(in) :: n
580 sll_real64,
dimension(:),
intent(in) :: mat
581 sll_real64,
dimension(:),
intent(inout) :: f
582 sll_real64,
dimension(:),
intent(in) :: fft_buf
589 call dfftf(n, f, fft_buf)
596 f(2*i) = rea*reb - ima*imb
597 f(2*i + 1) = rea*imb + reb*ima
599 if (mod(n, 2) == 0) f(n) = f(n)*mat(n)
600 call dfftb(n, f, fft_buf)
610 sll_int32,
intent(in) :: npts
612 sll_real64,
dimension(:),
intent(in) :: origin
613 sll_real64,
dimension(:),
intent(in) :: feet
614 sll_real64,
dimension(:),
intent(out) :: output
615 sll_real64 :: eta_min
616 sll_real64 :: eta_max
626 if (
size(output) < npts - 1)
then
627 print *,
'Npts-1=', npts - 1
628 print *,
'size(output)=',
size(output)
629 sll_error(
"compute_csl_integral",
"bad size of output")
631 if (
size(origin) < npts)
then
632 print *,
'Npts=', npts
633 print *,
'size(origin)=',
size(origin)
634 sll_error(
"compute_csl_integral",
"bad size of origin")
636 if (
size(feet) < npts)
then
637 print *,
'Npts=', npts
638 print *,
'size(feet)=',
size(feet)
639 sll_error(
"compute_csl_integral",
"bad size of feet")
644 eta_max = origin(npts)
645 delta = (eta_max - eta_min)/real(npts - 1, f64)
648 i_min = floor((feet(i) - eta_min)/delta)
649 i_max = floor((feet(i + 1) - eta_min)/delta)
650 if (i_min == i_max)
then
655 if (i_min > i_max)
then
656 print *,
'i_min,i_max=', i_min, i_max
657 sll_error(
"compute_csl_integral",
"bad value of i_min/i_max")
660 b = eta_min + real(i_min + 1, f64)*delta
662 do ii = i_min + 1, i_max - 1
663 a = eta_min + real(ii, f64)*delta
664 b = eta_min + real(ii + 1, f64)*delta
667 a = eta_min + real(i_max, f64)*delta
671 output(i) = val/delta
686 sll_real64,
intent(in) :: a
687 sll_real64,
intent(in) :: b
688 sll_real64,
intent(in) :: eta_min
689 sll_real64,
intent(in) :: eta_max
692 sll_real64 :: nodes(3, 2)
697 nodes(2, 1) = 0.5_f64*(a + b)
703 nodes(j, 2) = interp%interpolate_from_interpolant_value(eta)
705 res = nodes(1, 2) + 4._f64*nodes(2, 2) + nodes(3, 2)
706 res = res*(b - a)/6._f64
717 sll_real64,
intent(in) :: eta_min
718 sll_real64,
intent(in) :: eta_max
719 sll_int32,
intent(in) :: npts
720 sll_real64,
dimension(:),
intent(out) :: output
723 sll_real64,
dimension(:),
allocatable :: f
730 sll_real64 :: w_deriv_left(4)
731 sll_real64 :: w_deriv_right(4)
735 w_deriv_left = (/-5.5_f64, 9._f64, -4.5_f64, 1._f64/)
736 w_deriv_right = (/-1._f64, 4.5_f64, -9._f64, 5.5_f64/)
738 delta = (eta_max - eta_min)/real(npts - 1, f64)
743 sll_allocate(f(npts), ierr)
751 call interp%compute_interpolants(f)
760 call interp%compute_interpolants(f)
768 output(ind) = output(ind) + (df0 - df1)/12._f64
772 print *, i, output(i)
779 sll_real64,
intent(in) :: a
780 sll_real64,
intent(in) :: b
781 sll_real64,
dimension(4),
intent(in) :: w
788 eta = a + (real(i - 1, f64)/3._f64)*(b - a)
789 res = res + w(i)*interp%interpolate_from_interpolant_value(eta)
799 sll_real64,
dimension(:),
intent(in) :: csl_mat
800 sll_real64,
dimension(:),
intent(in) :: csl_mat_init
801 sll_int32,
intent(in) :: n
802 sll_real64,
dimension(:),
intent(in) :: fft_buf
803 sll_real64,
dimension(:),
allocatable :: f
804 sll_real64,
dimension(:),
allocatable :: g
805 sll_real64,
dimension(:),
allocatable :: h
811 sll_allocate(f(n), ierr)
812 sll_allocate(g(n), ierr)
813 sll_allocate(h(n), ierr)
830 err = max(err, maxval(abs(h - g)))
833 print *, j, f(j), g(j), h(j)
837 print *,
'#err=', err
843 sll_real64,
dimension(:),
intent(in) :: a
844 sll_real64,
dimension(:),
intent(in) :: input
845 sll_real64,
dimension(:),
intent(out) :: output
846 sll_int32,
intent(in) :: n
856 j2 = 1 + modulo(n - i + 1, n)
857 output(i) = output(i) + a(j2)*input(ind)
871 sll_real64,
dimension(:, :),
intent(out) :: deriv
872 sll_int32,
intent(in) :: n
873 sll_real64,
intent(in) :: eta_min
874 sll_real64,
intent(in) :: eta_max
876 sll_real64 :: w_deriv_left(4)
877 sll_real64 :: w_deriv_right(4)
882 w_deriv_left = (/-5.5_f64, 9._f64, -4.5_f64, 1._f64/)
883 w_deriv_right = (/-1._f64, 4.5_f64, -9._f64, 5.5_f64/)
887 sll_error(
'compute_node_derivative',
'bad size of N')
890 if ((
size(deriv, 1) < 2) .or. (
size(deriv, 2) < n))
then
891 print *,
'#size=',
size(deriv)
892 print *,
'#expected size=', 2, n
893 sll_error(
'compute_node_derivative',
'bad size of deriv')
896 delta = (eta_max - eta_min)/real(n, f64)
899 a = eta_min + real(i - 1, f64)*delta
900 b = eta_min + real(i, f64)*delta
918 sll_real64,
dimension(:),
intent(in) :: input
919 sll_real64,
dimension(:, :),
intent(inout) :: deriv
920 sll_real64,
dimension(:),
intent(in) :: charac
921 sll_int32,
intent(in) :: npts
922 sll_real64,
intent(in) :: eta_min
923 sll_real64,
intent(in) :: eta_max
924 sll_real64,
dimension(:),
intent(out) :: output
925 sll_int32,
intent(in),
optional :: csl_degree
926 sll_real64,
dimension(:),
allocatable :: output_bsl
927 sll_real64,
dimension(:),
allocatable :: flux
928 sll_int32,
dimension(:),
allocatable :: jstar
929 sll_real64,
dimension(:),
allocatable :: alpha
939 sll_real64,
dimension(:),
allocatable :: xi
940 sll_real64,
dimension(:),
allocatable :: fxi
941 sll_real64,
dimension(:),
allocatable :: xval
942 sll_real64,
dimension(:),
allocatable :: fval
948 sll_real64 :: xstarj1
951 sll_real64,
dimension(:),
allocatable :: ww_tmp
952 sll_real64,
dimension(:),
allocatable :: ww
958 sll_int32 :: num_gauss_points
959 sll_real64,
dimension(:, :),
allocatable :: xw
962 if (
present(csl_degree))
then
971 sll_allocate(ww_tmp(r:s - 1), ierr)
981 sll_allocate(ww(r1:s1), ierr)
983 ww(r1:s1) = ww_tmp(r:s - 1)
985 num_gauss_points = (d + 1)/2
986 sll_allocate(xw(2, num_gauss_points), ierr)
999 sll_allocate(xi(r1:s1), ierr)
1000 sll_allocate(fxi(r1:s1), ierr)
1001 sll_allocate(xval(r1:s1), ierr)
1002 sll_allocate(fval(r1:s1), ierr)
1004 xval(ii) = real(ii, f64)
1061 sll_allocate(output_bsl(npts), ierr)
1062 sll_allocate(flux(0:npts), ierr)
1063 sll_allocate(jstar(1 + r1 - 10:npts + s1 + 10), ierr)
1064 sll_allocate(alpha(1 + r1 - 10:npts + s1 + 10), ierr)
1068 delta = (eta_max - eta_min)/real(n, f64)
1073 output_bsl(npts) = output_bsl(1)
1075 call interp%compute_interpolants(output_bsl)
1091 eta = real(n, f64)*(eta - eta_min)/(eta_max - eta_min)
1094 if ((eta < 0) .or. (eta >= 1))
then
1095 print *,
'eta=', eta
1096 sll_error(
'update_solution_csl_periodic',
'bad value of eta')
1098 if ((ind < 0) .or. (ind >= n))
then
1099 print *,
'ind=', eta
1100 sll_error(
'update_solution_csl_periodic',
'bad value of ind')
1103 dof(1) = output_bsl(ind)
1104 dof(2) = output_bsl(ind + 1)
1105 dof(3) = deriv(1, ind)
1106 dof(4) = deriv(2, ind)
1110 res = output(i) - interp%interpolate_from_interpolant_value(eta)
1111 if (abs(res) > 1.e-10)
then
1112 print *,
'#problem detected'
1113 print *,
'#dof=', dof
1114 print *,
'ind=', ind
1117 eta = real(n, f64)*(eta - eta_min)/(eta_max - eta_min)
1120 print *,
'#eta=', eta
1123 err = max(err, abs(res))
1128 if (err > 1.e-14)
then
1129 print *,
'#err bsl=', err
1140 call interp%compute_interpolants(output_bsl)
1151 eta = real(n, f64)*(eta - eta_min)/(eta_max - eta_min)
1152 jstar(i) = floor(eta)
1153 alpha(i) = eta - jstar(i)
1154 jstar(i) = jstar(i) + 1
1155 if ((alpha(i) < 0._f64) .or. (alpha(i) >= 1.))
then
1156 print *,
'alpha(i)=', i, alpha(i)
1157 sll_error(
'update_solution_csl_periodic',
'bad value of alpha(i)')
1162 err = abs(real(jstar(npts) - jstar(1) - n, f64))
1163 err = max(err, abs(alpha(n + 1) - alpha(1)))
1164 if (err > 1.e-13)
then
1165 print *,
'#err periodicity=', err
1169 jstar(n + 1) = jstar(1) + n
1170 alpha(n + 1) = alpha(1)
1174 jstar(ii) = jstar(n + ii) - n
1175 alpha(ii) = alpha(n + ii)
1178 jstar(n + ii) = jstar(ii) + n
1179 alpha(n + ii) = alpha(ii)
1198 eta = real(jstar(i) - 1, f64) + alpha(i)
1199 eta = eta_min + eta*delta
1200 err = max(err, abs(eta - charac(i)))
1203 if (err > 1.e-14)
then
1204 print *,
'#err charac=', err
1222 ind = 1 + modulo(n + jstar(i) - 1, n)
1223 ind1 = 1 + modulo(n + jstar(i), n)
1224 dof(1) = output_bsl(ind)
1225 dof(2) = output_bsl(ind1)
1226 dof(3) = deriv(1, ind)
1227 dof(4) = deriv(2, ind)
1230 fval(ii) = output_bsl(1 + modulo(n + jstar(i) + ii - 1, n))
1234 xi(ii) = jstar(i + ii) + alpha(i + ii) - jstar(i)
1262 flux(i) = flux(i) + ww(ii)*fxi(ii)
1276 do ii = i + 1, jstar(i)
1277 ind1 = 1 + modulo(ii + n - 1, n)
1278 flux(i) = flux(i) + output_bsl(ind1)
1280 do ii = jstar(i) + 1, i
1281 ind1 = 1 + modulo(ii + n - 1, n)
1282 flux(i) = flux(i) - output_bsl(ind1)
1287 flux(n + 1) = flux(1)
1290 ind1 = 1 + modulo(i - 1 + n - 1, n)
1291 output(i) = output_bsl(i) + (flux(i) - flux(ind1))
1293 output(n + 1) = output(1)
1301 xj = eta_min + real(i - 1, f64)*delta
1303 if (xstarj .ge. xj)
then
1304 if (xstarj .ge. (xj + delta))
then
1305 print *,
'xstarj>=xj+delta'
1306 print *,
'xstarj=', xstarj
1307 print *,
'xj+delta=', xj + delta
1309 sll_error(
'update_solution_csl_periodic',
'dt may be too big')
1311 flux(i) = output_bsl(1 + modulo(i, n))*(xstarj - xj)/delta
1313 if (xstarj .le. (xj - delta))
then
1314 print *,
'xstarj<=xj-delta'
1315 print *,
'xstarj=', xstarj
1316 print *,
'xj-delta=', xj - delta
1318 sll_error(
'update_solution_csl_periodic',
'dt may be too big')
1320 flux(i) = output_bsl(i)*(xstarj - xj)/delta
1325 output(i) = output_bsl(i) + (flux(i) - flux(1 + modulo(i - 1 + n - 1, n)))
1327 output(n + 1) = output(1)
1333 xj = eta_min + real(i - 1, f64)*delta
1335 if (xstarj .ge. xj)
then
1336 if (xstarj .ge. (xj + delta))
then
1337 print *,
'xstarj>=xj+delta'
1338 print *,
'xstarj=', xstarj
1339 print *,
'xj+delta=', xj + delta
1341 sll_error(
'update_solution_csl_periodic',
'dt may be too big')
1343 i1 = 1 + modulo(i, n)
1344 a = 0.5_f64*(xj + xstarj)
1345 fxi(0) = output_bsl(i)*(xj + delta - a)/delta
1346 fxi(0) = fxi(0) + output_bsl(i1)*(1._f64 - (xj + delta - a)/delta)
1347 fxi(0) = fxi(0)*(xstarj - xj)/delta
1348 xstarj1 = real(jstar(i + 1) - 1, f64) + alpha(i + 1)
1349 xstarj1 = eta_min + xstarj1*delta
1351 a = 0.5_f64*(xj + delta + xstarj1)
1352 fxi(1) = output_bsl(i)*(xj + delta - a)/delta
1353 fxi(1) = fxi(1) + output_bsl(i1)*(1._f64 - (xj + delta - a)/delta)
1354 fxi(1) = fxi(1)*(xstarj1 - xj - delta)/delta
1355 flux(i) = 0.5_f64*(fxi(0) + fxi(1))
1358 if (xstarj .le. (xj - delta))
then
1359 print *,
'xstarj<=xj-delta'
1360 print *,
'xstarj=', xstarj
1361 print *,
'xj-delta=', xj - delta
1363 sll_error(
'update_solution_csl_periodic',
'dt may be too big')
1365 flux(i) = output_bsl(i)*(xstarj - xj)/delta
1369 flux(n + 1) = flux(1)
1372 output(i) = output_bsl(i) + (flux(i) - flux(1 + modulo(i - 1 + n - 1, n)))
1374 output(n + 1) = output(1)
1481 ind = 1 + modulo(n + jstar(i) - 1, n)
1482 dof(1) = output_bsl(ind)
1483 dof(2) = output_bsl(ind + 1)
1484 dof(3) = deriv(1, ind)
1485 dof(4) = deriv(2, ind)
1488 xi(ii) = jstar(i + ii) + alpha(i + ii) - jstar(i)
1495 flux(i) = (7._f64/12._f64)*(fxi(0) + fxi(1))
1496 flux(i) = flux(i) - (1._f64/12._f64)*(fxi(-1) + fxi(2))
1500 do ii = i + 1, jstar(i)
1501 ind = 1 + modulo(n + jstar(ii) - 1, n)
1502 flux(i) = flux(i) + output_bsl(ind)
1504 do ii = jstar(i), i - 1
1505 ind = 1 + modulo(n + jstar(ii) - 1, n)
1506 flux(i) = flux(i) - output_bsl(ind)
1514 output(i) = input(i) + (flux(i) - flux(i - 1))
1517 output(n + 1) = output(1)
1519 err = maxval(abs(output - output_bsl))
1521 if (err > 1.e-14)
then
1522 print *,
'#diff with bsl=', err
1525 print *, i, output(i)
1537 sll_real64,
intent(in)::x
1538 sll_real64,
dimension(:),
intent(in) :: dof
1542 w(1) = (2._f64*x + 1)*(1._f64 - x)*(1._f64 - x)
1543 w(2) = x*x*(3._f64 - 2._f64*x)
1544 w(3) = x*(1._f64 - x)*(1._f64 - x)
1545 w(4) = x*x*(x - 1._f64)
1546 res = dof(1)*w(1) + dof(2)*w(2) + dof(3)*w(3) + dof(4)*w(4)
1555 sll_real64,
intent(in) :: a
1556 sll_real64,
intent(in) :: b
1557 sll_real64,
dimension(:),
intent(in) :: dof
1560 sll_real64 :: nodes(3, 2)
1565 nodes(2, 1) = 0.5_f64*(a + b)
1569 res = nodes(1, 2) + 4._f64*nodes(2, 2) + nodes(3, 2)
1570 res = res*(b - a)/6._f64
1575 sll_int32,
intent(in) :: r
1576 sll_int32,
intent(in) :: s
1577 sll_real64,
dimension(r:s - 1),
intent(out) :: ww
1578 sll_real64,
dimension(:),
allocatable :: w
1584 sll_allocate(w(r:s), ierr)
1590 tmp = tmp*real(i - j, f64)
1593 tmp = tmp*real(i - j, f64)
1597 tmp = tmp*real(-j, f64)
1600 tmp = tmp*real(-j, f64)
1603 tmp = tmp*real(-j, f64)
1611 tmp = tmp*real(i - j, f64)
1614 tmp = tmp*real(i - j, f64)
1618 tmp = tmp*real(-j, f64)
1621 tmp = tmp*real(-j, f64)
1624 tmp = tmp*real(-j, f64)
1658 sll_real64,
intent(in) :: a
1659 sll_real64,
intent(in) :: b
1660 sll_int32,
intent(in) :: r
1661 sll_int32,
intent(in) :: s
1662 sll_real64,
dimension(r:s),
intent(in) :: xval
1663 sll_real64,
dimension(r:s),
intent(in) :: fval
1664 sll_real64,
dimension(:, :),
intent(in) ::xw
1665 sll_int32,
intent(in) :: ng
1695 x = a + xw(1, i)*(b - a)
Abstract class for advection.
conservative semi-lagrangian 1d advection using periodic interpolation
subroutine update_solution_csl_periodic(interp, input, deriv, charac, Npts, eta_min, eta_max, output, csl_degree)
real(kind=f64) function contribution_gauss_lagrange(a, b, xval, fval, r, s, xw, ng)
subroutine compute_csl_hermite_mat(d, N, output)
subroutine compute_csl_ww(ww, r, s)
subroutine compute_csl_integral(Npts, interp, origin, feet, output)
real(kind=f64) function compute_quadrature(interp, a, b, w)
subroutine check_solve_csl_mat(csl_mat, csl_mat_init, N, fft_buf)
subroutine mult_circulant_mat(N, mat, f, fft_buf)
type(csl_periodic_1d_advector) function, pointer, public sll_f_new_csl_periodic_1d_advector(interp, charac, Npts, eta_min, eta_max, eta_coords, csl_degree)
subroutine compute_inverse_csl_hermite_mat(N, mat)
subroutine circ_mat_mul_direct(a, input, output, N)
real(kind=f64) function contribution_simpson_hermite(a, b, dof)
subroutine csl_periodic_advect_1d_constant(adv, A, dt, input, output)
subroutine csl_periodic_advect_1d(adv, A, dt, input, output)
subroutine initialize_csl_periodic_1d_advector(adv, interp, charac, Npts, eta_min, eta_max, eta_coords, csl_degree)
real(kind=f64) function evaluate_hermite_1d(x, dof)
subroutine check_charac_feet(origin, feet, Npts, epsilon)
subroutine compute_csl_mat(interp, eta_min, eta_max, Npts, output)
real(kind=f64) function compute_gap_min(input, Npts)
real(kind=f64) function compute_gap_max(input, Npts)
subroutine delete_csl_periodic_1d_adv(adv)
subroutine compute_node_derivative_order3(interp, deriv, N, eta_min, eta_max)
real(kind=f64) function compute_simpson_contribution_csl_periodic(interp, a, b, eta_min, eta_max)
Abstract class for characteristic derived type.
function, public sll_f_process_outside_point_periodic(eta, eta_min, eta_max)
Gauss-Legendre integration.
real(kind=f64) function, dimension(2, 1:npoints), public sll_f_gauss_legendre_points_and_weights(npoints, a, b)
Returns a 2d array of size (2,npoints) containing gauss-legendre points and weights in the interval [...
subroutine, public sll_s_compute_w_hermite_1d(w, r, s)
Module for 1D interpolation and reconstruction.
real(kind=f64) function, public sll_f_lagrange_interpolate(x, degree, xi, yi)
Abstract class for 1D interpolation and reconstruction.