diff options
Diffstat (limited to 'src/patch/patch_system.hh')
-rw-r--r-- | src/patch/patch_system.hh | 58 |
1 files changed, 44 insertions, 14 deletions
diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh index 5688d48..75ca8cc 100644 --- a/src/patch/patch_system.hh +++ b/src/patch/patch_system.hh @@ -43,6 +43,7 @@ class patch_system // public: // what patch-system type are supported? + // (see "patch_system_info.hh" for detailed descriptions of these) enum patch_system_type { full_sphere_patch_system, plus_z_hemisphere_patch_system, @@ -52,7 +53,8 @@ public: }; // maximum number of patches in any patch-system type - static const int max_N_patches = 6; + static + const int max_N_patches = 6; // decode patch system type into N_patches static @@ -102,7 +104,9 @@ public: int N_patches() const { return N_patches_; } // get patches by patch number - patch &ith_patch(int pn) const + const patch &ith_patch(int pn) const + { return * all_patches_[pn]; } + patch &ith_patch(int pn) { return * all_patches_[pn]; } // find a patch by name, return patch number; error_exit() if not found @@ -241,6 +245,9 @@ private: // ***** gridfn operations ***** // public: + // dst = a + void set_gridfn_to_constant(fp a, int dst_gfn); + // dst = src void gridfn_copy(int src_gfn, int dst_gfn); @@ -248,8 +255,21 @@ public: void add_to_ghosted_gridfn(fp delta, int ghosted_dst_gfn); // compute norms of gridfn - void gridfn_norms(int src_gfn, jtutil::norm<fp>& norms); - void ghosted_gridfn_norms(int ghosted_src_gfn, jtutil::norm<fp>& norms); + void gridfn_norms(int src_gfn, jtutil::norm<fp>& norms) + const; + void ghosted_gridfn_norms(int ghosted_src_gfn, jtutil::norm<fp>& norms) + const; + + // integrate a gridfn: computes an approximation to the surface + // integral over the whole patch system + // area_weighting_flag ? $\int f(\rho,\sigma) \, dA$ + // : $\int f(\rho,\sigma) \, d\rho \, d\sigma$ + // where $dA$ is the area element in $(\rho,sigma)$ coordinates + // ... integration method selected by method argument + fp integrate_gridfn(int src_gfn, + bool area_weighting_flag, + enum patch::integration_method method) + const; // @@ -353,9 +373,11 @@ public: } // ... n.b. we return patch as a reference via the function result; // an alternative would be to have a patch*& argument - patch& patch_irho_isigma_of_gpn(int gpn, int& irho, int& isigma) + const patch& + patch_irho_isigma_of_gpn(int gpn, int& irho, int& isigma) const; - patch& ghosted_patch_irho_isigma_of_gpn(int gpn, int& irho, int& isigma) + const patch& + ghosted_patch_irho_isigma_of_gpn(int gpn, int& irho, int& isigma) const; // access actual gridfn data arrays @@ -387,7 +409,8 @@ public: fp delta_drho_dsigma, int min_gfn_in, int max_gfn_in, int ghosted_min_gfn_in, int ghosted_max_gfn_in, - int interp_handle_in, int interp_par_table_handle_in); + int interp_handle_in, int interp_par_table_handle_in, + bool print_msg_flag); ~patch_system(); @@ -401,29 +424,36 @@ private: // does *NOT* set up gridfns void create_patches(const struct patch_info patch_info_in[], int N_ghost_points, int N_extend_points, - fp delta_drho_dsigma); + fp delta_drho_dsigma, + bool print_msg_flag); // setup all gridfns with contiguous-across-patches storage void setup_gridfn_storage (int min_gfn_in, int max_gfn_in, - int ghosted_min_gfn_in, int ghosted_max_gfn_in); + int ghosted_min_gfn_in, int ghosted_max_gfn_in, + bool print_msg_flag); // create/interlink ghost zones void interlink_full_sphere_patch_system (int N_overlap_points, - int interp_handle, int interp_par_table_handle); + int interp_handle, int interp_par_table_handle, + bool print_msg_flag); void interlink_plus_z_hemisphere_patch_system (int N_overlap_points, - int interp_handle, int interp_par_table_handle); + int interp_handle, int interp_par_table_handle, + bool print_msg_flag); void interlink_plus_xy_quadrant_patch_system (int N_overlap_points, - int interp_handle, int interp_par_table_handle); + int interp_handle, int interp_par_table_handle, + bool print_msg_flag); void interlink_plus_xz_quadrant_patch_system (int N_overlap_points, - int interp_handle, int interp_par_table_handle); + int interp_handle, int interp_par_table_handle, + bool print_msg_flag); void interlink_plus_xyz_octant_patch_system (int N_overlap_points, - int interp_handle, int interp_par_table_handle); + int interp_handle, int interp_par_table_handle, + bool print_msg_flag); // create/interlink a pair of periodic-symmetry ghost zones static |