aboutsummaryrefslogtreecommitdiff
path: root/src/patch
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-01-16 17:07:08 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-01-16 17:07:08 +0000
commit70dfc183be3fff193d86eefef8c68b3ea1ad5438 (patch)
tree653adf59bbeac0da1cf1e7806d96b8e17bacbaf8 /src/patch
parentccd050da1496ca00845174ffcd4f4eaf22a9b792 (diff)
* change to not use STL vector class any more
(it caused portability problems on platinum) ==> move stl_vector.hh from src/include/ to archive/ directory * convert patch_system_type and initial_guess_method parameters to be array parameters, i.e. they're now set individually for each AH we want to find git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@920 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch')
-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
3 files changed, 16 insertions, 13 deletions
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"