From 2802d63d6f953d6d53886f653d5a74ff6b2f1319 Mon Sep 17 00:00:00 2001 From: schnetter Date: Mon, 7 Apr 2008 02:41:08 +0000 Subject: Add a new function CCTK_MaxGFDim to the flesh which returns the (maximum) dimension of all grid functions. Cactus can currently not handle the case where one uses grid arrays of dimension D while grid functions have a dimension less than D. During initialisation, Cactus sets cctk_dim to the largest dimension of all grid variables in all active thorns. This is arguably wrong; cctk_dim should be set to the (maximum) dimension of the grid functions. This patch adds a new function CCTK_MaxGFDim to the flesh which returns the (maximum) dimension of all grid functions. This function is used to set cctk_dim. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4476 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/comm/CactusDefaultComm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comm') diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c index b4b3741e..1cbc82e3 100644 --- a/src/comm/CactusDefaultComm.c +++ b/src/comm/CactusDefaultComm.c @@ -112,7 +112,7 @@ int CactusDefaultInterpGridArrays (const cGH *GH, int N_dims, @desc Default cactus SetupGH routine. @enddesc - @calls CCTK_MaxDim + @calls CCTK_MaxGFDim CCTK_NumVars CCTK_MaxTimeLevelsVI CCTK_NumGroups @@ -157,7 +157,7 @@ cGH *CactusDefaultSetupGH(tFleshConfig *config, int convergence_level) thisGH = malloc(sizeof(cGH)); if(thisGH) { - thisGH->cctk_dim = CCTK_MaxDim(); + thisGH->cctk_dim = CCTK_MaxGFDim(); /* Need this to be at least one otherwise the memory allocation will fail */ cctk_dim = thisGH->cctk_dim; -- cgit v1.2.3