Skip to content

Commit

Permalink
Merge pull request #263 from ljcarlin/feature-gmt-sphere-preprocessing
Browse files Browse the repository at this point in the history
Feature gmt sphere preprocessing
  • Loading branch information
cburstedde authored Jan 25, 2024
2 parents 71b69f4 + 4260b53 commit 0bf4bd8
Show file tree
Hide file tree
Showing 4 changed files with 652 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/gmt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ example_gmt_p4est_gmt_SOURCES = \

LINT_CSOURCES += \
$(example_gmt_p4est_gmt_SOURCES)

bin_PROGRAMS += example/gmt/p4est_sphere_preprocessing

example_gmt_p4est_sphere_preprocessing_SOURCES = example/gmt/sphere_preprocessing.c

endif

if P4EST_ENABLE_BUILD_3D
Expand Down
12 changes: 12 additions & 0 deletions example/gmt/gmt_models.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ p4est_gmt_model_latlong_params_t;
p4est_gmt_model_t *p4est_gmt_model_latlong_new
(p4est_gmt_model_latlong_params_t * params);

/** Represents a segment of a geodesic in the sphere model.
*
* Segments are restricted to lying on a single face of the cube-sphere.
* A segment is represented by its endpoints, given in tree-local
* reference coordinates.
*/
typedef struct p4est_gmt_sphere_geoseg
{
p4est_topidx_t which_tree;
double p1x, p1y, p2x, p2y; /* Geodesic endpoints */
} p4est_gmt_sphere_geoseg_t;

/** Destroy model */
void p4est_gmt_model_destroy (p4est_gmt_model_t * model);

Expand Down
15 changes: 15 additions & 0 deletions example/gmt/sphere_hello_world.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
0.0,50.0,0.0,130.0
50.0,50.0,50.0,130.0
0.0,90.0,50.0,90.0
70.0,50.0,70.0,130.0
70.0,50.0,110.0,50.0
70.0,130.0,110.0,130.0
70.0,90.0,110.0,90.0
140.0,50.0,140.0,130.0
140.0,130.0,180.0,130.0
210.0,50.0,210.0,130.0
210.0,130.0,250.0,130.0
280.0,50.0,280.0,130.0
320.0,50.0,320.0,130.0
280.0,50.0,320.0,50.0
280.0,130.0,320.0,130.0
Loading

0 comments on commit 0bf4bd8

Please sign in to comment.