Documentation for module pw_pool_types

Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate grids that are never given back.

source: pw_pool_types.F
Loading...

public Types:

pw_pool_p_type
to create arrays of pools
pw_pool_type
Manages a pool of grids (to be used for example as tmp objects), but can also be used to intantiate grids that are never given back.

public Subroutines/Functions:

copies a multigrid pool, the underlying pools are shared
creates a multigrid structure
SUBROUTINE
pw_pools_dealloc (pools)
deallocates the given pools (releasing each of the underlying pools)
returns the pw part of the coefficents into the pools
creates a pool for pw
returns a 3d real array of coefficents as the one used by pw with REALDATA3D, allocating it if none is present in the pool
returns a pw, allocating it if none is in the pool
returns a 3d real array of coefficents as the one used by pw with REALDATA3D, allocating it if none is present in the pool
returns the pw to the pool
SUBROUTINE
pw_pool_release (pool)
releases the given pool (see cp2k/doc/ReferenceCounting.html)
SUBROUTINE
pw_pool_retain (pool)
retains the pool (see cp2k/doc/ReferenceCounting.html)

public Types:

TYPE :: pw_pool_p_type

to create arrays of pools


POINTER :: pool the pool

TYPE :: pw_pool_type

Manages a pool of grids (to be used for example as tmp objects), but can also be used to intantiate grids that are never given back.


INTEGER
:: ref_count reference count (see /cp2k/doc/ReferenceCounting.html)
INTEGER
:: id_nr number that identifies each pool
INTEGER
:: max_cache ...
POINTER :: pw_grid ...
POINTER :: real1d_pw ...
POINTER :: real3d_pw ...
POINTER :: complex1d_pw ...
POINTER :: complex3d_pw ...
POINTER :: real3d_array ...

SUBROUTINEpw_pools_copy(source_pools, target_pools)

copies a multigrid pool, the underlying pools are shared

Arguments:
POINTER
:: source_pools(:) the pools to copy
POINTER
:: target_pools(:) will hold the copy of the pools

SUBROUTINEpw_pools_create_pws(pools, pws, use_data, in_space)

creates a multigrid structure

Arguments:
POINTER
:: pools(:) the multigrid pool (i.e. an array of pw_pool)
TYPE(pw_p_type),
POINTER
:: pws(:) the multigrid of coefficent you want to initialize
INTEGER,
INTENT(in)
:: use_data which data it uses: REALDATA1D, COMPLEXDATA1D, REALDATA3D, COMPLEXDATA3D
INTEGER,
INTENT(in),
OPTIONAL
:: in_space ...

SUBROUTINEpw_pools_dealloc(pools)

deallocates the given pools (releasing each of the underlying pools)

Arguments:
POINTER
:: pools(:) the pols to deallocate

SUBROUTINEpw_pools_give_back_pws(pools, pws)

returns the pw part of the coefficents into the pools

Arguments:
POINTER
:: pools(:) the pools that will cache the pws %pw
TYPE(pw_p_type),
POINTER
:: pws(:) the coefficents to give back

SUBROUTINEpw_pool_create(pool, pw_grid, max_cache)

creates a pool for pw

Arguments:
POINTER
:: pool the pool to create
POINTER
:: pw_grid the grid that is used to create the pw
INTEGER,
OPTIONAL
:: max_cache ...

SUBROUTINEpw_pool_create_cr3d(pw_pool, cr3d)

returns a 3d real array of coefficents as the one used by pw with REALDATA3D, allocating it if none is present in the pool

Arguments:
POINTER
:: pw_pool the pool that caches the cr3d
REAL(dp),
POINTER
:: cr3d(:,:,:) the pointer that will contain the array

SUBROUTINEpw_pool_create_pw(pool, pw, use_data, in_space)

returns a pw, allocating it if none is in the pool

Arguments:
POINTER
:: pool the pool from where you get the pw
TYPE(pw_type),
POINTER
:: pw will contain the new pw
INTEGER,
INTENT(in)
:: use_data which data it uses: REALDATA1D, COMPLEXDATA1D, REALDATA3D, COMPLEXDATA3D
INTEGER,
INTENT(in),
OPTIONAL
:: in_space in which space it is: REALSPACE, RECIPROCALSPACE

SUBROUTINEpw_pool_give_back_cr3d(pw_pool, cr3d, accept_non_compatible)

returns a 3d real array of coefficents as the one used by pw with REALDATA3D, allocating it if none is present in the pool

Arguments:
POINTER
:: pw_pool the pool that caches the cr3d
REAL(dp),
POINTER
:: cr3d(:,:,:) the pointer that will contain the array
LOGICAL,
INTENT(in),
OPTIONAL
:: accept_non_compatible if true deallocates the non compatible arrays passed in, if false (the default) stops with an error

SUBROUTINEpw_pool_give_back_pw(pool, pw, accept_non_compatible)

returns the pw to the pool

Arguments:
POINTER
:: pool the pool where to reintegrate the pw
TYPE(pw_type),
POINTER
:: pw the pw to give back
LOGICAL,
INTENT(in),
OPTIONAL
:: accept_non_compatible if non compatible pw should be accepted (they will be destroied). Defaults to false (and thus stops with an error)

SUBROUTINEpw_pool_release(pool)

releases the given pool (see cp2k/doc/ReferenceCounting.html)

Arguments:
POINTER
:: pool the pool to release

SUBROUTINEpw_pool_retain(pool)

retains the pool (see cp2k/doc/ReferenceCounting.html)

Arguments:
POINTER
:: pool the pool to retain