<commit_before>module ode1d

! General utilities for solving 1D ODEs. the Adams and rk4 subroutines
! are used by Schroedinger, Dirac and Poisson solvers. The integrate
! function is used at other places in dftatom to calculate integrals of the
! radial density/orbitals.

use types, only: dp
use utils, only: stop_error

implicit none
private
public integrate, normalize, parsefunction, get_n_nodes, get_min_idx, &
        adams_interp_outward, adams_extrapolation_outward, &
        adams_interp_outward_implicit, &
        adams_interp_inward_implicit, &
        get_midpoints, rk4_integrate3, rk4_integrate4, rk4_integrate

contains

real(dp) function integrate(Rp, f) result(s)
real(dp), intent(in) :: Rp(:), f(:)

! Choose one from the integration rules below:
!s = integrate_trapz_1(Rp, f)
!s = integrate_trapz_3(Rp, f)
!s = integrate_trapz_5(Rp, f)
s = integrate_trapz_7(Rp, f)
!s = integrate_simpson(Rp, f)
!s = integrate_adams(Rp, f)
end function

real(dp) function integrate_trapz_1(Rp, f) result(s)
real(dp), intent(in) :: Rp(:), f(:)<commit_msg>Make the integrate_* functions public<commit_after>module ode1d

! General utilities for solving 1D ODEs. the Adams and rk4 subroutines
! are used by Schroedinger, Dirac and Poisson solvers. The integrate
! function is used at other places in dftatom to calculate integrals of the
! radial density/orbitals.

use types, only: dp
use utils, only: stop_error

implicit none
private
public integrate, normalize, parsefunction, get_n_nodes, get_min_idx, &
        adams_interp_outward, adams_extrapolation_outward, &
        adams_interp_outward_implicit, &
        adams_interp_inward_implicit, &
        get_midpoints, rk4_integrate3, rk4_integrate4, rk4_integrate, &
        integrate_trapz_1, integrate_trapz_3, integrate_trapz_5, &
        integrate_trapz_7, integrate_simpson, integrate_adams

contains

real(dp) function integrate(Rp, f) result(s)
real(dp), intent(in) :: Rp(:), f(:)

! Choose one from the integration rules below:
!s = integrate_trapz_1(Rp, f)
!s = integrate_trapz_3(Rp, f)
!s = integrate_trapz_5(Rp, f)
s = integrate_trapz_7(Rp, f)
!s = integrate_simpson(Rp, f)
!s = integrate_adams(Rp, f)
end function

real(dp) function integrate_trapz_1(Rp, f) result(s)
real(dp), intent(in) :: Rp(:), f(:)
{'fraction_non_alphanumeric': 0.09639084507042253, 'fraction_numerical': 0.013204225352112676, 'mean_word_length': 5.227397260273973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6385167', 'n_tokens_mistral': 856, 'n_tokens_neox': 842, 'n_words': 227}