Skip to content

Instantly share code, notes, and snippets.

View St-Maxwell's full-sized avatar

St Maxwell St-Maxwell

View GitHub Profile
!> ccgk: This code generates Lebedev grids. It is based on C files from
!> ccgk: Dmitri Laikov, which were converted to FORTRAN by Christoph van Wuellen.
!> ccgk: I (Gerald Knizia) subsequently converted them back to C++.
!> ccsm: The Fortran90 version was converted by St Maxwell from C++ version.
!> ccgk:
!> ccgk: The original distribution contained the following readme file:
!> ccgk:
!> Lebedev grids of orders n=6m+5 where m=0,1,...,21 in 16 digit precision
!> =======================================================================
!>
!> reference: https://github.com/KT19/automatic_differentiation
module backward
use iso_fortran_env, only: real64
implicit none
type :: node
private
real(kind=real64) :: val
real(kind=real64) :: grad = 0._real64
type(pair), dimension(:), pointer :: parents