cell_type Derived Type

type, public :: cell_type

simulation cell type


Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
integer, public :: id
integer, public, dimension(3):: num_points

number of points along each direction

integer, public, dimension(3):: num_points_r

real number of points along each direction

real(kind=dp), public :: volume

volume of the cell

real(kind=dp), public, dimension(3):: origin

coordinates of the point of origin

real(kind=dp), public, dimension(3,3):: lattice

lattice vectors

real(kind=dp), public, dimension(3,3):: lattice_inverse

inverse lattice vectors


Type-Bound Procedures

procedure, public :: init => init_cell

  • private subroutine init_cell(this, id, num_points, num_points_r, origin, lattice)

    Arguments

    TypeIntentOptionalAttributesName
    class(cell_type), intent(inout) :: this
    integer, intent(in) :: id

    ID of a cell

    integer, intent(in), dimension(3):: num_points

    number of points in each dimension

    integer, intent(in), dimension(3):: num_points_r

    Real dimensions of arrays (in CPMD that would be +1 along each dim)

    real(kind=dp), intent(in), dimension(3):: origin

    Coordinates of a point of origin

    real(kind=dp), intent(in), dimension(3,3):: lattice

    lattice vectors

Source Code

    type :: cell_type
        private
        integer, public :: id
        !> number of points along each direction
        integer, dimension(3), public :: num_points
        !> real number of points along each direction
        integer, dimension(3), public :: num_points_r
        !> volume of the cell
        real(dp), public :: volume
        !> coordinates of the point of origin
        real(dp), dimension(3), public :: origin
        !> lattice vectors
        real(dp), dimension(3,3), public :: lattice
        !> inverse lattice vectors
        real(dp), dimension(3,3), public :: lattice_inverse
    contains
        private
        procedure, public :: init => init_cell
    end type cell_type