diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-07-27 14:25:55 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-07-27 14:25:55 +0000 |
commit | 566611956aede6ede419737eefa1a9f60019a4b0 (patch) | |
tree | d3b2e2dcec808ed6cf4cbd63e4539b06a6c1d10b /src/driver/misc-driver.cc | |
parent | 01cc4d16163b6d64eef20fab70c7c530d3e40ce7 (diff) |
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
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 */); |