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 e84abb4 commit 46b0da1Copy full SHA for 46b0da1
source/module_cell/read_pp.cpp
@@ -385,22 +385,15 @@ int Pseudopot_upf::average_p(const double& lambda, Atom_pseudo& pp)
385
void Pseudopot_upf::set_empty_element(Atom_pseudo& pp)
386
{
387
pp.zv = 0;
388
- for(int ir=0; ir<pp.mesh; ++ir)
389
- {
390
- pp.vloc_at[ir] = 0;
391
- }
392
- for(int i=0; i<pp.nbeta; ++i)
393
394
- for(int j=0; j<pp.nbeta; ++j)
395
396
- pp.dion(i,j) = 0;
397
398
399
400
401
- pp.rho_at[ir] = 0;
402
403
- 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();
404
}
405
406
/**
0 commit comments