This commit is contained in:
张壹 2025-05-12 10:41:04 +08:00
parent 613c73c812
commit 3377641ee3
14 changed files with 32 additions and 19 deletions

View File

@ -1,6 +1,11 @@
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")
# ExprTKmacOS 15.4
add_compile_options(-Wno-missing-template-arg-list-after-template-kw)
endif()
find_package(GCTL REQUIRED)
find_package(GCTL_MESH REQUIRED)

View File

@ -30,7 +30,7 @@
#include "gctl/core.h"
#include "gctl/utility.h"
#include "gctl/algorithms.h"
#include "gctl/math.h"
struct node
{

View File

@ -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;

View File

@ -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/geometry3d.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;
}

View File

@ -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/boxsort2d.h"
#include "gctl/optimization.h"
#if defined _WINDOWS || __WIN32__

View File

@ -29,10 +29,11 @@
//#include "lcg/solver.h"
// GCTL library
#include "gctl/core.h"
#include "gctl/algorithms.h"
#include "gctl/geometry.h"
#include "gctl/poly.h"
#include "gctl/io.h"
#include "gctl/utility.h"
#include "gctl/math/boxsort2d.h"
#include "gctl/math/variogram.h"
#include "gctl/optimization.h"
#if defined _WINDOWS || __WIN32__

View File

@ -6,7 +6,7 @@ if [[ $# == 0 || ${1} == "help" ]]; then
echo "School of Earth Sciences, Zhejiang University"
echo "Yi Zhang (yizhang-geo@zju.edu.cn)"
echo ""
echo "Usage: ./installer [option] [Cmake options]"
echo "Usage: ./manager.sh [option] [Cmake options]"
echo ""
echo "Options:"
echo "(1) configure: Configure Cmake project(s). This option could take extra Cmake options as in <option>=<value>."

View File

@ -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)

View File

@ -31,7 +31,8 @@
// add gctl head files
#include "gctl/core.h"
#include "gctl/utility.h"
#include "gctl/algorithms.h"
#include "gctl/math/legendre.h"
#include "gctl/math/interpolate.h"
#include "gctl/io.h"
#define NORMAL_GRAVITY 9.80665 // m/s^2

View File

@ -29,9 +29,11 @@
//#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/boxsort2d.h"
#include "gctl/math/boxsort_sph.h"
#include "gctl/optimization.h"
#if defined _WINDOWS || __WIN32__

View File

@ -28,6 +28,7 @@
#include "gctl/core.h"
#include "gctl/io.h"
#include "gctl/utility.h"
#include "gctl/math/refellipsoid.h"
int main(int argc, char *argv[]) try
{

View File

@ -47,8 +47,8 @@
#include "gctl/core.h"
#include "gctl/utility.h"
#include "gctl/algorithms.h"
#include "gctl/io.h"
#include "gctl/math/interpolate.h"
using namespace std;

View File

@ -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)

View File

@ -28,6 +28,7 @@
#include "gctl/core.h"
#include "gctl/io.h"
#include "gctl/utility.h"
#include "gctl/math/gmath.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;