aboutsummaryrefslogtreecommitdiff
path: root/src/Write2D.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-12-13 18:29:26 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-12-13 18:29:26 +0000
commitb488e2d50488bbaef4b228f7bf68b88dc0555cea (patch)
tree1ec944b655e94fd54d7e558c21cb7d072ced4c36 /src/Write2D.c
parentfd9ed4dae76c8e7c07d8b1d2e3a841782eb28213 (diff)
Moved the test, if storage was assigned to a variable to be output,
from the TimeToOutput() routines into the lower level WriteOutput() routines. Fixing by that * the behaviour of triggers, where TimeToOutput() is called BEFORE storage is possibly assigned (BR 170) * a potential bug when calling OutputVarAs() where no such test was done before git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@70 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Write2D.c')
-rw-r--r--src/Write2D.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Write2D.c b/src/Write2D.c
index cf192c5..47c5e05 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -96,6 +96,18 @@ void IOFlexIO_Write2D (cGH *GH, int index, const char *alias)
#endif
+ /* first, check if variable has storage assigned */
+ if (! CCTK_QueryGroupStorageI (GH, CCTK_GroupIndexFromVarI (index))) {
+ char *fullname = CCTK_FullName (index);
+ char *msg = (char *) malloc (80 + strlen (fullname));
+
+ sprintf (msg, "No IOFlexIO 2D output for '%s' (no storage)", fullname);
+ CCTK_WARN (2, msg);
+ free (fullname);
+ free (msg);
+ return;
+ }
+
/* Get the handles for pugh, IOFlexIO and IOUtil extensions */
pughGH = (pGH *) GH->extensions [CCTK_GHExtensionHandle ("PUGH")];
ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")];