aboutsummaryrefslogtreecommitdiff
path: root/src/gr
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-08-18 10:01:03 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-08-18 10:01:03 +0000
commit88ce8f204d96b41c7abd8f302c6aa2e1bd4ea7a9 (patch)
tree98b563a13fa8cbff16e9d3b14893717ceaffd2f2 /src/gr
parentb15e053d659533a3df651bdcf486ae14f5107639 (diff)
move lots and lots of code into C++ namespace AHFinderDirect
so it can't conflict with stuff in other thorns git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1184 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/gr')
-rw-r--r--src/gr/Schwarzschild_EF.cc8
-rw-r--r--src/gr/cg.hh13
-rw-r--r--src/gr/expansion.cc10
-rw-r--r--src/gr/expansion_Jacobian.cc8
-rw-r--r--src/gr/gfns.hh10
-rw-r--r--src/gr/gr.hh8
-rw-r--r--src/gr/misc-gr.cc8
7 files changed, 60 insertions, 5 deletions
diff --git a/src/gr/Schwarzschild_EF.cc b/src/gr/Schwarzschild_EF.cc
index 598dd94..63bc01f 100644
--- a/src/gr/Schwarzschild_EF.cc
+++ b/src/gr/Schwarzschild_EF.cc
@@ -40,6 +40,10 @@ using jtutil::error_exit;
#include "gfns.hh"
#include "gr.hh"
+// all the code in this file is inside this namespace
+namespace AHFinderDirect
+ {
+
//******************************************************************************
//
@@ -367,3 +371,7 @@ T_xz = (x*z/r2)*T_rr - (x*z/r4)*T_theta_theta;
T_yz = (y*z/r2)*T_rr - (y*z/r4)*T_theta_theta;
}
}
+
+//******************************************************************************
+
+ } // namespace AHFinderDirect
diff --git a/src/gr/cg.hh b/src/gr/cg.hh
index affd54b..50d1468 100644
--- a/src/gr/cg.hh
+++ b/src/gr/cg.hh
@@ -3,11 +3,14 @@
//
// This header file defines the "virtual machine" used by machine-generated
-// code. It is "dangerous" in that it #defines macros for all the gridfns,
-// which will break lots of other code. Thus this file should only be
-// #included just before #including machine-generated code, and this should
-// be as close as possible to the end of the source file (to minimize the
-// amount of other code affected by this file).
+// code. It is "dangerous" in that it #defines macros and local variables
+// for all the gridfns, which will break lots of other code. Thus this file
+// can only be #included within a function, and should only be #included
+// just before #including machine-generated code, and this should be as
+// close as possible to the end of the source file (to minimize the amount
+// of other code affected by this file).
+//
+// FIXME: we should have an "uncg.hh" header file to #undef all these macros
//
// prerequisites
// gfns.hh
diff --git a/src/gr/expansion.cc b/src/gr/expansion.cc
index c14b9f5..b9014d0 100644
--- a/src/gr/expansion.cc
+++ b/src/gr/expansion.cc
@@ -66,6 +66,10 @@ using jtutil::pow4;
#include "gfns.hh"
#include "gr.hh"
+// all the code in this file is inside this namespace
+namespace AHFinderDirect
+ {
+
//******************************************************************************
//******************************************************************************
//******************************************************************************
@@ -1283,3 +1287,9 @@ CCTK_VWarn(warn_level, __LINE__, __FILE__, CCTK_THORNSTRING,
return true; // *** NORMAL RETURN ***
}
}
+
+//******************************************************************************
+//******************************************************************************
+//******************************************************************************
+
+ } // namespace AHFinderDirect
diff --git a/src/gr/expansion_Jacobian.cc b/src/gr/expansion_Jacobian.cc
index d360076..41618b0 100644
--- a/src/gr/expansion_Jacobian.cc
+++ b/src/gr/expansion_Jacobian.cc
@@ -41,6 +41,10 @@ using jtutil::error_exit;
#include "../gr/gfns.hh"
#include "../gr/gr.hh"
+// all the code in this file is inside this namespace
+namespace AHFinderDirect
+ {
+
//******************************************************************************
//
@@ -590,3 +594,7 @@ if (active_flag)
return expansion_success; // *** NORMAL RETURN ***
}
}
+
+//******************************************************************************
+
+ } // namespace AHFinderDirect
diff --git a/src/gr/gfns.hh b/src/gr/gfns.hh
index d5186d0..d7a0afd 100644
--- a/src/gr/gfns.hh
+++ b/src/gr/gfns.hh
@@ -1,6 +1,12 @@
// gfns.hh -- define gfns of all gridfns
// $Header$
+// everything in this file is inside this namespace
+namespace AHFinderDirect
+ {
+
+//******************************************************************************
+
//
// For a skeletal patch system we only use the ghosted gridfns.
//
@@ -82,3 +88,7 @@ enum {
};
} // namespace gfns::
+
+//******************************************************************************
+
+ } // namespace AHFinderDirect
diff --git a/src/gr/gr.hh b/src/gr/gr.hh
index 88877ac..00f106c 100644
--- a/src/gr/gr.hh
+++ b/src/gr/gr.hh
@@ -1,6 +1,10 @@
// gr.hh -- header file for general relativity code
// $Header$
+// everything in this file is inside this namespace
+namespace AHFinderDirect
+ {
+
//******************************************************************************
//
@@ -192,3 +196,7 @@ void Schwarzschild_EF_geometry(patch_system& ps,
enum Jacobian_compute_method
decode_Jacobian_compute_method(const char Jacobian_compute_method_string[]);
const char* expansion_status_string(enum expansion_status status);
+
+//******************************************************************************
+
+ } // namespace AHFinderDirect
diff --git a/src/gr/misc-gr.cc b/src/gr/misc-gr.cc
index cc9988f..eaaaf9a 100644
--- a/src/gr/misc-gr.cc
+++ b/src/gr/misc-gr.cc
@@ -34,6 +34,10 @@
#include "gfns.hh"
#include "gr.hh"
+// all the code in this file is inside this namespace
+namespace AHFinderDirect
+ {
+
//******************************************************************************
//
@@ -96,3 +100,7 @@ default:
status); /*NOTREACHED*/
}
}
+
+//******************************************************************************
+
+ } // namespace AHFinderDirect