Octopus
states_elec_dim_oct_m Module Reference

This module handles spin dimensions of the states and the k-point distribution. More...

Detailed Description

This module handles spin dimensions of the states and the k-point distribution.

Currently, for SPIN_POLARIZED calculations, the spin channels are combined with the k-point index. This module provides functions to extract the separate spin and k-point indices.

Data Types

type  states_elec_dim_t
 class for organizing spins and k-points More...
 

Functions/Subroutines

subroutine, public states_elec_dim_copy (dout, din)
 
subroutine, public states_elec_dim_end (dim)
 
logical pure function, public is_spin_up (ik)
 Returns true if k-point ik denotes spin-up, in spin-polarized case. More...
 
logical pure function, public is_spin_down (ik)
 Returns true if k-point ik denotes spin-down, in spin-polarized case. More...
 
integer pure function states_elec_dim_get_spin_index (this, iq)
 extract the spin index from the combined spin and k index More...
 
integer pure function states_elec_dim_get_kpoint_index (this, iq)
 extract the k-point index from the combined spin and k index More...
 

Variables

integer, parameter, public spin_down = 1
 Spin-polarized k-indices for non-periodic systems. More...
 
integer, parameter, public spin_up = 2
 

Function/Subroutine Documentation

◆ states_elec_dim_copy()

subroutine, public states_elec_dim_oct_m::states_elec_dim_copy ( type(states_elec_dim_t), intent(inout)  dout,
type(states_elec_dim_t), intent(in)  din 
)

Definition at line 172 of file states_elec_dim.F90.

◆ states_elec_dim_end()

subroutine, public states_elec_dim_oct_m::states_elec_dim_end ( type(states_elec_dim_t), intent(inout)  dim)

Definition at line 193 of file states_elec_dim.F90.

◆ is_spin_up()

logical pure function, public states_elec_dim_oct_m::is_spin_up ( integer, intent(in)  ik)

Returns true if k-point ik denotes spin-up, in spin-polarized case.

Definition at line 208 of file states_elec_dim.F90.

◆ is_spin_down()

logical pure function, public states_elec_dim_oct_m::is_spin_down ( integer, intent(in)  ik)

Returns true if k-point ik denotes spin-down, in spin-polarized case.

Definition at line 219 of file states_elec_dim.F90.

◆ states_elec_dim_get_spin_index()

integer pure function states_elec_dim_oct_m::states_elec_dim_get_spin_index ( class(states_elec_dim_t), intent(in)  this,
integer, intent(in)  iq 
)
private

extract the spin index from the combined spin and k index

Definition at line 229 of file states_elec_dim.F90.

◆ states_elec_dim_get_kpoint_index()

integer pure function states_elec_dim_oct_m::states_elec_dim_get_kpoint_index ( class(states_elec_dim_t), intent(in)  this,
integer, intent(in)  iq 
)
private

extract the k-point index from the combined spin and k index

Definition at line 245 of file states_elec_dim.F90.

Variable Documentation

◆ spin_down

integer, parameter, public states_elec_dim_oct_m::spin_down = 1

Spin-polarized k-indices for non-periodic systems.

Definition at line 144 of file states_elec_dim.F90.

◆ spin_up

integer, parameter, public states_elec_dim_oct_m::spin_up = 2

Definition at line 144 of file states_elec_dim.F90.