aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README5
-rw-r--r--archive/stl_vector.hh (renamed from src/include/stl_vector.hh)0
-rw-r--r--doc/documentation.tex35
-rw-r--r--par/Kerr-tiny.par13
-rw-r--r--par/Kerr.par3
-rw-r--r--par/misner-init.par2
-rw-r--r--par/misner-run.par2
-rw-r--r--param.ccl23
-rw-r--r--src/driver/Newton.cc2
-rw-r--r--src/driver/driver.hh7
-rw-r--r--src/driver/find_horizons.cc4
-rw-r--r--src/driver/initial_guess.cc3
-rw-r--r--src/driver/io.cc3
-rw-r--r--src/driver/setup.cc82
-rw-r--r--src/driver/state.cc2
-rw-r--r--src/elliptic/Jacobian.cc3
-rw-r--r--src/gr/Schwarzschild_EF.cc2
-rw-r--r--src/gr/expansion.cc2
-rw-r--r--src/gr/expansion_Jacobian.cc2
-rw-r--r--src/gr/misc.cc3
-rw-r--r--src/patch/patch_system.cc17
-rw-r--r--src/patch/patch_system.hh10
-rw-r--r--src/patch/test_patch_system.cc2
23 files changed, 105 insertions, 122 deletions
diff --git a/README b/README
index 9d15ccc..5050042 100644
--- a/README
+++ b/README
@@ -138,9 +138,8 @@ In particular:
alas none of the more modern forms (<cstdio> and namespace std::)
seem to be supported on as wide a range of systems as the pre-namespaces
form.)
-* vector is the only part of the C++ standard template library (STL)
- used. Either <vector> or <vector.h> is #included, depending on which
- of them exists (this is probed by the Cactus configuration process).
+* To avoid various portability problems, the C++ standard template
+ library (STL) isn't used.
Compiler Notes
diff --git a/src/include/stl_vector.hh b/archive/stl_vector.hh
index 9e4d817..9e4d817 100644
--- a/src/include/stl_vector.hh
+++ b/archive/stl_vector.hh
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 86b9db1..00912c7 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -214,7 +214,7 @@ necessary in order for \thorn{AHFinderDirect} to work:
\thorn{AHFinderDirect} may report in such a situation
(where the Cactus 3-D grid resolution is too low) is that
the interpolated $g_{ij}$ fails to be positive definite.
-\item At the moment \thorn{AHFinderDirect} and \thorn{LocalInterp}
+\item At the moment \thorn{AHFinderDirect} and the Cactus interpolators
don't know anything about excision, so if the apparent horizon
(or any trial horizon surface as the algorithm is iterating
towards the apparent horizon) gets too close to an excised
@@ -262,13 +262,16 @@ here's what works and what doesn't:
have storage turned on for at least the conformal factor
\verb|StaticConformal::psi|. (The Cactus 3-D grid functions
for 1st and 2nd derivatives of \verb|psi| aren't used.)
-\item \thorn{AHFinderDirect} uses the new \verb|CCTK_InterpLocalUniform()|
- interpolator API, which at present is only supported by
- \thorn{LocalInterp}, so you need that thorn compiled in to
- your configuration and activated.
-\item At present \thorn{AHFinderDirect} only works for single-processor
- Cactus runs. This isn't checked, so if you try to activate
- it in a multi-procssor run you'll probably get garbage results.
+\item By default \thorn{AHFinderDirect} uses the new
+ \verb|CCTK_InterpGridArrays()| global interpolator API,
+ which in turn uses the new \verb|CCTK_InterpLocalUniform()|
+ local interpolator API. At present these interpolators
+ are only provided by the thorns \thorn{PUGHInterp} and
+ \thorn{LocalInterp} respectively, so you need to have
+ these thorns compiled into your configuration and activated.
+\item Even though it uses the new global interpolation API,
+ at present \thorn{AHFinderDirect} doesn't work properly
+ for multi-processor Cactus runs.
I hope to properly support multi-processor operation soon.
\end{itemize}
@@ -299,12 +302,16 @@ with various compilers. See the ``Code Notes'' and ``Compiler Notes''
sections in the top-level \code{README} file for details and lists of
compilers currently known to be ok or not.
-To compile (a Cactus configuration which includes) this thorn, at present
-you must set the environment variable \code{LAPACK\_DIR}, and possibly
-also the environment variables \code{LAPACK\_EXTRA\_LIBS} and
-\code{LAPACK\_EXTRA\_LIBDIRS}. See the ``Library Configuration''
-section in the top-level \code{README} file for details.
-(I plan to replace this by an autoconfiguration scheme at some point.)
+\thorn{AHFinderDirect} uses the LAPACK library for solving linear
+equations, so you need to configure Cactus with \verb|LAPACK=yes|.
+Cactus can usually find the LAPACK libraries itself; if not it will
+tell you (at configure time) that you also need to set the Cactus
+configuration variable \verb|LAPACK_DIR| to tell it where the
+libraries live. If the LAPACK libraries were compiled by a different
+Fortran compiler than you're using to compile Cactus, then you may also
+have to set the Cactus configuration variables \verb|LAPACK_EXTRA_LIBS|
+and \verb|LAPACK_EXTRA_LIB_DIRS|. See the top-level \verb|README|
+file for details and examples.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/par/Kerr-tiny.par b/par/Kerr-tiny.par
index 3ddf20c..90b4a08 100644
--- a/par/Kerr-tiny.par
+++ b/par/Kerr-tiny.par
@@ -7,38 +7,35 @@
# This parameter file is "tiny" in the sense that it sets only a
# small number of AHFinderDirect parameters.
-ActiveThorns = "CartGrid3D LocalInterp PUGH ADMBase ADMCoupling StaticConformal CoordGauge Exact AHFinderDirect"
-
# flesh
cactus::cctk_itlast = 0
-# PUGH
+ActiveThorns = "PUGH"
driver::ghost_size = 2
driver::global_nx = 31
driver::global_ny = 31
driver::global_nz = 17
-# CartGrid3D
+ActiveThorns = "CartGrid3D"
grid::domain = "bitant"
grid::avoid_origin = "false"
grid::type = "byspacing"
grid::dxyz = 0.2
-# ADMBase
+ActiveThorns = "ADMBase ADMCoupling StaticConformal CoordGauge Exact"
ADMBase::initial_lapse = "exact"
ADMBase::initial_shift = "exact"
ADMBase::initial_data = "exact"
ADMBase::lapse_evolution_method = "static"
ADMBase::shift_evolution_method = "static"
ADMBase::metric_type = "physical"
-
-# Exact
Exact::exact_model = "Kerr/Kerr-Schild"
Exact::Kerr_KerrSchild__mass = 1.0
Exact::Kerr_KerrSchild__spin = 0.6
########################################
+ActiveThorns = "LocalInterp PUGHInterp AHFinderDirect"
AHFinderDirect::find_AHs_at_poststep = "false" # no time evolution
AHFinderDirect::h_base_file_name = "Kerr-tiny.h"
@@ -47,7 +44,7 @@ AHFinderDirect::origin_x[1] = 0.5
AHFinderDirect::origin_y[1] = 0.7
AHFinderDirect::origin_z[1] = 0.0
-AHFinderDirect::initial_guess_method = "coordinate sphere"
+AHFinderDirect::initial_guess_method[1] = "coordinate sphere"
AHFinderDirect::initial_guess__coord_sphere__x_center[1] = -0.2
AHFinderDirect::initial_guess__coord_sphere__y_center[1] = 0.3
AHFinderDirect::initial_guess__coord_sphere__z_center[1] = 0.0
diff --git a/par/Kerr.par b/par/Kerr.par
index 003c5ad..abcc41c 100644
--- a/par/Kerr.par
+++ b/par/Kerr.par
@@ -26,7 +26,6 @@ ADMBase::initial_data = "exact"
ADMBase::lapse_evolution_method = "static"
ADMBase::shift_evolution_method = "static"
ADMBase::metric_type = "physical"
-
Exact::exact_model = "Kerr/Kerr-Schild"
Exact::Kerr_KerrSchild__mass = 1.0
Exact::Kerr_KerrSchild__spin = 0.6
@@ -49,7 +48,7 @@ AHFinderDirect::origin_x[1] = 0.5
AHFinderDirect::origin_y[1] = 0.7
AHFinderDirect::origin_z[1] = 0.0
-AHFinderDirect::initial_guess_method = "coordinate sphere"
+AHFinderDirect::initial_guess_method[1] = "coordinate sphere"
AHFinderDirect::initial_guess__coord_sphere__x_center[1] = -0.2
AHFinderDirect::initial_guess__coord_sphere__y_center[1] = 0.3
AHFinderDirect::initial_guess__coord_sphere__z_center[1] = 0.0
diff --git a/par/misner-init.par b/par/misner-init.par
index b72f2b2..c430510 100644
--- a/par/misner-init.par
+++ b/par/misner-init.par
@@ -85,7 +85,7 @@ AHFinderDirect::origin_x[1] = 0.0
AHFinderDirect::origin_y[1] = 0.0
AHFinderDirect::origin_z[1] = 1.0
-AHFinderDirect::initial_guess_method = "coordinate sphere"
+AHFinderDirect::initial_guess_method[1] = "coordinate sphere"
AHFinderDirect::initial_guess__coord_sphere__x_center[1] = 0.0
AHFinderDirect::initial_guess__coord_sphere__y_center[1] = 0.0
AHFinderDirect::initial_guess__coord_sphere__z_center[1] = 1.0
diff --git a/par/misner-run.par b/par/misner-run.par
index d7cc22c..a5c0caf 100644
--- a/par/misner-run.par
+++ b/par/misner-run.par
@@ -190,7 +190,7 @@ AHFinderDirect::origin_x[1] = 0.0
AHFinderDirect::origin_y[1] = 0.0
AHFinderDirect::origin_z[1] = 1.0
-AHFinderDirect::initial_guess_method = "coordinate sphere"
+AHFinderDirect::initial_guess_method[1] = "coordinate sphere"
AHFinderDirect::initial_guess__coord_sphere__x_center[1] = 0.0
AHFinderDirect::initial_guess__coord_sphere__y_center[1] = 0.0
AHFinderDirect::initial_guess__coord_sphere__z_center[1] = 1.0
diff --git a/param.ccl b/param.ccl
index 8466572..70cec5d 100644
--- a/param.ccl
+++ b/param.ccl
@@ -30,12 +30,13 @@ private:
# ***** overall parameters *****
#
-# if we are in a multiprocessor run, AHFinderDirect will be a no-op
-# on all processors with CCTK_MyProc() != this parameter
-int processor_number "processor number on which to run"
-{
-0:* :: "this thorn is a no-op on all processors *except* this one"
-} 0
+### *** this doesn't work ***
+### if we are in a multiprocessor run, AHFinderDirect will be a no-op
+### on all processors with CCTK_MyProc() != this parameter
+##int processor_number "processor number on which to run"
+##{
+##0:* :: "this thorn is a no-op on all processors *except* this one"
+##} 0
boolean find_AHs_at_postinitial \
"should we try to find apparent horizons at CCTK_POSTINITIAL?"
@@ -425,7 +426,7 @@ real origin_z[5] "global z coordinate of patch system origin"
# but don't work yet for apparent horizon finding
# (the Jacobian computation doesn't yet grok the nonlocal rotation BCs).
#
-keyword patch_system_type "what type of patch system should we use?"
+keyword patch_system_type[5] "what type of patch system should we use?"
{
# choose this for normal use
"match Cactus grid symmetry" :: \
@@ -545,12 +546,12 @@ keyword integral_method "how do we compute integrals over the horizon?"
keyword geometry_method "how do we compute the slice's geometry?"
{
-# this would be for normal use, but it doesn't work yet :( :( :(
+# this is for normal use
"globally interpolate from Cactus grid" :: \
"interpolate gij and Kij from global Cactus grid \
using CCTK_InterpGridArrays() global interpolator API"
-# use this for now
+# for testing/debugging
"locally interpolate from Cactus grid" :: \
"interpolate gij and Kij from local Cactus grid on this processor \
using CCTK_InterpLocalUniform() localinterpolator API"
@@ -558,7 +559,7 @@ keyword geometry_method "how do we compute the slice's geometry?"
# for testing/debugging
"Schwarzschild/EF" :: \
"hard-wire to Schwarzschild spacetime / Eddington-Finkelstein slice"
-} "locally interpolate from Cactus grid"
+} "globally interpolate from Cactus grid"
########################################
@@ -710,7 +711,7 @@ string interpatch_interpolator_pars \
#
# n.b. Schwarzschild/EF is the special case spin=0 of Kerr/Kerr
-keyword initial_guess_method \
+keyword initial_guess_method[5] \
"method used to set up initial guess for apparent horizon shape"
{
"read from file" :: "read from input file"
diff --git a/src/driver/Newton.cc b/src/driver/Newton.cc
index f13a40e..1127c25 100644
--- a/src/driver/Newton.cc
+++ b/src/driver/Newton.cc
@@ -12,8 +12,6 @@
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/driver.hh b/src/driver/driver.hh
index 9cd0d1f..149fa0d 100644
--- a/src/driver/driver.hh
+++ b/src/driver/driver.hh
@@ -211,10 +211,9 @@ struct state
int N_horizons;
- // this vector is of size N_horizons+1,
- // and is indexed with a "horizon number" hn
- // which is (hopefully) always in the range 1 <= hn <= N_horizons
- vector<AH_info *> AH_info_ptrs;
+ // --> array of size N_horizons+1,
+ // indexed with "horizon number" hn (should be in range [1,N_horizons]
+ AH_info* AH_info_array;
};
//******************************************************************************
diff --git a/src/driver/find_horizons.cc b/src/driver/find_horizons.cc
index c8afd32..b5db69d 100644
--- a/src/driver/find_horizons.cc
+++ b/src/driver/find_horizons.cc
@@ -26,8 +26,6 @@
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
@@ -157,7 +155,7 @@ if (state.gi.geometry_method == geometry__local_interp_from_Cactus_grid)
for (int hn = 1 ; hn <= state.N_horizons ; ++hn)
{
- struct AH_info& AH_info = * state.AH_info_ptrs[hn];
+ struct AH_info& AH_info = state.AH_info_array[hn];
patch_system& ps = *AH_info.ps_ptr;
//
diff --git a/src/driver/initial_guess.cc b/src/driver/initial_guess.cc
index eafadaf..a58617b 100644
--- a/src/driver/initial_guess.cc
+++ b/src/driver/initial_guess.cc
@@ -12,14 +12,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
+#include <string.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/io.cc b/src/driver/io.cc
index a557257..cc6be75 100644
--- a/src/driver/io.cc
+++ b/src/driver/io.cc
@@ -16,14 +16,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
+#include <string.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/setup.cc b/src/driver/setup.cc
index 9a923ff..aabc9ae 100644
--- a/src/driver/setup.cc
+++ b/src/driver/setup.cc
@@ -16,14 +16,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
+#include <string.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
@@ -273,24 +272,21 @@ if (interp_param_table_handle < 0)
"AHFinderDirect_setup(): bad interpatch-interpolator parameter(s) \"%s\"!",
interpatch_interpolator_pars); /*NOTREACHED*/
-const bool ps_type_from_Cactus_grid_sym
- = STRING_EQUAL(patch_system_type, "match Cactus grid symmetry");
-
-// we don't use the [0] array element
-state.AH_info_ptrs.push_back(NULL);
+// horizon numbers run from 1 to N_horizons; we don't use horizon number hn=0
+state.AH_info_array = new AH_info[N_horizons+1];
for (int hn = 1 ; hn <= N_horizons ; ++hn)
{
+ struct AH_info& AH_info = state.AH_info_array[hn];
+
if (verbose_info.print_algorithm_highlights)
then CCTK_VInfo(CCTK_THORNSTRING,
" setting up data structures for horizon %d/%d",
hn, int(N_horizons));
- struct AH_info* AH_ptr = new AH_info;
-
// decide what type of patch system this one should be
const enum patch_system::patch_system_type ps_type
- = ps_type_from_Cactus_grid_sym
+ = STRING_EQUAL(patch_system_type[hn], "match Cactus grid symmetry")
? // choose a patch system type based on grid:: parameters
// ... we inherit from grid, and we ask for some of its
// parameters in our param.ccl file; these appear as
@@ -303,7 +299,7 @@ state.AH_info_ptrs.push_back(NULL);
origin_x[hn],
origin_y[hn],
origin_z[hn])
- : patch_system::type_of_name(patch_system_type);
+ : patch_system::type_of_name(patch_system_type[hn]);
// create the patch system
patch_system& ps
@@ -316,14 +312,14 @@ state.AH_info_ptrs.push_back(NULL);
gfns::ghosted_min_gfn, gfns::ghosted_max_gfn,
interp_handle, interp_param_table_handle,
true, verbose_info.print_algorithm_details);
- AH_ptr->ps_ptr = &ps;
+ AH_info.ps_ptr = &ps;
ps.set_gridfn_to_constant(1.0, gfns::gfn__one);
// create the Jacobian matrix
if (verbose_info.print_algorithm_details)
then CCTK_VInfo(CCTK_THORNSTRING,
" constructing Jacobian matrix");
- AH_ptr->Jac_ptr = (state.method == method__evaluate_expansion)
+ AH_info.Jac_ptr = (state.method == method__evaluate_expansion)
? NULL // no Jacobian used for this case
: &new_Jacobian(ps, Jac_info.Jacobian_storage_method);
@@ -332,69 +328,67 @@ state.AH_info_ptrs.push_back(NULL);
" setting initial guess parameters etc");
// store the initial guess parameters
- AH_ptr->initial_guess_info.method
- = decode_initial_guess_method(initial_guess_method);
+ AH_info.initial_guess_info.method
+ = decode_initial_guess_method(initial_guess_method[hn]);
// ... Kerr/Kerr
- AH_ptr->initial_guess_info.Kerr_Kerr_info.x_posn
+ AH_info.initial_guess_info.Kerr_Kerr_info.x_posn
= initial_guess__Kerr_Kerr__x_posn[hn];
- AH_ptr->initial_guess_info.Kerr_Kerr_info.y_posn
+ AH_info.initial_guess_info.Kerr_Kerr_info.y_posn
= initial_guess__Kerr_Kerr__y_posn[hn];
- AH_ptr->initial_guess_info.Kerr_Kerr_info.z_posn
+ AH_info.initial_guess_info.Kerr_Kerr_info.z_posn
= initial_guess__Kerr_Kerr__z_posn[hn];
- AH_ptr->initial_guess_info.Kerr_Kerr_info.mass
+ AH_info.initial_guess_info.Kerr_Kerr_info.mass
= initial_guess__Kerr_Kerr__mass[hn];
- AH_ptr->initial_guess_info.Kerr_Kerr_info.spin
+ AH_info.initial_guess_info.Kerr_Kerr_info.spin
= initial_guess__Kerr_Kerr__spin[hn];
// ... Kerr/Kerr-Schild
- AH_ptr->initial_guess_info.Kerr_KerrSchild_info.x_posn
+ AH_info.initial_guess_info.Kerr_KerrSchild_info.x_posn
= initial_guess__Kerr_KerrSchild__x_posn[hn];
- AH_ptr->initial_guess_info.Kerr_KerrSchild_info.y_posn
+ AH_info.initial_guess_info.Kerr_KerrSchild_info.y_posn
= initial_guess__Kerr_KerrSchild__y_posn[hn];
- AH_ptr->initial_guess_info.Kerr_KerrSchild_info.z_posn
+ AH_info.initial_guess_info.Kerr_KerrSchild_info.z_posn
= initial_guess__Kerr_KerrSchild__z_posn[hn];
- AH_ptr->initial_guess_info.Kerr_KerrSchild_info.mass
+ AH_info.initial_guess_info.Kerr_KerrSchild_info.mass
= initial_guess__Kerr_KerrSchild__mass[hn];
- AH_ptr->initial_guess_info.Kerr_KerrSchild_info.spin
+ AH_info.initial_guess_info.Kerr_KerrSchild_info.spin
= initial_guess__Kerr_KerrSchild__spin[hn];
// ... coordinate sphere
- AH_ptr->initial_guess_info.coord_sphere_info.x_center
+ AH_info.initial_guess_info.coord_sphere_info.x_center
= initial_guess__coord_sphere__x_center[hn];
- AH_ptr->initial_guess_info.coord_sphere_info.y_center
+ AH_info.initial_guess_info.coord_sphere_info.y_center
= initial_guess__coord_sphere__y_center[hn];
- AH_ptr->initial_guess_info.coord_sphere_info.z_center
+ AH_info.initial_guess_info.coord_sphere_info.z_center
= initial_guess__coord_sphere__z_center[hn];
- AH_ptr->initial_guess_info.coord_sphere_info.radius
+ AH_info.initial_guess_info.coord_sphere_info.radius
= initial_guess__coord_sphere__radius[hn];
// ... coordinate ellipsoid
- AH_ptr->initial_guess_info.coord_ellipsoid_info.x_center
+ AH_info.initial_guess_info.coord_ellipsoid_info.x_center
= initial_guess__coord_ellipsoid__x_center[hn];
- AH_ptr->initial_guess_info.coord_ellipsoid_info.y_center
+ AH_info.initial_guess_info.coord_ellipsoid_info.y_center
= initial_guess__coord_ellipsoid__y_center[hn];
- AH_ptr->initial_guess_info.coord_ellipsoid_info.z_center
+ AH_info.initial_guess_info.coord_ellipsoid_info.z_center
= initial_guess__coord_ellipsoid__z_center[hn];
- AH_ptr->initial_guess_info.coord_ellipsoid_info.x_radius
+ AH_info.initial_guess_info.coord_ellipsoid_info.x_radius
= initial_guess__coord_ellipsoid__x_radius[hn];
- AH_ptr->initial_guess_info.coord_ellipsoid_info.y_radius
+ AH_info.initial_guess_info.coord_ellipsoid_info.y_radius
= initial_guess__coord_ellipsoid__y_radius[hn];
- AH_ptr->initial_guess_info.coord_ellipsoid_info.z_radius
+ AH_info.initial_guess_info.coord_ellipsoid_info.z_radius
= initial_guess__coord_ellipsoid__z_radius[hn];
// initialize the BH diagnostics
- AH_ptr->AH_found = false;
- AH_ptr->BH_diagnostics.centroid_x = 0.0;
- AH_ptr->BH_diagnostics.centroid_y = 0.0;
- AH_ptr->BH_diagnostics.centroid_z = 0.0;
- AH_ptr->BH_diagnostics.area = 0.0;
- AH_ptr->BH_diagnostics.m_irreducible = 0.0;
+ AH_info.AH_found = false;
+ AH_info.BH_diagnostics.centroid_x = 0.0;
+ AH_info.BH_diagnostics.centroid_y = 0.0;
+ AH_info.BH_diagnostics.centroid_z = 0.0;
+ AH_info.BH_diagnostics.area = 0.0;
+ AH_info.BH_diagnostics.m_irreducible = 0.0;
// set up the BH-diagnostics output files?
- AH_ptr->BH_diagnostics_fileptr
+ AH_info.BH_diagnostics_fileptr
= ( output_BH_diagnostics
&& (state.method == method__find_horizon) )
? setup_BH_diagnostics_output_file(IO_info, hn, N_horizons)
: NULL;
-
- state.AH_info_ptrs.push_back(AH_ptr);
}
}
diff --git a/src/driver/state.cc b/src/driver/state.cc
index 20b5e0c..77dc1f2 100644
--- a/src/driver/state.cc
+++ b/src/driver/state.cc
@@ -10,8 +10,6 @@
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/elliptic/Jacobian.cc b/src/elliptic/Jacobian.cc
index 83b0a0e..4ac18c3 100644
--- a/src/elliptic/Jacobian.cc
+++ b/src/elliptic/Jacobian.cc
@@ -21,13 +21,12 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
+#include <string.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/Schwarzschild_EF.cc b/src/gr/Schwarzschild_EF.cc
index 72fad0b..80869a4 100644
--- a/src/gr/Schwarzschild_EF.cc
+++ b/src/gr/Schwarzschild_EF.cc
@@ -18,8 +18,6 @@
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/expansion.cc b/src/gr/expansion.cc
index f2b5961..5e3e42b 100644
--- a/src/gr/expansion.cc
+++ b/src/gr/expansion.cc
@@ -22,8 +22,6 @@
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/expansion_Jacobian.cc b/src/gr/expansion_Jacobian.cc
index 40103ef..a843e4e 100644
--- a/src/gr/expansion_Jacobian.cc
+++ b/src/gr/expansion_Jacobian.cc
@@ -19,8 +19,6 @@
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/misc.cc b/src/gr/misc.cc
index 58ab640..28cdfbd 100644
--- a/src/gr/misc.cc
+++ b/src/gr/misc.cc
@@ -9,13 +9,12 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
+#include <string.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc
index 1b3ee83..e6d729f 100644
--- a/src/patch/patch_system.cc
+++ b/src/patch/patch_system.cc
@@ -60,8 +60,6 @@
#include "cctk.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
@@ -130,9 +128,9 @@ patch_system::patch_system(fp origin_x_in, fp origin_y_in, fp origin_z_in,
: global_coords_(origin_x_in, origin_y_in, origin_z_in),
type_(type_in),
N_patches_(N_patches_of_type(type_in)),
- all_patches_(N_patches_),
- starting_gpn_(N_patches_+1),
- ghosted_starting_gpn_(N_patches_+1),
+ all_patches_(new patch*[N_patches_]),
+ starting_gpn_(new int[N_patches_+1]),
+ ghosted_starting_gpn_(new int[N_patches_+1]),
gridfn_storage_(NULL), // set in setup_gridfn_storage()
ghosted_gridfn_storage_(NULL) // set in setup_gridfn_storage()
{
@@ -141,7 +139,7 @@ if (! jtutil::is_odd(patch_overlap_width))
"***** patch_system::patch_system(): implementation restriction:\n"
" patch_overlap_width=%d, but we only support odd values!\n"
,
- patch_overlap_width); /*NOTREACHED*/
+ patch_overlap_width); /*NOTREACHED*/
const int patch_extend_width = patch_overlap_width >> 1;
if (ghost_zone_width < fd_grid::molecule_radius())
@@ -280,8 +278,11 @@ default:
//
patch_system::~patch_system()
{
-delete ghosted_gridfn_storage_;
-delete gridfn_storage_;
+delete[] ghosted_gridfn_storage_;
+delete[] gridfn_storage_;
+delete[] ghosted_starting_gpn_;
+delete[] starting_gpn_;
+delete[] all_patches_;
for (int pn = N_patches()-1 ; pn >= 0 ; --pn)
{
diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh
index 24e61de..99bead8 100644
--- a/src/patch/patch_system.hh
+++ b/src/patch/patch_system.hh
@@ -559,13 +559,17 @@ private:
int N_grid_points_, ghosted_N_grid_points_;
// [pn] = --> individual patches
- vector<patch *> all_patches_;
+ // *** constructor initialization list ordering:
+ // *** this must be declared after N_patches_
+ patch** all_patches_;
// [pn] = starting grid point number of individual patches
// ... arrays are actually of size N_patches_+1, the [N_patches_]
// entries are == N_grid_points_ and ghosted_N_grid_points_
- vector<int> starting_gpn_;
- vector<int> ghosted_starting_gpn_;
+ // *** constructor initialization list ordering:
+ // *** these must be declared after N_patches_
+ int* starting_gpn_;
+ int* ghosted_starting_gpn_;
// pointers to storage blocks for all gridfns
// ... patches point into these, but we own the storage blocks
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index 1aa0917..2f65378 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -35,8 +35,6 @@
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "stl_vector.hh"
-
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"