51 logical,
public :: has_phase
78 class(wfs_elec_t),
intent(in) :: this
79 class(batch_t),
allocatable,
intent(out) :: dest
80 logical,
optional,
intent(in) :: pack
81 logical,
optional,
intent(in) :: copy_data
82 integer,
optional,
intent(in) :: new_np
90 call this%copy_to(dest, pack, copy_data, new_np)
92 message(1) =
"Internal error: imcompatible batches in wfs_elec_clone_to."
103 class(wfs_elec_t),
intent(in) :: this
104 class(batch_t),
allocatable,
intent(out) :: dest(:)
105 integer,
intent(in) :: n_batches
106 logical,
optional,
intent(in) :: pack
107 logical,
optional,
intent(in) :: copy_data
113 assert(n_batches > 0)
115 safe_allocate_type_array(
wfs_elec_t, dest, (1:n_batches))
120 call this%copy_to(dest(ib), pack, copy_data)
123 message(1) =
"Internal error: imcompatible batches in wfs_elec_clone_to_array."
134 class(wfs_elec_t),
intent(in) :: this
135 class(batch_t),
intent(out) :: dest
136 logical,
optional,
intent(in) :: pack
137 logical,
optional,
intent(in) :: copy_data
138 integer,
optional,
intent(in) :: new_np
139 logical,
optional,
intent(in) :: special
146 dest%has_phase = this%has_phase
147 call this%batch_t%copy_to(dest%batch_t, pack, copy_data, new_np, special=special)
149 message(1) =
"Internal error: imcompatible batches in wfs_elec_copy_to."
163 class(
batch_t),
intent(in) :: target
164 logical,
optional,
intent(in) :: only_check_dim
170 assert(this%ik ==
target%ik)
171 assert(this%has_phase .eqv.
target%has_phase)
173 message(1) =
"Internal error: imcompatible batches in wfs_elec_check_compatibility_with."
176 call this%batch_t%check_compatibility_with(
target, only_check_dim)
186 logical,
optional,
intent(in) :: copy
191 this%has_phase = .false.
192 call this%batch_t%end(copy)
199#include "wfs_elec_inc.F90"
202#include "complex.F90"
203#include "wfs_elec_inc.F90"
This module implements batches of mesh functions.
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 zwfs_elec_init(this, dim, st_start, st_end, np, ik, special, packed)
initialize an empty wfs_elec_t object
subroutine dwfs_elec_init_with_memory_3(this, dim, st_start, st_end, psi, ik)
initialize a wfs_elec_t object with given memory
subroutine wfs_elec_check_compatibility_with(this, target, only_check_dim)
check whether the object is compatible with a target object
subroutine wfs_elec_copy_to(this, dest, pack, copy_data, new_np, special)
copy the data of teh contained batch to another (existing) wfs_elec_t object
subroutine zwfs_elec_init_with_memory_2(this, dim, st_start, st_end, psi, ik)
initialize a wfs_elec_t object with given memory
subroutine dwfs_elec_init_with_memory_2(this, dim, st_start, st_end, psi, ik)
initialize a wfs_elec_t object with given memory
subroutine wfs_elec_clone_to(this, dest, pack, copy_data, new_np)
clone to another wfs_elec_t object
subroutine wfs_elec_clone_to_array(this, dest, n_batches, pack, copy_data)
clone the data to multipe wfs_elec_t objects
subroutine, public dwfs_elec_init(this, dim, st_start, st_end, np, ik, special, packed)
initialize an empty wfs_elec_t object
subroutine wfs_elec_end(this, copy)
finalze the object and the contained batch
subroutine zwfs_elec_init_with_memory_3(this, dim, st_start, st_end, psi, ik)
initialize a wfs_elec_t object with given memory
Class defining batches of mesh functions.
batches of electronic states