aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorgoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-02-17 17:38:50 +0000
committergoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-02-17 17:38:50 +0000
commitc06576a3bcd5cace72592c6041e6fb2827ffbff6 (patch)
tree5565cc938c0841bcf8372b15496b72b6b98b221f /src/include
parent539cd2636da010382f41c9ff1ba237ec080e5341 (diff)
Untabified.
Got rid of redundant file. Did some formatting changes in line with the coding guidelines. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@164 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pGArray.h24
-rw-r--r--src/include/pGF.h12
-rw-r--r--src/include/pGH.h54
-rw-r--r--src/include/pGV.h99
-rw-r--r--src/include/pugh.h30
5 files changed, 101 insertions, 118 deletions
diff --git a/src/include/pGArray.h b/src/include/pGArray.h
deleted file mode 100644
index b5338b6..0000000
--- a/src/include/pGArray.h
+++ /dev/null
@@ -1,24 +0,0 @@
- /*@@
- @file pGArray.h
- @date
- @author
- @desc
- @enddesc
- @version $Id$
- @@*/
-
-typedef struct PGARRAY {
- char *name;
- int pgano;
- CCTK_REAL *data;
-
- int npoints;
- struct PGH *parentGH;
-
- int do_arrayio;
-#if 0
-/*** FIXME ***/
-/* should be shifted into thorn_IO */
- IOFile IEEEfile;
-#endif
-} pGArray;
diff --git a/src/include/pGF.h b/src/include/pGF.h
index db40fc9..ab9e0d4 100644
--- a/src/include/pGF.h
+++ b/src/include/pGF.h
@@ -14,7 +14,7 @@
into padddata. This allows us, if we want to, to explicitly move
the starting point of the array to align with cache lines.
Important on some architectures. So the deal is if we are
- in padding mode (see @seeroutine EnableGFDataStorage fro more
+ in padding mode (see @seeroutine EnableGFDataStorage for more
on that) padddata will be bigger than data, and data will point
to an address insinde padddata and such that lnx * lny * lnz
further down the data pointer is still in padddata. If we are
@@ -24,16 +24,20 @@
create or de-allocate data. <b>All other operatoins shold
be done on *data</a>
@enddesc
- @version $Id$
+ @version $Header$
@@*/
+#ifndef _PGF_H_
+#define _PGF_H_ 1
+
#define DATINDEX(GH,i,j,k) ((i) + GH->lnsize[0]*((j)+GH->lnsize[1]*(k)))
/*#define DI(GH,i,j,k) ((i) + GH->lnx*((j)+GH->lny*(k)))*/
/*#define GDATINDEX(GH,i,j,k) ((i) + GH->nx*((j)+GH->ny*(k)))*/
#include "CactusTimers.h"
-typedef struct PGF {
+typedef struct PGF
+{
char *name; /* The name of the grid function */
int gfno; /* My ID number in my GH parent. */
int dim; /* dimension of GF */
@@ -68,3 +72,5 @@ typedef struct PGF {
*/
} pGF;
+
+#endif /* _PGF_H_ */
diff --git a/src/include/pGH.h b/src/include/pGH.h
index 91aae1d..c27fa35 100644
--- a/src/include/pGH.h
+++ b/src/include/pGH.h
@@ -23,7 +23,7 @@
@hauthor Thomas Radke @hdate 30 Mar 1999
@desc Added sync_verbose and comm_time
@endhistory
- @version $Id$
+ @version $Header$
@@*/
#include "pugh_constants.h"
@@ -41,54 +41,54 @@ typedef struct PGH
int dim; /* The dimension of the GH */
/* Size of the processor group */
- int nprocs; /* Number of processors */
- int myproc; /* My processor */
- int *nproc; /* Processor topology */
+ int nprocs; /* Number of processors */
+ int myproc; /* My processor */
+ 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 */
+ 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 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 */
+ CCTK_REAL maxskew; /* Maximum point skew */
+ 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];
+ int *ownership[PUGH_NSTAGGER][2];
/* The box owned in each direction. */
/* [stagger][min/max][dir] */
-
- int **ghosts[PUGH_NSTAGGER][2];
+
+ int **ghosts[PUGH_NSTAGGER][2];
/* The ghost zones on each face. */
/* [stagger][min/max][face][dir] */
-
- int **overlap[PUGH_NSTAGGER][2];
+
+ int **overlap[PUGH_NSTAGGER][2];
/* The overlap region owned on each face. */
- /* [stagger][min/max][face][ijk] */
-
+ /* [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 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 */
int GHiteration; /* iteration number on processor */
diff --git a/src/include/pGV.h b/src/include/pGV.h
index e8dc3e7..4cae517 100644
--- a/src/include/pGV.h
+++ b/src/include/pGV.h
@@ -9,10 +9,11 @@
@@*/
#ifndef _PGV_H_
-#define _PGV_H_
+#define _PGV_H_ 1
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
typedef enum {pgv_none, pgv_scalar, pgv_array, pgv_gf} pgv_type;
@@ -22,7 +23,7 @@ typedef struct PConnectivity
int dim;
int *nprocs;
int **neighbours;
- int periodic; /* Is the system periodic? */
+ int periodic; /* Is the system periodic? */
} pConnectivity;
typedef struct PGS
@@ -33,64 +34,64 @@ typedef struct PGS
typedef struct PGExtras
{
- int dim; /* dimension of GA */
+ int dim; /* dimension of GA */
- int *nsize; /* The global size of the array */
+ int *nsize; /* The global size of the array */
/* Processor group layouts */
- double maxskew; /* Maximum point skew */
- int **lb; /* Lower bound (nprocs X dim) 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] */
+ double maxskew; /* Maximum point skew */
+ int **lb; /* Lower bound (nprocs X dim) 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] */
/* Ghosts and overlaps. */
- int *nghostzones; /* Width of ghost zone */
- 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] */
+ int *nghostzones; /* Width of ghost zone */
+ 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] */
} pGExtras;
typedef struct PGA
{
- char *name; /* The name of the grid function */
- int id; /* My ID number in my GH parent. */
- void *padddata; /* Storage for the data. */
- void *data; /* See the note above. */
- /* buffer_sz[2*dim] */
- int *buffer_sz; /* Size of the face ghost zones */
- void **send_buffer; /* Storage for buffered Comm if */
- void **recv_buffer; /* we don't use derived types */
- int commflag; /* What is the comm flag set to? */
- /* do_comm[2*dim] */
- int *docomm; /* Do we do comm or not? */
- int storage; /* Do we have storage or not? */
- int stagger; /* Only Vertex Centered now... */
-
- void *parent; /* The GH to which I belong */
- /* Note this is struct PGH whic is
- typedeffed to pGH in pGH.h, but
- that is included AFTER this so we
- need the full name for the lookahead
- structure reference thingy.
- */
-
- int varsize; /* The size of the data */
- int vtype; /* The type of the data */
+ char *name; /* The name of the grid function */
+ int id; /* My ID number in my GH parent. */
+ void *padddata; /* Storage for the data. */
+ void *data; /* See the note above. */
+ /* buffer_sz[2*dim] */
+ int *buffer_sz; /* Size of the face ghost zones */
+ void **send_buffer; /* Storage for buffered Comm if */
+ void **recv_buffer; /* we don't use derived types */
+ int commflag; /* What is the comm flag set to? */
+ /* do_comm[2*dim] */
+ int *docomm; /* Do we do comm or not? */
+ int storage; /* Do we have storage or not? */
+ int stagger; /* Only Vertex Centered now... */
+
+ void *parent; /* The GH to which I belong */
+ /* Note this is struct PGH whic is
+ typedeffed to pGH in pGH.h, but
+ that is included AFTER this so we
+ need the full name for the lookahead
+ structure reference thingy.
+ */
+
+ int varsize; /* The size of the data */
+ int vtype; /* The type of the data */
#ifdef MPI
- MPI_Request *sreq, *rreq; /* Comm requests and statuses. */
+ MPI_Request *sreq, *rreq; /* Comm requests and statuses. */
MPI_Status ms;
#endif
diff --git a/src/include/pugh.h b/src/include/pugh.h
index 4576cca..26d27ae 100644
--- a/src/include/pugh.h
+++ b/src/include/pugh.h
@@ -8,11 +8,11 @@
@seefile pughProtos.h for the pugh bit, and @seefile
pughProblem.h for the cactus-specific bits.
@enddesc
- @version $Id$
+ @version $Header$
@@*/
#ifndef _PUGH_H_
-#define _PUGH_H_
+#define _PUGH_H_ 1
#include "cctk.h"
@@ -73,16 +73,16 @@
#define CACTUS_MPI_ERROR(xf) do {int errcode; \
if((errcode = xf) != MPI_SUCCESS) \
- { \
- char mpi_error_string[MPI_MAX_ERROR_STRING+1]; \
- int resultlen; \
- MPI_Error_string(errcode, mpi_error_string, &resultlen);\
- fprintf(stderr, "MPI Call %s returned error code %d (%s)\n", \
+ { \
+ char mpi_error_string[MPI_MAX_ERROR_STRING+1]; \
+ int resultlen; \
+ MPI_Error_string(errcode, mpi_error_string, &resultlen);\
+ fprintf(stderr, "MPI Call %s returned error code %d (%s)\n", \
#xf, errcode, mpi_error_string); \
- fprintf(stderr, "At line %d of file %s\n", \
- __LINE__, __FILE__); \
- } \
- } while (0)
+ fprintf(stderr, "At line %d of file %s\n", \
+ __LINE__, __FILE__); \
+ } \
+ } while (0)
#endif
#ifdef _cplusplus
@@ -105,10 +105,10 @@ int PUGH_SetupGroup
);
pGH *PUGH_SetupPGH(void *callerid,
- int dim,
- int *nsize,
- int *nghostzones,
- int staggertype);
+ int dim,
+ int *nsize,
+ int *nghostzones,
+ int staggertype);
int pugh_GFSize(int dim,
int *nsize);