From b251204bf5a3d915d3918d3ad97b34d201fac905 Mon Sep 17 00:00:00 2001 From: Max Luebke Date: Wed, 20 Apr 2022 11:27:30 +0200 Subject: [PATCH] Apply bc to ghost node --- app/main_1D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main_1D.cpp b/app/main_1D.cpp index e908039..2fb7c21 100644 --- a/app/main_1D.cpp +++ b/app/main_1D.cpp @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) { diffu.setXDimensions(1, n); // set the boundary condition for the left ghost cell to dirichlet - bc[1] = {Diffusion::BC_CONSTANT, 5 * std::pow(10, -6)}; + bc[0] = {Diffusion::BC_CONSTANT, 5 * std::pow(10, -6)}; // diffu.setBoundaryCondition(1, 0, BTCSDiffusion::BC_CONSTANT, // 5. * std::pow(10, -6));