Octopus
grid_oct_m Module Reference

This module implements the underlying real-space grid. More...

Detailed Description

This module implements the underlying real-space grid.

Data Types

type  grid_t
 Description of the grid, containing information on derivatives, stencil, and symmetries. More...
 

Functions/Subroutines

subroutine, public grid_init_stage_1 (gr, namespace, space, symm, latt, n_sites, site_position)
 First stage of the grid initialization. More...
 
subroutine, public grid_init_from_grid_stage_1 (gr, original_gr, namespace, space, box, spacing_prefactor, latt, n_sites, site_position)
 this subroutine allows to create a grid from an existing grid More...
 
subroutine initialize_coordinate_system (gr, namespace, space, latt, n_sites, site_position)
 this subroutine initializes the coordinate system More...
 
subroutine, public grid_init_stage_2 (gr, namespace, space, mc, qvector)
 Second stage of the grid initialization. More...
 
subroutine, public grid_end (gr)
 finalize a grid object More...
 
subroutine, public grid_write_info (gr, iunit, namespace)
 
subroutine, public grid_lattice_vectors_update (gr, space, namespace, mc, new_latt)
 Regenerate the grid information after update of the lattice vectors. More...
 
subroutine, public dgrid_symmetrize_scalar_field (gr, field, suppress_warning)
 
subroutine, public dgrid_symmetrize_vector_field (gr, field, suppress_warning)
 
subroutine, public dgrid_symmetrize_single (gr, iop, field, symm_field, suppress_warning)
 
subroutine, public zgrid_symmetrize_scalar_field (gr, field, suppress_warning)
 
subroutine, public zgrid_symmetrize_vector_field (gr, field, suppress_warning)
 
subroutine, public zgrid_symmetrize_single (gr, iop, field, symm_field, suppress_warning)
 

Variables

integer, parameter curv_affine = 1
 
integer, parameter curv_gygi = 2
 
integer, parameter curv_briggs = 3
 
integer, parameter curv_modine = 4
 

Function/Subroutine Documentation

◆ grid_init_stage_1()

subroutine, public grid_oct_m::grid_init_stage_1 ( type(grid_t), intent(inout)  gr,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(symmetries_t), intent(in), optional  symm,
type(lattice_vectors_t), intent(in), optional  latt,
integer, intent(in), optional  n_sites,
real(real64), dimension(:,:), intent(in), optional  site_position 
)

First stage of the grid initialization.

  • Read the input variables
  • Initialize the coordinate system
  • Initialize the derivatives
  • Set up the stencil
  • initialize the mesh (stages 1 and 2)

Definition at line 193 of file grid.F90.

◆ grid_init_from_grid_stage_1()

subroutine, public grid_oct_m::grid_init_from_grid_stage_1 ( type(grid_t), intent(inout)  gr,
type(grid_t), intent(in)  original_gr,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
class(box_t), intent(in), optional, target  box,
real(real64), dimension(:), intent(in), optional  spacing_prefactor,
type(lattice_vectors_t), intent(in), optional  latt,
integer, intent(in), optional  n_sites,
real(real64), dimension(:,:), intent(in), optional  site_position 
)

this subroutine allows to create a grid from an existing grid

Parameters
[in,out]grThe grid to initialize
[in]original_grThe original grid from where to copy the data
[in]boxthe box that contains the grid

Definition at line 306 of file grid.F90.

◆ initialize_coordinate_system()

subroutine grid_oct_m::initialize_coordinate_system ( type(grid_t), intent(inout)  gr,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in), optional  latt,
integer, intent(in), optional  n_sites,
real(real64), dimension(:,:), intent(in), optional  site_position 
)
private

this subroutine initializes the coordinate system

read information from input file and set up the coordinate system type

Definition at line 370 of file grid.F90.

◆ grid_init_stage_2()

