Skip to content
Snippets Groups Projects
Commit ee23f391 authored by Nicolas Essing's avatar Nicolas Essing
Browse files

Bugfix concerning nonco bfield data.

The bfields are now always allocated, as they are passed around to
some subroutines even if they are not used. The types are small if
they are not initialized, so that doesn't matter.
Actually, I never got an error from this bug, but I think this
might depend on the compiler.
parent 289f1fb1
No related branches found
No related tags found
No related merge requests found
......@@ -138,11 +138,10 @@ module CalculationData_mod
allocate(self%madelung_sum_a(num_local_atoms)) ! only visible to this module and MadelungPotential_mod.F90
allocate(self%jij_data_a(num_local_atoms))
if(num_local_atoms > 1 .and. params%Jij) warn(6, "Jij work with max. 1 atom so far!")
! Allocate bfields only if used
if (params%noncobfield) then
allocate(self%bfields(num_local_atoms))
end if
! Always allocate bfields, they are small objects and are passed around to
! some subroutines even if they are not used.
allocate(self%bfields(num_local_atoms))
allocate(self%atom_ids(num_local_atoms))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment