From ee2b51e7a68f72d503d6a5cb507b334e705ae8fe Mon Sep 17 00:00:00 2001 From: knarf Date: Sun, 21 Aug 2011 03:48:00 +0000 Subject: patch from Steven Brandt: It gets rid of annoying error messages when one of the dimensions is one. git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@139 eff87b29-5268-4891-90a3-a07138403961 --- src/Write.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Write.c b/src/Write.c index 4ada69b..498f5b9 100644 --- a/src/Write.c +++ b/src/Write.c @@ -154,14 +154,20 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) if (dir == 0) { dir_i = 0; dir_j = 1; /* xy */ + if(GH->cctk_gsh[0]==1 || GH->cctk_gsh[1]==1) + continue; } else if (dir == 1) { dir_i = 0; dir_j = 2; /* xz */ + if(GH->cctk_gsh[0]==1 || GH->cctk_gsh[2]==1) + continue; } else { dir_i = 1; dir_j = 2; /* yz */ + if(GH->cctk_gsh[1]==1 || GH->cctk_gsh[2]==1) + continue; } /* set the origin using the slice center from IOUtil */ -- cgit v1.2.3