diff --git a/addnoise/addnoise.cpp b/addnoise/addnoise.cpp index 92476a0..535657a 100644 --- a/addnoise/addnoise.cpp +++ b/addnoise/addnoise.cpp @@ -55,7 +55,7 @@ int ADDNOSIE::Addnoise(std::string infilename, std::string outfilename, int orde int data_num = in_data_.size(); double tmp_dou; gctl::array noises(data_num); - noises.random_float(noise_mean_, noise_dev_); + random_float(noises, noise_mean_, noise_dev_); for (int i = 0; i < data_num; i++) { tmp_dou = in_data_.at(i).at(order) + noises.at(i); diff --git a/cutprofile/cutprofile.h b/cutprofile/cutprofile.h index b037451..3dfe743 100644 --- a/cutprofile/cutprofile.h +++ b/cutprofile/cutprofile.h @@ -30,7 +30,7 @@ #include "gctl/core.h" #include "gctl/utility.h" -#include "gctl/algorithms.h" +#include "gctl/math.h" struct node { diff --git a/fractopo/FractalTopo.h b/fractopo/FractalTopo.h index d15ae17..e5b566d 100644 --- a/fractopo/FractalTopo.h +++ b/fractopo/FractalTopo.h @@ -45,8 +45,8 @@ #include "gctl/core.h" #include "gctl/utility.h" -#include "gctl/geometry.h" -#include "gctl/algorithms.h" +#include "gctl/poly.h" +#include "gctl/math.h" using namespace std; diff --git a/handyman/handyman.cpp b/handyman/handyman.cpp index fc5b0cb..b5165e7 100644 --- a/handyman/handyman.cpp +++ b/handyman/handyman.cpp @@ -26,9 +26,10 @@ ******************************************************/ #include "gctl/core.h" -#include "gctl/geometry.h" +#include "gctl/poly.h" #include "gctl/io.h" #include "gctl/utility.h" +#include "gctl/math.h" class HandyMan { @@ -353,7 +354,7 @@ void HandyMan::SR_GeoAngle() std::cin >> c[i].lon >> c[i].lat; } - std::cout << "The geo-centric angle is: " << gctl::geometry3d::angle(c[0].s2c(), c[1].s2c())*180.0/M_PI << " deg.\n"; + std::cout << "The geo-centric angle is: " << gctl::geometry3d::angle(s2c(c[0]), s2c(c[1]))*180.0/M_PI << " deg.\n"; return; } diff --git a/lbsi/lbsi.h b/lbsi/lbsi.h index 03af5e2..9a4aae3 100644 --- a/lbsi/lbsi.h +++ b/lbsi/lbsi.h @@ -29,9 +29,10 @@ //#include "lcg/solver.h" // GCTL library #include "gctl/core.h" -#include "gctl/geometry.h" +#include "gctl/poly.h" #include "gctl/io.h" #include "gctl/utility.h" +#include "gctl/math.h" #include "gctl/optimization.h" #if defined _WINDOWS || __WIN32__ @@ -200,7 +201,7 @@ void LBSI::Routine(std::string in_name, std::string tar_name, { bar.progressed(i); - Kernel.assign_all(0.0); + Kernel.assign(0.0); CalKernel(TargNodes[i]); for (size_t s = 0; s < ValSize; s++) diff --git a/lki/lki.h b/lki/lki.h index 6d7ba0b..6081e3b 100644 --- a/lki/lki.h +++ b/lki/lki.h @@ -29,8 +29,8 @@ //#include "lcg/solver.h" // GCTL library #include "gctl/core.h" -#include "gctl/algorithms.h" -#include "gctl/geometry.h" +#include "gctl/math.h" +#include "gctl/poly.h" #include "gctl/io.h" #include "gctl/utility.h" #include "gctl/optimization.h" @@ -185,7 +185,7 @@ void LKI::Routine(std::string inname, std::string tarname, std::string outname, { bar.progressed(i); - Kernel.assign_all(0.0); + Kernel.assign(0.0); Wgts.assign(0.0); CalKernel(TargNodes[i]); diff --git a/ncget/ncget.cpp b/ncget/ncget.cpp index 2a0939e..a84b502 100644 --- a/ncget/ncget.cpp +++ b/ncget/ncget.cpp @@ -65,7 +65,7 @@ Please see instructions or contact the author for more information."); gctl::read_netcdf_axis(in_name, out_x, x_name); gctl::read_netcdf_axis(in_name, out_y, y_name); gctl::read_netcdf_grid(in_name, out_data, x_name, y_name, data_name); - gctl::save_netcdf_grid(out_name, out_data, out_x, out_y, x_name, y_name, data_name, zmin, zmax); + gctl::save_netcdf_grid(out_name, out_data, out_x, out_y, gctl::BtmLeft, x_name, y_name, data_name, zmin, zmax); return 0; } catch(std::exception &e) diff --git a/shc2xyz/func.h b/shc2xyz/func.h index b5e5ac5..a312004 100644 --- a/shc2xyz/func.h +++ b/shc2xyz/func.h @@ -31,7 +31,7 @@ // add gctl head files #include "gctl/core.h" #include "gctl/utility.h" -#include "gctl/algorithms.h" +#include "gctl/math.h" #include "gctl/io.h" #define NORMAL_GRAVITY 9.80665 // m/s^2 diff --git a/slbsi/slbsi.h b/slbsi/slbsi.h index c8592e0..862e4ff 100644 --- a/slbsi/slbsi.h +++ b/slbsi/slbsi.h @@ -29,9 +29,10 @@ //#include "lcg/solver.h" // GCTL library #include "gctl/core.h" -#include "gctl/geometry.h" +#include "gctl/poly.h" #include "gctl/io.h" #include "gctl/utility.h" +#include "gctl/math.h" #include "gctl/optimization.h" #if defined _WINDOWS || __WIN32__ @@ -186,7 +187,7 @@ void LBSI::Routine(std::string in_name, std::string tar_name, { bar.progressed(i); - Kernel.assign_all(0.0); + Kernel.assign(0.0); CalKernel(TargNodes[i]); for (size_t s = 0; s < ValSize; s++) diff --git a/sph2plane/sph2plane.cpp b/sph2plane/sph2plane.cpp index ac4b1fe..48d303b 100644 --- a/sph2plane/sph2plane.cpp +++ b/sph2plane/sph2plane.cpp @@ -28,6 +28,7 @@ #include "gctl/core.h" #include "gctl/io.h" #include "gctl/utility.h" +#include "gctl/math.h" int main(int argc, char *argv[]) try { diff --git a/trackline/trackline.h b/trackline/trackline.h index ce0688d..9fdaff5 100644 --- a/trackline/trackline.h +++ b/trackline/trackline.h @@ -47,7 +47,7 @@ #include "gctl/core.h" #include "gctl/utility.h" -#include "gctl/algorithms.h" +#include "gctl/math.h" #include "gctl/io.h" using namespace std; diff --git a/xyz2nc/xyz2nc.cpp b/xyz2nc/xyz2nc.cpp index acaf507..b7d61fb 100644 --- a/xyz2nc/xyz2nc.cpp +++ b/xyz2nc/xyz2nc.cpp @@ -266,7 +266,7 @@ Please see instructions or contact the author for more information."); } gctl::save_netcdf_grid(grid_name, out_data, xnum, ynum, xmin, dx, ymin, dy, - label_index[0], label_index[1], label_index[2]); + gctl::BtmLeft, label_index[0], label_index[1], label_index[2]); std::string save_dataname; if (col_index.size() > 1) @@ -302,7 +302,7 @@ Please see instructions or contact the author for more information."); } gctl::save_netcdf_grid(grid_name, out_data, xnum, ynum, xmin, dx, ymin, dy, - label_index[0], label_index[1], label_index[2]); + gctl::BtmLeft, label_index[0], label_index[1], label_index[2]); std::string save_dataname; if (col_index.size() > 3) diff --git a/xyz2sph/xyz2sph.cpp b/xyz2sph/xyz2sph.cpp index 73745d6..781ef30 100644 --- a/xyz2sph/xyz2sph.cpp +++ b/xyz2sph/xyz2sph.cpp @@ -28,6 +28,7 @@ #include "gctl/core.h" #include "gctl/io.h" #include "gctl/utility.h" +#include "gctl/math.h" int main(int argc, char *argv[]) try { @@ -134,11 +135,11 @@ The inputting continues until encounter a blank line or 'EOF'. Any lines start w throw err_str; } - ps = pc.c2s(); + ps = c2s(pc); if (ref_str != "NULL") { ps.rad = gctl::ellipse_radius_2d(ref_R, ref_r, ps.lat*GCTL_Pi/180.0); - pc = ps.s2c(); + pc = s2c(ps); } if (verbose) std::cout << std::setprecision(pre_int) << pc.x << "," << pc.y << "," << pc.z << ","; @@ -163,7 +164,7 @@ The inputting continues until encounter a blank line or 'EOF'. Any lines start w { ps.rad = gctl::ellipse_radius_2d(ref_R, ref_r, ps.lat*GCTL_Pi/180.0); } - pc = ps.s2c(); + pc = s2c(ps); if (verbose) std::cout << std::setprecision(pre_int) << ps.rad << "," << ps.lon << "," << ps.lat << ","; std::cout << std::setprecision(pre_int) << pc.x << "," << pc.y << "," << pc.z << std::endl;