From 365d074e3e4065612813eaad2e975a99e18c7d40 Mon Sep 17 00:00:00 2001 From: allen Date: Sat, 29 Dec 2001 11:19:10 +0000 Subject: Prototypes for new coordinate functions. Also needed a macro for fortran, since the call to register a system now automatically hide the argument with the thorn name doing the registering git-svn-id: http://svn.cactuscode.org/flesh/trunk@2544 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/include/cctk.h | 2 ++ src/include/cctk_Coord.h | 38 ++++++++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/include/cctk.h b/src/include/cctk.h index 1714bc7c..0345f2c5 100644 --- a/src/include/cctk.h +++ b/src/include/cctk.h @@ -53,6 +53,8 @@ #define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FORTRANFILE__,CCTK_THORNSTRING,b) +#define CCTK_CoordRegisterSystem(a,b,c) CCTKi_CoordRegisterSystem(a,b,CCTK_THORNSTRING,c) + #define CCTKi_EXPECTERR(in,err,warnonerr,message) CCTKi_ExpectError(in,err,warnonerr,__LINE__,__FORTRANFILE__,CCTK_THORNSTRING,message) #define CCTKi_EXPECTOK(in,ok,warnonerr,message) CCTKi_ExpectOK(in,ok,warnonerr,__LINE__,__FORTRANFILE__,CCTK_THORNSTRING,message) diff --git a/src/include/cctk_Coord.h b/src/include/cctk_Coord.h index 7137e9f2..745c59bf 100644 --- a/src/include/cctk_Coord.h +++ b/src/include/cctk_Coord.h @@ -16,25 +16,14 @@ extern "C" { #endif -int CCTK_CoordRegisterSystem(int dim, const char *systemname); - -int CCTK_CoordRegisterData(int dir, - const char *gv, - const char *name, - const char *systemname); +int CCTK_CoordDir(const char *name, + const char *systemname); int CCTK_CoordIndex(int dir, const char *name, const char *systemname); -int CCTK_CoordDir(const char *name, - const char *systemname); - -int CCTK_CoordSystemDim(const char *systemname); - -int CCTK_CoordSystemHandle(const char *systemname); - -const char *CCTK_CoordSystemName(int handle); +const char *CCTK_CoordName (int dir, const char *systemname); int CCTK_CoordRange(const cGH *GH, CCTK_REAL *coord_lower, @@ -50,6 +39,23 @@ int CCTK_CoordRangePhysIndex (const cGH *GH, const char *coordname, const char *systemname); +int CCTK_CoordRegisterData(int dir, + const char *gv, + const char *name, + const char *systemname); + +#define CCTK_CoordRegisterSystem(a,b) \ + CCTKi_CoordRegisterSystem (a,CCTK_THORNSTRING,b) +int CCTKi_CoordRegisterSystem(int dim, + const char *implementation, + const char *systemname); + +int CCTK_CoordSystemDim(const char *systemname); + +int CCTK_CoordSystemHandle(const char *systemname); + +const char *CCTK_CoordSystemName(int handle); + int CCTK_CoordLocalRange(const cGH *GH, CCTK_REAL *lower, CCTK_REAL *upper, @@ -71,6 +77,10 @@ int CCTK_CoordRegisterRangePhysIndex(cGH *GH, const char *coord_name, const char *system_name); +int CCTK_NumCoordSystems (void); + +const char *CCTK_CoordSystemImplementation (int handle); + #ifdef __cplusplus } #endif -- cgit v1.2.3