tmp
This commit is contained in:
parent
613c73c812
commit
3377641ee3
@ -1,6 +1,11 @@
|
|||||||
cmake_minimum_required(VERSION 3.15.2)
|
cmake_minimum_required(VERSION 3.15.2)
|
||||||
|
|
||||||
project(GCTL_TOOLKITS VERSION 1.0)
|
project(GCTL_TOOLKITS VERSION 2.0)
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
|
# ExprTK库在macOS 15.4中编译会有错误 添加以下命令对应检查项
|
||||||
|
add_compile_options(-Wno-missing-template-arg-list-after-template-kw)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(GCTL REQUIRED)
|
find_package(GCTL REQUIRED)
|
||||||
find_package(GCTL_MESH REQUIRED)
|
find_package(GCTL_MESH REQUIRED)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
#include "gctl/algorithms.h"
|
#include "gctl/math.h"
|
||||||
|
|
||||||
struct node
|
struct node
|
||||||
{
|
{
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
|
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
#include "gctl/geometry.h"
|
#include "gctl/poly.h"
|
||||||
#include "gctl/algorithms.h"
|
#include "gctl/math.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -26,9 +26,10 @@
|
|||||||
******************************************************/
|
******************************************************/
|
||||||
|
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/geometry.h"
|
#include "gctl/poly.h"
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
|
#include "gctl/math/geometry3d.h"
|
||||||
|
|
||||||
class HandyMan
|
class HandyMan
|
||||||
{
|
{
|
||||||
@ -353,7 +354,7 @@ void HandyMan::SR_GeoAngle()
|
|||||||
std::cin >> c[i].lon >> c[i].lat;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,10 @@
|
|||||||
//#include "lcg/solver.h"
|
//#include "lcg/solver.h"
|
||||||
// GCTL library
|
// GCTL library
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/geometry.h"
|
#include "gctl/poly.h"
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
|
#include "gctl/math/boxsort2d.h"
|
||||||
#include "gctl/optimization.h"
|
#include "gctl/optimization.h"
|
||||||
|
|
||||||
#if defined _WINDOWS || __WIN32__
|
#if defined _WINDOWS || __WIN32__
|
||||||
|
@ -29,10 +29,11 @@
|
|||||||
//#include "lcg/solver.h"
|
//#include "lcg/solver.h"
|
||||||
// GCTL library
|
// GCTL library
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/algorithms.h"
|
#include "gctl/poly.h"
|
||||||
#include "gctl/geometry.h"
|
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
|
#include "gctl/math/boxsort2d.h"
|
||||||
|
#include "gctl/math/variogram.h"
|
||||||
#include "gctl/optimization.h"
|
#include "gctl/optimization.h"
|
||||||
|
|
||||||
#if defined _WINDOWS || __WIN32__
|
#if defined _WINDOWS || __WIN32__
|
||||||
|
@ -6,7 +6,7 @@ if [[ $# == 0 || ${1} == "help" ]]; then
|
|||||||
echo "School of Earth Sciences, Zhejiang University"
|
echo "School of Earth Sciences, Zhejiang University"
|
||||||
echo "Yi Zhang (yizhang-geo@zju.edu.cn)"
|
echo "Yi Zhang (yizhang-geo@zju.edu.cn)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: ./installer [option] [Cmake options]"
|
echo "Usage: ./manager.sh [option] [Cmake options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo "(1) configure: Configure Cmake project(s). This option could take extra Cmake options as in <option>=<value>."
|
echo "(1) configure: Configure Cmake project(s). This option could take extra Cmake options as in <option>=<value>."
|
@ -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_x, x_name);
|
||||||
gctl::read_netcdf_axis(in_name, out_y, y_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::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;
|
return 0;
|
||||||
}
|
}
|
||||||
catch(std::exception &e)
|
catch(std::exception &e)
|
||||||
|
@ -31,7 +31,8 @@
|
|||||||
// add gctl head files
|
// add gctl head files
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
#include "gctl/algorithms.h"
|
#include "gctl/math/legendre.h"
|
||||||
|
#include "gctl/math/interpolate.h"
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
|
|
||||||
#define NORMAL_GRAVITY 9.80665 // m/s^2
|
#define NORMAL_GRAVITY 9.80665 // m/s^2
|
||||||
|
@ -29,9 +29,11 @@
|
|||||||
//#include "lcg/solver.h"
|
//#include "lcg/solver.h"
|
||||||
// GCTL library
|
// GCTL library
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/geometry.h"
|
#include "gctl/poly.h"
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
|
#include "gctl/math/boxsort2d.h"
|
||||||
|
#include "gctl/math/boxsort_sph.h"
|
||||||
#include "gctl/optimization.h"
|
#include "gctl/optimization.h"
|
||||||
|
|
||||||
#if defined _WINDOWS || __WIN32__
|
#if defined _WINDOWS || __WIN32__
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
|
#include "gctl/math/refellipsoid.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) try
|
int main(int argc, char *argv[]) try
|
||||||
{
|
{
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
|
|
||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
#include "gctl/algorithms.h"
|
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
|
#include "gctl/math/interpolate.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -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,
|
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;
|
std::string save_dataname;
|
||||||
if (col_index.size() > 1)
|
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,
|
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;
|
std::string save_dataname;
|
||||||
if (col_index.size() > 3)
|
if (col_index.size() > 3)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "gctl/core.h"
|
#include "gctl/core.h"
|
||||||
#include "gctl/io.h"
|
#include "gctl/io.h"
|
||||||
#include "gctl/utility.h"
|
#include "gctl/utility.h"
|
||||||
|
#include "gctl/math/gmath.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) try
|
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;
|
throw err_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
ps = pc.c2s();
|
ps = c2s(pc);
|
||||||
if (ref_str != "NULL")
|
if (ref_str != "NULL")
|
||||||
{
|
{
|
||||||
ps.rad = gctl::ellipse_radius_2d(ref_R, ref_r, ps.lat*GCTL_Pi/180.0);
|
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 << ",";
|
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);
|
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 << ",";
|
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;
|
std::cout << std::setprecision(pre_int) << pc.x << "," << pc.y << "," << pc.z << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user