Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jukkr
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kkr
jukkr
Commits
1934962e
Commit
1934962e
authored
2 years ago
by
Philipp Rüssmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix running OPERATORS test
parent
a6a99adf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/KKRhost/tmat_newsolver.F90
+42
-6
42 additions, 6 deletions
source/KKRhost/tmat_newsolver.F90
tests/KKRhost/tools/test_verify_results.py
+7
-7
7 additions, 7 deletions
tests/KKRhost/tools/test_verify_results.py
with
49 additions
and
13 deletions
source/KKRhost/tmat_newsolver.F90
+
42
−
6
View file @
1934962e
...
@@ -633,10 +633,11 @@ contains
...
@@ -633,10 +633,11 @@ contains
!----------------------------------------------------------------------------
!----------------------------------------------------------------------------
! Calculate the left-hand side solution
! Calculate the left-hand side solution
!----------------------------------------------------------------------------
!----------------------------------------------------------------------------
if
(
t_dtmatjij_at
%
calculate
.or.
(
t_wavefunctions
%
isave_wavefun
(
i1
,
ie
)
>
0
.and.
&
if
(
calculate_left
(
i1
,
ie
)
.or.
&
(
t_wavefunctions
%
save_rllleft
.or.
t_wavefunctions
%
save_sllleft
))
.or.
&
t_dtmatjij_at
%
calculate
.or.
&
((
write_rhoq_input
.and.
ie
==
2
)
.and.
(
i1
==
mu0
))
.or.
&
! rhoqtest
((
write_rhoq_input
.and.
ie
==
2
)
.and.
(
i1
==
mu0
))
&
! rhoqtest
calc_exchange_couplings
.or.
write_pkkr_operators
.or.
calc_wronskian
)
then
! MdSD: seems to make more sense to check here than below
)
then
! MdSD: seems to make more sense to check here than below
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Calculate the left-hand side solution this needs to be done for the
! Calculate the left-hand side solution this needs to be done for the
! calculation of t-matrices for Jij tensor or if wavefunctions should be saved
! calculation of t-matrices for Jij tensor or if wavefunctions should be saved
...
@@ -983,7 +984,7 @@ contains
...
@@ -983,7 +984,7 @@ contains
sll
=
czero
sll
=
czero
! Left regular and irregular wavefunctions (used here only in case of XCPL or saving of left wavefunctions)
! Left regular and irregular wavefunctions (used here only in case of XCPL or saving of left wavefunctions)
if
(
calc
_exchange_couplings
.or.
(
t_wavefunctions
%
save_rllleft
.or.
t_wavefunctions
%
save_sllleft
.or.
write_rhoq_input
)
.or.
calc_wronskian
)
then
if
(
calc
ulate_left
(
1
,
1
)
)
then
allocate
(
rllleft
(
nsra
*
lmmaxd
,
lmmaxd
,
irmdnew
,
0
:
nth
-1
),
stat
=
i_stat
)
allocate
(
rllleft
(
nsra
*
lmmaxd
,
lmmaxd
,
irmdnew
,
0
:
nth
-1
),
stat
=
i_stat
)
call
memocc
(
i_stat
,
product
(
shape
(
rllleft
))
*
kind
(
rllleft
),
'RLLLEFT'
,
'allocate_locals_tmat_newsolver'
)
call
memocc
(
i_stat
,
product
(
shape
(
rllleft
))
*
kind
(
rllleft
),
'RLLLEFT'
,
'allocate_locals_tmat_newsolver'
)
rllleft
=
czero
rllleft
=
czero
...
@@ -1065,7 +1066,7 @@ contains
...
@@ -1065,7 +1066,7 @@ contains
deallocate
(
sll
,
stat
=
i_stat
)
deallocate
(
sll
,
stat
=
i_stat
)
call
memocc
(
i_stat
,
-
product
(
shape
(
sll
))
*
kind
(
sll
),
'SLL'
,
'allocate_locals_tmat_newsolver'
)
call
memocc
(
i_stat
,
-
product
(
shape
(
sll
))
*
kind
(
sll
),
'SLL'
,
'allocate_locals_tmat_newsolver'
)
if
(
calc
_exchange_couplings
.or.
(
t_wavefunctions
%
save_rllleft
.or.
t_wavefunctions
%
save_sllleft
.or.
write_rhoq_input
))
then
if
(
calc
ulate_left
(
1
,
1
))
then
deallocate
(
rllleft
,
stat
=
i_stat
)
deallocate
(
rllleft
,
stat
=
i_stat
)
call
memocc
(
i_stat
,
-
product
(
shape
(
rllleft
))
*
kind
(
rllleft
),
'RLLLEFT'
,
'allocate_locals_tmat_newsolver'
)
call
memocc
(
i_stat
,
-
product
(
shape
(
rllleft
))
*
kind
(
rllleft
),
'RLLLEFT'
,
'allocate_locals_tmat_newsolver'
)
deallocate
(
sllleft
,
stat
=
i_stat
)
deallocate
(
sllleft
,
stat
=
i_stat
)
...
@@ -1102,4 +1103,39 @@ contains
...
@@ -1102,4 +1103,39 @@ contains
end
subroutine
allocate_locals_tmat_newsolver
end
subroutine
allocate_locals_tmat_newsolver
!-------------------------------------------------------------------------------
!> Summary: Helper function which tells if the left wave functions are needed
!> calculation
!> Author: Philipp Ruessmann
!> Category: single-site, profiling, KKRhost
!> Deprecated: False
!>
!-------------------------------------------------------------------------------
logical
function
calculate_left
(
i1
,
ie
)
use
::
mod_save_wavefun
,
only
:
t_wavefunctions
use
::
mod_runoptions
,
only
:
calc_wronskian
,
write_pkkr_operators
,
calc_exchange_couplings
,
write_rhoq_input
use
::
mod_types
,
only
:
type_dtmatjijdij
implicit
None
integer
,
intent
(
in
)
::
i1
,
ie
calculate_left
=
.false.
if
(
calc_exchange_couplings
&
.or.
&
write_pkkr_operators
&
.or.
&
calc_wronskian
&
)
then
calculate_left
=
.true.
end
if
if
(
(
t_wavefunctions
%
save_rllleft
.or.
t_wavefunctions
%
save_sllleft
)
)
then
if
(
t_wavefunctions
%
isave_wavefun
(
i1
,
ie
)
>
0
)
calculate_left
=
.true.
end
if
return
end
function
calculate_left
end
module
mod_tmatnewsolver
end
module
mod_tmatnewsolver
This diff is collapsed.
Click to expand it.
tests/KKRhost/tools/test_verify_results.py
+
7
−
7
View file @
1934962e
...
@@ -72,9 +72,9 @@ class Test_features():
...
@@ -72,9 +72,9 @@ class Test_features():
fname
=
'
TBkkr_rhod.txt
'
fname
=
'
TBkkr_rhod.txt
'
num
,
text
=
read_file
(
path
+
fname
)
num
,
text
=
read_file
(
path
+
fname
)
num_ref
,
text_ref
=
read_file
(
path0
+
fname
)
num_ref
,
text_ref
=
read_file
(
path0
+
fname
)
assert
std
(
abs
(
num
-
num_ref
))
<
1
0
**
-
14
assert
std
(
abs
(
num
-
num_ref
))
<
1
e
-14
assert
mean
(
abs
(
num
-
num_ref
))
<
1
0
**
-
14
assert
mean
(
abs
(
num
-
num_ref
))
<
1
e
-14
assert
abs
(
num
-
num_ref
).
max
()
<
5
*
10
**
-
1
3
assert
abs
(
num
-
num_ref
).
max
()
<
1e
-1
2
assert
set
(
text
)
-
set
(
text_ref
)
==
set
()
assert
set
(
text
)
-
set
(
text_ref
)
==
set
()
# compare output of OPERATOR for host and for impurity wavefunctions
# compare output of OPERATOR for host and for impurity wavefunctions
for
filename
in
'
TBkkr_rhod.txt TBkkr_torq.txt TBkkr_spinflux.txt
'
.
split
():
for
filename
in
'
TBkkr_rhod.txt TBkkr_torq.txt TBkkr_spinflux.txt
'
.
split
():
...
@@ -93,10 +93,10 @@ class Test_features():
...
@@ -93,10 +93,10 @@ class Test_features():
# flatten arrays and take diff
# flatten arrays and take diff
d1
=
d1
.
reshape
(
-
1
);
d2
=
d2
.
reshape
(
-
1
);
d01
=
d01
.
reshape
(
-
1
);
d02
=
d02
.
reshape
(
-
1
)
d1
=
d1
.
reshape
(
-
1
);
d2
=
d2
.
reshape
(
-
1
);
d01
=
d01
.
reshape
(
-
1
);
d02
=
d02
.
reshape
(
-
1
)
diff1
=
d01
-
d1
;
diff2
=
d02
-
d2
diff1
=
d01
-
d1
;
diff2
=
d02
-
d2
assert
mean
(
diff1
)
<
1
0
**
-
1
5
assert
mean
(
diff1
)
<
1
e
-1
4
assert
abs
(
diff1
).
max
()
<
1
0
**
-
1
5
assert
abs
(
diff1
).
max
()
<
1
e
-1
2
assert
mean
(
diff2
)
<
1
0
**
-
1
5
assert
mean
(
diff2
)
<
1
e
-1
4
assert
abs
(
diff2
).
max
()
<
1
0
**
-
1
5
assert
abs
(
diff2
).
max
()
<
1
e
-1
2
def
test_11_DTM_GMAT
(
self
):
def
test_11_DTM_GMAT
(
self
):
path
=
'
test_run11_mpi_1_8/
'
path
=
'
test_run11_mpi_1_8/
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment