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
87abe74b
Commit
87abe74b
authored
Oct 28, 2004
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added timers
git-svn-id:
http://qboxcode.org/svn/qb/trunk@285
cba15fb0-1239-40c8-b417-11db7ca47a34
parent
0fccba2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
BOSampleStepper.C
src/BOSampleStepper.C
+38
-6
No files found.
src/BOSampleStepper.C
View file @
87abe74b
...
...
@@ -3,7 +3,7 @@
// BOSampleStepper.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: BOSampleStepper.C,v 1.1
4 2004-10-15 18:06:24
fgygi Exp $
// $Id: BOSampleStepper.C,v 1.1
5 2004-10-28 16:56:41
fgygi Exp $
#include "BOSampleStepper.h"
#include "EnergyFunctional.h"
...
...
@@ -31,6 +31,26 @@ BOSampleStepper::BOSampleStepper(Sample& s, int nitscf, int nite) :
dwf
(
s
.
wf
),
wfv
(
s
.
wfv
),
nitscf_
(
nitscf
),
nite_
(
nite
)
{}
////////////////////////////////////////////////////////////////////////////////
BOSampleStepper
::~
BOSampleStepper
()
{
for
(
TimerMap
::
iterator
i
=
tmap
.
begin
();
i
!=
tmap
.
end
();
i
++
)
{
double
time
=
(
*
i
).
second
.
real
();
double
tmin
=
time
;
double
tmax
=
time
;
s_
.
ctxt_
.
dmin
(
1
,
1
,
&
tmin
,
1
);
s_
.
ctxt_
.
dmax
(
1
,
1
,
&
tmax
,
1
);
if
(
s_
.
ctxt_
.
myproc
()
==
0
)
{
cout
<<
"<!-- timing "
<<
setw
(
15
)
<<
(
*
i
).
first
<<
" : "
<<
setprecision
(
3
)
<<
setw
(
9
)
<<
tmin
<<
" "
<<
setprecision
(
3
)
<<
setw
(
9
)
<<
tmax
<<
" -->"
<<
endl
;
}
}
}
////////////////////////////////////////////////////////////////////////////////
void
BOSampleStepper
::
step
(
int
niter
)
{
const
bool
extrapolate_wf
=
true
;
...
...
@@ -107,7 +127,9 @@ void BOSampleStepper::step(int niter)
const
bool
compute_hpsi
=
false
;
const
bool
compute_forces
=
false
;
const
bool
compute_stress
=
false
;
tmap
[
"charge"
].
start
();
cd_
.
update_density
();
tmap
[
"charge"
].
stop
();
ef_
.
update_vhxc
();
double
energy
=
ef_
.
energy
(
compute_hpsi
,
dwf
,
compute_forces
,
fion
,
compute_stress
,
sigma_eks
);
...
...
@@ -130,8 +152,11 @@ void BOSampleStepper::step(int niter)
if
(
compute_forces
||
compute_stress
)
{
// compute energy and ionic forces using existing wavefunction
tmap
[
"charge"
].
start
();
cd_
.
update_density
();
tmap
[
"charge"
].
stop
();
ef_
.
update_vhxc
();
energy
=
ef_
.
energy
(
false
,
dwf
,
compute_forces
,
fion
,
compute_stress
,
sigma_eks
);
...
...
@@ -357,25 +382,25 @@ void BOSampleStepper::step(int niter)
switch
(
ortho
)
{
case
GRAM
:
tmap
[
"gram"
].
st
op
();
tmap
[
"gram"
].
st
art
();
s_
.
wf
.
sd
(
ispin
,
ikp
)
->
gram
();
tmap
[
"gram"
].
stop
();
break
;
case
LOWDIN
:
tmap
[
"lowdin"
].
st
op
();
tmap
[
"lowdin"
].
st
art
();
s_
.
wf
.
sd
(
ispin
,
ikp
)
->
lowdin
();
tmap
[
"lowdin"
].
stop
();
break
;
case
ORTHO_ALIGN
:
tmap
[
"ortho_align"
].
st
op
();
tmap
[
"ortho_align"
].
st
art
();
s_
.
wf
.
sd
(
ispin
,
ikp
)
->
ortho_align
(
*
s_
.
wfv
->
sd
(
ispin
,
ikp
));
tmap
[
"ortho_align"
].
stop
();
break
;
case
RICCATI
:
tmap
[
"riccati"
].
st
op
();
tmap
[
"riccati"
].
st
art
();
s_
.
wf
.
sd
(
ispin
,
ikp
)
->
riccati
(
*
s_
.
wfv
->
sd
(
ispin
,
ikp
));
tmap
[
"riccati"
].
stop
();
break
;
...
...
@@ -401,7 +426,9 @@ void BOSampleStepper::step(int niter)
{
if
(
nite_
>
1
&&
s_
.
ctxt_
.
onpe0
()
)
cout
<<
" <!-- BOSampleStepper: start scf iteration -->"
<<
endl
;
tmap
[
"charge"
].
start
();
cd_
.
update_density
();
tmap
[
"charge"
].
stop
();
// charge mixing
...
...
@@ -643,7 +670,9 @@ void BOSampleStepper::step(int niter)
{
// wf_stepper == 0, wf_dyn == LOCKED
// evaluate and print energy
tmap
[
"charge"
].
start
();
cd_
.
update_density
();
tmap
[
"charge"
].
stop
();
ef_
.
update_vhxc
();
double
energy
=
ef_
.
energy
(
true
,
dwf
,
false
,
fion
,
false
,
sigma_eks
);
if
(
s_
.
ctxt_
.
onpe0
()
)
...
...
@@ -707,7 +736,10 @@ void BOSampleStepper::step(int niter)
// compute ionic forces at last position to update velocities
// consistently with last position
tmap
[
"charge"
].
start
();
cd_
.
update_density
();
tmap
[
"charge"
].
stop
();
ef_
.
update_vhxc
();
double
energy
=
ef_
.
energy
(
false
,
dwf
,
compute_forces
,
fion
,
compute_stress
,
sigma_eks
);
...
...
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