aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-12-02 13:33:42 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 18:25:40 +0000
commitc364073589286a4667233eda63d24b9cb24e90f0 (patch)
tree6e6ff95aafde4c351c264856bf85ec2e199ffef7 /Carpet
parent0c5ebf66d02eaebe2fe8de5641df163ad2d39258 (diff)
CarpetLib: Rearrange order of #include statements
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetLib/src/accumulate_3d.cc6
-rw-r--r--Carpet/CarpetLib/src/bbox.cc6
-rw-r--r--Carpet/CarpetLib/src/commstate.cc6
-rw-r--r--Carpet/CarpetLib/src/copy_3d.cc13
-rw-r--r--Carpet/CarpetLib/src/data.hh4
-rw-r--r--Carpet/CarpetLib/src/defs.cc6
-rw-r--r--Carpet/CarpetLib/src/defs.hh4
-rw-r--r--Carpet/CarpetLib/src/dist.cc17
-rw-r--r--Carpet/CarpetLib/src/dist.hh10
-rw-r--r--Carpet/CarpetLib/src/gdata.hh4
-rw-r--r--Carpet/CarpetLib/src/gf.cc4
-rw-r--r--Carpet/CarpetLib/src/ggf.cc4
-rw-r--r--Carpet/CarpetLib/src/ggf.hh4
-rw-r--r--Carpet/CarpetLib/src/gh.cc6
-rw-r--r--Carpet/CarpetLib/src/operator_prototypes_4d.hh4
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_o5_monotone_rf2.cc6
-rw-r--r--Carpet/CarpetLib/src/restrict_3d_cc_rf2.cc6
-rw-r--r--Carpet/CarpetLib/src/restrict_3d_rf2.cc6
-rw-r--r--Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc6
-rw-r--r--Carpet/CarpetLib/src/restrict_4d_rf2.cc6
-rw-r--r--Carpet/CarpetLib/src/startup_time.cc4
-rw-r--r--Carpet/CarpetLib/src/th.cc4
-rw-r--r--Carpet/CarpetLib/src/th.hh4
-rw-r--r--Carpet/CarpetLib/src/vect.cc4
-rw-r--r--Carpet/CarpetLib/src/vect.hh4
25 files changed, 79 insertions, 69 deletions
diff --git a/Carpet/CarpetLib/src/accumulate_3d.cc b/Carpet/CarpetLib/src/accumulate_3d.cc
index f57cc06c0..8fef2e616 100644
--- a/Carpet/CarpetLib/src/accumulate_3d.cc
+++ b/Carpet/CarpetLib/src/accumulate_3d.cc
@@ -1,12 +1,12 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iostream>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc
index a382b0c67..efd380b93 100644
--- a/Carpet/CarpetLib/src/bbox.cc
+++ b/Carpet/CarpetLib/src/bbox.cc
@@ -1,3 +1,6 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <iostream>
@@ -6,9 +9,6 @@
#include <string>
#include <typeinfo>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "defs.hh"
#include "vect.hh"
diff --git a/Carpet/CarpetLib/src/commstate.cc b/Carpet/CarpetLib/src/commstate.cc
index f3a6d7ebf..27f426890 100644
--- a/Carpet/CarpetLib/src/commstate.cc
+++ b/Carpet/CarpetLib/src/commstate.cc
@@ -1,11 +1,11 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <iostream>
-#include "cctk.h"
-#include "cctk_Parameters.h"
-
#include "bbox.hh"
#include "defs.hh"
#include "dist.hh"
diff --git a/Carpet/CarpetLib/src/copy_3d.cc b/Carpet/CarpetLib/src/copy_3d.cc
index 4a78fe030..b7fb72e40 100644
--- a/Carpet/CarpetLib/src/copy_3d.cc
+++ b/Carpet/CarpetLib/src/copy_3d.cc
@@ -1,12 +1,13 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
+#include <cstring>
#include <iostream>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
@@ -116,11 +117,17 @@ namespace CarpetLib {
// Loop over region
for (int k=0; k<regkext; ++k) {
for (int j=0; j<regjext; ++j) {
+#if 1
for (int i=0; i<regiext; ++i) {
dst [DSTIND3(i, j, k)] = src [SRCIND3(i, j, k)];
}
+#else
+ memcpy (& dst [DSTIND3(0, j, k)],
+ & src [SRCIND3(0, j, k)],
+ regiext * sizeof(T));
+#endif
}
}
diff --git a/Carpet/CarpetLib/src/data.hh b/Carpet/CarpetLib/src/data.hh
index d321e46c1..1812f43a8 100644
--- a/Carpet/CarpetLib/src/data.hh
+++ b/Carpet/CarpetLib/src/data.hh
@@ -1,13 +1,13 @@
#ifndef DATA_HH
#define DATA_HH
+#include <cctk.h>
+
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
-#include "cctk.h"
-
#include "defs.hh"
#include "dist.hh"
#include "bbox.hh"
diff --git a/Carpet/CarpetLib/src/defs.cc b/Carpet/CarpetLib/src/defs.cc
index f620a0b0d..b142b331f 100644
--- a/Carpet/CarpetLib/src/defs.cc
+++ b/Carpet/CarpetLib/src/defs.cc
@@ -1,3 +1,6 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <cassert>
#include <cctype>
#include <iostream>
@@ -7,9 +10,6 @@
#include <stack>
#include <vector>
-#include "cctk.h"
-#include "cctk_Parameters.h"
-
#include "bbox.hh"
#include "defs.hh"
#include "dh.hh"
diff --git a/Carpet/CarpetLib/src/defs.hh b/Carpet/CarpetLib/src/defs.hh
index 65a1edce5..7c9a98f42 100644
--- a/Carpet/CarpetLib/src/defs.hh
+++ b/Carpet/CarpetLib/src/defs.hh
@@ -1,6 +1,8 @@
#ifndef DEFS_HH
#define DEFS_HH
+#include <cctk.h>
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -16,8 +18,6 @@
#include <stack>
#include <vector>
-#include "cctk.h"
-
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/dist.cc b/Carpet/CarpetLib/src/dist.cc
index 89acacfad..67ebe35a6 100644
--- a/Carpet/CarpetLib/src/dist.cc
+++ b/Carpet/CarpetLib/src/dist.cc
@@ -1,14 +1,18 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <cassert>
#include <typeinfo>
-#include <mpi.h>
+#ifdef CCTK_MPI
+# include <mpi.h>
+#else
+# include "nompi.h"
+#endif
#ifdef _OPENMP
# include <omp.h>
#endif
-#include "cctk.h"
-#include "cctk_Parameters.h"
-
#include "defs.hh"
#include "limits.hh"
#include "startup_time.hh"
@@ -54,17 +58,12 @@ namespace dist {
#endif
// Output startup time
- // cerr << "QQQ: pseudoinit[1]" << endl;
CarpetLib::output_startup_time ();
- // cerr << "QQQ: pseudoinit[2]" << endl;
// Check and/or modify system limits
CarpetLib::set_system_limits ();
- // cerr << "QQQ: pseudoinit[3]" << endl;
- // cerr << "QQQ: pseudoinit[4]" << endl;
collect_total_num_threads ();
- // cerr << "QQQ: pseudoinit[5]" << endl;
}
void finalize () {
diff --git a/Carpet/CarpetLib/src/dist.hh b/Carpet/CarpetLib/src/dist.hh
index 091da31e4..2f6726fa0 100644
--- a/Carpet/CarpetLib/src/dist.hh
+++ b/Carpet/CarpetLib/src/dist.hh
@@ -1,18 +1,22 @@
#ifndef DIST_HH
#define DIST_HH
+#include <cctk.h>
+
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iostream>
-#include <mpi.h>
+#ifdef CCTK_MPI
+# include <mpi.h>
+#else
+# include "nompi.h"
+#endif
#ifdef _OPENMP
# include <omp.h>
#endif
-#include "cctk.h"
-
#include "defs.hh"
using namespace std;
diff --git a/Carpet/CarpetLib/src/gdata.hh b/Carpet/CarpetLib/src/gdata.hh
index 5a7f153e7..634f5a917 100644
--- a/Carpet/CarpetLib/src/gdata.hh
+++ b/Carpet/CarpetLib/src/gdata.hh
@@ -1,6 +1,8 @@
#ifndef GDATA_HH
#define GDATA_HH
+#include <cctk.h>
+
#include <cassert>
#include <cstdlib>
#include <queue>
@@ -8,8 +10,6 @@
#include <string>
#include <vector>
-#include "cctk.h"
-
#include "bbox.hh"
#include "commstate.hh"
#include "defs.hh"
diff --git a/Carpet/CarpetLib/src/gf.cc b/Carpet/CarpetLib/src/gf.cc
index ef5ae7889..08d8715c7 100644
--- a/Carpet/CarpetLib/src/gf.cc
+++ b/Carpet/CarpetLib/src/gf.cc
@@ -1,6 +1,6 @@
-#include <cassert>
+#include <cctk.h>
-#include "cctk.h"
+#include <cassert>
#include "defs.hh"
diff --git a/Carpet/CarpetLib/src/ggf.cc b/Carpet/CarpetLib/src/ggf.cc
index 314a04843..216f6cef5 100644
--- a/Carpet/CarpetLib/src/ggf.cc
+++ b/Carpet/CarpetLib/src/ggf.cc
@@ -1,3 +1,5 @@
+#include <cctk.h>
+
#include <cassert>
#include <cmath>
#include <cstdlib>
@@ -5,8 +7,6 @@
#include <iostream>
#include <string>
-#include "cctk.h"
-
#include "CarpetTimers.hh"
#include "defs.hh"
diff --git a/Carpet/CarpetLib/src/ggf.hh b/Carpet/CarpetLib/src/ggf.hh
index 56263fa80..b24bdd440 100644
--- a/Carpet/CarpetLib/src/ggf.hh
+++ b/Carpet/CarpetLib/src/ggf.hh
@@ -1,13 +1,13 @@
#ifndef GGF_HH
#define GGF_HH
+#include <cctk.h>
+
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
-#include "cctk.h"
-
#include "defs.hh"
#include "dh.hh"
#include "gdata.hh"
diff --git a/Carpet/CarpetLib/src/gh.cc b/Carpet/CarpetLib/src/gh.cc
index 23e823257..003fa7608 100644
--- a/Carpet/CarpetLib/src/gh.cc
+++ b/Carpet/CarpetLib/src/gh.cc
@@ -1,11 +1,11 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <vector>
-#include "cctk.h"
-#include "cctk_Parameters.h"
-
#include "CarpetTimers.hh"
#include "defs.hh"
diff --git a/Carpet/CarpetLib/src/operator_prototypes_4d.hh b/Carpet/CarpetLib/src/operator_prototypes_4d.hh
index afd75c655..59c1bc53f 100644
--- a/Carpet/CarpetLib/src/operator_prototypes_4d.hh
+++ b/Carpet/CarpetLib/src/operator_prototypes_4d.hh
@@ -1,10 +1,10 @@
#ifndef OPERATOR_PROTOTYPES_4D
#define OPERATOR_PROTOTYPES_4D
-#include <cstdlib>
-
#include <cctk.h>
+#include <cstdlib>
+
#include "defs.hh"
#include "bbox.hh"
#include "vect.hh"
diff --git a/Carpet/CarpetLib/src/prolongate_3d_o5_monotone_rf2.cc b/Carpet/CarpetLib/src/prolongate_3d_o5_monotone_rf2.cc
index 0cff2b8a0..dac0870d2 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_o5_monotone_rf2.cc
+++ b/Carpet/CarpetLib/src/prolongate_3d_o5_monotone_rf2.cc
@@ -15,14 +15,14 @@
// Note that this code does not work for complex GFs (due to the use
// of the max and min intrinsics).
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/restrict_3d_cc_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_cc_rf2.cc
index a0f74acde..5e9ff5e84 100644
--- a/Carpet/CarpetLib/src/restrict_3d_cc_rf2.cc
+++ b/Carpet/CarpetLib/src/restrict_3d_cc_rf2.cc
@@ -1,10 +1,10 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/restrict_3d_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_rf2.cc
index ba999cd91..a7df73e62 100644
--- a/Carpet/CarpetLib/src/restrict_3d_rf2.cc
+++ b/Carpet/CarpetLib/src/restrict_3d_rf2.cc
@@ -1,12 +1,12 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iostream>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
index f59790bf3..a17462de0 100644
--- a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
+++ b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
@@ -1,10 +1,10 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/restrict_4d_rf2.cc b/Carpet/CarpetLib/src/restrict_4d_rf2.cc
index 46f7f1b57..ba1370b93 100644
--- a/Carpet/CarpetLib/src/restrict_4d_rf2.cc
+++ b/Carpet/CarpetLib/src/restrict_4d_rf2.cc
@@ -1,12 +1,12 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iostream>
-#include <cctk.h>
-#include <cctk_Parameters.h>
-
#include "operator_prototypes_4d.hh"
#include "typeprops.hh"
diff --git a/Carpet/CarpetLib/src/startup_time.cc b/Carpet/CarpetLib/src/startup_time.cc
index f361345fa..1861bdeea 100644
--- a/Carpet/CarpetLib/src/startup_time.cc
+++ b/Carpet/CarpetLib/src/startup_time.cc
@@ -1,9 +1,9 @@
+#include <cctk.h>
+
#include <cstdio>
#include <cstdlib>
#include <string>
-#include <cctk.h>
-
// IRIX wants this before <time.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
diff --git a/Carpet/CarpetLib/src/th.cc b/Carpet/CarpetLib/src/th.cc
index bed473245..d34ad6c65 100644
--- a/Carpet/CarpetLib/src/th.cc
+++ b/Carpet/CarpetLib/src/th.cc
@@ -1,10 +1,10 @@
+#include <cctk.h>
+
#include <cassert>
#include <cmath>
#include <iostream>
#include <vector>
-#include "cctk.h"
-
#include "defs.hh"
#include "gh.hh"
diff --git a/Carpet/CarpetLib/src/th.hh b/Carpet/CarpetLib/src/th.hh
index c1453cf4d..107e6cc6d 100644
--- a/Carpet/CarpetLib/src/th.hh
+++ b/Carpet/CarpetLib/src/th.hh
@@ -1,13 +1,13 @@
#ifndef TH_HH
#define TH_HH
+#include <cctk.h>
+
#include <cassert>
#include <cmath>
#include <iostream>
#include <vector>
-#include <cctk.h>
-
#include "defs.hh"
#include "gh.hh"
diff --git a/Carpet/CarpetLib/src/vect.cc b/Carpet/CarpetLib/src/vect.cc
index 58def3ca1..15bf81a86 100644
--- a/Carpet/CarpetLib/src/vect.cc
+++ b/Carpet/CarpetLib/src/vect.cc
@@ -1,8 +1,8 @@
+#include <cctk.h>
+
#include <cassert>
#include <iostream>
-#include "cctk.h"
-
#include "defs.hh"
#include "bboxset.hh"
diff --git a/Carpet/CarpetLib/src/vect.hh b/Carpet/CarpetLib/src/vect.hh
index 27b4ffad0..05f8c9ca7 100644
--- a/Carpet/CarpetLib/src/vect.hh
+++ b/Carpet/CarpetLib/src/vect.hh
@@ -1,13 +1,13 @@
#ifndef VECT_HH
#define VECT_HH
+#include <cctk.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
-#include "cctk.h"
-
#include "defs.hh"
#include "vect_helpers.hh"