Octopus
smear_oct_m Module Reference

Data Types

type  smear_t
 

Functions/Subroutines

subroutine, public smear_init (this, namespace, ispin, fixed_occ, integral_occs, kpoints)
 
subroutine, public smear_copy (to, from)
 
subroutine, public smear_find_fermi_energy (this, namespace, eigenvalues, occupations, qtot, nik, nst, kweights)
 
subroutine bisection_find_fermi_energy (this, namespace, dsmear_in, tol, eigenvalues, kweights, nik, q_in, start_band, end_band, e_fermi, ef_occ)
 
subroutine bisection_find_fermi_energy_tetra (this, namespace, tol, eigenvalues, nik, nst, q_in, e_fermi)
 Finds the Fermi energy using the tetrahedron method via bisection. More...
 
subroutine, public smear_fill_occupations (this, eigenvalues, occupations, kweights, nik, nst)
 
real(real64) function, public smear_calc_entropy (this, eigenvalues, nik, nst, kweights, occ)
 
real(real64) function, public smear_delta_function (this, xx)
 
real(real64) function, public smear_step_function (this, xx)
 
real(real64) function, public smear_entropy_function (this, xx)
 This function is defined as \( \int_{-infty}^x y delta(y) dy \). More...
 
logical pure function, public smear_is_semiconducting (this)
 
subroutine, public smear_write_info (this, namespace, iunit)
 

Variables

integer, parameter, public smear_semiconductor = 1
 
integer, parameter, public smear_fermi_dirac = 2
 
integer, parameter, public smear_cold = 3
 
integer, parameter, public smear_methfessel_paxton = 4
 
integer, parameter, public smear_spline = 5
 
integer, parameter, public smear_fixed_occ = 6
 
integer, parameter, public smear_gaussian = 7
 
integer, parameter, public smear_lorentzian = 8
 
integer, parameter, public smear_tetrahedra = 21
 
integer, parameter, public smear_tetrahedra_opt = 22
 
real(real64), parameter tol_smear = 1e-6_real64
 

Function/Subroutine Documentation

◆ smear_init()

subroutine, public smear_oct_m::smear_init ( type(smear_t), intent(out)  this,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  ispin,
logical, intent(in)  fixed_occ,
logical, intent(in)  integral_occs,
type(kpoints_t), intent(in)  kpoints 
)

Definition at line 193 of file smear.F90.

◆ smear_copy()

subroutine, public smear_oct_m::smear_copy ( type(smear_t), intent(out)  to,
type(smear_t), intent(in)  from 
)

Definition at line 349 of file smear.F90.

◆ smear_find_fermi_energy()

