Skip to content

Commit

Permalink
update rom main driver again
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed Jun 14, 2024
1 parent d10d4d1 commit 162f7d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
19 changes: 7 additions & 12 deletions src/rom_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ int main(int argc, char** argv)
std::string input_filename("");
std::string lrs_filename;
std::string constraints_filename("");
bool tcheck = false;

float total_spin = 0.;
bool with_spin = false;
Expand All @@ -64,7 +63,7 @@ int main(int argc, char** argv)
if (MPIdata::onpe0)
{
read_config(argc, argv, vm, input_filename, lrs_filename,
constraints_filename, total_spin, with_spin, tcheck);
constraints_filename, total_spin, with_spin);
}

MGmol_MPI::setup(comm, std::cout, with_spin);
Expand Down Expand Up @@ -97,17 +96,13 @@ int main(int argc, char** argv)
mgmol = new MGmol<ExtendedGridOrbitals>(global_comm, *MPIdata::sout,
input_filename, lrs_filename, constraints_filename);

if (!tcheck)
{
if (ct.isLocMode())
readRestartFiles<LocGridOrbitals>(mgmol);
else
readRestartFiles<ExtendedGridOrbitals>(mgmol);
}
mgmol->setup();

if (ct.isLocMode())
readRestartFiles<LocGridOrbitals>(mgmol);
else
{
*MPIdata::sout << " Input parameters OK\n";
}
readRestartFiles<ExtendedGridOrbitals>(mgmol);

delete mgmol;

} // close main scope
Expand Down
3 changes: 1 addition & 2 deletions src/rom_workflows.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ void readRestartFiles(MGmolInterface *mgmol_)

MGmol<OrbitalsType> *mgmol = static_cast<MGmol<OrbitalsType> *>(mgmol_);
OrbitalsType *orbitals = mgmol->getOrbitals();
Hamiltonian<OrbitalsType> *hamiltonian = mgmol->getHamiltonian();
Potentials& pot = hamiltonian->potential();
Potentials& pot = mgmol->getHamiltonian()->potential();
std::string filename;

/* Determine basis prefix, dimension, and sample size */
Expand Down

0 comments on commit 162f7d4

Please sign in to comment.