diff --git a/include/tug/Core/FTCS.hpp b/include/tug/Core/FTCS.hpp index 7f12780..76d8d1b 100644 --- a/include/tug/Core/FTCS.hpp +++ b/include/tug/Core/FTCS.hpp @@ -88,9 +88,9 @@ static inline T calcHorizontalChangeLeftBoundaryClosed(Grid &grid, int &row, template static inline T calcHorizontalChangeLeftBoundary(Grid &grid, Boundary &bc, int &row, int &col) { - if (bc.getBoundaryElementType(BC_SIDE_LEFT, col) == BC_TYPE_CONSTANT) { + if (bc.getBoundaryElementType(BC_SIDE_LEFT, row) == BC_TYPE_CONSTANT) { return calcHorizontalChangeLeftBoundaryConstant(grid, bc, row, col); - } else if (bc.getBoundaryElementType(BC_SIDE_LEFT, col) == BC_TYPE_CLOSED) { + } else if (bc.getBoundaryElementType(BC_SIDE_LEFT, row) == BC_TYPE_CLOSED) { return calcHorizontalChangeLeftBoundaryClosed(grid, row, col); } else { throw_invalid_argument("Undefined Boundary Condition Type!"); @@ -130,9 +130,9 @@ template static inline T calcHorizontalChangeRightBoundary(Grid &grid, Boundary &bc, int &row, int &col) { - if (bc.getBoundaryElementType(BC_SIDE_RIGHT, col) == BC_TYPE_CONSTANT) { + if (bc.getBoundaryElementType(BC_SIDE_RIGHT, row) == BC_TYPE_CONSTANT) { return calcHorizontalChangeRightBoundaryConstant(grid, bc, row, col); - } else if (bc.getBoundaryElementType(BC_SIDE_RIGHT, col) == BC_TYPE_CLOSED) { + } else if (bc.getBoundaryElementType(BC_SIDE_RIGHT, row) == BC_TYPE_CLOSED) { return calcHorizontalChangeRightBoundaryClosed(grid, row, col); } else { throw_invalid_argument("Undefined Boundary Condition Type!"); @@ -162,7 +162,7 @@ static inline T calcVerticalChangeTopBoundaryClosed(Grid &grid, int &row, int &col) { return calcAlphaIntercell(grid.getAlphaY()(row + 1, col), - grid.getConcentrations()(row, col)) * + grid.getAlphaY()(row, col)) * (grid.getConcentrations()(row + 1, col) - grid.getConcentrations()(row, col)); }