mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 04:48:23 +01:00
fix: remove unnecessary RoundToZero function from DiffusionModule
This commit is contained in:
parent
5c540af2bf
commit
607b939208
@ -86,8 +86,6 @@ private:
|
||||
|
||||
void initialize(poet::DiffusionParams args);
|
||||
|
||||
void RoundToZero(double *field, uint32_t cell_count) const;
|
||||
|
||||
Grid &grid;
|
||||
uint8_t dim;
|
||||
|
||||
|
||||
@ -182,11 +182,6 @@ void DiffusionModule::simulate(double dt) {
|
||||
} else {
|
||||
tug::diffusion::ADI_2D(this->diff_input, in_field, in_alpha.data());
|
||||
}
|
||||
|
||||
// TODO: do not use hardcoded index for O, H and charge
|
||||
if (i > 2) {
|
||||
this->RoundToZero(in_field, this->n_cells_per_prop);
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << " done!\n";
|
||||
@ -195,12 +190,6 @@ void DiffusionModule::simulate(double dt) {
|
||||
|
||||
transport_t += sim_a_transport - sim_b_transport;
|
||||
}
|
||||
inline void DiffusionModule::RoundToZero(double *field,
|
||||
uint32_t cell_count) const {
|
||||
for (uint32_t i = 0; i < cell_count; i++) {
|
||||
field[i] = ((int32_t)(field[i] / ZERO_MULTIPLICATOR)) * ZERO_MULTIPLICATOR;
|
||||
}
|
||||
}
|
||||
|
||||
void DiffusionModule::end() {
|
||||
// R["simtime_transport"] = transport_t;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user