From 566611956aede6ede419737eefa1a9f60019a4b0 Mon Sep 17 00:00:00 2001 From: jthorn Date: Sun, 27 Jul 2003 14:25:55 +0000 Subject: get rid of template function Cactus_variable_dataptr() since it's only called twice -- just do the CCTK_VarDataPtrI() calls explicitly in the mask code --> with this change, the only templates in this thorn are in src/jtutil/ git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1151 f88db872-0e4f-0410-b76b-b9085cfa78c5 --- src/driver/misc-driver.cc | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'src/driver/misc-driver.cc') diff --git a/src/driver/misc-driver.cc b/src/driver/misc-driver.cc index 735d0f9..cc6f590 100644 --- a/src/driver/misc-driver.cc +++ b/src/driver/misc-driver.cc @@ -2,8 +2,6 @@ // $Header$ // // Cactus_gridfn_varindex - get Cactus gridfn variable index -// Cactus_gridfn_dataptr - get Cactus gridfn data pointer -// ***** template instantiations ***** // #include @@ -61,48 +59,3 @@ if (varindex < 0) return varindex; } - -//****************************************************************************** - -// -// This template function gets the Cactus data pointer for a single gridfn, -// and optionally checks to make sure this is non-NULL. -// -// Arguments: -// T = The desired CCTK_* datatype. -// GH --> The Cactus grid hierarchy. -// gridfn_name[] = The character-string name of the grid function; -// this is used only for formatting error messages. -// check_for_NULL = true ==> check to make sure the data pointer is non-NULL -// false ==> skip this check (presumably because a NULL -// pointer is ok) -// -template - T* Cactus_gridfn_dataptr(const cGH *GH, int varindex, - const char gridfn_name[], - bool check_for_NULL /* = true */) -{ -const int time_level = 0; - -T* data_ptr = static_cast( CCTK_VarDataPtrI(GH, time_level, varindex) ); - -if (check_for_NULL && (data_ptr == NULL)) - then CCTK_VWarn(FATAL_ERROR, __LINE__, __FILE__, CCTK_THORNSTRING, -"\n" -" Cactus_gridfn_dataptr(): got unexpected NULL data pointer\n" -" for Cactus gridfn!\n" -" name=\"%s\" varindex=%d" - , - gridfn_name, varindex); /*NOTREACHED*/ - -return data_ptr; -} - -//****************************************************************************** - -template CCTK_REAL* Cactus_gridfn_dataptr(const cGH*, int, - const char*, - bool /* = true */); -template CCTK_INT* Cactus_gridfn_dataptr(const cGH*, int, - const char*, - bool /* = true */); -- cgit v1.2.3