diff options
Diffstat (limited to 'src/SetupPGV.c')
-rw-r--r-- | src/SetupPGV.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c index 9f4ebe8..b81864e 100644 --- a/src/SetupPGV.c +++ b/src/SetupPGV.c @@ -1374,15 +1374,16 @@ pGA *PUGH_SetupGArray(void *parent, int arrayid, int varsize, int vtype, - int stagger, + int staggercode, int vector_size, int vector_entry, pGA *vector_base) { + int dim; pGA *this; - this = calloc(1, sizeof(pGA)); + this = calloc(1, sizeof(pGA)); if(this) { this->extras = extras; @@ -1392,7 +1393,11 @@ pGA *PUGH_SetupGArray(void *parent, this->parent = parent; this->varsize = varsize; this->vtype = vtype; - this->stagger = stagger; + this->stagger = calloc (this->extras->dim, sizeof (int)); + for (dim = 0; dim < this->extras->dim; dim++) + { + this->stagger[dim] = CCTK_StaggerDirIndex (dim, staggercode); + } this->id = id; this->arrayid = arrayid; this->storage = PUGH_NOSTORAGE; |