29 int N = bigspace.size();
33 if (bigspace[iorb].Energy >= emin)
35 n_lower += (bigspace[iorb].MakeTwoCopies) ? 2 : 1;
41 APP_ABORT(
"BandInfoGroup::selectBands failed due to iorb>=N");
49 if (bigspace[iorb].Energy >= emax)
51 myBands.push_back(bigspace[iorb]);
52 NumSPOs += (bigspace[iorb].MakeTwoCopies) ? 2 : 1;
56 app_log() <<
"BandInfoGroup::selectBands using energy [" << emin <<
"," << emax <<
")" << std::endl;
57 app_log() <<
" Number of distinct bands " <<
myBands.size() << std::endl;
69 app_log() <<
"BandInfoGroup::selectBands bigspace has " << bigspace.size() <<
" distinct orbitals " << std::endl;
73 int N = bigspace.size();
77 if (iorb >= first_orb)
79 n_lower += (bigspace[iorb].MakeTwoCopies) ? 2 : 1;
85 APP_ABORT(
"BandInfoGroup::selectBands failed due to iorb>=N");
91 int ns_max = num_spos - 1;
92 while (iorb <
N &&
NumSPOs < num_spos)
95 myBands.push_back(bigspace[iorb]);
96 NumSPOs += (
NumSPOs < ns_max && bigspace[iorb].MakeTwoCopies) ? 2 : 1;
100 app_log() <<
"BandInfoGroup::selectBands using distinct orbitals [" << first_orb <<
"," << iorb <<
")" << std::endl;
101 app_log() <<
" Number of distinct bands " <<
myBands.size() << std::endl;
helper functions for EinsplineSetBuilder
BandInfoGroup()
constructor
Define helper class to sort bands according to the band and twist and functions.
void selectBands(const std::vector< BandInfo > &bigspace, double emin, double emax)
select the bands within an energy range [emin,emax)
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
int FirstBand
starting band
int NumSPOs
number of SPOs handled by this object
std::vector< BandInfo > myBands
Bands that belong to this group.