Octopus
cube_oct_m Module Reference

Data Types

type  cube_t
 
type  dimensions_t
 It is intended to be used within a vector. More...
 

Functions/Subroutines

subroutine, public cube_init (cube, nn, namespace, space, spacing, coord_system, fft_type, fft_library, dont_optimize, nn_out, mpi_grp, need_partition, tp_enlarge, blocksize, batch_size, batch_axis)
 
subroutine, public cube_end (cube)
 
subroutine cube_init_fourier_mode_numbers_mapping (cube)
 Initialises the mapping between local cube index in Fourier space and global FFT integer frequencies. FFT integer frequencies directly translate to G-vectors. More...
 
subroutine cube_tp_fft_defaults (cube, fft_library)
 
subroutine cube_init_coords (cube, tp_enlarge, spacing, fft_library)
 
logical function, public cube_global2local (cube, ixyz, lxyz)
 True if global coordinates belong to this process. On output lxyz contains the local coordinates. More...
 
integer function, public cube_getfftlibrary (cube)
 Returns the FFT library of the cube. Possible values are FFTLIB_NONE, FFTLIB_FFTW, FFTLIB_PFFT FFTLIB_ACCEL, FFTLIB_NFFT and FFTLIB_PNFFT (defined in fft.F90) More...
 
subroutine cube_do_mapping (cube, fs)
 do the mapping between global and local points of the cube More...
 
integer pure function, public cube_point_to_process (mpi_grp, xyz, part)
 
subroutine cube_set_blocksize (rs_n_global, blocksize, rank, rs_n, rs_istart)
 
subroutine, public cube_partition (cube, part)
 
subroutine cube_partition_messages_debug (cube, namespace)
 
subroutine, public cube_init_cube_map (cube, mesh)
 

Function/Subroutine Documentation

◆ cube_init()

subroutine, public cube_oct_m::cube_init ( type(cube_t), intent(out)  cube,
integer, dimension(:), intent(in)  nn,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
real(real64), dimension(:), intent(in)  spacing,
class(coordinate_system_t), intent(in)  coord_system,
integer, intent(in), optional  fft_type,
integer, intent(in), optional  fft_library,
logical, intent(in), optional  dont_optimize,
integer, dimension(3), intent(out), optional  nn_out,
type(mpi_grp_t), intent(in), optional  mpi_grp,
logical, intent(in), optional  need_partition,
real(real64), dimension(3), intent(in), optional  tp_enlarge,
integer, intent(in), optional  blocksize,
integer, intent(in), optional  batch_size,
integer, intent(in), optional  batch_axis 
)
Parameters
[in]fft_typeIs the cube going to be used to perform FFTs?
[in]fft_libraryWhat fft library to use
[in]dont_optimizeif true, do not optimize grid for FFT
[out]nn_outWhat are the FFT dims? If optimized, may be different from input nn.
[in]mpi_grpThe mpi group to be use for cube parallelization
[in]need_partitionShould we calculate and store the cube partition?
[in]tp_enlargeTwo point enlargement factor. Can be used with (p)nfft enlarge the box by moving outward the cube first and last points in each direction. The resulting boundaries are rescaled by tp_enlarge.
[in]blocksizejust use a fixed block decomposition without caring about FFT library. See description for cube_set_blocksize.
[in]batch_sizeNumber of cubes held at once. Directly determines
[in]batch_axisBatch memory layout: 1 = batch-first (default),

Definition at line 210 of file cube.F90.

◆ cube_end()

subroutine, public cube_oct_m::cube_end ( type(cube_t), intent(inout)  cube)

Definition at line 402 of file cube.F90.

◆ cube_init_fourier_mode_numbers_mapping()

subroutine cube_oct_m::cube_init_fourier_mode_numbers_mapping ( class(cube_t), intent(inout)  cube)
private

Initialises the mapping between local cube index in Fourier space and global FFT integer frequencies. FFT integer frequencies directly translate to G-vectors.

Example usage:

do lz = 1, cube%fs_n(3)
gz = cube%fs_ifz(lz)
do ly = 1, cube%fs_n(2)
gy = cube%fs_ify(ly)
do lx = 1, cube%fs_n(1)
gx = cube%fs_ifx(lx)
Parameters
[in,out]cubeFills the attributes fs_ifx,fs_ify,fs_ifz

Definition at line 450 of file cube.F90.

◆ cube_tp_fft_defaults()

subroutine cube_oct_m::cube_tp_fft_defaults ( type(cube_t), intent(inout)  cube,
integer, intent(in)  fft_library 
)
private

Definition at line 477 of file cube.F90.

◆ cube_init_coords()

subroutine cube_oct_m::cube_init_coords ( type(cube_t), intent(inout)  cube,
real(real64), dimension(3), intent(in)  tp_enlarge,
real(real64), dimension(3), intent(in)  spacing,
integer, intent(in)  fft_library 
)
private

Definition at line 499 of file cube.F90.

◆ cube_global2local()

logical function, public cube_oct_m::cube_global2local ( type(cube_t), intent(in)  cube,
integer, dimension(3), intent(in)  ixyz,
integer, dimension(3), intent(out)  lxyz 
)

True if global coordinates belong to this process. On output lxyz contains the local coordinates.

Parameters
[in]ixyzglobal coordinates
[out]lxyzlocal coordinates

Definition at line 563 of file cube.F90.

◆ cube_getfftlibrary()

integer function, public cube_oct_m::cube_getfftlibrary ( type(cube_t), intent(in)  cube)

Returns the FFT library of the cube. Possible values are FFTLIB_NONE, FFTLIB_FFTW, FFTLIB_PFFT FFTLIB_ACCEL, FFTLIB_NFFT and FFTLIB_PNFFT (defined in fft.F90)

Definition at line 583 of file cube.F90.

◆ cube_do_mapping()

subroutine cube_oct_m::cube_do_mapping ( type(cube_t), intent(inout)  cube,
logical, intent(in)  fs 
)
private

do the mapping between global and local points of the cube

Parameters
[in]fsfill the fs mapping too

Definition at line 595 of file cube.F90.

◆ cube_point_to_process()

integer pure function, public cube_oct_m::cube_point_to_process ( type(mpi_grp_t), intent(in)  mpi_grp,
integer, dimension(1:3), intent(in)  xyz,
type(dimensions_t), dimension(:), intent(in)  part 
)

Definition at line 736 of file cube.F90.

◆ cube_set_blocksize()

subroutine cube_oct_m::cube_set_blocksize ( integer, dimension(1:3), intent(in)  rs_n_global,
integer, intent(in)  blocksize,
integer, intent(in)  rank,
integer, dimension(1:3), intent(out)  rs_n,
integer, dimension(1:3), intent(out)  rs_istart 
)
private

Definition at line 766 of file cube.F90.

◆ cube_partition()

subroutine, public cube_oct_m::cube_partition ( type(cube_t), intent(in)  cube,
type(dimensions_t), dimension(:), intent(out)  part 
)

Definition at line 785 of file cube.F90.

◆ cube_partition_messages_debug()

subroutine cube_oct_m::cube_partition_messages_debug ( type(cube_t), intent(in)  cube,
type(namespace_t), intent(in)  namespace 
)
private

Definition at line 826 of file cube.F90.

◆ cube_init_cube_map()

subroutine, public cube_oct_m::cube_init_cube_map ( type(cube_t), intent(inout)  cube,
class(mesh_t), intent(in)  mesh 
)

Definition at line 881 of file cube.F90.