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
51
Issues
51
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
343d8e18
Commit
343d8e18
authored
Mar 01, 2017
by
Gregor Michalicek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduced readDensityIndex into cdn.hdf file
parent
e7539fd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
145 additions
and
35 deletions
+145
-35
io/cdn_io.F90
io/cdn_io.F90
+40
-19
io/cdnpot_io_hdf.F90
io/cdnpot_io_hdf.F90
+105
-16
No files found.
io/cdn_io.F90
View file @
343d8e18
...
...
@@ -76,8 +76,9 @@ MODULE m_cdn_io
INTEGER
(
HID_T
)
::
fileID
#endif
INTEGER
::
currentStarsIndex
,
currentLatharmsIndex
INTEGER
::
currentStructureIndex
,
currentDensityIndex
INTEGER
::
lastDensityIndex
,
densityType
INTEGER
::
currentStructureIndex
INTEGER
::
readDensityIndex
,
lastDensityIndex
INTEGER
::
previousDensityIndex
,
densityType
CHARACTER
(
LEN
=
30
)
::
archiveName
TYPE
(
t_cell
)
::
cellTemp
...
...
@@ -91,14 +92,13 @@ MODULE m_cdn_io
INQUIRE
(
FILE
=
'cdn.hdf'
,
EXIST
=
l_exist
)
IF
(
l_exist
)
THEN
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
currentDensityIndex
=
currentDensityIndex
+
relCdnIndex
! This is actually wrong. I should go back step by step.
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
IF
(
archiveType
.EQ.
CDN_ARCHIVE_TYPE_CDN_const
)
THEN
archiveName
=
'cdn'
ELSE
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
current
DensityIndex
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
read
DensityIndex
END
IF
SELECT
CASE
(
inOrOutCDN
)
...
...
@@ -123,7 +123,8 @@ MODULE m_cdn_io
END
IF
IF
(
l_exist
)
THEN
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
CALL
readDensityHDF
(
fileID
,
archiveName
,
densityType
,&
iter
,
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
...
...
@@ -260,15 +261,19 @@ MODULE m_cdn_io
INTEGER
(
HID_T
)
::
fileID
#endif
INTEGER
::
currentStarsIndex
,
currentLatharmsIndex
INTEGER
::
currentStructureIndex
,
currentDensityIndex
INTEGER
::
lastDensityIndex
,
densityType
INTEGER
::
currentStructureIndex
INTEGER
::
readDensityIndex
,
writeDensityIndex
,
lastDensityIndex
INTEGER
::
previousDensityIndex
,
densityType
INTEGER
::
starsIndexTemp
,
latharmsIndexTemp
,
structureIndexTemp
INTEGER
::
jspinsTemp
CHARACTER
(
LEN
=
30
)
::
archiveName
CALL
getMode
(
mode
)
IF
(
mode
.EQ.
CDN_HDF5_MODE
)
THEN
#ifdef CPP_HDF
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
l_storeIndices
=
.FALSE.
IF
(
currentStarsIndex
.EQ.
0
)
THEN
...
...
@@ -286,9 +291,12 @@ MODULE m_cdn_io
l_storeIndices
=
.TRUE.
CALL
writeStructureHDF
(
fileID
,
input
,
atoms
,
cell
,
vacuum
,
oneD
,
currentStructureIndex
)
END
IF
lastDensityIndex
=
currentDensityIndex
previousDensityIndex
=
readDensityIndex
writeDensityIndex
=
readDensityIndex
IF
(
relCdnIndex
.NE.
0
)
THEN
currentDensityIndex
=
currentDensityIndex
+
relCdnIndex
writeDensityIndex
=
lastDensityIndex
+
relCdnIndex
lastDensityIndex
=
writeDensityIndex
readDensityIndex
=
writeDensityIndex
l_storeIndices
=
.TRUE.
END
IF
...
...
@@ -296,7 +304,7 @@ MODULE m_cdn_io
IF
(
archiveType
.EQ.
CDN_ARCHIVE_TYPE_CDN_const
)
THEN
archiveName
=
'cdn'
ELSE
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
current
DensityIndex
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
write
DensityIndex
END
IF
densityType
=
0
...
...
@@ -318,13 +326,22 @@ MODULE m_cdn_io
CALL
juDFT_error
(
"Invalid inOrOutCDN selected."
,
calledby
=
"writeDensity"
)
END
SELECT
CALL
writeDensityHDF
(
input
,
fileID
,
archiveName
,
densityType
,
lastDensityIndex
,&
IF
(
relCdnIndex
.EQ.
0
)
THEN
l_exist
=
isDensityEntryPresentHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_UNDEFINED_const
)
IF
(
l_exist
)
THEN
CALL
peekDensityEntryHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_UNDEFINED_const
,&
iterTemp
,
starsIndexTemp
,
latharmsIndexTemp
,
structureIndexTemp
,&
previousDensityIndex
,
jspinsTemp
)
END
IF
END
IF
CALL
writeDensityHDF
(
input
,
fileID
,
archiveName
,
densityType
,
previousDensityIndex
,&
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
iter
+
relCdnIndex
,
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
IF
(
l_storeIndices
)
THEN
CALL
writeHeaderData
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,&
currentStructureIndex
,
curren
tDensityIndex
)
currentStructureIndex
,
readDensityIndex
,
las
tDensityIndex
)
END
IF
CALL
closeCDN_HDF
(
fileID
)
...
...
@@ -485,7 +502,8 @@ MODULE m_cdn_io
INTEGER
(
HID_T
)
::
fileID
#endif
INTEGER
::
currentStarsIndex
,
currentLatharmsIndex
INTEGER
::
currentStructureIndex
,
currentDensityIndex
INTEGER
::
currentStructureIndex
INTEGER
::
readDensityIndex
,
lastDensityIndex
CALL
getMode
(
mode
)
...
...
@@ -493,7 +511,8 @@ MODULE m_cdn_io
#ifdef CPP_HDF
l_exist
=
isCoreDensityPresentHDF
()
IF
(
l_exist
)
THEN
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
CALL
readCoreDensityHDF
(
fileID
,
input
,
atoms
,
dimension
,
rhcs
,
tecs
,
qints
)
CALL
closeCDN_HDF
(
fileID
)
RETURN
...
...
@@ -554,13 +573,15 @@ MODULE m_cdn_io
INTEGER
(
HID_T
)
::
fileID
#endif
INTEGER
::
currentStarsIndex
,
currentLatharmsIndex
INTEGER
::
currentStructureIndex
,
currentDensityIndex
INTEGER
::
currentStructureIndex
INTEGER
::
readDensityIndex
,
lastDensityIndex
CALL
getMode
(
mode
)
IF
(
mode
.EQ.
CDN_HDF5_MODE
)
THEN
#ifdef CPP_HDF
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
CALL
writeCoreDensityHDF
(
fileID
,
input
,
atoms
,
dimension
,
rhcs
,
tecs
,
qints
)
CALL
closeCDN_HDF
(
fileID
)
#endif
...
...
io/cdnpot_io_hdf.F90
View file @
343d8e18
...
...
@@ -24,12 +24,15 @@ MODULE m_cdnpot_io_hdf
PUBLIC
writeCoreDensityHDF
,
readCoreDensityHDF
PUBLIC
writeHeaderData
PUBLIC
isCoreDensityPresentHDF
,
isDensityEntryPresentHDF
PUBLIC
peekDensityEntryHDF
#endif
PUBLIC
DENSITY_TYPE_UNDEFINED_const
PUBLIC
DENSITY_TYPE_IN_const
,
DENSITY_TYPE_OUT_const
PUBLIC
DENSITY_TYPE_NOCO_IN_const
,
DENSITY_TYPE_NOCO_OUT_const
PUBLIC
DENSITY_TYPE_PRECOND_const
INTEGER
,
PARAMETER
::
DENSITY_TYPE_UNDEFINED_const
=
0
INTEGER
,
PARAMETER
::
DENSITY_TYPE_IN_const
=
1
INTEGER
,
PARAMETER
::
DENSITY_TYPE_OUT_const
=
2
INTEGER
,
PARAMETER
::
DENSITY_TYPE_NOCO_IN_const
=
3
...
...
@@ -40,10 +43,12 @@ MODULE m_cdnpot_io_hdf
#ifdef CPP_HDF
SUBROUTINE
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
SUBROUTINE
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
INTEGER
(
HID_T
),
INTENT
(
OUT
)
::
fileID
INTEGER
,
INTENT
(
OUT
)
::
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
INTEGER
,
INTENT
(
OUT
)
::
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
INTEGER
,
INTENT
(
OUT
)
::
readDensityIndex
,
lastDensityIndex
INTEGER
(
HID_T
)
::
generalGroupID
INTEGER
::
hdfError
...
...
@@ -52,7 +57,8 @@ MODULE m_cdnpot_io_hdf
currentStarsIndex
=
0
currentLatharmsIndex
=
0
currentStructureIndex
=
0
currentDensityIndex
=
0
readDensityIndex
=
0
lastDensityIndex
=
0
INQUIRE
(
FILE
=
'cdn.hdf'
,
EXIST
=
l_exist
)
IF
(
l_exist
)
THEN
! only open file
...
...
@@ -63,7 +69,8 @@ MODULE m_cdnpot_io_hdf
CALL
io_read_attint0
(
generalGroupID
,
'currentStarsIndex'
,
currentStarsIndex
)
CALL
io_read_attint0
(
generalGroupID
,
'currentLatharmsIndex'
,
currentLatharmsIndex
)
CALL
io_read_attint0
(
generalGroupID
,
'currentStructureIndex'
,
currentStructureIndex
)
CALL
io_read_attint0
(
generalGroupID
,
'currentDensityIndex'
,
currentDensityIndex
)
CALL
io_read_attint0
(
generalGroupID
,
'readDensityIndex'
,
readDensityIndex
)
CALL
io_read_attint0
(
generalGroupID
,
'lastDensityIndex'
,
lastDensityIndex
)
CALL
h5gclose_f
(
generalGroupID
,
hdfError
)
ELSE
! create file
...
...
@@ -74,7 +81,8 @@ MODULE m_cdnpot_io_hdf
CALL
io_write_attint0
(
generalGroupID
,
'currentStarsIndex'
,
currentStarsIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'currentLatharmsIndex'
,
currentLatharmsIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'currentStructureIndex'
,
currentStructureIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'currentDensityIndex'
,
currentDensityIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'readDensityIndex'
,
readDensityIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'lastDensityIndex'
,
lastDensityIndex
)
CALL
h5gclose_f
(
generalGroupID
,
hdfError
)
END
IF
...
...
@@ -92,13 +100,15 @@ MODULE m_cdnpot_io_hdf
END
SUBROUTINE
closeCDN_HDF
SUBROUTINE
writeHeaderData
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
SUBROUTINE
writeHeaderData
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
INTEGER
,
INTENT
(
IN
)
::
currentStarsIndex
INTEGER
,
INTENT
(
IN
)
::
currentLatharmsIndex
INTEGER
,
INTENT
(
IN
)
::
currentStructureIndex
INTEGER
,
INTENT
(
IN
)
::
currentDensityIndex
INTEGER
,
INTENT
(
IN
)
::
readDensityIndex
INTEGER
,
INTENT
(
IN
)
::
lastDensityIndex
INTEGER
(
HID_T
)
::
generalGroupID
INTEGER
::
hdfError
...
...
@@ -108,7 +118,8 @@ MODULE m_cdnpot_io_hdf
CALL
io_write_attint0
(
generalGroupID
,
'currentStarsIndex'
,
currentStarsIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'currentLatharmsIndex'
,
currentLatharmsIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'currentStructureIndex'
,
currentStructureIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'currentDensityIndex'
,
currentDensityIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'readDensityIndex'
,
readDensityIndex
)
CALL
io_write_attint0
(
generalGroupID
,
'lastDensityIndex'
,
lastDensityIndex
)
CALL
h5gclose_f
(
generalGroupID
,
hdfError
)
...
...
@@ -1020,13 +1031,13 @@ MODULE m_cdnpot_io_hdf
END
SUBROUTINE
readStructureHDF
SUBROUTINE
writeDensityHDF
(
input
,
fileID
,
archiveName
,
densityType
,
last
DensityIndex
,&
SUBROUTINE
writeDensityHDF
(
input
,
fileID
,
archiveName
,
densityType
,
previous
DensityIndex
,&
starsIndex
,
latharmsIndex
,
structureIndex
,&
iter
,
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
INTEGER
,
INTENT
(
IN
)
::
densityType
,
last
DensityIndex
INTEGER
,
INTENT
(
IN
)
::
densityType
,
previous
DensityIndex
INTEGER
,
INTENT
(
IN
)
::
starsIndex
,
latharmsIndex
,
structureIndex
CHARACTER
(
LEN
=*
),
INTENT
(
IN
)
::
archiveName
...
...
@@ -1113,7 +1124,7 @@ MODULE m_cdnpot_io_hdf
IF
(
l_exist
)
THEN
CALL
h5gopen_f
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)),
archiveID
,
hdfError
)
CALL
io_write_attint0
(
archiveID
,
'
lastDensityIndex'
,
last
DensityIndex
)
CALL
io_write_attint0
(
archiveID
,
'
previousDensityIndex'
,
previous
DensityIndex
)
CALL
io_write_attint0
(
archiveID
,
'starsIndex'
,
starsIndex
)
CALL
io_write_attint0
(
archiveID
,
'latharmsIndex'
,
latharmsIndex
)
CALL
io_write_attint0
(
archiveID
,
'structureIndex'
,
structureIndex
)
...
...
@@ -1243,7 +1254,7 @@ MODULE m_cdnpot_io_hdf
ELSE
CALL
h5gcreate_f
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)),
archiveID
,
hdfError
)
CALL
io_write_attint0
(
archiveID
,
'
lastDensityIndex'
,
last
DensityIndex
)
CALL
io_write_attint0
(
archiveID
,
'
previousDensityIndex'
,
previous
DensityIndex
)
CALL
io_write_attint0
(
archiveID
,
'starsIndex'
,
starsIndex
)
CALL
io_write_attint0
(
archiveID
,
'latharmsIndex'
,
latharmsIndex
)
CALL
io_write_attint0
(
archiveID
,
'structureIndex'
,
structureIndex
)
...
...
@@ -1339,7 +1350,7 @@ MODULE m_cdnpot_io_hdf
COMPLEX
,
INTENT
(
OUT
)
::
cdom
(:),
cdomvz
(:,:),
cdomvxy
(:,:,:)
INTEGER
::
starsIndex
,
latharmsIndex
,
structureIndex
INTEGER
::
last
DensityIndex
,
jspins
INTEGER
::
previous
DensityIndex
,
jspins
INTEGER
::
ntype
,
jmtd
,
nmzd
,
nmzxyd
,
nlhd
,
ng3
,
ng2
INTEGER
::
nmz
,
nvac
,
od_nq2
,
nmzxy
INTEGER
::
localDensityType
...
...
@@ -1399,7 +1410,7 @@ MODULE m_cdnpot_io_hdf
CALL
h5gopen_f
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)),
archiveID
,
hdfError
)
CALL
h5gopen_f
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)),
groupID
,
hdfError
)
CALL
io_read_attint0
(
archiveID
,
'
lastDensityIndex'
,
last
DensityIndex
)
CALL
io_read_attint0
(
archiveID
,
'
previousDensityIndex'
,
previous
DensityIndex
)
CALL
io_read_attint0
(
archiveID
,
'starsIndex'
,
starsIndex
)
CALL
io_read_attint0
(
archiveID
,
'latharmsIndex'
,
latharmsIndex
)
CALL
io_read_attint0
(
archiveID
,
'structureIndex'
,
structureIndex
)
...
...
@@ -1490,6 +1501,80 @@ MODULE m_cdnpot_io_hdf
END
SUBROUTINE
readDensityHDF
SUBROUTINE
peekDensityEntryHDF
(
fileID
,
archiveName
,
densityType
,&
iter
,
starsIndex
,
latharmsIndex
,
structureIndex
,&
previousDensityIndex
,
jspins
)
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
INTEGER
,
INTENT
(
IN
)
::
densityType
CHARACTER
(
LEN
=*
),
INTENT
(
IN
)
::
archiveName
INTEGER
,
INTENT
(
OUT
)
::
iter
INTEGER
,
INTENT
(
OUT
)
::
starsIndex
,
latharmsIndex
,
structureIndex
INTEGER
,
INTENT
(
OUT
)
::
previousDensityIndex
,
jspins
INTEGER
::
localDensityType
LOGICAL
::
l_exist
INTEGER
(
HID_T
)
::
archiveID
,
groupID
INTEGER
::
hdfError
CHARACTER
(
LEN
=
30
)
::
groupName
,
densityTypeName
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)))
IF
(
.NOT.
l_exist
)
THEN
CALL
juDFT_error
(
'density archive '
//
TRIM
(
ADJUSTL
(
archiveName
))//
' does not exist.'
,
calledby
=
"readDensityHDF"
)
END
IF
localDensityType
=
densityType
SELECT
CASE
(
densityType
)
CASE
(
DENSITY_TYPE_UNDEFINED_const
)
densityTypeName
=
''
CASE
(
DENSITY_TYPE_IN_const
)
densityTypeName
=
'/in'
CASE
(
DENSITY_TYPE_OUT_const
)
densityTypeName
=
'/out'
CASE
(
DENSITY_TYPE_NOCO_IN_const
)
densityTypeName
=
'/noco_in'
groupName
=
TRIM
(
ADJUSTL
(
archiveName
))//
TRIM
(
ADJUSTL
(
densityTypeName
))
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)))
IF
(
.NOT.
l_exist
)
THEN
localDensityType
=
DENSITY_TYPE_IN_const
densityTypeName
=
'/in'
END
IF
CASE
(
DENSITY_TYPE_NOCO_OUT_const
)
densityTypeName
=
'/noco_out'
groupName
=
TRIM
(
ADJUSTL
(
archiveName
))//
TRIM
(
ADJUSTL
(
densityTypeName
))
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)))
IF
(
.NOT.
l_exist
)
THEN
localDensityType
=
DENSITY_TYPE_OUT_const
densityTypeName
=
'/out'
END
IF
CASE
(
DENSITY_TYPE_PRECOND_const
)
densityTypeName
=
'/precond'
CASE
DEFAULT
CALL
juDFT_error
(
"Unknown density type selected"
,
calledby
=
"writeDensityHDF"
)
END
SELECT
groupName
=
TRIM
(
ADJUSTL
(
archiveName
))//
TRIM
(
ADJUSTL
(
densityTypeName
))
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)))
IF
(
.NOT.
l_exist
)
THEN
CALL
juDFT_error
(
'density entry '
//
TRIM
(
ADJUSTL
(
groupName
))//
' does not exist.'
,
calledby
=
"readDensityHDF"
)
END
IF
CALL
h5gopen_f
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)),
archiveID
,
hdfError
)
CALL
h5gopen_f
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)),
groupID
,
hdfError
)
CALL
io_read_attint0
(
archiveID
,
'previousDensityIndex'
,
previousDensityIndex
)
CALL
io_read_attint0
(
archiveID
,
'starsIndex'
,
starsIndex
)
CALL
io_read_attint0
(
archiveID
,
'latharmsIndex'
,
latharmsIndex
)
CALL
io_read_attint0
(
archiveID
,
'structureIndex'
,
structureIndex
)
CALL
io_read_attint0
(
archiveID
,
'spins'
,
jspins
)
CALL
io_read_attint0
(
archiveID
,
'iter'
,
iter
)
CALL
h5gclose_f
(
groupID
,
hdfError
)
CALL
h5gclose_f
(
archiveID
,
hdfError
)
END
SUBROUTINE
peekDensityEntryHDF
SUBROUTINE
writeCoreDensityHDF
(
fileID
,
input
,
atoms
,
dimension
,
rhcs
,
tecs
,
qints
)
TYPE
(
t_atoms
),
INTENT
(
IN
)
::
atoms
...
...
@@ -1624,7 +1709,8 @@ MODULE m_cdnpot_io_hdf
INTEGER
(
HID_T
)
::
fileID
INTEGER
::
currentStarsIndex
,
currentLatharmsIndex
INTEGER
::
currentStructureIndex
,
currentDensityIndex
INTEGER
::
currentStructureIndex
INTEGER
::
readDensityIndex
,
lastDensityIndex
LOGICAL
::
l_exist
INQUIRE
(
FILE
=
'cdn.hdf'
,
EXIST
=
l_exist
)
...
...
@@ -1632,7 +1718,8 @@ MODULE m_cdnpot_io_hdf
isCoreDensityPresentHDF
=
.FALSE.
RETURN
END
IF
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,
currentDensityIndex
)
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
readDensityIndex
,
lastDensityIndex
)
isCoreDensityPresentHDF
=
io_groupexists
(
fileID
,
'/cdnc'
)
CALL
closeCDN_HDF
(
fileID
)
END
FUNCTION
...
...
@@ -1655,6 +1742,8 @@ MODULE m_cdnpot_io_hdf
localDensityType
=
densityType
SELECT
CASE
(
densityType
)
CASE
(
DENSITY_TYPE_UNDEFINED_const
)
densityTypeName
=
''
CASE
(
DENSITY_TYPE_IN_const
)
densityTypeName
=
'/in'
CASE
(
DENSITY_TYPE_OUT_const
)
...
...
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