BaseMesh

This module provides basical meshes.

BrillouinZoneMeshes.BaseMesh.AbstractUniformMeshType
abstract type AbstractUniformMesh{T,DIM} <: AbstractMesh{T,DIM}

Parent type of all uniform meshes.

Mesh points of a uniform mesh is assumed to be uniformly distributed in an parrallelogram area. Uniform meshes support fractional coordinates.

All concrete implementations of this abstract type are assumed to have the following fields:

Required Fields:

  • origin: the origin(bottom-left point) of the area
  • shift: the fractional coordinate shift of the mesh. This is useful to reproduce M-P mesh commonly used in DFT.

and have the following methods implemented:

Required Methods:

  • lattice_vector: return lattice vector of the represented area
  • inv_lattice_vector: return inverse of lattice vector
  • cell_volume: return cell volume
source
BrillouinZoneMeshes.BaseMesh.UMeshType
struct UMesh{T,DIM} <: AbstractUniformMesh{T,DIM}

Simplest uniform mesh with lattice/invlattice/cellvolume stored.

Fields:

  • lattice: lattice vector
  • inv_lattice: inverse lattice vector
  • cell_volume: volume of the area represented
  • origin: the origin(bottom-left point) of the area
  • size: size of the mesh
  • shift: the fractional coordinate shift of the mesh. This is useful to reproduce M-P mesh commonly used in DFT.
source
BrillouinZoneMeshes.BaseMesh.UMeshMethod
UMesh(;br::Cell{T,DIM}, origin, size, shift)

Construct a UMesh from a brillouin zone with given origin, size and shift.

Parameters:

  • br: brillouin zone containing information of the area represented
  • origin: the origin(bottom-left point) of the area
  • size: size of the mesh
  • shift: the fractional coordinate shift of the mesh. This is useful to reproduce M-P mesh commonly used in DFT.
source
BrillouinZoneMeshes.AbstractMeshes.integrateMethod
function AbstractMeshes.integrate(data, mesh::AbstractUniformMesh)

Default integration for uniform meshes. Use zeroth-order integration, i.e. average value times volume.

Parameters:

  • data: data
  • mesh: mesh
source
BrillouinZoneMeshes.AbstractMeshes.locateMethod
function AbstractMeshes.locate(mesh::AbstractUniformMesh{T,DIM}, x) where {T,DIM}

locate mesh point in mesh that is nearest to x. Useful for Monte-Carlo algorithm. Could also be used for zeroth order interpolation.

Parameters

  • mesh: aimed mesh
  • x: cartesian pos to locate
source
BrillouinZoneMeshes.AbstractMeshes.volumeMethod
function AbstractMeshes.volume(mesh::AbstractUniformMesh, i)

volume represented by mesh point i. When i is omitted return volume of the whole mesh. For M-P mesh it's always volume(mesh)/length(mesh), but for others things are more complecated. Here we assume periodic boundary condition so for all case it's the same.

Parameters:

  • mesh: mesh
  • i: index of mesh point, if ommited return volume of whole mesh
source