diff options
Diffstat (limited to 'src/patch/grid.hh')
-rw-r--r-- | src/patch/grid.hh | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/patch/grid.hh b/src/patch/grid.hh index 804534f..a8220f4 100644 --- a/src/patch/grid.hh +++ b/src/patch/grid.hh @@ -94,9 +94,9 @@ public: static const bool side_is_sigma = false; // human-readable names for the sides (for debugging) - static const char *minmax_name(bool minmax) + static const char* minmax_name(bool minmax) { return minmax ? "min" : "max"; } - static const char *iang_name(bool want_rho) + static const char* iang_name(bool want_rho) { return want_rho ? "irho" : "isigma"; } @@ -406,7 +406,7 @@ public: // gridfn storage will be automatically allocated // if pointer is NULL; any 0 strides are automatically // set to C-style row-major subscripting - fp *storage_array; + fp* storage_array; int gfn_stride, irho_stride, isigma_stride; }; @@ -437,8 +437,8 @@ private: // n.b. these pointers are *first* data member in this class // ==> possibly slightly faster access (0 offset from pointer) // ... indices are (gfn, irho, isigma) - jtutil::array3d<fp> *gridfn_data_; - jtutil::array3d<fp> *ghosted_gridfn_data_; + jtutil::array3d<fp>* gridfn_data_; + jtutil::array3d<fp>* ghosted_gridfn_data_; // gfn bounds const int min_gfn_, max_gfn_; @@ -479,9 +479,9 @@ class grid public: // direct (read-only) access to the underlying linear_map objects // ... useful for (eg) passing to interpolators - const linear_map<fp>& rho_map() const { return rho_map_; } - const linear_map<fp>& sigma_map() const { return sigma_map_; } - const linear_map<fp>& ang_map(bool want_rho) const + const jtutil::linear_map<fp>& rho_map() const { return rho_map_; } + const jtutil::linear_map<fp>& sigma_map() const { return sigma_map_; } + const jtutil::linear_map<fp>& ang_map(bool want_rho) const { return want_rho ? rho_map() : sigma_map(); } @@ -501,14 +501,14 @@ public: fp fp_irho_of_rho(fp rho) const { return rho_map().fp_int_of_fp(rho); } - int irho_of_rho(fp rho, linear_map<fp>::noninteger_action - nia = linear_map<fp>::error) + int irho_of_rho(fp rho, jtutil::linear_map<fp>::noninteger_action + nia = jtutil::linear_map<fp>::error) const { return rho_map().int_of_fp(rho, nia); } fp fp_isigma_of_sigma(fp sigma) const { return sigma_map().fp_int_of_fp(sigma); } - int isigma_of_sigma(fp sigma, linear_map<fp>::noninteger_action - nia = linear_map<fp>::error) + int isigma_of_sigma(fp sigma, jtutil::linear_map<fp>::noninteger_action + nia = jtutil::linear_map<fp>::error) const { return sigma_map().int_of_fp(sigma, nia); } fp fp_iang_of_ang(bool want_rho, fp ang) @@ -518,8 +518,8 @@ public: : fp_isigma_of_sigma(ang); } int iang_of_ang(bool want_rho, - fp ang, linear_map<fp>::noninteger_action - nia = linear_map<fp>::error) + fp ang, jtutil::linear_map<fp>::noninteger_action + nia = jtutil::linear_map<fp>::error) const { return want_rho ? irho_of_rho(ang, nia) @@ -532,12 +532,13 @@ public: fp dsigma_of_isigma(int isigma) const { return jtutil::degrees_of_radians(sigma_of_isigma(isigma)); } - int irho_of_drho(fp drho, linear_map<fp>::noninteger_action - nia = linear_map<fp>::error) + int irho_of_drho(fp drho, jtutil::linear_map<fp>::noninteger_action + nia = jtutil::linear_map<fp>::error) const { return irho_of_rho(jtutil::radians_of_degrees(drho), nia); } - int isigma_of_dsigma(fp dsigma, linear_map<fp>::noninteger_action - nia = linear_map<fp>::error) + int isigma_of_dsigma(fp dsigma, + jtutil::linear_map<fp>::noninteger_action + nia = jtutil::linear_map<fp>::error) const { return isigma_of_sigma(jtutil::radians_of_degrees(dsigma), nia); @@ -622,9 +623,9 @@ public: // public: // human-readable names for the sides (for debugging) - static const char *ang_name(bool want_rho) + static const char* ang_name(bool want_rho) { return want_rho ? "rho" : "sigma"; } - static const char *dang_name(bool want_rho) + static const char* dang_name(bool want_rho) { return want_rho ? "drho" : "dsigma"; } @@ -657,7 +658,7 @@ private: private: // range of these is the full grid (including ghost zones) - const linear_map<fp> rho_map_, sigma_map_; + const jtutil::linear_map<fp> rho_map_, sigma_map_; // angular boundaries of nominal grid const fp min_rho_, max_rho_; |