// patch_info.hh -- POD struct of minimal info varying from one patch to another // $Header$ // // prerequisites: // // // // "../jtutil/util.hh" // "../jtutil//array.hh" // "../jtutil/linear_map.hh" // "coords.hh" // "grid.hh" // //***************************************************************************** // // This (POD, and hence static-initializable) struct gives a minimal // set of information which varies from one patch to another. // // The member functions allow a patch to be constructed from this struct // together with the additional information provided by their arguments. // This doesn't allow the most general possible type of patch (eg it // constrains all ghost zones to have the same width), but does cover // the common casees. // // Arguments for member functions: // N_ghost_points = Width in grid points of all ghost zones. // N_extend_points = Number of grid points to extend each patch past // "just touching" so as to overlap neighboring patches. // Thus patches overlap by // N_overlap_points = 2*N_extend_points + 1 // grid points. For example, with N_extend_points == 2, // here are the grid points of two neighboring patches: // x x x x x X X // | // O O o o o o o // Here | marks the "just touching" boundary, // x and o the grid points before this extension, // and X and O the extra grid points added by this // extension. // delta_drho_dsigma = Grid spacing (both rho and sigma) in degrees. // struct patch_info { const char* name; bool is_plus; char ctype; fp min_drho, max_drho; fp min_dsigma, max_dsigma; // compute and return reference to struct grid_arrays::grid_array_pars // ... result refers to internal static buffer; // the usual caveats about lifetimes/overwriting apply const grid_arrays::grid_array_pars& grid_array_pars(int N_ghost_points, int N_extend_points, fp delta_drho_dsigma) const; // compute and return reference to struct grid::grid_pars // ... result refers to internal static buffer; // the usual caveats about lifetimes/overwriting apply const grid::grid_pars& grid_pars(int N_extend_points, fp delta_drho_dsigma) const; };