diff options
Diffstat (limited to 'src/patch/patch_system.cc')
-rw-r--r-- | src/patch/patch_system.cc | 17 |
1 files changed, 9 insertions, 8 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) { |