aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index b5a8e2121..fcf1e2f6b 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -1002,6 +1002,7 @@ namespace CarpetIOASCII {
const vect<CCTK_REAL,dim>& coord_upper)
{
assert (outdim<=dim);
+ const int vartype = CCTK_VarTypeI(vi);
if (gfdata->proc()==0) {
// output on processor 0
@@ -1061,7 +1062,7 @@ namespace CarpetIOASCII {
if (d != dim-1) os << " ";
}
os << "\t";
- switch (CCTK_VarTypeI(vi)) {
+ switch (vartype) {
#define TYPECASE(N,T) \
case N: \
os << (*(const data<T>*)gfdata)[index]; \
@@ -1097,7 +1098,7 @@ namespace CarpetIOASCII {
gdata* const tmp = gfdata->make_typed(vi);
tmp->allocate(gfdata->extent(), 0);
- for (comm_state state; !state.done(); state.step()) {
+ for (comm_state state(vartype); !state.done(); state.step()) {
tmp->copy_from (state, gfdata, gfdata->extent());
}
WriteASCII (os, tmp, gfext, vi, time, org, dirs, rl, ml, m, c, tl,