aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOScalar
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-03-25 16:53:48 -0400
committerErik Schnetter <schnetter@gmail.com>2013-03-25 16:53:48 -0400
commitafd93dce86328a3489608b729894bb34add6cb90 (patch)
tree36af56311ce273fcb01cbbb82768a3a6d3708adb /Carpet/CarpetIOScalar
parentb2e07dd1f4a8a7ee0f82fc0453548cb6fa3eb1ac (diff)
CarpetIO*: Output complex numbers as pair of real numbers
Don't use the (real,imag) notation that C++ would use by default.
Diffstat (limited to 'Carpet/CarpetIOScalar')
-rw-r--r--Carpet/CarpetIOScalar/src/ioscalar.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc
index 1cd0ee102..cfdf1843b 100644
--- a/Carpet/CarpetIOScalar/src/ioscalar.cc
+++ b/Carpet/CarpetIOScalar/src/ioscalar.cc
@@ -471,12 +471,23 @@ namespace CarpetIOScalar {
file << " ";
switch (specific_cactus_type(vartype)) {
+#define CARPET_NO_COMPLEX
#define TYPECASE(N,T) \
case N: \
file << *(T const*)result; \
break;
#include "typecase.hh"
#undef TYPECASE
+#undef CARPET_NO_COMPLEX
+#define CARPET_COMPLEX
+#define TYPECASE(N,T) \
+ case N: \
+ file << real(*(T const*)result) << " " \
+ << imag(*(T const*)result); \
+ break;
+#include "typecase.hh"
+#undef TYPECASE
+#undef CARPET_COMPLEX
default:
UnsupportedVarType (n);
}