src/coreprofiles.f90: exit on density fit errors
This commit is contained in:
parent
b1accf0ae3
commit
78d8bdbb33
@ -371,12 +371,16 @@ contains
|
|||||||
call dens_spline%init(data%psrad, data%derad, n, range=[zero, data%psrad(n)], &
|
call dens_spline%init(data%psrad, data%derad, n, range=[zero, data%psrad(n)], &
|
||||||
tension=params%sspld, err=err)
|
tension=params%sspld, err=err)
|
||||||
|
|
||||||
! if failed, re-fit with an interpolating spline (zero tension)
|
! Tension is very small, re-fit with an interpolating spline
|
||||||
if (err == -1) then
|
if (err == -1) then
|
||||||
call log_warning('density fit failed with error -1: re-fitting with '// &
|
call log_warning('re-fitting with density curve with zero tension', &
|
||||||
'zero tension', mod='coreprofiles', proc='density')
|
mod='coreprofiles', proc='density')
|
||||||
call dens_spline%init(data%psrad, data%derad, n, &
|
call dens_spline%init(data%psrad, data%derad, n, &
|
||||||
range=[zero, data%psrad(n)], tension=zero)
|
range=[zero, data%psrad(n)], tension=zero)
|
||||||
|
else if (err > 0) then
|
||||||
|
write (msg, '(a, g0)') 'density fit failed with error ', err
|
||||||
|
call log_error(msg, mod='coreprofiles', proc='density')
|
||||||
|
call exit(1)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
! Computation of the polynomial tail parameters
|
! Computation of the polynomial tail parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user