Skip to content

Commit

Permalink
Checking/tidying BECK_GRID
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-jayatilaka committed Apr 24, 2024
1 parent 5d5ceca commit b4ca52d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
38 changes: 20 additions & 18 deletions foofiles/becke_grid.foo
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,9 @@ contains
end

set_grid_data ::: leaky, PURE
! Set all the radial and angular grid data required to construct the product
! grids for any atom in the periodic table. Then define the unique atomic
! grids for the current set of atoms.
! Set all the radial and angular grid data required to construct
! the product grids for any atom in the periodic table. Then define
! the unique atomic grids for the current set of atoms.
self :: INOUT

if (.atom.deallocated) return
Expand Down Expand Up @@ -943,9 +943,10 @@ contains
! The following are private helper routines

set_radial_grids ::: private, leaky, PURE
! Set all possible .radial_grid's that could be needed. Since a different
! number of radial points is used for atoms in different rows of the periodic
! table, this required a loop over the rows of the periodic table.
! Set all possible .radial_grid's that could be needed. Since a
! different number of radial points is used for atoms in different
! rows of the periodic table, this required a loop over the rows of
! the periodic table.
self :: INOUT

ENSURE(.kind/=" ","no grid kind set")
Expand All @@ -961,12 +962,12 @@ contains
end

set_radial_grid(radial,p) ::: private, leaky, PURE
! Set the "radial" grid data for an atom on period "p" of the periodic table.
! The standard radial grid points are modified using the mappings
! recommended by the authors. The jacoboian of the transformation is included
! back into the weight. The zeta scale factor is *not* included at this stage,
! only at the final stage when the full grid is generated for the entire atom
! list.
! Set the "radial" grid data for an atom on period "p" of the
! periodic table. The standard radial grid points are modified
! using the mappings recommended by the authors. The jacoboian of
! the transformation is included back into the weight. The zeta
! scale factor is *not* included at this stage, only at the final
! stage when the full grid is generated for the entire atom list.
self :: INOUT
radial :: QUADRATURE, INOUT
p :: INT, IN
Expand All @@ -980,7 +981,7 @@ contains
select case (.kind)
case ("becke "); BECKE_GRID::set_B_radial_grid(radial,nr)
case ("treutler_ahlrichs"); BECKE_GRID::set_TA_radial_grid(radial,nr)
case ("mura_knowles "); BECKE_GRID::set_MK_radial_grid(radial,nr)
case ("mura_knowles "); BECKE_GRID::set_MK_radial_grid(radial,nr) ! default
! case default; UNKNOWN(.kind)
end

Expand Down Expand Up @@ -1077,11 +1078,12 @@ contains
end

set_MK_radial_grid(radial_grid,nr) ::: selfless, private, leaky, PURE
! Set the Mura-Knowles "radial_grid" to have "nr" points. The standard grid
! points are modified using the recommended mappings. The jacoboian of the
! mapping is included back into the weight. The zeta scale factor is *not*
! included at this stage, only at the final stage when the full grid is
! generated for the entire atom list.
! Set the Mura-Knowles "radial_grid" to have "nr" points. The
! standard grid points are modified using the recommended mappings.
! The jacoboian of the mapping is included back into the weight.
! The zeta scale factor is *not* included at this stage, only at
! the final stage when the full grid is generated for the entire
! atom list.
self :: INOUT
radial_grid :: QUADRATURE, INOUT
nr :: INT, IN
Expand Down
16 changes: 8 additions & 8 deletions foofiles/quadrature.foo
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,9 @@ contains
end

set_extended_trapezoid ::: private, PURE
! Set extended trapezoid points and weights
! The error is (-n h^3 f''(z)/12) where n in the number of points minus one,
! h is the point spacing, and z is a number in the integration interval,
! Set extended trapezoid points and weights. The error is (-n h^3
! f''(z)/12) where n in the number of points minus one, h is the
! point spacing, and z is a number in the integration interval,
! which is here [0,1].
self :: INOUT

Expand Down Expand Up @@ -722,11 +722,11 @@ contains
end

set_open_extended_trapezoid ::: private, PURE
! Set open extended trapezoid points and weights. Use this if you know
! that the function to be quadrated is zero on the endpoints.
! The error is (-n h^3 f''(z)/12) where n in the number of points minus one,
! h is the point spacing, and z is a number in the integration interval,
! which is here [0,1].
! Set open extended trapezoid points and weights. Use this if you
! know that the function to be quadrated is zero on the endpoints.
! The error is (-n h^3 f''(z)/12) where n in the number of points
! minus one, h is the point spacing, and z is a number in the
! integration interval, which is here [0,1].
self :: INOUT

ENSURE(.n_points>2,"must have greater than 2 points")
Expand Down
4 changes: 2 additions & 2 deletions foofiles/types.foo
Original file line number Diff line number Diff line change
Expand Up @@ -1188,8 +1188,8 @@ module TYPES
! The accuracy required for adapative quadratures

n_points :: INT, readonly DEFAULT(0)
! No. of quadrature points. For adaptive quadrature it is set to thye number
! of function eveluations.
! No. of quadrature points. For adaptive quadrature it is set to
! the number of function eveluations.

lower_limit :: REAL, readonly DEFAULT(-ONE)
! Lower integration limit (if appropriate)
Expand Down

0 comments on commit b4ca52d

Please sign in to comment.