Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions src/Control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1119,78 +1119,6 @@ void Control::printThermostatInfo(std::ostream& os) const
}
}

int Control::readOccupations(std::ifstream* tfile)
{
int count = 0;
float nel = 0.;
do
{
float t1 = 0.;
int nst = 0;
if (mype_ == 0)
{
#ifdef DEBUG
(*MPIdata::sout) << " Occupations of states..." << std::endl;
#endif
(*tfile) >> nst;
if (nst <= 0)
{
(*MPIdata::sout)
<< "Control::readOccupations: numst=" << numst << std::endl;
(*MPIdata::sout) << "Control::readOccupations: nst=" << nst
<< ", count=" << count << std::endl;
(*MPIdata::sout) << "Control::readOccupations: Bad repeat "
"count for state occupations"
<< std::endl;
return -1;
}
if ((count + nst) > numst)
{
(*MPIdata::sout) << "Control::readOccupations: Occupations "
"specified for too many states"
<< std::endl;
return -1;
}

(*tfile) >> t1;
if (t1 < 0.)
{
(*MPIdata::sout)
<< "Control::readOccupations: occupation=" << t1
<< std::endl;
(*MPIdata::sout) << "Control::readOccupations: occupation "
"should be a positive number"
<< std::endl;
return -1;
}
finishRead(*tfile);
}
int mpirc = MPI_Bcast(&nst, 1, MPI_INT, 0, comm_global_);
if (mpirc != MPI_SUCCESS)
{
(*MPIdata::sout)
<< "MPI Bcast of occupation numbers failed!!!" << std::endl;
return -1;
}
mpirc = MPI_Bcast(&t1, 1, MPI_FLOAT, 0, comm_global_);
if (mpirc != MPI_SUCCESS)
{
(*MPIdata::sout)
<< "MPI Bcast of occupation failed!!!" << std::endl;
return -1;
}
nel += nst * t1;
count += nst;

} while (count < numst);

nel_ = (int)nel;

nempty_ = (2 * numst - (int)nel) / 2;

return count;
}

void Control::setLocMode(const float radius, const float lx, const float ly,
const float lz, const float mind_centers)
{
Expand Down
1 change: 0 additions & 1 deletion src/Control.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ class Control
const float dtol, const short kim, const short itmax, const short lfil,
const short maxfill, const short ilutype);
void setSpreadRadius();
int readOccupations(std::ifstream* tfile);
bool checkTimeout() { return timeout_.check(); }

bool occupationWidthIsZero() { return occ_width < 1.e-12; }
Expand Down