Update: pass additional information as parameter to simulate1D

This commit is contained in:
Max Luebke 2022-03-01 11:25:13 +01:00
parent 9ec382877e
commit a5a66f1403
2 changed files with 6 additions and 7 deletions

View File

@ -159,11 +159,8 @@ inline void Diffusion::BTCSDiffusion::reserveMemory(int size,
void Diffusion::BTCSDiffusion::simulate1D(
Eigen::Map<DVectorRowMajor> &c, Eigen::Map<const DVectorRowMajor> &alpha,
Eigen::Map<const BCVectorRowMajor> &bc) {
int size = this->grid_cells[0];
double dx = this->deltas[0];
double time_step = this->time_step;
Eigen::Map<const BCVectorRowMajor> &bc, int size, double dx,
double time_step) {
reserveMemory(size, BTCS_MAX_DEP_PER_CELL);
@ -345,7 +342,8 @@ void Diffusion::BTCSDiffusion::simulate(double *c, double *alpha,
Eigen::Map<const DVectorRowMajor> alpha_in(alpha, this->grid_cells[0]);
Eigen::Map<const BCVectorRowMajor> bc_in(bc, this->grid_cells[0]);
simulate1D(c_in, alpha_in, bc_in);
simulate1D(c_in, alpha_in, bc_in, this->grid_cells[0], this->deltas[0],
this->time_step);
}
if (this->grid_dim == 2) {
Eigen::Map<DMatrixRowMajor> c_in(c, this->grid_cells[1],

View File

@ -122,7 +122,8 @@ private:
void simulate1D(Eigen::Map<DVectorRowMajor> &c,
Eigen::Map<const DVectorRowMajor> &alpha,
Eigen::Map<const BCVectorRowMajor> &bc);
Eigen::Map<const BCVectorRowMajor> &bc, int size, double dx,
double time_step);
void simulate2D(Eigen::Map<DMatrixRowMajor> &c,
Eigen::Map<const DMatrixRowMajor> &alpha,