[Commits] [svn:einsteintoolkit] GRHydro/ (Rev. 352)

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Wed Jun 6 09:35:52 CDT 2012


User: rhaas
Date: 2012/06/06 09:35 AM

Added:
 /trunk/src/
  GRHydro_LastMoLPostStep.c

Log:
 GRHydro: add file missing from r343

Directory Changes:

Directory: /svn:mime-type/
==========================

   + text/x-csrc

File Changes:

Directory: /trunk/src/
======================

File [added]: GRHydro_LastMoLPostStep.c
Delta lines: +41 -0
===================================================================
--- trunk/src/GRHydro_LastMoLPostStep.c	                        (rev 0)
+++ trunk/src/GRHydro_LastMoLPostStep.c	2012-06-06 14:35:52 UTC (rev 352)
@@ -0,0 +1,41 @@
+// GRHydro_LastMoLPostStep.c
+//
+// Compute is this is the last MoL PostStep call. Code taken from Christian
+// Reisswig's rejected MoL changes.
+//
+// Roland Haas
+// Sun Jun  3 17:35:53 PDT 2012
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+void GRHydro_SetLastMoLPostStep(CCTK_ARGUMENTS)
+{
+  DECLARE_CCTK_ARGUMENTS;
+
+  const CCTK_INT *MoL_Intermediate_Step = 
+    CCTK_VarDataPtr(cctkGH,0,"MoL::MoL_Intermediate_Step");
+  if(NULL == MoL_Intermediate_Step)
+  {
+    CCTK_WARN(CCTK_WARN_ABORT,
+              "Could not get data pointer for MoL::MoL_Intermediate_Step");
+  }
+
+  // If counter becomes zero, the only thing left to do is to call PostStep!
+  if (*MoL_Intermediate_Step == 0)
+    *InLastMoLPostStep = 1;
+  else
+    *InLastMoLPostStep = 0;
+}
+
+void GRHydro_ClearLastMoLPostStep(CCTK_ARGUMENTS)
+{
+  DECLARE_CCTK_ARGUMENTS;
+
+  *InLastMoLPostStep = 0;
+}



Property changes on: trunk/src/GRHydro_LastMoLPostStep.c
___________________________________________________________________



More information about the Commits mailing list