mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-15 20:38:23 +01:00
Add minimal flag to importList function in InitialList
This commit is contained in:
parent
8856825c23
commit
e27ce205fb
@ -15,7 +15,7 @@ void InitialList::initializeFromList(const Rcpp::List &setup) {
|
||||
initChemistry(setup[chemistry_key]);
|
||||
}
|
||||
|
||||
void InitialList::importList(const Rcpp::List &setup) {
|
||||
void InitialList::importList(const Rcpp::List &setup, bool minimal) {
|
||||
this->dim = Rcpp::as<uint8_t>(setup[static_cast<int>(ExportList::GRID_DIM)]);
|
||||
|
||||
Rcpp::NumericVector grid_specs =
|
||||
@ -34,20 +34,23 @@ void InitialList::importList(const Rcpp::List &setup) {
|
||||
this->porosity = Rcpp::as<std::vector<double>>(
|
||||
setup[static_cast<int>(ExportList::GRID_POROSITY)]);
|
||||
|
||||
this->initial_grid =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::GRID_INITIAL)]);
|
||||
if (!minimal) {
|
||||
this->initial_grid =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::GRID_INITIAL)]);
|
||||
}
|
||||
|
||||
this->transport_names = Rcpp::as<std::vector<std::string>>(
|
||||
setup[static_cast<int>(ExportList::DIFFU_TRANSPORT)]);
|
||||
this->boundaries =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_BOUNDARIES)]);
|
||||
this->inner_boundaries =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_INNER_BOUNDARIES)]);
|
||||
this->alpha_x =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_ALPHA_X)]);
|
||||
this->alpha_y =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_ALPHA_Y)]);
|
||||
|
||||
if (!minimal) {
|
||||
this->boundaries =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_BOUNDARIES)]);
|
||||
this->inner_boundaries =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_INNER_BOUNDARIES)]);
|
||||
this->alpha_x =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_ALPHA_X)]);
|
||||
this->alpha_y =
|
||||
Rcpp::List(setup[static_cast<int>(ExportList::DIFFU_ALPHA_Y)]);
|
||||
}
|
||||
this->database =
|
||||
Rcpp::as<std::string>(setup[static_cast<int>(ExportList::CHEM_DATABASE)]);
|
||||
this->pqc_scripts = Rcpp::as<std::vector<std::string>>(
|
||||
|
||||
@ -31,7 +31,7 @@ public:
|
||||
|
||||
void initializeFromList(const Rcpp::List &setup);
|
||||
|
||||
void importList(const Rcpp::List &setup);
|
||||
void importList(const Rcpp::List &setup, bool minimal = false);
|
||||
Rcpp::List exportList();
|
||||
|
||||
Field getInitialGrid() const { return Field(this->initial_grid); }
|
||||
|
||||
@ -351,7 +351,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
InitialList init_list(R);
|
||||
init_list.importList(run_params.init_params);
|
||||
init_list.importList(run_params.init_params, MY_RANK != 0);
|
||||
|
||||
MSG("RInside initialized on process " + std::to_string(MY_RANK));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user