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

Fixing a but I introduced for collinear calculations.

As some calculations use the muffin tin index (of the new mesh),
this was calculated in calculateDensities in ProcessKKRresults_mod,
so before checking if a nonco calculation is done. However, in a
collinear calculation, the pointer to the new mesh is not associated,
which gave an error in that case.
parent 21372d11
No related branches found
No related tags found
No related merge requests found
...@@ -454,6 +454,7 @@ module ProcessKKRresults_mod ...@@ -454,6 +454,7 @@ module ProcessKKRresults_mod
double precision :: CHRGSEMICORE !< total semicore charge over all atoms double precision :: CHRGSEMICORE !< total semicore charge over all atoms
double precision :: fsemicore_in double precision :: fsemicore_in
integer :: ila, r1fu integer :: ila, r1fu
integer :: imt ! muffin tin index
integer :: num_local_atoms integer :: num_local_atoms
double complex, allocatable :: prefactors(:) ! for Morgan charge test only double complex, allocatable :: prefactors(:) ! for Morgan charge test only
...@@ -506,6 +507,16 @@ module ProcessKKRresults_mod ...@@ -506,6 +507,16 @@ module ProcessKKRresults_mod
energies => getEnergies(calc, ila) energies => getEnergies(calc, ila)
ldau_data => getLDAUData(calc, ila) ldau_data => getLDAUData(calc, ila)
atom_id = calc%atom_ids(ila) ! get global atom_id from local index atom_id = calc%atom_ids(ila) ! get global atom_id from local index
if (dims%korbit == 1) then
imt = get_muffin_tin_index(atomdata%chebmesh_ptr)
else
! At the moment, the muffin tin index is used in RHOVAL_wrapper only for
! noncollinear magnetic fields, so only for korbit==1. Thus, the value
! assigned here is not used. However, if that changes at some point,
! I think this value is what you'd expect
imt = calc%mesh_a(ila)%imt
end if
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
! has to be done after Lloyd ! has to be done after Lloyd
...@@ -523,7 +534,7 @@ module ProcessKKRresults_mod ...@@ -523,7 +534,7 @@ module ProcessKKRresults_mod
calc%noco_data%angle_fix_mode(atom_id), calc%noco_data%moment_x(atom_id), & calc%noco_data%angle_fix_mode(atom_id), calc%noco_data%moment_x(atom_id), &
calc%noco_data%moment_y(atom_id), calc%noco_data%moment_z(atom_id), & calc%noco_data%moment_y(atom_id), calc%noco_data%moment_z(atom_id), &
densities%muorb, densities%iemxd, params, calc%bfields(ila), & densities%muorb, densities%iemxd, params, calc%bfields(ila), &
get_muffin_tin_index(atomdata%chebmesh_ptr), iter) imt, iter)
! LDAU ! LDAU
if (ldau_data%LDAU .and. ldau_data%NLDAU >= 1) then if (ldau_data%LDAU .and. ldau_data%NLDAU >= 1) then
......
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