49 integer,
public,
parameter :: &
66 integer :: spin_channels
67 type(distributed_t) :: kpt
78 type(states_elec_dim_t),
intent(inout) :: dout
79 type(states_elec_dim_t),
intent(in) :: din
86 dout%ispin = din%ispin
87 dout%nspin = din%nspin
88 dout%spin_channels = din%spin_channels
99 type(states_elec_dim_t),
intent(inout) :: dim
113 logical pure function is_spin_up(ik)
114 integer,
intent(in) :: ik
123 integer pure function states_elec_dim_get_spin_index(this, iq) result(index)
124 class(states_elec_dim_t),
intent(in) :: this
125 integer,
intent(in) :: iq
127 if (this%ispin == spin_polarized)
then
128 index = 1 + mod(iq - 1, 2)
139 integer pure function states_elec_dim_get_kpoint_index(this, iq) result(index)
140 class(states_elec_dim_t),
intent(in) :: this
141 integer,
intent(in) :: iq
143 if (this%ispin == spin_polarized)
then
144 index = 1 + (iq - 1)/2
subroutine, public distributed_end(this)
subroutine, public distributed_copy(in, out)
Create a copy of a distributed instance.
This module is intended to contain "only mathematical" functions and procedures.
logical pure function, public odd(n)
Returns if n is odd.
This module handles the communicators for the various parallelization strategies.
This module handles spin dimensions of the states and the k-point distribution.
integer pure function states_elec_dim_get_spin_index(this, iq)
extract the spin index from the combined spin and k index
integer, parameter, public spin_up
integer pure function states_elec_dim_get_kpoint_index(this, iq)
extract the k-point index from the combined spin and k index
subroutine, public states_elec_dim_copy(dout, din)
logical pure function, public is_spin_up(ik)
Returns true if k-point ik denotes spin-up, in spin-polarized case.
subroutine, public states_elec_dim_end(dim)
class for organizing spins and k-points