erf_count Function

private pure function erf_count(k, r, r0) result(count)

Error function counting function for coordination number contributions.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: k

Steepness of the counting function.

real(kind=wp), intent(in) :: r

Current distance.

real(kind=wp), intent(in) :: r0

Cutoff radius.

Return Value real(kind=wp)


Source Code

pure function erf_count(k, r, r0) result(count)

   !> Steepness of the counting function.
   real(wp), intent(in) :: k

   !> Current distance.
   real(wp), intent(in) :: r

   !> Cutoff radius.
   real(wp), intent(in) :: r0

   real(wp) :: count

   count = 0.5_wp * (1.0_wp + erf(-k*(r-r0)/r0))

end function erf_count