diff options
author | allen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-03-23 15:18:57 +0000 |
---|---|---|
committer | allen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-03-23 15:18:57 +0000 |
commit | 3641f4c7513fffd1f0d026f1a859ecaa78712682 (patch) | |
tree | 322b86eeaf723d4940ffaff81d5b02819146d39c /src/include | |
parent | a5844c641aa3c1b179d0176acf16fcd3607d439c (diff) |
Major changes to PUGH as the dearly loved pGF is removed, and a grid function
is lowered to being simply a special case of a grid array, pGA. Grid arrays
can all have different sizes, which means that now the size of a GA is moved
from the GH to a structure on the GA, along with a lot of other connectivity
and additional information which was formerly on the GH.
If you need to care about these changes, take a look at the files in
src/include/pGH.h and src/include/pGA.h, to see the new structures
(I'll leave the old files pGF.h and SetupPGF.c around for a while to compare with).
Also, look at a PUGH dependent file which has already been converted, such
as CactusPUGHIO/IOASCII/src/Write1D.c.
Warning:
This commit breaks the development versions of IOHDF5 and IsoSurfacer, these
will be fixed real quick.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@182 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/pGH.h | 64 | ||||
-rw-r--r-- | src/include/pGV.h | 4 | ||||
-rw-r--r-- | src/include/pugh.h | 31 |
3 files changed, 27 insertions, 72 deletions
diff --git a/src/include/pGH.h b/src/include/pGH.h index c27fa35..2794f8f 100644 --- a/src/include/pGH.h +++ b/src/include/pGH.h @@ -1,28 +1,10 @@ /*@@ @header pGH.h @date Fri Feb 21 10:12:58 1997 - @author + @author Tom Goodale, Paul Walker @desc - The Pugh Grid Hierarchy structure. There isn't much point in having - a GridHierarchy without GridFunctions, so you'd better see - @seefile pGF.h also. + The Pugh Grid Hierarchy structure. @enddesc - @history - @hauthor Gabrielle Allen - @hdate Sep 10 @hdesc Added the iteration number on a GH - @endhistory - @history - @hauthor Gabrielle Allen @hdate 26 Sep 1998 - @desc Changed IO parameter names, removed GH->out3D_mode, added t_iopars - structure - @hauthor Gabrielle Allen @hdate 17 Oct 1998 - @desc Added more IO parameters to IO structure - structure - @hauthor Gabrielle Allen @hdate 3 Nov 1998 - @desc Added forceSync - @hauthor Thomas Radke @hdate 30 Mar 1999 - @desc Added sync_verbose and comm_time - @endhistory @version $Header$ @@*/ @@ -43,58 +25,29 @@ typedef struct PGH /* Size of the processor group */ int nprocs; /* Number of processors */ int myproc; /* My processor */ - int *nproc; /* Processor topology */ + /*int *nproc;*/ /* Processor topology */ int commmodel; /* Comm model is PUGH_ALLOCATEDBUFFERS */ /* or PUGH_DERIVEDTYPES. Currently unused */ /* Size of the problems */ int nvariables; /* Number of Grid variables */ void ***variables; /* Pointers to them */ - int *nsize; /* Physical size of the Problem */ - int *nghostzones; /* Width of ghost zone */ /* What time level we're on */ int timelevel; - /* Processor group layouts */ - CCTK_REAL maxskew; /* Maximum point skew */ + int *perme; /* Periodic in each direction? */ int periodic; /* Is the system periodic? */ - int **lb; /* Lower bound (nprocs X 3) for each proc */ - int **ub; /* Upper bound (same sizes) */ - int *lnsize; /* Size on this processor */ - int npoints; /* LOCAL number of points on this proc. */ - int *rnpoints; /* Number of points on each proc */ - int **rnsize; /* [#points on a proc][in each dir] */ - int **neighbors; /* Neighbours (proc num) on each side */ - /* [nprocs x 2 * dim] */ - int stagger; /* Is staggering turned on? */ int forceSync; /* force synchronisation of GFs with storage */ - /* Ghosts and overlaps. */ - int *ownership[PUGH_NSTAGGER][2]; - /* The box owned in each direction. */ - /* [stagger][min/max][dir] */ - - int **ghosts[PUGH_NSTAGGER][2]; - /* The ghost zones on each face. */ - /* [stagger][min/max][face][dir] */ - - int **overlap[PUGH_NSTAGGER][2]; - /* The overlap region owned on each face. */ - /* [stagger][min/max][face][ijk] */ - /* Coordinate information */ - CCTK_REAL cx0, cy0, cz0; /* Origin of our system */ CCTK_REAL dx0, dy0, dz0, dt0; /* Delta of our system */ CCTK_REAL lx0, ly0, lz0; /* Processor-Local coordinate origins */ - CCTK_REAL phys_time; /* physical time */ + /* CCTK_REAL phys_time; */ /* physical time */ int GHiteration; /* iteration number on processor */ - - - /* Indentification for a pGH */ int level; /* level in Berger-Oliger stack */ int mglevel; /* level in multigrid stack */ @@ -104,7 +57,6 @@ typedef struct PGH int active; /* 1 -> GH active */ /* 0 -> GH is skipped for conv.test */ /* is used in NanCheckGH.c */ - int sync_verbose; /* verbose output during synchronization */ /* FIXME */ double comm_time; /* time spent in communication */ @@ -127,19 +79,17 @@ typedef struct PGH pGExtras **GFExtras; /* [dim] stagger ? */ pConnectivity **Connectivity; /* [dim] */ - /* #include "pGH_Extensions.h" */ - /* FIXME : should be a dynamically allocated string. * If you change this, please change the line in pugh_SetupGH. */ char identity_string[20]; } pGH; +/* #define XDP 1 #define XDM 0 #define YDP 3 #define YDM 2 #define ZDP 5 #define ZDM 4 - - +*/ diff --git a/src/include/pGV.h b/src/include/pGV.h index 4cae517..a69f10d 100644 --- a/src/include/pGV.h +++ b/src/include/pGV.h @@ -16,6 +16,8 @@ extern "C" { #endif +#define DATINDEX(GH,i,j,k) ((i) + GH->lnsize[0]*((j)+GH->lnsize[1]*(k))) + typedef enum {pgv_none, pgv_scalar, pgv_array, pgv_gf} pgv_type; typedef struct PConnectivity @@ -23,7 +25,7 @@ typedef struct PConnectivity int dim; int *nprocs; int **neighbours; - int periodic; /* Is the system periodic? */ + int *perme; /* Is the system periodic? */ } pConnectivity; typedef struct PGS diff --git a/src/include/pugh.h b/src/include/pugh.h index 41869c6..af42aef 100644 --- a/src/include/pugh.h +++ b/src/include/pugh.h @@ -63,10 +63,12 @@ #define PUGH_MPI_INT4 (sizeof (int) == 8 ? MPI_SHORT : MPI_INT) +#define HEREINPUGH printf("I'm in %s at line %d\n",__FILE__,__LINE__); + #include "pugh_constants.h" #include "pGV.h" -#include "pGF.h" +/*#include "pGF.h"*/ #include "pGH.h" #ifdef MPI @@ -91,34 +93,35 @@ extern "C" #endif -int PUGH_SetupGroup - ( - pGH *newGH, - int *nsize, - int *nghostsize, - int gtype, - int vtype, - int dim, - int n_variables, - int staggertype, - int n_timelevels - ); +int PUGH_SetupGroup(pGH *newGH, + int *nsize, + int *nghostsize, + int gtype, + int vtype, + int dim, + int n_variables, + int staggertype, + int n_timelevels); pGH *PUGH_SetupPGH(void *callerid, int dim, int *nsize, int *nghostzones, int staggertype, - int periodic); + int *perme); int pugh_GFSize(int dim, int *nsize); int pugh_GFGhostsize(int dim, int *ghostsize); +int pugh_GFPeriodic(int dim, + int *perme); pGH *pugh_pGH(cGH *GH); +int PUGH_Evolve(tFleshConfig *config); + int GetSliceSizes(int np, int grid_points, char *slicesS, |