commit fd7d2ebbea9d3079fd4cbd210b7bf081eb3f7764
parent 60815244104ff136da823b895613c0979ecbffcf
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 10 Apr 2019 17:25:37 +0200
Fix writes for Dirichlet BC and fix allocation of extra fluidity array
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/simulation.c b/simulation.c
@@ -108,7 +108,7 @@ void set_bc_dirichlet(
if (boundary == -1)
g_ghost[0] = value;
else if (boundary == +1)
- g_ghost[idx1g(nz)+1] = value;
+ g_ghost[nz+1] = value;
else {
fprintf(stderr, "set_bc_dirichlet: Unknown boundary %d\n", boundary);
exit(1);
@@ -153,7 +153,7 @@ int implicit_1d_jacobian_poisson_solver(
const int max_iter,
const double rel_tol)
{
- double* g_ghost_out = empty(sim->nz);
+ double* g_ghost_out = empty(sim->nz+2);
double* r_norm = empty(sim->nz);
int iter;