59 logical :: apply = .false.
61 type(mixfield_t) :: field
62 real(real64),
allocatable :: tmp(:, :)
69 type(namespace_t),
intent(in) :: namespace
70 type(augmentation_mixer_t),
intent(inout) :: mixer
71 type(mix_t),
intent(inout) :: smix
72 type(hamiltonian_elec_t),
intent(in) :: hm
79 if (hm%ep%has_paw .and. hm%vnl%nprojector_matrices > 0 &
80 .and. .not.
allocated(hm%aug_overlap%onsite_density_matrix))
then
81 message(1) =
"Internal error: the PAW one-center density matrix is not allocated,"
82 message(2) =
"it cannot be mixed."
85 if (hm%ep%has_paw .and.
allocated(hm%aug_overlap%onsite_density_matrix))
then
87 mixer%size = product(shape(hm%aug_overlap%onsite_density_matrix))
88 safe_allocate(mixer%tmp(1:mixer%size, 1:1))
101 type(augmentation_mixer_t),
intent(inout) :: mixer
102 type(mix_t),
intent(inout) :: smix
104 if (.not. mixer%apply)
return
114 type(augmentation_mixer_t),
intent(inout) :: mixer
115 type(mix_t),
intent(inout) :: smix
117 if (.not. mixer%apply)
return
121 safe_deallocate_a(mixer%tmp)
122 mixer%apply = .false.
129 type(augmentation_mixer_t),
intent(inout) :: mixer
130 type(hamiltonian_elec_t),
intent(in) :: hm
132 if (.not. mixer%apply)
return
135 mixer%tmp(1:mixer%size, 1) = reshape(hm%aug_overlap%onsite_density_matrix, [mixer%size])
146 if (.not. mixer%apply)
return
149 mixer%tmp(1:mixer%size, 1) = reshape(hm%aug_overlap%onsite_density_matrix, [mixer%size])
160 if (.not. mixer%apply)
return
164 hm%aug_overlap%onsite_density_matrix = &
165 reshape(mixer%tmp(1:mixer%size, 1), shape(hm%aug_overlap%onsite_density_matrix))
Auxiliary SCF mixer for the PAW one-center density matrix.
subroutine, public augmentation_mixer_clear(mixer, smix)
subroutine, public augmentation_mixer_get_vnew(mixer, hm)
subroutine, public augmentation_mixer_init_auxmixer(namespace, mixer, smix, hm)
subroutine, public augmentation_mixer_set_vin(mixer, hm)
subroutine, public augmentation_mixer_end(mixer, smix)
subroutine, public augmentation_mixer_set_vout(mixer, hm)
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 mixfield_end(smix, mixfield)
Deallocate all arrays of a mixfield instance.
integer pure function, public mix_scheme(this)
subroutine, public mixfield_init(smix, mixfield, d1, d2, d3, func_type)
Initialise all attributes of a mixfield instance.
subroutine, public mix_add_auxmixfield(namespace, smix, mixfield)
subroutine, public mixfield_clear(scheme, mixfield)
Zero all potential and field attributes of a mixfield instance.
integer pure function, public mix_d3(this)
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
type(type_t), parameter, public type_float