Skip to content

Commit

Permalink
Added test for 1d interpolator and some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulzc committed Jan 8, 2025
1 parent 7117b9f commit 45888cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bte.f90
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ subroutine bte_driver(self, num, crys, wann, sym, ph, el)
if(.not. num%onlyphbte) &
call dragless_ebte_RTA(Tdir, self, num, crys, wann, sym, el, ph)

!$! TEST for RPA- Only calc the ee rates and screened potential
!$! TEST for RPA: Only calculate the e-e rates
!$! if(.not. num%onlyphbte) then
!$! if(this_image() == 1) print *,"**** TEST - RPA ****"
!$! call dragless_ebte_RTA(Tdir, self, num, crys, wann, sym, el, ph)
Expand Down
10 changes: 8 additions & 2 deletions test/test_misc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ program test_misc
twonorm, binsearch, mux_vector, demux_vector, interpolate, coarse_grained, &
unique, linspace, compsimps, mux_state, demux_state, demux_mesh, expm1, &
Fermi, Bose, Pade_continued, precompute_interpolation_corners_and_weights, &
interpolate_using_precomputed, operator(.umklapp.), shrink, Hilbert_transform
interpolate_using_precomputed, operator(.umklapp.), shrink, Hilbert_transform, &
interpolator_1d

implicit none

integer :: itest
integer, parameter :: num_tests = 32
integer, parameter :: num_tests = 33
type(testify) :: test_array(num_tests), tests_all
integer(i64) :: index, quotient, remainder, int_array(5), v1(3), v2(3), &
v1_muxed, v2_muxed, ik, ik1, ik2, ik3, ib1, ib2, ib3, wvmesh(3), &
Expand Down Expand Up @@ -380,6 +381,11 @@ program test_misc
call Hilbert_transform(fx2(x_odd), hfx2_odd)
call test_array(itest)%assert(hfx2_odd(ind_odd), hfx2(x_odd(ind_odd)), &
tol = 1e-5_r64)

itest = itest + 1
test_array(itest) = testify("1D Interpolation")
call test_array(itest)%assert([9, 19, 29]*1.0_r64, interpolator_1d([2, 4, 6]*1.0_r64, &
[1, 3, 5, 7]*1.0_r64, [4, 14, 24, 34]*1.0_r64))

tests_all = testify(test_array)
call tests_all%report
Expand Down

0 comments on commit 45888cd

Please # to comment.