Octopus
phase_oct_m Module Reference

Data Types

type  phase_t
 A container for the phase. More...
 

Functions/Subroutines

subroutine phase_init_phases (phase, gr, kpt, kpoints, d, space)
 Initiliaze the phase arrays and copy to GPU the data. More...
 
subroutine phase_update_phases (phase, mesh, kpt, kpoints, d, space, uniform_vector_potential)
 Update the phases. More...
 
subroutine phase_end (phase)
 Releases the memory of the phase object. More...
 
subroutine phase_set_phase_corr (phase, mesh, psib, async)
 set the phase correction (if necessary) More...
 
subroutine phase_unset_phase_corr (phase, mesh, psib, async)
 unset the phase correction (if necessary) More...
 
subroutine phase_apply_batch (this, mesh, np, conjugate, psib, src, async)
 apply (remove) the phase to the wave functions before (after) applying the Hamiltonian More...
 
subroutine phase_apply_mf (this, psi, np, dim, ik, conjugate)
 apply (or remove) the phase to a wave function psi More...
 
subroutine phase_phase_spiral (this, der, psib)
 apply spiral phase More...
 
logical pure function phase_is_allocated (this)
 

Function/Subroutine Documentation

◆ phase_init_phases()

subroutine phase_oct_m::phase_init_phases ( class(phase_t), intent(inout)  phase,
type(grid_t), intent(in)  gr,
type(distributed_t), intent(in)  kpt,
type(kpoints_t), intent(in)  kpoints,
type(states_elec_dim_t), intent(in)  d,
type(space_t), intent(in)  space 
)
private

Initiliaze the phase arrays and copy to GPU the data.

Definition at line 217 of file phase.F90.

◆ phase_update_phases()

subroutine phase_oct_m::phase_update_phases ( class(phase_t), intent(inout)  phase,
class(mesh_t), intent(in)  mesh,
type(distributed_t), intent(in)  kpt,
type(kpoints_t), intent(in)  kpoints,
type(states_elec_dim_t), intent(in)  d,
type(space_t), intent(in)  space,
real(real64), dimension(:), intent(in), allocatable  uniform_vector_potential 
)
private

Update the phases.

Definition at line 322 of file phase.F90.

◆ phase_end()

subroutine phase_oct_m::phase_end ( class(phase_t), intent(inout)  phase)
private

Releases the memory of the phase object.

Definition at line 405 of file phase.F90.

◆ phase_set_phase_corr()

subroutine phase_oct_m::phase_set_phase_corr ( class(phase_t), intent(in)  phase,
class(mesh_t), intent(in)  mesh,
type(wfs_elec_t), intent(inout)  psib,
logical, intent(in), optional  async 
)
private

set the phase correction (if necessary)

Definition at line 429 of file phase.F90.

◆ phase_unset_phase_corr()

subroutine phase_oct_m::phase_unset_phase_corr ( class(phase_t), intent(in)  phase,
class(mesh_t), intent(in)  mesh,
type(wfs_elec_t), intent(inout)  psib,
logical, intent(in), optional  async 
)
private

unset the phase correction (if necessary)

Definition at line 455 of file phase.F90.

◆ phase_apply_batch()

subroutine phase_oct_m::phase_apply_batch ( class(phase_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
integer, intent(in)  np,
logical, intent(in)  conjugate,
type(wfs_elec_t), intent(inout), target  psib,
type(wfs_elec_t), intent(in), optional, target  src,
logical, intent(in), optional  async 
)
private

apply (remove) the phase to the wave functions before (after) applying the Hamiltonian

Definition at line 480 of file phase.F90.

◆ phase_apply_mf()

subroutine phase_oct_m::phase_apply_mf ( class(phase_t), intent(in)  this,
complex(real64), dimension(:, :), intent(inout)  psi,
integer, intent(in)  np,
integer, intent(in)  dim,
integer, intent(in)  ik,
logical, intent(in)  conjugate 
)
private

apply (or remove) the phase to a wave function psi

States are usually stored without the phase. Due to the phase convention (exp(-i phase())), the phase is applied by multiplying with the complex conjugate of the phase() function, and removed by multiplying with phase().

Parameters
[in,out]psithe complex wave function
[in]npnumber of points
[in]conjugateif .false.: apply the phase, if .true.: remove the phase

Definition at line 648 of file phase.F90.

◆ phase_phase_spiral()

subroutine phase_oct_m::phase_phase_spiral ( class(phase_t), intent(in)  this,
type(derivatives_t), intent(in)  der,
class(wfs_elec_t), intent(inout)  psib 
)
private

apply spiral phase

Definition at line 691 of file phase.F90.

◆ phase_is_allocated()

logical pure function phase_oct_m::phase_is_allocated ( class(phase_t), intent(in)  this)
private

Definition at line 796 of file phase.F90.