mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-14 09:58:22 +01:00
Fix clang-tidy suggestions
This commit is contained in:
parent
56e70efd1e
commit
b2bbd28175
@ -135,16 +135,17 @@ private:
|
|||||||
const BCMatrixRowMajor &bc, double time_step, double dx)
|
const BCMatrixRowMajor &bc, double time_step, double dx)
|
||||||
-> DMatrixRowMajor;
|
-> DMatrixRowMajor;
|
||||||
|
|
||||||
void fillMatrixFromRow(Eigen::SparseMatrix<double> &A_matrix,
|
static void fillMatrixFromRow(Eigen::SparseMatrix<double> &A_matrix,
|
||||||
const DVectorRowMajor &alpha,
|
const DVectorRowMajor &alpha,
|
||||||
const BCVectorRowMajor &bc, int size, double dx,
|
const BCVectorRowMajor &bc, int size, double dx,
|
||||||
double time_step);
|
double time_step);
|
||||||
|
|
||||||
void fillVectorFromRow(Eigen::VectorXd &b_vector, const DVectorRowMajor &c,
|
static void fillVectorFromRow(Eigen::VectorXd &b_vector,
|
||||||
const DVectorRowMajor &alpha,
|
const DVectorRowMajor &c,
|
||||||
const BCVectorRowMajor &bc,
|
const DVectorRowMajor &alpha,
|
||||||
const DVectorRowMajor &t0_c, int size, double dx,
|
const BCVectorRowMajor &bc,
|
||||||
double time_step);
|
const DVectorRowMajor &t0_c, int size,
|
||||||
|
double dx, double time_step);
|
||||||
void simulate3D(std::vector<double> &c);
|
void simulate3D(std::vector<double> &c);
|
||||||
|
|
||||||
inline static auto getBCFromFlux(Diffusion::boundary_condition bc,
|
inline static auto getBCFromFlux(Diffusion::boundary_condition bc,
|
||||||
|
|||||||
@ -179,14 +179,15 @@ auto Diffusion::BTCSDiffusion::calc_t0_c(const DMatrixRowMajor &c,
|
|||||||
|
|
||||||
DMatrixRowMajor t0_c(n_rows, n_cols);
|
DMatrixRowMajor t0_c(n_rows, n_cols);
|
||||||
|
|
||||||
std::array<double, 3> y_values;
|
std::array<double, 3> y_values{};
|
||||||
|
|
||||||
// first, iterate over first row
|
// first, iterate over first row
|
||||||
for (int j = 0; j < n_cols; j++) {
|
for (int j = 0; j < n_cols; j++) {
|
||||||
boundary_condition tmp_bc = bc(0, j + 1);
|
boundary_condition tmp_bc = bc(0, j + 1);
|
||||||
|
|
||||||
if (tmp_bc.type == Diffusion::BC_CLOSED)
|
if (tmp_bc.type == Diffusion::BC_CLOSED){
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
y_values[0] = getBCFromFlux(tmp_bc, c(0, j), alpha(0, j));
|
y_values[0] = getBCFromFlux(tmp_bc, c(0, j), alpha(0, j));
|
||||||
y_values[1] = c(0, j);
|
y_values[1] = c(0, j);
|
||||||
@ -216,8 +217,9 @@ auto Diffusion::BTCSDiffusion::calc_t0_c(const DMatrixRowMajor &c,
|
|||||||
for (int j = 0; j < n_cols; j++) {
|
for (int j = 0; j < n_cols; j++) {
|
||||||
boundary_condition tmp_bc = bc(end + 1, j + 1);
|
boundary_condition tmp_bc = bc(end + 1, j + 1);
|
||||||
|
|
||||||
if (tmp_bc.type == Diffusion::BC_CLOSED)
|
if (tmp_bc.type == Diffusion::BC_CLOSED) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
y_values[0] = c(end - 1, j);
|
y_values[0] = c(end - 1, j);
|
||||||
y_values[1] = c(end, j);
|
y_values[1] = c(end, j);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user