Octopus
fourier_space_oct_m Module Reference

Data Types

type  fourier_space_op_t
 Definition of a Fourier Space Coulomb Kernel. More...
 

Functions/Subroutines

subroutine fourier_space_op_init (this, space, qvector, cam, singularity)
 Initialise a Fourier space Op instance. More...
 
subroutine fourier_space_op_end (this)
 Finalize an instance of fourier_space_op_t. More...
 
subroutine dfourier_space_op_set_op (this, cube, op, in_device, op_move)
 Set the op buffer, which defines the kernel on the cube, in Fourier space. More...
 
subroutine, public dfourier_space_op_apply (this, cube, cf)
 Applies a multiplication factor to the Fourier space grid. This is a local function. More...
 
subroutine zfourier_space_op_set_op (this, cube, op, in_device, op_move)
 Set the op buffer, which defines the kernel on the cube, in Fourier space. More...
 
subroutine, public zfourier_space_op_apply (this, cube, cf)
 Applies a multiplication factor to the Fourier space grid. This is a local function. More...
 
subroutine, public sfourier_space_op_apply (this, cube, cf)
 Applies a multiplication factor to the Fourier space grid. This is a local function. More...
 
subroutine, public cfourier_space_op_apply (this, cube, cf)
 Applies a multiplication factor to the Fourier space grid. This is a local function. More...
 

Variables

real(real64), parameter, public vanishing_q = 1.0e-5_real64
 Vanishingly small q-vector. More...
 
real(real64), parameter tol_vanishing_q = 1e-6_real64
 

Function/Subroutine Documentation

◆ fourier_space_op_init()

subroutine fourier_space_oct_m::fourier_space_op_init ( class(fourier_space_op_t), intent(inout)  this,
class(space_t), intent(in)  space,
real(real64), dimension(:), intent(in)  qvector,
type(xc_cam_t), intent(in)  cam,
real(real64), intent(in), optional  singularity 
)
private

Initialise a Fourier space Op instance.

Only the parameters defining the kernel are set here. The op buffer itself is installed by a kernel builder through dset_op/zset_op.

Note
This is not a Fortran finaliser-backed constructor: this must be freshly declared, or have been released with end(), before calling init.
Parameters
[in]qvectorq-vector
[in]camCAM parameters
[in]singularityMust be defined for all but the short-range Coulomb potential

Definition at line 189 of file fourier_space.F90.

◆ fourier_space_op_end()

subroutine fourier_space_oct_m::fourier_space_op_end ( class(fourier_space_op_t), intent(inout)  this)
private

Finalize an instance of fourier_space_op_t.

Definition at line 213 of file fourier_space.F90.

◆ dfourier_space_op_set_op()

subroutine fourier_space_oct_m::dfourier_space_op_set_op ( class(fourier_space_op_t), intent(inout)  this,
type(cube_t), intent(in)  cube,
real(real64), dimension(:, :, :), intent(in), optional, target  op,
logical, intent(in), optional  in_device,
real(real64), dimension(:, :, :), intent(inout), optional, allocatable, target  op_move 
)
private

Set the op buffer, which defines the kernel on the cube, in Fourier space.

The operator can be provided either through op (which is copied) or through op_move (an allocatable that is taken over via move_alloc, avoiding a full-grid copy). Exactly one of the two must be present.

Definition at line 313 of file fourier_space.F90.

◆ dfourier_space_op_apply()

subroutine, public fourier_space_oct_m::dfourier_space_op_apply ( type(fourier_space_op_t), intent(in)  this,
type(cube_t), intent(in)  cube,
type(cube_function_t), intent(inout)  cf 
)

Applies a multiplication factor to the Fourier space grid. This is a local function.

One handle per multiplication kernel. The kernel is picked by the operator, not by the instantiation, so a single shared handle would keep running the first one built.

Definition at line 443 of file fourier_space.F90.

◆ zfourier_space_op_set_op()

subroutine fourier_space_oct_m::zfourier_space_op_set_op ( class(fourier_space_op_t), intent(inout)  this,
type(cube_t), intent(in)  cube,
complex(real64), dimension(:, :, :), intent(in), optional, target  op,
logical, intent(in), optional  in_device,
complex(real64), dimension(:, :, :), intent(inout), optional, allocatable, target  op_move 
)
private

Set the op buffer, which defines the kernel on the cube, in Fourier space.

The operator can be provided either through op (which is copied) or through op_move (an allocatable that is taken over via move_alloc, avoiding a full-grid copy). Exactly one of the two must be present.

Definition at line 673 of file fourier_space.F90.

◆ zfourier_space_op_apply()

subroutine, public fourier_space_oct_m::zfourier_space_op_apply ( type(fourier_space_op_t), intent(in)  this,
type(cube_t), intent(in)  cube,
type(cube_function_t), intent(inout)  cf 
)

Applies a multiplication factor to the Fourier space grid. This is a local function.

One handle per multiplication kernel. The kernel is picked by the operator, not by the instantiation, so a single shared handle would keep running the first one built.

Definition at line 803 of file fourier_space.F90.

◆ sfourier_space_op_apply()

subroutine, public fourier_space_oct_m::sfourier_space_op_apply ( type(fourier_space_op_t), intent(in)  this,
type(cube_t), intent(in)  cube,
type(cube_function_t), intent(inout)  cf 
)

Applies a multiplication factor to the Fourier space grid. This is a local function.

One handle per multiplication kernel. The kernel is picked by the operator, not by the instantiation, so a single shared handle would keep running the first one built.

Definition at line 1034 of file fourier_space.F90.

◆ cfourier_space_op_apply()

subroutine, public fourier_space_oct_m::cfourier_space_op_apply ( type(fourier_space_op_t), intent(in)  this,
type(cube_t), intent(in)  cube,
type(cube_function_t), intent(inout)  cf 
)

Applies a multiplication factor to the Fourier space grid. This is a local function.

One handle per multiplication kernel. The kernel is picked by the operator, not by the instantiation, so a single shared handle would keep running the first one built.

Definition at line 1238 of file fourier_space.F90.

Variable Documentation

◆ vanishing_q

real(real64), parameter, public fourier_space_oct_m::vanishing_q = 1.0e-5_real64

Vanishingly small q-vector.

Definition at line 177 of file fourier_space.F90.

◆ tol_vanishing_q

real(real64), parameter fourier_space_oct_m::tol_vanishing_q = 1e-6_real64
private

Definition at line 178 of file fourier_space.F90.