Fix alpha intercell calculation

This commit is contained in:
Max Lübke 2024-03-05 10:26:15 +01:00
parent 48000710c7
commit 2f737ce09e

View File

@ -138,10 +138,9 @@ template <typename T>
constexpr T calcExplicitConcentrationsBoundaryConstant(T conc_center, T conc_bc,
T alpha_center,
T alpha_neighbor, T sy) {
return sy * calcAlphaIntercell(alpha_center, alpha_neighbor) * conc_center +
(1 - sy * (calcAlphaIntercell(alpha_center, alpha_center) +
alpha_center)) *
conc_center +
const T inter_cell = calcAlphaIntercell(alpha_center, alpha_neighbor);
return sy * inter_cell * conc_center +
(1 - sy * (inter_cell + alpha_center)) * conc_center +
sy * alpha_center * conc_bc;
}