58 logical,
public :: apply = .false.
60 type(states_elec_t) :: gs_st
69 subroutine scissor_init(this, namespace, space, st, mesh, kpoints, phase, gap, mc)
70 type(scissor_t),
intent(inout) :: this
71 type(namespace_t),
intent(in) :: namespace
72 class(space_t),
intent(in) :: space
73 type(states_elec_t),
intent(in) :: st
74 class(mesh_t),
intent(in) :: mesh
75 type(kpoints_t),
intent(in) :: kpoints
76 type(phase_t),
intent(in) :: phase
77 real(real64),
intent(in) :: gap
78 type(multicomm_t),
intent(in) :: mc
80 type(restart_t) :: restart_gs
82 integer :: ib, ist, ik
83 complex(real64),
allocatable :: temp_state(:,:)
87 assert(.not. this%apply)
92 if (st%parallel_in_states)
then
95 if (mesh%parallel_in_domains)
then
102 write(
message(1),
'(a)')
'Start loading GS states.'
109 message(1) =
"Unable to read states information."
113 call states_elec_load(restart_gs, namespace, space, this%gs_st, mesh, kpoints, &
114 fixed_occ=.
true., ierr=ierr, label =
': gs for TDScissor')
115 if (ierr /= 0 .and. ierr /= (this%gs_st%st_end-this%gs_st%st_start+1)*this%gs_st%nik*this%gs_st%d%dim)
then
116 message(1) =
"Unable to read wavefunctions for TDScissor."
119 call restart_gs%end()
123 write(
message(1),
'(a)')
'Adding the phase for GS states.'
126 safe_allocate(temp_state(1:mesh%np_part, 1:this%gs_st%d%dim))
128 do ik=this%gs_st%d%kpt%start, this%gs_st%d%kpt%end
130 do ist = this%gs_st%st_start, this%gs_st%st_end
132 call phase%apply_to_single(temp_state, mesh%np, this%gs_st%d%dim, ik, .false.)
138 safe_deallocate_a(temp_state)
142 do ik = this%gs_st%d%kpt%start, this%gs_st%d%kpt%end
143 do ib = this%gs_st%group%block_start, this%gs_st%group%block_end
144 call this%gs_st%group%psib(ib, ik)%do_pack(
batch_packed)
166#include "scissor_inc.F90"
169#include "complex.F90"
170#include "scissor_inc.F90"
This module implements batches of mesh functions.
integer, parameter, public batch_packed
functions are stored in CPU memory, in transposed (packed) order
This module implements common operations on batches of mesh functions.
logical pure function, public kpoints_point_is_gamma(this, ik)
integer pure function, public kpoints_number(this)
This module defines functions over batches of mesh functions.
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
subroutine, public messages_print_with_emphasis(msg, iunit, namespace)
subroutine, public messages_not_implemented(feature, namespace)
character(len=512), private msg
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
This module handles the communicators for the various parallelization strategies.
integer, parameter, public restart_proj
integer, parameter, public restart_type_load
subroutine zscissor_commute_r(this, mesh, ik, psi, gpsi)
subroutine, public zscissor_apply(this, mesh, psib, hpsib)
subroutine dscissor_commute_r(this, mesh, ik, psi, gpsi)
subroutine, public dscissor_apply(this, mesh, psib, hpsib)
subroutine, public scissor_end(this)
subroutine, public scissor_init(this, namespace, space, st, mesh, kpoints, phase, gap, mc)
pure logical function, public states_are_real(st)
This module handles spin dimensions of the states and the k-point distribution.
subroutine, public states_elec_end(st)
finalize the states_elec_t object
subroutine, public states_elec_copy(stout, stin, exclude_wfns, exclude_eigenval, special)
make a (selective) copy of a states_elec_t object
This module handles reading and writing restart information for the states_elec_t.
subroutine, public states_elec_load(restart, namespace, space, st, mesh, kpoints, fixed_occ, ierr, iter, lr, lowest_missing, label, verbose, skip)
returns in ierr: <0 => Fatal error, or nothing read =0 => read all wavefunctions >0 => could only rea...