Skip to content

Commit

Permalink
update the rom main driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed Jun 14, 2024
1 parent ed6c0bf commit 5c75b60
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/rom_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,35 +79,26 @@ int main(int argc, char** argv)
int ret = ct.checkOptions();
if (ret < 0) return ret;

unsigned ngpts[3] = { ct.ngpts_[0], ct.ngpts_[1], ct.ngpts_[2] };
double origin[3] = { ct.ox_, ct.oy_, ct.oz_ };
const double cell[3] = { ct.lx_, ct.ly_, ct.lz_ };
Mesh::setup(mmpi.commSpin(), ngpts, origin, cell, ct.lap_type);

mmpi.bcastGlobal(input_filename);
mmpi.bcastGlobal(lrs_filename);

// Enter main scope
{
MGmolInterface* mgmol;
if (ct.isLocMode())
mgmol = new MGmol<LocGridOrbitals>(global_comm, *MPIdata::sout);
mgmol = new MGmol<LocGridOrbitals>(global_comm, *MPIdata::sout,
input_filename, lrs_filename, constraints_filename);
else
mgmol
= new MGmol<ExtendedGridOrbitals>(global_comm, *MPIdata::sout);

unsigned ngpts[3] = { ct.ngpts_[0], ct.ngpts_[1], ct.ngpts_[2] };
double origin[3] = { ct.ox_, ct.oy_, ct.oz_ };
const double cell[3] = { ct.lx_, ct.ly_, ct.lz_ };
Mesh::setup(mmpi.commSpin(), ngpts, origin, cell, ct.lap_type);

mgmol->setupFromInput(input_filename);

if (ct.isLocMode() || ct.init_loc == 1) mgmol->setupLRs(lrs_filename);

mgmol->setupConstraintsFromInput(constraints_filename);

mgmol_setup();
mgmol = new MGmol<ExtendedGridOrbitals>(global_comm, *MPIdata::sout,
input_filename, lrs_filename, constraints_filename);

if (!tcheck)
{
mgmol->setup();

if (ct.isLocMode())
readRestartFiles<LocGridOrbitals>(mgmol);
else
Expand Down

0 comments on commit 5c75b60

Please sign in to comment.