From 049ce8a3bf87bbebd787dc781b76e4320e5c7231 Mon Sep 17 00:00:00 2001 From: baiotti Date: Thu, 27 Oct 2005 15:34:30 +0000 Subject: Do not use ADMMAcros (C version), since they are bugged (for Carpet). Finish changes that ensure compatibility with Carpet and multiprocessor runs. Not tested extensively. git-svn-id: http://svn.aei.mpg.de/numrel/AEIThorns/ADMMass/trunk@5 54511f98-0e4f-0410-826e-eb8b393f5a1e --- src/loop.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/loop.c') diff --git a/src/loop.c b/src/loop.c index 7cc36bb..34122a0 100644 --- a/src/loop.c +++ b/src/loop.c @@ -2,13 +2,23 @@ #include #include -/* Initialises the loop counter to the last radius/distance set */ + +/* Initialise the loop counter */ void ADMMass_InitLoopCounter(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS - *ADMMass_LoopCounter = ADMMass_number; + *ADMMass_LoopCounter = 0; +} + +/* Set the loop counter to the value of the parameter ADMMass:ADMMass_number */ +void ADMMass_SetLoopCounter(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + *ADMMass_LoopCounter = ADMMass_number; } /* Decrements the counter to loop over all radii/distances set */ @@ -18,4 +28,5 @@ void ADMMass_Loop(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS (*ADMMass_LoopCounter)--; + } -- cgit v1.2.3