Fix issue #1593 in evaluating of lambda at boundary point.

This commit is contained in:
yeanment 2023-08-18 12:40:35 +08:00 committed by Ingmar Schoegl
parent cde1e79567
commit ec48ebc53a

View File

@ -1027,12 +1027,11 @@ void StFlow::evalRightBoundary(double* x, double* rsd, int* diag, double rdt)
diag[index(c_offset_Y + rightExcessSpecies(), j)] = 0;
if (m_usesLambda) {
rsd[index(c_offset_U, j)] = rho_u(x, j);
rsd[index(c_offset_L, j)] = lambda(x, j);
} else {
rsd[index(c_offset_U, j)] = rho_u(x, j) - rho_u(x, j-1);
rsd[index(c_offset_L, j)] = lambda(x, j) - lambda(x, j-1);
}
rsd[index(c_offset_L, j)] = lambda(x, j) - lambda(x, j-1);
diag[index(c_offset_L, j)] = 0;
rsd[index(c_offset_T, j)] = T(x, j);
}