Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
54
Issues
54
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
9161a5b0
Commit
9161a5b0
authored
Sep 10, 2018
by
Matthias Redies
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix LDA so tests run through
parent
d4eb1d7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
236 additions
and
210 deletions
+236
-210
types/types_xcpot_libxc.F90
types/types_xcpot_libxc.F90
+236
-210
No files found.
types/types_xcpot_libxc.F90
View file @
9161a5b0
...
...
@@ -21,11 +21,13 @@ MODULE m_types_xcpot_libxc
#endif
INTEGER
::
func_id_c
,
func_id_x
,
jspins
CONTAINS
PROCEDURE
::
is_LDA
=>
xcpot_is_LDA
PROCEDURE
::
is_gga
=>
xcpot_is_gga
PROCEDURE
::
is_MetaGGA
=>
xcpot_is_MetaGGA
PROCEDURE
::
is_hybrid
=>
xcpot_is_hybrid
PROCEDURE
::
get_exchange_weight
=>
xcpot_get_exchange_weight
PROCEDURE
::
get_vxc
=>
xcpot_get_vxc
PROCEDURE
::
get_vxc_start
=>
xcpot_get_vxc_start
PROCEDURE
::
get_exc
=>
xcpot_get_exc
PROCEDURE
,
NOPASS
::
alloc_gradients
=>
xcpot_alloc_gradients
!Not overloeaded...
...
...
@@ -76,7 +78,6 @@ CONTAINS
#endif
END
SUBROUTINE
xcpot_init
LOGICAL
FUNCTION
xcpot_is_gga
(
xcpot
)
IMPLICIT
NONE
CLASS
(
t_xcpot_libxc
),
INTENT
(
IN
)::
xcpot
...
...
@@ -87,6 +88,16 @@ CONTAINS
#endif
END
FUNCTION
xcpot_is_gga
LOGICAL
FUNCTION
xcpot_is_LDA
(
xcpot
)
IMPLICIT
NONE
CLASS
(
t_xcpot_libxc
),
INTENT
(
IN
)::
xcpot
#ifdef CPP_LIBXC
xcpot_is_LDA
=
(
XC_FAMILY_LDA
==
xc_f03_func_info_get_family
(
xcpot
%
xc_info_x
))
#else
xcpot_is_LDA
=
.false.
#endif
END
FUNCTION
xcpot_is_LDA
LOGICAL
FUNCTION
xcpot_is_MetaGGA
(
xcpot
)
IMPLICIT
NONE
CLASS
(
t_xcpot_libxc
),
INTENT
(
IN
)::
xcpot
...
...
@@ -118,6 +129,23 @@ CONTAINS
#endif
END
FUNCTION
xcpot_get_exchange_weight
SUBROUTINE
xcpot_get_vxc_start
(
xcpot
,
jspins
,
rh
,
vxc
,
vx
,
grad
)
IMPLICIT
NONE
CLASS
(
t_xcpot_libxc
),
INTENT
(
IN
)
::
xcpot
INTEGER
,
INTENT
(
IN
)
::
jspins
REAL
,
INTENT
(
IN
)
::
rh
(:,:)
!Dimensions here
REAL
,
INTENT
(
OUT
)
::
vx
(:,:)
!points,spin
REAL
,
INTENT
(
OUT
)
::
vxc
(:,:)
!
! optional arguments for GGA
TYPE
(
t_gradients
),
OPTIONAL
,
INTENT
(
INOUT
)::
grad
IF
(
xcpot
%
is_lda
())
THEN
call
xcpot
%
get_vxc
(
jspins
,
rh
,
vxc
,
vx
,
grad
)
ELSE
ENDIF
END
SUBROUTINE
xcpot_get_vxc_start
!***********************************************************************
SUBROUTINE
xcpot_get_vxc
(
xcpot
,
jspins
,
rh
,
vxc
,
vx
,
grad
)
!***********************************************************************
...
...
@@ -132,8 +160,8 @@ CONTAINS
#ifdef CPP_LIBXC
REAL
,
ALLOCATABLE
::
vxc_tmp
(:,:),
vx_tmp
(:,:),
vsigma
(:,:)
!libxc uses the spin as a first index, hence we have to transpose....
ALLOCATE
(
vxc_tmp
(
SIZE
(
vxc
,
2
),
SIZE
(
vxc
,
1
)));
vxc_tmp
=
0.0
ALLOCATE
(
vx_tmp
(
SIZE
(
vx
,
2
),
SIZE
(
vx
,
1
)));
vx_tmp
=
0.0
ALLOCATE
(
vxc_tmp
(
SIZE
(
vxc
,
2
),
SIZE
(
vxc
,
1
)));
vxc_tmp
=
0.0
ALLOCATE
(
vx_tmp
(
SIZE
(
vx
,
2
),
SIZE
(
vx
,
1
)));
vx_tmp
=
0.0
IF
(
xcpot
%
is_gga
())
THEN
IF
(
.NOT.
PRESENT
(
grad
))
CALL
judft_error
(
"Bug: You called get_vxc for a GGA potential without providing derivatives"
)
ALLOCATE
(
vsigma
,
mold
=
grad
%
vsigma
)
...
...
@@ -159,7 +187,6 @@ CONTAINS
#endif
END
SUBROUTINE
xcpot_get_vxc
!***********************************************************************
SUBROUTINE
xcpot_get_exc
(
xcpot
,
jspins
,
rh
,
exc
,
grad
)
!***********************************************************************
...
...
@@ -203,7 +230,6 @@ CONTAINS
END
SUBROUTINE
xcpot_alloc_gradients
#ifdef CPP_LIBXC
SUBROUTINE
priv_write_info
(
xc_info
)
IMPLICIT
NONE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment