Grid
Work in progress!
The Grid in Octopus
Introduction
The fundamental element of Octopus is the real space grid, on which all quantities, such as wave functions, densities and potentials are defined.
In general, a grid consists of
- the mesh
- the simulation box
The mesh is based on an regular mesh in D dimensions, which can be distorted using so-called curvilinear coordinates.
The underlying internal structure is a mesh of integer coordinates and the important mapping arrays which
- map the index to the D integer coordinates
- map the integer coordinates to the index.
The grid is constructed in several steps:
- Generation of a regular mesh filling a rectangular volume enclosing the simulation box.
- Selecting inner points, enlargement points and ghost points.
- re-ordering the points and regeneration of the mapping arrays.
The top level data structure, describing a grid is defined in
grid/grid.F90
:
type, extends(mesh_t) :: grid_t
! Components are public by default
type(derivatives_t) :: der
type(stencil_t) :: stencil
type(symmetries_t) :: symm
type(symmetrizer_t) :: symmetrizer
end type grid_t