From f1a4032a937950c7ca283492dd9111cbdf87d39a Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 3 Dec 2003 23:08:20 +0000 Subject: Only register IOJepg I/O method if the maximum dimension of grid variables is >= 2. git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@90 eff87b29-5268-4891-90a3-a07138403961 --- src/Startup.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Startup.c b/src/Startup.c index f58a5a0..4d1cb19 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -41,15 +41,20 @@ static void *SetupGH (tFleshConfig *config, int conv_level, cGH *GH); @author Thomas Radke @desc The startup registration routine for IOJpeg. - Registers the GH extensions needed for IOJpeg - along with its setup routine. + Registers the GH extensions needed for IOJpeg, + along with its setup routine, if there are grid variables + of at least dimensionality of 2. @enddesc @calls CCTK_RegisterGHExtension CCTK_RegisterGHExtensionSetupGH @@*/ void IOJpeg_Startup (void) { - CCTK_RegisterGHExtensionSetupGH (CCTK_RegisterGHExtension("IOJpeg"), SetupGH); + if (CCTK_MaxDim () >= 2) + { + CCTK_RegisterGHExtensionSetupGH (CCTK_RegisterGHExtension ("IOJpeg"), + SetupGH); + } } -- cgit v1.2.3