10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-19 04:22:32 +01:00

Fixed tooth_width=0.0

This commit is contained in:
Anthony Scemama 2022-03-25 09:30:43 +01:00
parent b70ae8dc58
commit e63fa3fdd5
3 changed files with 3 additions and 4 deletions

View File

@ -842,9 +842,8 @@ END_PROVIDER
do t=1, pt2_N_teeth do t=1, pt2_N_teeth
tooth_width = tilde_cW(pt2_n_0(t+1)) - tilde_cW(pt2_n_0(t)) tooth_width = tilde_cW(pt2_n_0(t+1)) - tilde_cW(pt2_n_0(t))
if (tooth_width == 0.d0) then if (tooth_width == 0.d0) then
tooth_width = sum(tilde_w(pt2_n_0(t):pt2_n_0(t+1))) tooth_width = max(1.d-15,sum(tilde_w(pt2_n_0(t):pt2_n_0(t+1))))
endif endif
ASSERT(tooth_width > 0.d0)
do i=pt2_n_0(t)+1, pt2_n_0(t+1) do i=pt2_n_0(t)+1, pt2_n_0(t+1)
pt2_w(i) = tilde_w(i) * pt2_W_T / tooth_width pt2_w(i) = tilde_w(i) * pt2_W_T / tooth_width
end do end do

View File

@ -1550,7 +1550,7 @@ subroutine bitstring_to_list_in_selection( string, list, n_elements, Nint)
use bitmasks use bitmasks
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Gives the inidices(+1) of the bits set to 1 in the bit string ! Gives the indices(+1) of the bits set to 1 in the bit string
END_DOC END_DOC
integer, intent(in) :: Nint integer, intent(in) :: Nint
integer(bit_kind), intent(in) :: string(Nint) integer(bit_kind), intent(in) :: string(Nint)

View File

@ -1179,7 +1179,7 @@ subroutine bitstring_to_list_in_selection( string, list, n_elements, Nint)
use bitmasks use bitmasks
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Gives the inidices(+1) of the bits set to 1 in the bit string ! Gives the indices(+1) of the bits set to 1 in the bit string
END_DOC END_DOC
integer, intent(in) :: Nint integer, intent(in) :: Nint
integer(bit_kind), intent(in) :: string(Nint) integer(bit_kind), intent(in) :: string(Nint)