aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-02-13 18:33:30 -0600
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:45:26 +0000
commit3b52b3721d634461b2d3840db16735b78a4a8cad (patch)
treebf192abc623573e7124f3810a7336d1f85fe3c54 /Carpet/CarpetIOASCII
parent23a591ba88475bf0842257215f04c9f76a1c3fc4 (diff)
Combine CarpetLib's INSTANTIATE and Carpet's TYPECASE mechanism into a
single mechanism provided by CarpetLib. Use this mechanism everywhere.
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r--Carpet/CarpetIOASCII/interface.ccl3
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc10
2 files changed, 8 insertions, 5 deletions
diff --git a/Carpet/CarpetIOASCII/interface.ccl b/Carpet/CarpetIOASCII/interface.ccl
index 5de734da9..709c7ba5d 100644
--- a/Carpet/CarpetIOASCII/interface.ccl
+++ b/Carpet/CarpetIOASCII/interface.ccl
@@ -15,7 +15,8 @@ uses include header: gdata.hh
uses include header: gf.hh
uses include header: ggf.hh
-uses include header: carpet_typecase.hh
+uses include header: typecase.hh
+uses include header: typeprops.hh
CCTK_INT last_output_iteration[4] TYPE=scalar
CCTK_REAL last_output_time[4] TYPE=scalar
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index 7253de9c5..f120ddd2a 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -24,6 +24,8 @@
#include "carpet.hh"
#include "CarpetTimers.hh"
+#include "typeprops.hh"
+
#include "ioascii.hh"
@@ -1370,12 +1372,12 @@ namespace CarpetIOASCII {
for (size_t n=0; n<gfdatas.size(); ++n) {
const gdata* gfdata = gfdatas.at(n);
if (n > 0) os << " ";
- switch (vartype) {
+ switch (specific_cactus_type(vartype)) {
#define TYPECASE(N,T) \
case N: \
os << (*(const data<T>*)gfdata)[index]; \
break;
-#include "carpet_typecase.hh"
+#include "typecase.hh"
#undef TYPECASE
default:
UnsupportedVarType(vi);
@@ -1443,12 +1445,12 @@ namespace CarpetIOASCII {
for (size_t n=0; n<gfdatas.size(); ++n) {
const gdata* gfdata = gfdatas.at(n);
if (n > 0) os << " ";
- switch (vartype) {
+ switch (specific_cactus_type(vartype)) {
#define TYPECASE(N,T) \
case N: \
os << (*(const data<T>*)gfdata)[pos]; \
break;
-#include "carpet_typecase.hh"
+#include "typecase.hh"
#undef TYPECASE
default:
UnsupportedVarType(vi);