We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f16364d commit 52911e0Copy full SHA for 52911e0
source/source_cell/read_pp.cpp
@@ -399,22 +399,15 @@ int Pseudopot_upf::average_p(const double& lambda, Atom_pseudo& pp)
399
void Pseudopot_upf::set_empty_element(Atom_pseudo& pp)
400
{
401
pp.zv = 0;
402
- for(int ir=0; ir<pp.mesh; ++ir)
403
- {
404
- pp.vloc_at[ir] = 0;
405
- }
406
- for(int i=0; i<pp.nbeta; ++i)
407
408
- for(int j=0; j<pp.nbeta; ++j)
409
410
- pp.dion(i,j) = 0;
411
412
413
414
415
- pp.rho_at[ir] = 0;
416
417
- return;
+ for(double &value : pp.vloc_at)
+ { value = 0; }
+ for(double &value : pp.rho_atc)
+ for(double &value : pp.rho_at)
+ pp.chi.zero_out();
+ pp.dion.zero_out();
+ pp.betar.zero_out();
418
}
419
420
/**
0 commit comments