aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 17:28:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 17:28:00 +0000
commit84b8d17344762c61597e2b62056d92ee73fb414f (patch)
tree9a5a98c170c8190982121bcf5a3056fe92eb82a3 /Carpet
parent058424603e6ec5eb7079a3870db541ac052300ab (diff)
CarpetLib: Remove commented out code for complex variables
CarpetLib contained special code that used std::complex instead of Cactus's CCTK_COMPLEX for complex variables. A very similar feature is now supposed to go into the flesh, and hence this (unused) code is being removed. darcs-hash:20070204172854-dae7b-af7b7aca42988195846220dd7f45827549f5caf9.gz
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetLib/src/defs.hh60
-rw-r--r--Carpet/CarpetLib/src/dist.cc25
-rw-r--r--Carpet/CarpetLib/src/dist.hh60
3 files changed, 15 insertions, 130 deletions
diff --git a/Carpet/CarpetLib/src/defs.hh b/Carpet/CarpetLib/src/defs.hh
index afbabfba5..84cc63f72 100644
--- a/Carpet/CarpetLib/src/defs.hh
+++ b/Carpet/CarpetLib/src/defs.hh
@@ -7,9 +7,6 @@
#include <algorithm>
#include <cassert>
-#if 0
-#include <complex>
-#endif
#include <iostream>
#include <list>
#include <set>
@@ -101,61 +98,6 @@ void consume (istream& is, char const * c);
// Names for types
-#if 0
-
-inline const char * typestring (const char& dummy)
-{ return "char"; }
-
-inline const char * typestring (const signed char& dummy)
-{ return "signed char"; }
-
-inline const char * typestring (const unsigned char& dummy)
-{ return "unsigned char"; }
-
-inline const char * typestring (const short& dummy)
-{ return "short"; }
-
-inline const char * typestring (const unsigned short& dummy)
-{ return "unsigned short"; }
-
-inline const char * typestring (const int& dummy)
-{ return "int"; }
-
-inline const char * typestring (const unsigned int& dummy)
-{ return "unsigned int"; }
-
-inline const char * typestring (const long& dummy)
-{ return "long"; }
-
-inline const char * typestring (const unsigned long& dummy)
-{ return "unsigned long"; }
-
-inline const char * typestring (const long long& dummy)
-{ return "long long"; }
-
-inline const char * typestring (const unsigned long long& dummy)
-{ return "unsigned long long"; }
-
-inline const char * typestring (const float& dummy)
-{ return "float"; }
-
-inline const char * typestring (const double& dummy)
-{ return "double"; }
-
-inline const char * typestring (const long double& dummy)
-{ return "long double"; }
-
-inline const char * typestring (const complex<float>& dummy)
-{ return "complex<float>"; }
-
-inline const char * typestring (const complex<double>& dummy)
-{ return "complex<double>"; }
-
-inline const char * typestring (const complex<long double>& dummy)
-{ return "complex<long double>"; }
-
-#else
-
#ifdef HAVE_CCTK_INT1
inline const char * typestring (const CCTK_INT1& dummy)
{ return "CCTK_INT1"; }
@@ -206,8 +148,6 @@ inline const char * typestring (const CCTK_COMPLEX32& dummy)
{ return "CCTK_COMPLEX32"; }
#endif
-#endif
-
// Container input
diff --git a/Carpet/CarpetLib/src/dist.cc b/Carpet/CarpetLib/src/dist.cc
index b8edac101..79871f3f0 100644
--- a/Carpet/CarpetLib/src/dist.cc
+++ b/Carpet/CarpetLib/src/dist.cc
@@ -17,15 +17,9 @@ namespace dist {
MPI_Comm comm_ = MPI_COMM_NULL;
-#if 0
- MPI_Datatype mpi_complex_float;
- MPI_Datatype mpi_complex_double;
- MPI_Datatype mpi_complex_long_double;
-#else
MPI_Datatype mpi_complex8;
MPI_Datatype mpi_complex16;
MPI_Datatype mpi_complex32;
-#endif
void init (int& argc, char**& argv) {
MPI_Init (&argc, &argv);
@@ -35,29 +29,20 @@ namespace dist {
void pseudoinit (MPI_Comm const c) {
comm_ = c;
-#if 0
- MPI_Type_contiguous (2, MPI_FLOAT, &mpi_complex_float);
- MPI_Type_commit (&mpi_complex_float);
- MPI_Type_contiguous (2, MPI_DOUBLE, &mpi_complex_double);
- MPI_Type_commit (&mpi_complex_double);
- MPI_Type_contiguous (2, MPI_LONG_DOUBLE, &mpi_complex_long_double);
- MPI_Type_commit (&mpi_complex_long_double);
-#else
-# ifdef HAVE_CCTK_REAL4
+#ifdef HAVE_CCTK_REAL4
CCTK_REAL4 dummy4;
MPI_Type_contiguous (2, datatype(dummy4), &mpi_complex8);
MPI_Type_commit (&mpi_complex8);
-# endif
-# ifdef HAVE_CCTK_REAL8
+#endif
+#ifdef HAVE_CCTK_REAL8
CCTK_REAL8 dummy8;
MPI_Type_contiguous (2, datatype(dummy8), &mpi_complex16);
MPI_Type_commit (&mpi_complex16);
-# endif
-# ifdef HAVE_CCTK_REAL16
+#endif
+#ifdef HAVE_CCTK_REAL16
CCTK_REAL16 dummy16;
MPI_Type_contiguous (2, datatype(dummy16), &mpi_complex32);
MPI_Type_commit (&mpi_complex32);
-# endif
#endif
}
diff --git a/Carpet/CarpetLib/src/dist.hh b/Carpet/CarpetLib/src/dist.hh
index 23c445430..38d7219d1 100644
--- a/Carpet/CarpetLib/src/dist.hh
+++ b/Carpet/CarpetLib/src/dist.hh
@@ -5,10 +5,6 @@
#include <cstdio>
#include <cstdlib>
-#if 0
-#include <complex>
-#endif
-
#include <mpi.h>
#include "cctk.h"
@@ -23,15 +19,9 @@ namespace dist {
extern MPI_Comm comm_;
-#if 0
- extern MPI_Datatype mpi_complex_float;
- extern MPI_Datatype mpi_complex_double;
- extern MPI_Datatype mpi_complex_long_double;
-#else
extern MPI_Datatype mpi_complex8;
extern MPI_Datatype mpi_complex16;
extern MPI_Datatype mpi_complex32;
-#endif
void init (int& argc, char**& argv);
void pseudoinit (MPI_Comm const c);
@@ -118,34 +108,19 @@ namespace dist {
inline unsigned int c_datatype (const long double&)
{ return 12; }
-#if 0
-
- inline unsigned int c_datatype (const complex<float>&)
- { return 13; }
-
- inline unsigned int c_datatype (const complex<double>&)
- { return 14; }
-
- inline unsigned int c_datatype (const complex<long double>&)
- { return 15; }
-
-#else
-
-# ifdef HAVE_CCTK_COMPLEX8
+#ifdef HAVE_CCTK_COMPLEX8
inline unsigned int c_datatype (const CCTK_COMPLEX8&)
{ return 13; }
-# endif
+#endif
-# ifdef HAVE_CCTK_COMPLEX16
+#ifdef HAVE_CCTK_COMPLEX16
inline unsigned int c_datatype (const CCTK_COMPLEX16&)
{ return 14; }
-# endif
+#endif
-# ifdef HAVE_CCTK_COMPLEX32
+#ifdef HAVE_CCTK_COMPLEX32
inline unsigned int c_datatype (const CCTK_COMPLEX32&)
{ return 15; }
-# endif
-
#endif
// keep this function's return code consistent with functions above
@@ -196,34 +171,19 @@ namespace dist {
inline MPI_Datatype datatype (const long double&)
{ return MPI_LONG_DOUBLE; }
-#if 0
-
- inline MPI_Datatype datatype (const complex<float>&)
- { return mpi_complex_float; }
-
- inline MPI_Datatype datatype (const complex<double>&)
- { return mpi_complex_double; }
-
- inline MPI_Datatype datatype (const complex<long double>&)
- { return mpi_complex_long_double; }
-
-#else
-
-# ifdef HAVE_CCTK_COMPLEX8
+#ifdef HAVE_CCTK_COMPLEX8
inline MPI_Datatype datatype (const CCTK_COMPLEX8&)
{ return mpi_complex8; }
-# endif
+#endif
-# ifdef HAVE_CCTK_COMPLEX16
+#ifdef HAVE_CCTK_COMPLEX16
inline MPI_Datatype datatype (const CCTK_COMPLEX16&)
{ return mpi_complex16; }
-# endif
+#endif
-# ifdef HAVE_CCTK_COMPLEX32
+#ifdef HAVE_CCTK_COMPLEX32
inline MPI_Datatype datatype (const CCTK_COMPLEX32&)
{ return mpi_complex32; }
-# endif
-
#endif
} // namespace dist