54 logical,
public :: has_phase
85 subroutine wfs_elec_clone_to(this, dest, pack, copy_data, new_np, special, dest_type)
86 class(wfs_elec_t),
intent(in) :: this
87 class(batch_t),
allocatable,
intent(out) :: dest
88 logical,
optional,
intent(in) :: pack
89 logical,
optional,
intent(in) :: copy_data
90 integer,
optional,
intent(in) :: new_np
91 logical,
optional,
intent(in) :: special
93 type(type_t),
optional,
intent(in) :: dest_type
101 call this%copy_to(dest, pack, copy_data, new_np, special, dest_type)
103 message(1) =
"Internal error: imcompatible batches in wfs_elec_clone_to."
112 class(wfs_elec_t),
intent(in) :: this
113 class(batch_t),
allocatable,
intent(out) :: dest(:)
114 integer,
intent(in) :: n_batches
115 logical,
optional,
intent(in) :: pack
116 logical,
optional,
intent(in) :: copy_data
117 integer,
optional,
intent(in) :: new_np
118 logical,
optional,
intent(in) :: special
120 type(type_t),
optional,
intent(in) :: dest_type
126 assert(n_batches > 0)
128 safe_allocate_type_array(
wfs_elec_t, dest, (1:n_batches))
133 call this%copy_to(dest(ib), pack, copy_data, new_np, special, dest_type)
136 message(1) =
"Internal error: incompatible batches in wfs_elec_clone_to_array."
147 class(
batch_t),
intent(out) :: dest
148 logical,
optional,
intent(in) :: pack
149 logical,
optional,
intent(in) :: copy_data
150 integer,
optional,
intent(in) :: new_np
151 logical,
optional,
intent(in) :: special
152 type(
type_t),
optional,
intent(in) :: dest_type
159 dest%has_phase = this%has_phase
160 call this%batch_t%copy_to(dest%batch_t, pack, copy_data, new_np, special=special, dest_type=dest_type)
162 message(1) =
"Internal error: incompatible batches in wfs_elec_copy_to."
171 class(wfs_elec_t),
intent(in) :: this
172 integer,
intent(in) :: np
173 class(batch_t),
intent(inout) :: dest
174 logical,
optional,
intent(in) :: async
181 dest%has_phase = this%has_phase
182 call this%batch_t%copy_data_to(np, dest%batch_t, async)
184 message(1) =
"Internal error: incompatible batches in wfs_elec_copy_data_to."
198 class(
batch_t),
intent(in) :: target
199 logical,
optional,
intent(in) :: only_check_dim
200 logical,
optional,
intent(in) :: type_check
206 assert(this%ik ==
target%ik)
207 assert(this%has_phase .eqv.
target%has_phase)
209 message(1) =
"Internal error: imcompatible batches in wfs_elec_check_compatibility_with."
212 call this%batch_t%check_compatibility_with(
target, only_check_dim, type_check)
222 logical,
optional,
intent(in) :: copy
227 this%has_phase = .false.
228 call this%batch_t%end(copy)
235#include "wfs_elec_inc.F90"
238#include "complex.F90"
239#include "wfs_elec_inc.F90"
243#include "wfs_elec_inc.F90"
246#include "complex32.F90"
247#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 wfs_elec_clone_to(this, dest, pack, copy_data, new_np, special, dest_type)
clone to another 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, public cwfs_elec_init(this, dim, st_start, st_end, np, ik, special, packed)
initialize an empty wfs_elec_t object
subroutine wfs_elec_clone_to_array(this, dest, n_batches, pack, copy_data, new_np, special, dest_type)
Clone the data to multiple wfs_elec_t objects.
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 swfs_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_copy_to(this, dest, pack, copy_data, new_np, special, dest_type)
copy a contained batch to another (existing) wfs_elec_t object
subroutine wfs_elec_copy_data_to(this, np, dest, async)
copy the data of the contained batch to another (existing) wfs_elec_t object
subroutine, public dwfs_elec_init(this, dim, st_start, st_end, np, ik, special, packed)
initialize an empty wfs_elec_t object
subroutine cwfs_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_end(this, copy)
finalze the object and the contained batch
subroutine, public swfs_elec_init(this, dim, st_start, st_end, np, ik, special, packed)
initialize an empty wfs_elec_t object
subroutine swfs_elec_init_with_memory_2(this, dim, st_start, st_end, psi, ik)
initialize a wfs_elec_t object with given memory
subroutine cwfs_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_check_compatibility_with(this, target, only_check_dim, type_check)
check whether the object is compatible with a target object
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