tFix length of domain when origo is non-zero - cngf-pf - continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
HTML git clone git://src.adamsgaard.dk/cngf-pf
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit df16288abb150656c54b2cdb3acbb4f9e39af1f7
DIR parent 2b8fb8c7892e052ef12eaacf2dfda9291d51ebd5
HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 12 Apr 2019 11:02:34 +0200
Fix length of domain when origo is non-zero
Diffstat:
M simulation.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
DIR diff --git a/simulation.c b/simulation.c
t@@ -5,7 +5,9 @@
void prepare_arrays(struct simulation* sim)
{
- sim->z = linspace(sim->origo_z, sim->L_z, sim->nz); /* spatial coordinates */
+ sim->z = linspace(sim->origo_z, /* spatial coordinates */
+ sim->origo_z + sim->L_z,
+ sim->nz);
sim->dz = sim->z[1] - sim->z[0]; /* cell spacing */
sim->mu = zeros(sim->nz); /* local stress ratio */
sim->p = zeros(sim->nz); /* local pressure */