Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
b802e34b
Commit
b802e34b
authored
Dec 13, 2020
by
Francois Gygi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
3f48d3c0
5780a4f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
53 deletions
+54
-53
BOSampleStepper.cpp
src/BOSampleStepper.cpp
+2
-2
ComputeMLWFCmd.cpp
src/ComputeMLWFCmd.cpp
+12
-2
ExchangeOperator.cpp
src/ExchangeOperator.cpp
+39
-48
release.cpp
src/release.cpp
+1
-1
No files found.
src/BOSampleStepper.cpp
View file @
b802e34b
...
...
@@ -1149,7 +1149,7 @@ void BOSampleStepper::step(int niter)
ostr
<<
" <total_spread> "
;
for
(
int
j
=
0
;
j
<
3
;
j
++
)
ostr
<<
set
w
(
10
)
<<
total_spread
[
j
];
ostr
<<
set
precision
(
6
)
<<
setw
(
15
)
<<
total_spread
[
j
];
ostr
<<
" </total_spread>"
<<
endl
;
D3vector
edipole
=
mlwft
[
isp_loc
]
->
dipole
();
ostr
<<
" <electronic_dipole spin=
\"
"
<<
ispin
...
...
@@ -1174,13 +1174,13 @@ void BOSampleStepper::step(int niter)
if
(
onpe0
)
{
D3vector
idipole
=
atoms
.
dipole
();
cout
<<
setprecision
(
6
);
cout
<<
" <ionic_dipole> "
<<
idipole
<<
" </ionic_dipole>"
<<
endl
;
cout
<<
" <total_dipole> "
<<
idipole
+
edipole_sum
<<
" </total_dipole>"
<<
endl
;
cout
<<
" <total_dipole_length> "
<<
length
(
idipole
+
edipole_sum
)
<<
" </total_dipole_length>"
<<
endl
;
cout
<<
"</mlwfs>"
<<
endl
;
}
tmap
[
"mlwf"
].
stop
();
}
...
...
src/ComputeMLWFCmd.cpp
View file @
b802e34b
...
...
@@ -95,7 +95,7 @@ int ComputeMLWFCmd::action(int argc, char **argv)
ostr
<<
" <total_spread> "
;
for
(
int
j
=
0
;
j
<
3
;
j
++
)
ostr
<<
set
w
(
10
)
<<
total_spread
[
j
];
ostr
<<
set
precision
(
6
)
<<
setw
(
15
)
<<
total_spread
[
j
];
ostr
<<
" </total_spread>"
<<
endl
;
D3vector
edipole
=
mlwft
->
dipole
();
ostr
<<
" <electronic_dipole spin=
\"
"
<<
ispin
...
...
@@ -108,17 +108,27 @@ int ComputeMLWFCmd::action(int argc, char **argv)
cout0
(
ostr
.
str
(),
isrc
);
MPI_Barrier
(
MPIdata
::
comm
());
}
// ispin
if
(
onpe0
)
cout
<<
"</mlwfs>"
<<
endl
;
if
(
MPIdata
::
sd_rank
()
==
0
)
{
D3vector
d3tsum
;
MPI_Reduce
(
&
edipole_sum
[
0
],
&
d3tsum
[
0
],
3
,
MPI_DOUBLE
,
MPI_SUM
,
0
,
MPIdata
::
sp_comm
());
edipole_sum
=
d3tsum
;
}
if
(
onpe0
)
{
D3vector
idipole
=
s
->
atoms
.
dipole
();
cout
<<
setprecision
(
6
);
cout
<<
" <ionic_dipole> "
<<
idipole
<<
" </ionic_dipole>"
<<
endl
;
cout
<<
" <total_dipole> "
<<
idipole
+
edipole_sum
<<
" </total_dipole>"
<<
endl
;
cout
<<
" <total_dipole_length> "
<<
length
(
idipole
+
edipole_sum
)
<<
" </total_dipole_length>"
<<
endl
;
cout
<<
"</mlwfs>"
<<
endl
;
}
return
0
;
}
src/ExchangeOperator.cpp
View file @
b802e34b
...
...
@@ -997,7 +997,6 @@ double ExchangeOperator::compute_exchange_at_gamma_(const Wavefunction &wf,
const
double
*
const
g_y
=
vbasis_
->
gx_ptr
(
1
);
const
double
*
const
g_z
=
vbasis_
->
gx_ptr
(
2
);
ostringstream
ostr
;
for
(
int
isp_loc
=
0
;
isp_loc
<
wfc_
.
nsp_loc
();
++
isp_loc
)
{
const
int
ispin
=
wf
.
isp_global
(
isp_loc
);
...
...
@@ -1060,30 +1059,6 @@ double ExchangeOperator::compute_exchange_at_gamma_(const Wavefunction &wf,
// copy of localization vector from Bisection object
localization_
=
bisection_
[
isp_loc
]
->
localization
();
#if TIMING
Timer
tmbsize
,
tmbpair
;
tmbsize
.
start
();
#endif
if
(
MPIdata
::
sd_rank
()
==
0
)
{
ostr
<<
setprecision
(
10
);
ostr
<<
" ExchangeOperator: bisection size: ispin="
<<
ispin
<<
": "
<<
bisection_
[
isp_loc
]
->
total_size
()
<<
endl
;
}
#if TIMING
tmbsize
.
stop
();
tmbpair
.
start
();
#endif
if
(
MPIdata
::
sd_rank
()
==
0
)
{
ostr
<<
setprecision
(
10
);
ostr
<<
" ExchangeOperator: pair fraction: ispin="
<<
ispin
<<
": "
<<
bisection_
[
isp_loc
]
->
pair_fraction
()
<<
endl
;
}
#if TIMING
tmbpair
.
stop
();
#endif
// copy the orthogonal transformation u to uc_[isp_loc]
*
uc_
[
isp_loc
]
=
bisection_
[
isp_loc
]
->
u
();
...
...
@@ -1360,24 +1335,6 @@ double ExchangeOperator::compute_exchange_at_gamma_(const Wavefunction &wf,
#endif
tmb
.
stop
();
if
(
MPIdata
::
sd_rank
()
==
0
)
{
#if TIMING
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection compute transform time: "
<<
tmbtransf
.
real
()
<<
" s"
<<
endl
;
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection compute localization time: "
<<
tmbcomploc
.
real
()
<<
" s"
<<
endl
;
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection forward time: "
<<
tmbfwd
.
real
()
<<
" s"
<<
endl
;
#endif
ostr
<<
setprecision
(
3
);
ostr
<<
" ExchangeOperator: bisection time: "
<<
tmb
.
real
()
<<
" s"
<<
endl
;
ostr
<<
setprecision
(
10
);
}
}
// if use_bisection_
tm
.
start
();
...
...
@@ -2248,12 +2205,46 @@ double ExchangeOperator::compute_exchange_at_gamma_(const Wavefunction &wf,
}
// for isp_loc
for
(
int
ispin
=
0
;
ispin
<
wfc_
.
nspin
();
++
ispin
)
if
(
use_bisection_
)
{
int
isrc
=
-
1
;
if
(
MPIdata
::
sd_rank
()
==
0
)
isrc
=
MPIdata
::
rank
();
cout0
(
ostr
.
str
(),
isrc
);
ostringstream
ostr
;
for
(
int
ispin
=
0
;
ispin
<
wfc_
.
nspin
();
++
ispin
)
{
int
isp_loc
=
wfc_
.
isp_local
(
ispin
);
int
isrc
=
-
1
;
if
(
isp_loc
>=
0
)
{
if
(
MPIdata
::
sd_rank
()
==
0
)
{
ostr
.
str
(
""
);
isrc
=
MPIdata
::
rank
();
ostr
<<
setprecision
(
10
);
ostr
<<
" ExchangeOperator: bisection size: ispin="
<<
ispin
<<
": "
<<
bisection_
[
isp_loc
]
->
total_size
()
<<
endl
;
ostr
<<
" ExchangeOperator: pair fraction: ispin="
<<
ispin
<<
": "
<<
bisection_
[
isp_loc
]
->
pair_fraction
()
<<
endl
;
}
}
cout0
(
ostr
.
str
(),
isrc
);
MPI_Barrier
(
MPIdata
::
comm
());
}
if
(
MPIdata
::
onpe0
()
)
{
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection time: "
<<
tmb
.
real
()
<<
" s"
<<
endl
;
#if TIMING
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection compute transform time: "
<<
tmbtransf
.
real
()
<<
" s"
<<
endl
;
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection compute localization time: "
<<
tmbcomploc
.
real
()
<<
" s"
<<
endl
;
cout
<<
setprecision
(
3
);
cout
<<
" ExchangeOperator: bisection forward time: "
<<
tmbfwd
.
real
()
<<
" s"
<<
endl
;
#endif
}
}
// sum contributions to the exchange energy
...
...
src/release.cpp
View file @
b802e34b
...
...
@@ -19,5 +19,5 @@
#include "release.h"
std
::
string
release
(
void
)
{
return
std
::
string
(
"rel1_72_2"
);
return
std
::
string
(
"rel1_72_2
dev
"
);
}
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