From dd5c14aa88e3f813275d0c8886becd774723903e Mon Sep 17 00:00:00 2001 From: Max Luebke Date: Wed, 3 Apr 2024 13:00:58 +0000 Subject: [PATCH] Fix initialization of transport_names in ChemistryInit and GridInit --- src/Init/ChemistryInit.cpp | 2 ++ src/Init/GridInit.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Init/ChemistryInit.cpp b/src/Init/ChemistryInit.cpp index c1f884fa2..e5f59380e 100644 --- a/src/Init/ChemistryInit.cpp +++ b/src/Init/ChemistryInit.cpp @@ -6,6 +6,8 @@ namespace poet { void InitialList::initChemistry(const Rcpp::List &chem) { + this->pqc_sol_order = this->transport_names; + if (chem.containsElementNamed("dht_species")) { this->dht_species = Rcpp::as>(chem["dht_species"]); } diff --git a/src/Init/GridInit.cpp b/src/Init/GridInit.cpp index 29f9c9d48..a35295769 100644 --- a/src/Init/GridInit.cpp +++ b/src/Init/GridInit.cpp @@ -165,7 +165,7 @@ void InitialList::prepareGrid(const Rcpp::List &grid_input) { std::vector colnames = Rcpp::as>(this->initial_grid.names()); - this->transport_names = this->pqc_sol_order = std::vector( + this->transport_names = std::vector( colnames.begin() + 1, colnames.begin() + 1 + solution_count); // skip ID