diff options
author | tradke <tradke@eff87b29-5268-4891-90a3-a07138403961> | 2003-12-03 23:08:20 +0000 |
---|---|---|
committer | tradke <tradke@eff87b29-5268-4891-90a3-a07138403961> | 2003-12-03 23:08:20 +0000 |
commit | f1a4032a937950c7ca283492dd9111cbdf87d39a (patch) | |
tree | fe1f9622659b0d18926cf3c851748362c73b2080 | |
parent | f307689c93a5eef9452c601567bbfb2370efd49f (diff) |
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
-rw-r--r-- | src/Startup.c | 11 |
1 files 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); + } } |