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
000b3db0
Commit
000b3db0
authored
Nov 15, 2017
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed charge integral in ChargeDensity::update_rhor
parent
e9d66bfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
ChargeDensity.C
src/ChargeDensity.C
+13
-0
No files found.
src/ChargeDensity.C
View file @
000b3db0
...
...
@@ -21,6 +21,7 @@
#include "Wavefunction.h"
#include "FourierTransform.h"
#include "SlaterDet.h"
#include "blas.h" // dasum
#include <iomanip>
#include <algorithm> // fill
...
...
@@ -207,6 +208,18 @@ void ChargeDensity::update_rhor(void)
for
(
int
i
=
0
;
i
<
rhor_size
;
i
++
)
prhor
[
i
]
=
rhotmp
[
i
].
real
()
*
omega_inv
;
}
// integral of the charge density
tmap
[
"charge_integral"
].
start
();
int
ione
=
1
;
int
n
=
rhor_size
;
double
sum
=
dasum
(
&
n
,
prhor
,
&
ione
);
sum
*=
omega
/
vft_
->
np012
();
// sum on all indices except spin: sum along columns of spincontext
wf_
.
spincontext
()
->
dsum
(
'c'
,
1
,
1
,
&
sum
,
1
);
tmap
[
"charge_integral"
].
stop
();
total_charge_
[
ispin
]
=
sum
;
}
}
...
...
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