mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 04:48:23 +01:00
Add total_grid_cells to ChemistryInit struct
This commit is contained in:
parent
756988da31
commit
d3632156a5
@ -6,6 +6,8 @@ InitialList::ChemistryInit InitialList::getChemistryInit() const {
|
||||
|
||||
chem_init.initial_grid = Field(initial_grid);
|
||||
|
||||
chem_init.total_grid_cells = this->n_cols * this->n_rows;
|
||||
|
||||
chem_init.database = database;
|
||||
chem_init.pqc_scripts = pqc_scripts;
|
||||
chem_init.pqc_ids = pqc_ids;
|
||||
|
||||
@ -174,4 +174,27 @@ void InitialList::initDiffusion(const Rcpp::List &diffusion_input) {
|
||||
// R.parseEval("print(alpha_x)");
|
||||
// R.parseEval("print(alpha_y)");
|
||||
}
|
||||
|
||||
InitialList::DiffusionInit InitialList::getDiffusionInit() const {
|
||||
DiffusionInit diff_init;
|
||||
|
||||
diff_init.dim = this->dim;
|
||||
|
||||
diff_init.n_cols = this->n_cols;
|
||||
diff_init.n_rows = this->n_rows;
|
||||
|
||||
diff_init.s_cols = this->s_cols;
|
||||
diff_init.s_rows = this->s_rows;
|
||||
|
||||
diff_init.constant_cells = this->constant_cells;
|
||||
diff_init.transport_names = this->transport_names;
|
||||
|
||||
diff_init.initial_grid = Field(this->initial_grid);
|
||||
diff_init.boundaries = Field(this->boundaries);
|
||||
diff_init.alpha_x = Field(this->alpha_x);
|
||||
diff_init.alpha_y = Field(this->alpha_y);
|
||||
|
||||
return diff_init;
|
||||
}
|
||||
|
||||
} // namespace poet
|
||||
@ -179,24 +179,4 @@ void InitialList::initGrid(const Rcpp::List &grid_input) {
|
||||
}
|
||||
}
|
||||
|
||||
InitialList::DiffusionInit InitialList::getDiffusionInit() const {
|
||||
DiffusionInit diff_init;
|
||||
|
||||
diff_init.n_cols = this->n_cols;
|
||||
diff_init.n_rows = this->n_rows;
|
||||
|
||||
diff_init.s_cols = this->s_cols;
|
||||
diff_init.s_rows = this->s_rows;
|
||||
|
||||
diff_init.constant_cells = this->constant_cells;
|
||||
diff_init.transport_names = this->transport_names;
|
||||
|
||||
diff_init.initial_grid = Field(this->initial_grid);
|
||||
diff_init.boundaries = Field(this->boundaries);
|
||||
diff_init.alpha_x = Field(this->alpha_x);
|
||||
diff_init.alpha_y = Field(this->alpha_y);
|
||||
|
||||
return diff_init;
|
||||
}
|
||||
|
||||
} // namespace poet
|
||||
@ -93,6 +93,7 @@ private:
|
||||
|
||||
public:
|
||||
struct DiffusionInit {
|
||||
uint8_t dim;
|
||||
std::uint32_t n_cols;
|
||||
std::uint32_t n_rows;
|
||||
|
||||
@ -152,6 +153,8 @@ public:
|
||||
struct ChemistryInit {
|
||||
Field initial_grid;
|
||||
|
||||
uint32_t total_grid_cells;
|
||||
|
||||
std::string database;
|
||||
std::vector<std::string> pqc_scripts;
|
||||
std::vector<int> pqc_ids;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user