diff options
Diffstat (limited to 'src/driver/misc-driver.cc')
-rw-r--r-- | src/driver/misc-driver.cc | 47 |
1 files changed, 0 insertions, 47 deletions
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 <stdio.h> @@ -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 <typename T> - 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<T*>( 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<CCTK_REAL>(const cGH*, int, - const char*, - bool /* = true */); -template CCTK_INT* Cactus_gridfn_dataptr<CCTK_INT>(const cGH*, int, - const char*, - bool /* = true */); |