Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rokzitko committed Oct 23, 2024
1 parent 35c9a1d commit 77f3d32
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions c++/nrg-general.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,14 @@ template <scalar S> class NRG_calculation {
rhoFDM.save(step.lastndx(), P, fn_rhoFDM);
if (!P.ZBW()) calc_fulldensitymatrix(step, rhoFDM, store, store_all, stats, Sym.get(), mt, P);
}
NRG_calculation(std::unique_ptr<Workdir> workdir, std::shared_ptr<DiagEngine<S>> eng, const bool embedded) :
P("param", "param", std::move(workdir), embedded), eng(eng), input(P, "data"), Sym(input.Sym),
NRG_calculation(std::unique_ptr<Workdir> workdir, std::shared_ptr<DiagEngine<S>> _eng, const bool embedded) :
P("param", "param", std::move(workdir), embedded), eng(_eng), input(P, "data"), Sym(input.Sym),
stats(P, Sym->get_td_fields(), input.GS_energy), store(P.Ninit, P.Nlen), store_all(P.Ninit, P.Nlen)
{
if (P.diag_mode == "OpenMP") // override
eng = std::make_shared<DiagOpenMP<S>>();
if (P.diag_mode == "serial") {
if (P.diag_mode == "serial")
eng = std::make_shared<DiagSerial<S>>();
}
auto diag = run_nrg(RUNTYPE::NRG, input.operators, input.coef, input.diag);
if (P.dm) {
if (P.need_rho()) calc_rho(diag); // XXX: diag required here?
Expand Down

0 comments on commit 77f3d32

Please sign in to comment.