subroutine, public smear_oct_m::smear_find_fermi_energy ( type(smear_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
real(real64), dimension(:,:), intent(in)  eigenvalues,
real(real64), dimension(:,:), intent(in)  occupations,
real(real64), intent(in)  qtot,
integer, intent(in)  nik,
integer, intent(in)  nst,
real(real64), dimension(:), intent(in)  kweights 
)

Definition at line 370 of file smear.F90.

◆ bisection_find_fermi_energy()

subroutine smear_oct_m::bisection_find_fermi_energy ( type(smear_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
real(real64), intent(in)  dsmear_in,
real(real64), intent(in)  tol,
real(real64), dimension(:,:), intent(in)  eigenvalues,
real(real64), dimension(:), intent(in)  kweights,
integer, intent(in)  nik,
real(real64), intent(in)  q_in,
integer, intent(in)  start_band,
integer, intent(in)  end_band,
real(real64), intent(out)  e_fermi,
real(real64), intent(out)  ef_occ 
)
private

Definition at line 509 of file smear.F90.

◆ bisection_find_fermi_energy_tetra()

subroutine smear_oct_m::bisection_find_fermi_energy_tetra ( type(smear_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
real(real64), intent(in)  tol,
real(real64), dimension(:,:), intent(in)  eigenvalues,
integer, intent(in)  nik,
integer, intent(in)  nst,
real(real64), intent(in)  q_in,
real(real64), intent(out)  e_fermi 
)
private

Finds the Fermi energy using the tetrahedron method via bisection.

This subroutine determines the Fermi energy by iteratively adjusting the energy range using the bisection method. At each iteration, it calculates the total charge corresponding to the current trial Fermi energy using the tetrahedron method and compares it with the desired charge q_in.

Parameters
[in,out]thisSmearing object containing tetrahedron mesh information
[in]namespaceNamespace for error messages
[in]tolConvergence tolerance for charge comparison
[in]eigenvaluesArray of eigenvalues (nst, nik)
[in]nikNumber of k-points
[in]nstNumber of states
[in]q_inDesired total charge
[out]e_fermiCalculated Fermi energy output
Note
This subroutine uses OpenMP parallelization for performance
Requires an associated tetrahedron simplex mesh (this%tetra_simplex)
Maximum iterations: 200 (nitmax parameter)

Definition at line 583 of file smear.F90.

◆ smear_fill_occupations()

subroutine, public smear_oct_m::smear_fill_occupations ( type(smear_t), intent(in)  this,
real(real64), dimension(:,:), intent(in)  eigenvalues,
real(real64), dimension(:,:), intent(inout)  occupations,
real(real64), dimension(:), intent(in)  kweights,
integer, intent(in)  nik,
integer, intent(in)  nst 
)

Definition at line 664 of file smear.F90.

◆ smear_calc_entropy()

real(real64) function, public smear_oct_m::smear_calc_entropy ( type(smear_t), intent(inout)  this,
real(real64), dimension(:,:), intent(in)  eigenvalues,
integer, intent(in)  nik,
integer, intent(in)  nst,
real(real64), dimension(:), intent(in)  kweights,
real(real64), dimension(:, :), intent(in)  occ 
)
Parameters
[in]occused if fixed_occ

Definition at line 774 of file smear.F90.

◆ smear_delta_function()

real(real64) function, public smear_oct_m::smear_delta_function ( type(smear_t), intent(in)  this,
real(real64), intent(in)  xx 
)

Definition at line 823 of file smear.F90.

◆ smear_step_function()

real(real64) function, public smear_oct_m::smear_step_function ( type(smear_t), intent(in)  this,
real(real64), intent(in)  xx 
)

Definition at line 889 of file smear.F90.

◆ smear_entropy_function()

real(real64) function, public smear_oct_m::smear_entropy_function ( type(smear_t), intent(in)  this,
real(real64), intent(in)  xx 
)

This function is defined as \( \int_{-infty}^x y delta(y) dy \).

Definition at line 967 of file smear.F90.

◆ smear_is_semiconducting()

logical pure function, public smear_oct_m::smear_is_semiconducting ( type(smear_t), intent(in)  this)

Definition at line 1033 of file smear.F90.

◆ smear_write_info()

subroutine, public smear_oct_m::smear_write_info ( type(smear_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
integer, intent(in), optional  iunit 
)
Parameters
[in]iunitoptional file unit

Definition at line 1040 of file smear.F90.

Variable Documentation

◆ smear_semiconductor

integer, parameter, public smear_oct_m::smear_semiconductor = 1

Definition at line 176 of file smear.F90.

◆ smear_fermi_dirac

integer, parameter, public smear_oct_m::smear_fermi_dirac = 2

Definition at line 176 of file smear.F90.

◆ smear_cold

integer, parameter, public smear_oct_m::smear_cold = 3

Definition at line 176 of file smear.F90.

◆ smear_methfessel_paxton

integer, parameter, public smear_oct_m::smear_methfessel_paxton = 4

Definition at line 176 of file smear.F90.

◆ smear_spline

integer, parameter, public smear_oct_m::smear_spline = 5

Definition at line 176 of file smear.F90.

◆ smear_fixed_occ

integer, parameter, public smear_oct_m::smear_fixed_occ = 6

Definition at line 176 of file smear.F90.

◆ smear_gaussian

integer, parameter, public smear_oct_m::smear_gaussian = 7

Definition at line 176 of file smear.F90.

◆ smear_lorentzian

integer, parameter, public smear_oct_m::smear_lorentzian = 8

Definition at line 176 of file smear.F90.

◆ smear_tetrahedra

integer, parameter, public smear_oct_m::smear_tetrahedra = 21

Definition at line 176 of file smear.F90.

◆ smear_tetrahedra_opt

integer, parameter, public smear_oct_m::smear_tetrahedra_opt = 22

Definition at line 176 of file smear.F90.

◆ tol_smear

real(real64), parameter smear_oct_m::tol_smear = 1e-6_real64
private

Definition at line 188 of file smear.F90.