w90_readwrite_set_kmesh Subroutine

public subroutine w90_readwrite_set_kmesh(spacing, reclat, mesh)

This routines returns the three integers that define the interpolation k-mesh, satisfying the condition that the spacing between two neighboring points along each of the three k_x, k_y and k_z directions is at smaller than a given spacing.

The reclat is defined as: * 'b_1' = (recip_lattice(1,I), i=1,3) * 'b_2' = (recip_lattice(2,I), i=1,3) * 'b_3' = (recip_lattice(3,I), i=1,3)

spacing must be > 0 (and in particular different from zero). We don't check this here.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: spacing

Minimum spacing between neighboring points, in angstrom^(-1)

real(kind=dp), intent(in) :: reclat(3,3)

Matrix of the reciprocal lattice vectors in cartesian coordinates, in angstrom^(-1)

integer, intent(out) :: mesh(3)

Will contain the three integers defining the interpolation k-mesh


Called by

proc~~w90_readwrite_set_kmesh~~CalledByGraph proc~w90_readwrite_set_kmesh w90_readwrite_set_kmesh proc~get_module_kmesh get_module_kmesh proc~get_module_kmesh->proc~w90_readwrite_set_kmesh proc~w90_wannier90_readwrite_read_global_kmesh w90_wannier90_readwrite_read_global_kmesh proc~w90_wannier90_readwrite_read_global_kmesh->proc~w90_readwrite_set_kmesh proc~w90_postw90_readwrite_read w90_postw90_readwrite_read proc~w90_postw90_readwrite_read->proc~w90_wannier90_readwrite_read_global_kmesh proc~w90_wannier90_readwrite_read_local_kmesh w90_wannier90_readwrite_read_local_kmesh proc~w90_postw90_readwrite_read->proc~w90_wannier90_readwrite_read_local_kmesh proc~w90_postw90_readwrite_readall w90_postw90_readwrite_readall proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_global_kmesh proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_local_kmesh proc~w90_wannier90_readwrite_read_local_kmesh->proc~get_module_kmesh program~postw90 postw90 program~postw90->proc~w90_postw90_readwrite_read

Source Code

  subroutine w90_readwrite_set_kmesh(spacing, reclat, mesh)
    !! This routines returns the three integers that define the interpolation k-mesh, satisfying
    !! the condition that the spacing between two neighboring points along each of the three
    !! k_x, k_y and k_z directions is at smaller than a given spacing.
    !!
    !! The reclat is defined as:
    !!   * 'b_1' = (recip_lattice(1,I), i=1,3)
    !!   * 'b_2' = (recip_lattice(2,I), i=1,3)
    !!   * 'b_3' = (recip_lattice(3,I), i=1,3)
    !!
    !!  spacing must be > 0 (and in particular different from zero). We don't check this here.
    !!
    implicit none
    real(kind=dp), intent(in) :: spacing
    !! Minimum spacing between neighboring points, in angstrom^(-1)
    real(kind=dp), intent(in) :: reclat(3, 3)
    !! Matrix of the reciprocal lattice vectors in cartesian coordinates, in angstrom^(-1)
    integer, intent(out) :: mesh(3)
    !! Will contain the three integers defining the interpolation k-mesh

    real(kind=dp) :: blen(3)
    integer :: i

    do i = 1, 3
      blen(i) = sqrt(sum(reclat(i, :)**2))
    end do

    do i = 1, 3
      mesh(i) = int(floor(blen(i)/spacing)) + 1
    end do
  end subroutine w90_readwrite_set_kmesh