subroutine, public grid_oct_m::grid_init_stage_2 ( type(grid_t), intent(inout), target  gr,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(multicomm_t), intent(in)  mc,
real(real64), dimension(:), intent(in), optional  qvector 
)

Second stage of the grid initialization.

  • finish mesh initialization
  • initialize non-local operators
  • write grid info
  • initialize symmetrizer

Definition at line 464 of file grid.F90.

◆ grid_end()

subroutine, public grid_oct_m::grid_end ( type(grid_t), intent(inout)  gr)

finalize a grid object

Definition at line 492 of file grid.F90.

◆ grid_write_info()

subroutine, public grid_oct_m::grid_write_info ( type(grid_t), intent(in)  gr,
integer, intent(in), optional  iunit,
type(namespace_t), intent(in), optional  namespace 
)

Definition at line 521 of file grid.F90.

◆ grid_lattice_vectors_update()

subroutine, public grid_oct_m::grid_lattice_vectors_update ( type(grid_t), intent(inout)  gr,
type(space_t), intent(in)  space,
type(namespace_t), intent(in)  namespace,
type(multicomm_t), intent(in)  mc,
type(lattice_vectors_t), intent(in)  new_latt 
)

Regenerate the grid information after update of the lattice vectors.

We assume here that the number of grid points are not changing

Definition at line 551 of file grid.F90.

◆ dgrid_symmetrize_scalar_field()

subroutine, public grid_oct_m::dgrid_symmetrize_scalar_field ( type(grid_t), intent(in)  gr,
real(real64), dimension(:), intent(inout)  field,
logical, intent(in), optional  suppress_warning 
)

Definition at line 660 of file grid.F90.

◆ dgrid_symmetrize_vector_field()

subroutine, public grid_oct_m::dgrid_symmetrize_vector_field ( type(grid_t), intent(in)  gr,
real(real64), dimension(:,:), intent(inout)  field,
logical, intent(in), optional  suppress_warning 
)

Definition at line 686 of file grid.F90.

◆ dgrid_symmetrize_single()

subroutine, public grid_oct_m::dgrid_symmetrize_single ( type(grid_t), intent(in)  gr,
integer, intent(in)  iop,
real(real64), dimension(:), intent(in)  field,
real(real64), dimension(:), intent(out)  symm_field,
logical, intent(in), optional  suppress_warning 
)

Definition at line 714 of file grid.F90.

◆ zgrid_symmetrize_scalar_field()

subroutine, public grid_oct_m::zgrid_symmetrize_scalar_field ( type(grid_t), intent(in)  gr,
complex(real64), dimension(:), intent(inout)  field,
logical, intent(in), optional  suppress_warning 
)

Definition at line 804 of file grid.F90.

◆ zgrid_symmetrize_vector_field()

subroutine, public grid_oct_m::zgrid_symmetrize_vector_field ( type(grid_t), intent(in)  gr,
complex(real64), dimension(:,:), intent(inout)  field,
logical, intent(in), optional  suppress_warning 
)

Definition at line 830 of file grid.F90.

◆ zgrid_symmetrize_single()

subroutine, public grid_oct_m::zgrid_symmetrize_single ( type(grid_t), intent(in)  gr,
integer, intent(in)  iop,
complex(real64), dimension(:), intent(in)  field,
complex(real64), dimension(:), intent(out)  symm_field,
logical, intent(in), optional  suppress_warning 
)

Definition at line 858 of file grid.F90.

Variable Documentation

◆ curv_affine

integer, parameter grid_oct_m::curv_affine = 1
private

Definition at line 176 of file grid.F90.

◆ curv_gygi

integer, parameter grid_oct_m::curv_gygi = 2
private

Definition at line 176 of file grid.F90.

◆ curv_briggs

integer, parameter grid_oct_m::curv_briggs = 3
private

Definition at line 176 of file grid.F90.

◆ curv_modine

integer, parameter grid_oct_m::curv_modine = 4
private

Definition at line 176 of file grid.F90.