(git:6a2e663)
pw_grids Module Reference

This module defines the grid data type and some basic operations on it. More...

Functions/Subroutines

subroutine, public pw_grid_create (pw_grid, pe_group, local)
 Initialize a PW grid with all defaults. More...
 
logical function, public pw_grid_compare (grida, gridb)
 Check if two pw_grids are equal. More...
 
subroutine, public get_pw_grid_info (pw_grid, id_nr, mode, vol, dvol, npts, ngpts, ngpts_cut, dr, cutoff, orthorhombic, gvectors, gsquare)
 Access to information stored in the pw_grid_type. More...
 
subroutine, public pw_grid_setup (cell_hmat, pw_grid, grid_span, cutoff, bounds, bounds_local, npts, spherical, odd, fft_usage, ncommensurate, icommensurate, blocked, ref_grid, rs_dims, iounit)
 sets up a pw_grid More...
 
subroutine, public pw_grid_change (cell_hmat, pw_grid)
 Recalculate the g-vectors after a change of the box. More...
 
subroutine, public pw_grid_retain (pw_grid)
 retains the given pw grid More...
 
subroutine, public pw_grid_release (pw_grid)
 releases the given pw grid More...
 

Variables

integer, parameter, public do_pw_grid_blocked_false = 0
 
integer, parameter, public do_pw_grid_blocked_true = 1
 
integer, parameter, public do_pw_grid_blocked_free = 2
 

Detailed Description

This module defines the grid data type and some basic operations on it.

Note
pw_grid_create : set the defaults pw_grid_release : release all memory connected to type pw_grid_setup : main routine to set up a grid input: cell (the box for the grid) pw_grid (the grid; pw_gridgrid_span has to be set) cutoff (optional, if not given pw_gridbounds has to be set) pe_group (optional, if not given we have a local grid)

if no cutoff or a negative cutoff is given, all g-vectors in the box are included (no spherical cutoff)

for a distributed setup the array in para rs_dims has to be initialized output: pw_grid

pw_grid_change : updates g-vectors after a change of the box

History
JGH (20-12-2000) : Adapted for parallel use JGH (07-02-2001) : Added constructor and destructor routines JGH (21-02-2003) : Generalized reference grid concept JGH (19-11-2007) : Refactoring and modularization JGH (21-12-2007) : pw_grid_setup refactoring
Author
apsi CJM

Function/Subroutine Documentation

◆ pw_grid_create()

subroutine, public pw_grids::pw_grid_create ( type(pw_grid_type), pointer  pw_grid,
class(mp_comm_type), intent(in)  pe_group,
logical, intent(in), optional  local 
)

Initialize a PW grid with all defaults.

Parameters
pw_grid...
pe_group...
local...
History
JGH (21-Feb-2003) : initialize pw_gridreference
Author
JGH (7-Feb-2001) & fawzi

Definition at line 92 of file pw_grids.F.

Here is the caller graph for this function:

◆ pw_grid_compare()

logical function, public pw_grids::pw_grid_compare ( type(pw_grid_type), intent(in)  grida,
type(pw_grid_type), intent(in)  gridb 
)

Check if two pw_grids are equal.

Parameters
grida...
gridb...
Returns
...
History
none
Author
JGH (14-Feb-2001)

Definition at line 146 of file pw_grids.F.

Here is the caller graph for this function:

◆ get_pw_grid_info()

subroutine, public pw_grids::get_pw_grid_info ( type(pw_grid_type), intent(in)  pw_grid,
integer, intent(out), optional  id_nr,
integer, intent(out), optional  mode,
real(dp), intent(out), optional  vol,
real(dp), intent(out), optional  dvol,
integer, dimension(3), intent(out), optional  npts,
integer(int_8), intent(out), optional  ngpts,
integer(int_8), intent(out), optional  ngpts_cut,
real(dp), dimension(3), intent(out), optional  dr,
real(dp), intent(out), optional  cutoff,
logical, intent(out), optional  orthorhombic,
real(dp), dimension(:, :), optional, pointer  gvectors,
real(dp), dimension(:), optional, pointer  gsquare 
)

Access to information stored in the pw_grid_type.

Parameters
pw_grid...
id_nr...
mode...
vol...
dvol...
npts...
ngpts...
ngpts_cut...
dr...
cutoff...
orthorhombic...
gvectors...
gsquare...
History
none
Author
JGH (17-Nov-2007)

Definition at line 182 of file pw_grids.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pw_grid_setup()

subroutine, public pw_grids::pw_grid_setup ( real(kind=dp), dimension(3, 3), intent(in)  cell_hmat,
type(pw_grid_type), intent(inout)  pw_grid,
integer, intent(in), optional  grid_span,
real(kind=dp), intent(in), optional  cutoff,
integer, dimension(2, 3), intent(in), optional  bounds,
integer, dimension(2, 3), intent(in), optional  bounds_local,
integer, dimension(3), intent(in), optional  npts,
logical, intent(in), optional  spherical,
logical, intent(in), optional  odd,
logical, intent(in), optional  fft_usage,
integer, intent(in), optional  ncommensurate,
integer, intent(in), optional  icommensurate,
integer, intent(in), optional  blocked,
type(pw_grid_type), intent(in), optional  ref_grid,
integer, dimension(2), intent(in), optional  rs_dims,
integer, intent(in), optional  iounit 
)

sets up a pw_grid

Parameters
cell_hmat...
pw_grid...
grid_span...
cutoff...
bounds...
bounds_local...
npts...
spherical...
odd...
fft_usage...
ncommensurate...
icommensurate...
blocked...
ref_grid...
rs_dims...
iounit...
Author
JGH (21-Dec-2007)
Note
this is the function that should be used in the future

Definition at line 283 of file pw_grids.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pw_grid_change()

subroutine, public pw_grids::pw_grid_change ( real(kind=dp), dimension(3, 3), intent(in)  cell_hmat,
type(pw_grid_type), intent(inout)  pw_grid 
)

Recalculate the g-vectors after a change of the box.

Parameters
cell_hmat...
pw_grid...
History
JGH (20-12-2000) : get local grid size from definition of g. Assume that gsq is allocated. Local routine, no information on distribution of PW required. JGH (8-Mar-2001) : also update information on volume and grid spaceing
Author
apsi Christopher Mundy

Definition at line 2067 of file pw_grids.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pw_grid_retain()

subroutine, public pw_grids::pw_grid_retain ( type(pw_grid_type), intent(inout)  pw_grid)

retains the given pw grid

Parameters
pw_gridthe pw grid to retain
History
04.2003 created [fawzi]
Author
fawzi
Note
see doc/ReferenceCounting.html

Definition at line 2116 of file pw_grids.F.

Here is the caller graph for this function:

◆ pw_grid_release()

subroutine, public pw_grids::pw_grid_release ( type(pw_grid_type), pointer  pw_grid)

releases the given pw grid

Parameters
pw_gridthe pw grid to release
History
04.2003 created [fawzi]
Author
fawzi
Note
see doc/ReferenceCounting.html

Definition at line 2132 of file pw_grids.F.

Here is the caller graph for this function:

Variable Documentation

◆ do_pw_grid_blocked_false

integer, parameter, public pw_grids::do_pw_grid_blocked_false = 0

Definition at line 78 of file pw_grids.F.

◆ do_pw_grid_blocked_true

integer, parameter, public pw_grids::do_pw_grid_blocked_true = 1

Definition at line 78 of file pw_grids.F.

◆ do_pw_grid_blocked_free

integer, parameter, public pw_grids::do_pw_grid_blocked_free = 2

Definition at line 78 of file pw_grids.F.