diff options
author | lanfer <lanfer@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-09-19 20:16:56 +0000 |
---|---|---|
committer | lanfer <lanfer@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-09-19 20:16:56 +0000 |
commit | 0085bc73495640d5fe9595a37a513b2739031807 (patch) | |
tree | f9b1416306bb64a42b7e86bdbb683e4e0641ed49 | |
parent | 9c581cf8b1320c6cc677b6a5a5e5aadc7c78d444 (diff) |
Cactus Sync routines
git-svn-id: http://svn.cactuscode.org/flesh/trunk@969 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/comm/CactusSync.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/comm/CactusSync.c b/src/comm/CactusSync.c new file mode 100644 index 00000000..df06093f --- /dev/null +++ b/src/comm/CactusSync.c @@ -0,0 +1,56 @@ +#include <stdlib.h> +#include "cctk_Flesh.h" +#include "cctk_FortranString.h" +#include "cctk_Comm.h" +#include "cctk_Groups.h" + + + /*@@ + @file CactusSync.c + @date Thu Sep 18 14:27:18 1999 + @author Gerd Lanfermann + @desc + A collection of SyncGroup routines: Sync a group by the GROUP INDEX, + by the group's VARIABLE NAME, by the group's VARIABLE INDEX. + + It ends up calling CCTK_SyncGroup(GH,groupname), which is overloaded (currently + by PUGH). + + @enddesc + @@*/ + +void CCTK_SyncGroupI(cGH *GH, int gi) { + CCTK_SyncGroup(GH,CCTK_GroupName(gi)); +} + +void FMODIFIER FORTRAN_NAME(CCTK_SyncGroupI)(cGH *GH, int *gi) { + CCTK_SyncGroupI(GH, *gi); +} + + + +void CCTK_SyncGroupWithVar(cGH *GH, const char *impvarname) { + int gi; + gi = CCTK_GroupIndexFromVarI(CCTK_VarIndex(impvarname)); + CCTK_SyncGroupI(GH,gi); +} + +void FMODIFIER FORTRAN_NAME(CCTK_SyncGroupWithVar)(cGH *GH, ONE_FORTSTRING_ARG) { + ONE_FORTSTRING_CREATE(impvarname); + CCTK_SyncGroupWithVar(GH,impvarname); + free(impvarname); +} + + + +void CCTK_SyncGroupWithVarI(cGH *GH, int vi) { + int gi; + gi = CCTK_GroupIndexFromVarI(vi); + CCTK_SyncGroupI(GH,gi); +} + +void FMODIFIER FORTRAN_NAME(CCTK_SyncGroupWithVarI)(cGH *GH, int *vi) { + CCTK_SyncGroupWithVarI(GH,*vi); +} + + |