mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 17:38:23 +01:00
Update: also pass t0_c to simulate_1D
This commit is contained in:
parent
a5a66f1403
commit
fb5ee6431e
@ -159,14 +159,13 @@ 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, double dx,
|
||||
double time_step) {
|
||||
Eigen::Map<const BCVectorRowMajor> &bc, const DVectorRowMajor &t0_c,
|
||||
int size, double dx, double time_step) {
|
||||
|
||||
reserveMemory(size, BTCS_MAX_DEP_PER_CELL);
|
||||
|
||||
fillMatrixFromRow(alpha.row(0), bc.row(0), size, dx, time_step);
|
||||
fillVectorFromRowADI(c, alpha, bc, Eigen::VectorXd::Constant(size, 0), size,
|
||||
dx, time_step);
|
||||
fillVectorFromRowADI(c, alpha, bc, t0_c, size, dx, time_step);
|
||||
|
||||
solveLES();
|
||||
|
||||
@ -342,8 +341,9 @@ 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, this->grid_cells[0], this->deltas[0],
|
||||
this->time_step);
|
||||
simulate1D(c_in, alpha_in, bc_in,
|
||||
Eigen::VectorXd::Constant(this->grid_cells[0], 0),
|
||||
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],
|
||||
|
||||
@ -122,7 +122,8 @@ private:
|
||||
|
||||
void simulate1D(Eigen::Map<DVectorRowMajor> &c,
|
||||
Eigen::Map<const DVectorRowMajor> &alpha,
|
||||
Eigen::Map<const BCVectorRowMajor> &bc, int size, double dx,
|
||||
Eigen::Map<const BCVectorRowMajor> &bc,
|
||||
const DVectorRowMajor &t0_c, int size, double dx,
|
||||
double time_step);
|
||||
|
||||
void simulate2D(Eigen::Map<DMatrixRowMajor> &c,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user