From b360a7181fc8e3b740f5baba0711a593e5b56891 Mon Sep 17 00:00:00 2001 From: allen Date: Thu, 16 May 2002 15:43:05 +0000 Subject: Fortran binding for CCTK_OutputVar git-svn-id: http://svn.cactuscode.org/flesh/trunk@2817 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/IO/FortranBindingsIO.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) (limited to 'src/IO') diff --git a/src/IO/FortranBindingsIO.c b/src/IO/FortranBindingsIO.c index 2fa32e72..a70fa229 100644 --- a/src/IO/FortranBindingsIO.c +++ b/src/IO/FortranBindingsIO.c @@ -18,19 +18,105 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(IO_FortranBindingsIO_c) +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ void CCTK_FCALL CCTK_FNAME (CCTK_OutputGH) (int *istat, const cGH *GH); +void CCTK_FCALL CCTK_FNAME (CCTK_OutputVar) + (int *istat, const cGH *GH, ONE_FORTSTRING_ARG); void CCTK_FCALL CCTK_FNAME (CCTKi_RegisterIOMethod) (int *handle, TWO_FORTSTRING_ARG); +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + +/******************************************************************** + ********************* External Routines ********************** + ********************************************************************/ + + /*@@ + @routine CCTK_OutputGH + @date + @author + @desc + Fortran binding for CCTK_OutputGH + @enddesc + @var istat + @vdesc error code + @vtype int + @vio out + @endvar + @var GH + @vdesc grid hierachy + @vtype const GH * + @vio in + @endvar + + @returntype int + @returndesc + @endreturndesc +@@*/ void CCTK_FCALL CCTK_FNAME (CCTK_OutputGH) (int *istat, const cGH *GH) { *istat = CCTK_OutputGH (GH); } + /*@@ + @routine CCTK_OutputVar + @date + @author + @desc + Fortran binding for CCTK_OutputVar + @enddesc + @var istat + @vdesc error code + @vtype int + @vio out + @endva + @var GH + @vdesc grid hierachy + @vtype const GH * + @vio in + @endvar + @var name + @vdesc Name of variable to outut + @vtype const char * + @vio in + @endvar + @returntype int + @returndesc + + @endreturndesc +@@*/ +void CCTK_FCALL CCTK_FNAME (CCTK_OutputVar) + (int *istat, const cGH *GH, ONE_FORTSTRING_ARG) +{ + ONE_FORTSTRING_CREATE (var); + *istat = CCTK_OutputVar (GH, var); + free (var); +} + + + /*@@ + @routine CCTKi_RegisterIOMethod + @date + @author + @desc + + @enddesc +@@*/ + +/* FIXME: This function is no longer needed, test can remove */ + void CCTK_FCALL CCTK_FNAME (CCTKi_RegisterIOMethod) (int *handle, TWO_FORTSTRING_ARG) { @@ -39,3 +125,4 @@ void CCTK_FCALL CCTK_FNAME (CCTKi_RegisterIOMethod) free (thorn); free (name); } + -- cgit v1.2.3