tAdd array for water pressure - cngf-pf - continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
 (HTM) git clone git://src.adamsgaard.dk/cngf-pf
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit ab64cc76d88a2d0544f8170a4ddd666474472996
 (DIR) parent 7312db6f2dff524b4182787d42284bd297f3e6d5
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Mon, 15 Apr 2019 07:51:33 +0200
       
       Add array for water pressure
       
       Diffstat:
         M simulation.c                        |       2 ++
         M simulation.h                        |       1 +
       
       2 files changed, 3 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/simulation.c b/simulation.c
       t@@ -11,6 +11,7 @@ void prepare_arrays(struct simulation* sim)
            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 */
       +    sim->p_w_ghost = zeros(sim->nz+2); /* water pressure with ghost nodes */
            sim->xi = zeros(sim->nz);          /* cooperativity length */
            sim->gamma_dot_p = zeros(sim->nz); /* local shear velocity */
            sim->v_x = zeros(sim->nz);         /* local shear velocity */
       t@@ -22,6 +23,7 @@ void free_arrays(struct simulation* sim)
            free(sim->z);
            free(sim->mu);
            free(sim->p);
       +    free(sim->p_w_ghost);
            free(sim->xi);
            free(sim->gamma_dot_p);
            free(sim->v_x);
 (DIR) diff --git a/simulation.h b/simulation.h
       t@@ -55,6 +55,7 @@ struct simulation {
            /* other arrays */
            double* mu;           /* static yield friction [-] */
            double* p;            /* effective normal pressure [Pa] */
       +    double* p_w_ghost;    /* water pressure [Pa] */
            double* xi;           /* cooperativity length */
            double* gamma_dot_p;  /* plastic shear strain rate [1/s] */
            double* v_x;          /* shear velocity [m/s] */