Commit 14eb3b69 by Francois Gygi

Add sum of taur over columns in ChargeDensity

parent d8932526
......@@ -213,30 +213,21 @@ void ChargeDensity::update_rhor(void)
////////////////////////////////////////////////////////////////////////////////
void ChargeDensity::update_taur(double* taur) const
{
tmap["update_taur"].start();
for ( int ispin = 0; ispin < wf_.nspin(); ispin++ )
{
tmap["update_taur"].start();
memset( (void*)taur, 0, vft_->np012loc()*sizeof(double) );
for ( int ikp = 0; ikp < wf_.nkp(); ikp++ )
{
wf_.sd(ispin,ikp)->compute_tau(*ft_[ikp], wf_.weight(ikp), taur);
}
tmap["update_taur"].stop();
//!!Taken from update_density, need similiar to sum columns
// 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;
tmap["charge_vft"].start();
vft_->forward(&rhotmp[0],&rhog[ispin][0]);
tmap["charge_vft"].stop();*/
//!! Needed?
if ( rhocore_r )
assert(false);
}
// sum along columns of spincontext
wf_.kpcontext()->dsum('r',vft_->np012loc(),1,&taur[0],vft_->np012loc());
tmap["update_taur"].stop();
if ( rhocore_r )
assert(false);
}
////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment