From afd93dce86328a3489608b729894bb34add6cb90 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 25 Mar 2013 16:53:48 -0400 Subject: CarpetIO*: Output complex numbers as pair of real numbers Don't use the (real,imag) notation that C++ would use by default. --- Carpet/CarpetIOASCII/src/ioascii.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Carpet/CarpetIOASCII') diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index c7dab0add..a257975a6 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -1467,12 +1467,23 @@ namespace CarpetIOASCII { const gdata* gfdata = gfdatas.at(n); os << (n==0 ? "\t" : " "); switch (specific_cactus_type(vartype)) { +#define CARPET_NO_COMPLEX #define TYPECASE(N,T) \ case N: \ os << (*(const data*)gfdata)[index]; \ break; #include "typecase.hh" #undef TYPECASE +#undef CARPET_NO_COMPLEX +#define CARPET_COMPLEX +#define TYPECASE(N,T) \ + case N: \ + os << real((*(const data*)gfdata)[index]) << " " \ + << imag((*(const data*)gfdata)[index]); \ + break; +#include "typecase.hh" +#undef TYPECASE +#undef CARPET_COMPLEX default: UnsupportedVarType(vi); } -- cgit v1.2.3