diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2005-03-31 07:48:00 +0000 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2005-03-31 07:48:00 +0000 |
commit | 24180c60ef9b2c8e2e2c733417740db274cda87c (patch) | |
tree | 79bca552468561d405f0194dc399b57eeb6fab51 /Carpet/CarpetIOASCII | |
parent | 94daef6e66284e4bd9cd44cfe9f554932c7773c7 (diff) |
CarpetIOASCII: pass vartype in comm_state constructor tto make use of collective communication buffers
darcs-hash:20050331074851-776a0-fe39223cec4a68197e224c9b92f4fbef7b6258d8.gz
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 5 |
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, |