Skip to content

Commit 2eefd87

Browse files
author
Ben Mather
authored
Merge pull request #81 from underworldcode/dev
Merging dev into master for v2.0 release
2 parents 4e2c577 + 8af54e7 commit 2eefd87

36 files changed

Lines changed: 13892 additions & 1849 deletions

.github/workflows/python_pypi_upload_macos_wheel.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: PYPI wheels macos
33
on:
44
release:
55
types: [created, edited]
6+
push:
7+
branches:
8+
- dev
69

710

811
jobs:
@@ -36,6 +39,7 @@ jobs:
3639
pip install numpy
3740
pip install scipy
3841
pip install Cython
42+
pip install delocate
3943
4044
- name: Build the wheel
4145
env:
@@ -45,4 +49,5 @@ jobs:
4549
run: |
4650
4751
python setup.py bdist_wheel
48-
twine upload dist/* --skip-existing
52+
delocate-wheel -d -w fixed_wheels dist/*whl
53+
twine upload fixed_wheels/*whl --skip-existing

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ litho1pt0-src/litho1pt0/Notebooks/litho1pt0/Data/ETOPO1_Ice_g_geotiff.tif.zip
4141
/.vscode/
4242
/.spyproject/
4343

44+
fixed_wheels/stripy-1.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
File renamed without changes.

COPYING.LESSER

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
GNU LESSER GENERAL PUBLIC LICENSE
2+
Version 3, 29 June 2007
3+
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5+
Everyone is permitted to copy and distribute verbatim copies
6+
of this license document, but changing it is not allowed.
7+
8+
9+
This version of the GNU Lesser General Public License incorporates
10+
the terms and conditions of version 3 of the GNU General Public
11+
License, supplemented by the additional permissions listed below.
12+
13+
0. Additional Definitions.
14+
15+
As used herein, "this License" refers to version 3 of the GNU Lesser
16+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
17+
General Public License.
18+
19+
"The Library" refers to a covered work governed by this License,
20+
other than an Application or a Combined Work as defined below.
21+
22+
An "Application" is any work that makes use of an interface provided
23+
by the Library, but which is not otherwise based on the Library.
24+
Defining a subclass of a class defined by the Library is deemed a mode
25+
of using an interface provided by the Library.
26+
27+
A "Combined Work" is a work produced by combining or linking an
28+
Application with the Library. The particular version of the Library
29+
with which the Combined Work was made is also called the "Linked
30+
Version".
31+
32+
The "Minimal Corresponding Source" for a Combined Work means the
33+
Corresponding Source for the Combined Work, excluding any source code
34+
for portions of the Combined Work that, considered in isolation, are
35+
based on the Application, and not on the Linked Version.
36+
37+
The "Corresponding Application Code" for a Combined Work means the
38+
object code and/or source code for the Application, including any data
39+
and utility programs needed for reproducing the Combined Work from the
40+
Application, but excluding the System Libraries of the Combined Work.
41+
42+
1. Exception to Section 3 of the GNU GPL.
43+
44+
You may convey a covered work under sections 3 and 4 of this License
45+
without being bound by section 3 of the GNU GPL.
46+
47+
2. Conveying Modified Versions.
48+
49+
If you modify a copy of the Library, and, in your modifications, a
50+
facility refers to a function or data to be supplied by an Application
51+
that uses the facility (other than as an argument passed when the
52+
facility is invoked), then you may convey a copy of the modified
53+
version:
54+
55+
a) under this License, provided that you make a good faith effort to
56+
ensure that, in the event an Application does not supply the
57+
function or data, the facility still operates, and performs
58+
whatever part of its purpose remains meaningful, or
59+
60+
b) under the GNU GPL, with none of the additional permissions of
61+
this License applicable to that copy.
62+
63+
3. Object Code Incorporating Material from Library Header Files.
64+
65+
The object code form of an Application may incorporate material from
66+
a header file that is part of the Library. You may convey such object
67+
code under terms of your choice, provided that, if the incorporated
68+
material is not limited to numerical parameters, data structure
69+
layouts and accessors, or small macros, inline functions and templates
70+
(ten or fewer lines in length), you do both of the following:
71+
72+
a) Give prominent notice with each copy of the object code that the
73+
Library is used in it and that the Library and its use are
74+
covered by this License.
75+
76+
b) Accompany the object code with a copy of the GNU GPL and this license
77+
document.
78+
79+
4. Combined Works.
80+
81+
You may convey a Combined Work under terms of your choice that,
82+
taken together, effectively do not restrict modification of the
83+
portions of the Library contained in the Combined Work and reverse
84+
engineering for debugging such modifications, if you also do each of
85+
the following:
86+
87+
a) Give prominent notice with each copy of the Combined Work that
88+
the Library is used in it and that the Library and its use are
89+
covered by this License.
90+
91+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
92+
document.
93+
94+
c) For a Combined Work that displays copyright notices during
95+
execution, include the copyright notice for the Library among
96+
these notices, as well as a reference directing the user to the
97+
copies of the GNU GPL and this license document.
98+
99+
d) Do one of the following:
100+
101+
0) Convey the Minimal Corresponding Source under the terms of this
102+
License, and the Corresponding Application Code in a form
103+
suitable for, and under terms that permit, the user to
104+
recombine or relink the Application with a modified version of
105+
the Linked Version to produce a modified Combined Work, in the
106+
manner specified by section 6 of the GNU GPL for conveying
107+
Corresponding Source.
108+
109+
1) Use a suitable shared library mechanism for linking with the
110+
Library. A suitable mechanism is one that (a) uses at run time
111+
a copy of the Library already present on the user's computer
112+
system, and (b) will operate properly with a modified version
113+
of the Library that is interface-compatible with the Linked
114+
Version.
115+
116+
e) Provide Installation Information, but only if you would otherwise
117+
be required to provide such information under section 6 of the
118+
GNU GPL, and only to the extent that such information is
119+
necessary to install and execute a modified version of the
120+
Combined Work produced by recombining or relinking the
121+
Application with a modified version of the Linked Version. (If
122+
you use option 4d0, the Installation Information must accompany
123+
the Minimal Corresponding Source and Corresponding Application
124+
Code. If you use option 4d1, you must provide the Installation
125+
Information in the manner specified by section 6 of the GNU GPL
126+
for conveying Corresponding Source.)
127+
128+
5. Combined Libraries.
129+
130+
You may place library facilities that are a work based on the
131+
Library side by side in a single library together with other library
132+
facilities that are not Applications and are not covered by this
133+
License, and convey such a combined library under terms of your
134+
choice, if you do both of the following:
135+
136+
a) Accompany the combined library with a copy of the same work based
137+
on the Library, uncombined with any other library facilities,
138+
conveyed under the terms of this License.
139+
140+
b) Give prominent notice with the combined library that part of it
141+
is a work based on the Library, and explaining where to find the
142+
accompanying uncombined form of the same work.
143+
144+
6. Revised Versions of the GNU Lesser General Public License.
145+
146+
The Free Software Foundation may publish revised and/or new versions
147+
of the GNU Lesser General Public License from time to time. Such new
148+
versions will be similar in spirit to the present version, but may
149+
differ in detail to address new problems or concerns.
150+
151+
Each version is given a distinguishing version number. If the
152+
Library as you received it specifies that a certain numbered version
153+
of the GNU Lesser General Public License "or any later version"
154+
applies to it, you have the option of following the terms and
155+
conditions either of that published version or of any later version
156+
published by the Free Software Foundation. If the Library as you
157+
received it does not specify a version number of the GNU Lesser
158+
General Public License, you may choose any version of the GNU Lesser
159+
General Public License ever published by the Free Software Foundation.
160+
161+
If the Library as you received it specifies that a proxy can decide
162+
whether future versions of the GNU Lesser General Public License shall
163+
apply, that proxy's public statement of acceptance of any version is
164+
permanent authorization for you to choose that version for the
165+
Library.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Note: the Cartesian and Spherical notebooks can be obtained / installed from `st
5151
- [Ex5-Smoothing.ipynb](stripy/Notebooks/CartesianTriangulations/Ex5-Smoothing.ipynb)
5252
- [Ex6-Scattered-Data.ipynb](stripy/Notebooks/CartesianTriangulations/Ex6-Scattered-Data.ipynb)
5353
- [Ex7-Refinement-of-Triangulations.ipynb](stripy/Notebooks/CartesianTriangulations/Ex7-Refinement-of-Triangulations.ipynb)
54+
- [Ex8-Spline-Tension.ipynb](stripy/Notebooks/CartesianTriangulations/Ex8-Spline-Tension.ipynb)
55+
- [Ex9-Voronoi-Diagram.ipynb](stripy/Notebooks/CartesianTriangulations/Ex9-Voronoi-Diagram.ipynb)
5456

5557
### Spherical
5658

@@ -61,6 +63,8 @@ Note: the Cartesian and Spherical notebooks can be obtained / installed from `st
6163
- [Ex5-Smoothing.ipynb](stripy/Notebooks/SphericalTriangulations/Ex5-Smoothing.ipynb)
6264
- [Ex6-Scattered-Data.ipynb](stripy/Notebooks/SphericalTriangulations/Ex6-Scattered-Data.ipynb)
6365
- [Ex7-Refinement-of-Triangulations.ipynb](stripy/Notebooks/SphericalTriangulations/Ex7-Refinement-of-Triangulations.ipynb)
66+
- [Ex8-Spline-Tension.ipynb](stripy/Notebooks/SphericalTriangulations/Ex8-Spline-Tension.ipynb)
67+
- [Ex9-Voronoi-Diagram.ipynb](stripy/Notebooks/SphericalTriangulations/Ex9-Voronoi-Diagram.ipynb)
6468

6569

6670
### Examples

conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "stripy" %}
2-
{% set version = "1.2.2" %}
2+
{% set version = "1.2.3" %}
33

44
package:
55
name: "{{ name|lower }}"

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
link_args = ["-static"]
3636

3737
# in development set version to none and ...
38-
PYPI_VERSION = "1.2.2"
38+
PYPI_VERSION = "1.3"
3939

4040
# Return the git revision as a string (from numpy)
4141

@@ -85,6 +85,10 @@ def _minimal_ext_cmd(cmd):
8585
ext4 = Extension(name = 'stripy._ssrfpack',
8686
sources = ['src/ssrfpack.pyf', 'src/ssrfpack.f'],
8787
extra_link_args=link_args)
88+
ext5 = Extension(name = 'stripy._fortran',
89+
sources = ['src/stripyf.pyf', 'src/stripyf.f90'],
90+
extra_link_args=link_args)
91+
8892

8993
if __name__ == "__main__":
9094
setup(name = 'stripy',
@@ -95,7 +99,7 @@ def _minimal_ext_cmd(cmd):
9599
description = "Python interface to TRIPACK and STRIPACK fortran code for triangulation/interpolation in Cartesian coordinates and on a sphere",
96100
long_description = long_description,
97101
long_description_content_type='text/markdown',
98-
ext_modules = [ext1, ext2, ext3, ext4],
102+
ext_modules = [ext1, ext2, ext3, ext4, ext5],
99103
install_requires = ['numpy>=1.16.0', 'scipy>=1.0.0'],
100104
packages = ['stripy'],
101105
package_data = {'stripy': ['Notebooks/*ipynb', # Worked Examples is not currently used

src/srfpack.f

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7398,4 +7398,33 @@ SUBROUTINE interp_cubic(n,ns,xs,ys,x,y,zdata,lst,
73987398
ENDIF
73997399
ENDDO
74007400
RETURN
7401+
END
7402+
C
7403+
C Routines that benefit from a Fortran loop
7404+
C
7405+
SUBROUTINE GRADLS (NK,K,NCC,LCC,N,X,Y,Z,LIST,LPTR,
7406+
. LEND,DXS,DYS,IER)
7407+
INTEGER NK, I, NCC, LCC(*), N, LIST(*), LPTR(*),
7408+
. LEND(N), IER, K(NK)
7409+
REAL X(N), Y(N), Z(N), DXS(NK), DYS(NK)
7410+
C
7411+
DO I = 1, NK
7412+
CALL GRADL(K(I),NCC,LCC,N,X,Y,Z,LIST,LPTR,
7413+
. LEND,DXS(I),DYS(I),IER)
7414+
ENDDO
7415+
RETURN
7416+
END
7417+
C
7418+
SUBROUTINE GRADCS (NK,K,NCC,LCC,N,X,Y,Z,LIST,LPTR,
7419+
. LEND,DXS,DYS,DXXS,DXYS,DYYS,IER)
7420+
INTEGER NK, NCC, LCC(*), N, LIST(*), LPTR(*),
7421+
. LEND(N), IER, K(NK)
7422+
REAL X(N), Y(N), Z(N)
7423+
REAL DXS(NK), DYS(NK), DXXS(NK), DXYS(NK), DYYS(NK)
7424+
C
7425+
DO I = 1, NK
7426+
CALL GRADC(K(I),NCC,LCC,N,X,Y,Z,LIST,LPTR,LEND,
7427+
. DXS(I),DYS(I),DXXS(I),DXYS(I),DYYS(I),IER)
7428+
ENDDO
7429+
RETURN
74017430
END

src/srfpack.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,9 @@ SUBROUTINE GIVENS ( A,B, C,S)
19021902
S = 0.
19031903
RETURN
19041904
END
1905+
1906+
1907+
19051908
SUBROUTINE GRADC (K,NCC,LCC,N,X,Y,Z,LIST,LPTR,&
19061909
& LEND, DX,DY,DXX,DXY,DYY,IER)
19071910
INTEGER K, NCC, LCC(*), N, LIST(*), LPTR(*),&

src/srfpack.pyf

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,43 @@ python module _srfpack ! in
110110
! real :: c
111111
! real :: s
112112
! end subroutine givens
113-
! subroutine gradc(k,ncc,lcc,n,x,y,z,list,lptr,lend,dx,dy,dxx,dxy,dyy,ier) ! in :_srfpack:srfpack.f
114-
! integer :: k
115-
! integer :: ncc
116-
! integer dimension(*) :: lcc
117-
! integer, optional,check(len(x)>=n),depend(x) :: n=len(x)
118-
! real dimension(n) :: x
119-
! real dimension(n),depend(n) :: y
120-
! real dimension(n),depend(n) :: z
121-
! integer dimension(*) :: list
122-
! integer dimension(*) :: lptr
123-
! integer dimension(n),depend(n) :: lend
124-
! real :: dx
125-
! real :: dy
126-
! real :: dxx
127-
! real :: dxy
128-
! real :: dyy
129-
! integer :: ier
130-
! end subroutine gradc
113+
subroutine gradc(k,ncc,lcc,n,x,y,z,list,lptr,lend,dx,dy,dxx,dxy,dyy,ier) ! in :_srfpack:srfpack.f
114+
integer :: k
115+
integer, optional :: ncc=0
116+
integer dimension(ncc+1), optional :: lcc
117+
integer, depend(x), intent(hide) :: n=len(x)
118+
real dimension(n), intent(in) :: x
119+
real dimension(n), intent(in) :: y
120+
real dimension(n), intent(in) :: z
121+
integer dimension(6*n-12), intent(in) :: list
122+
integer dimension(6*n-12), intent(in) :: lptr
123+
integer dimension(n), intent(in) :: lend
124+
real intent(out) :: dx
125+
real intent(out) :: dy
126+
real intent(out) :: dxx
127+
real intent(out) :: dxy
128+
real intent(out) :: dyy
129+
integer, intent(out) :: ier
130+
end subroutine gradc
131+
subroutine gradcs(nk,k,ncc,lcc,n,x,y,z,list,lptr,lend,dxs,dys,dxxs,dxys,dyys,ier) ! in :_srfpack:srfpack.f
132+
integer, depend(k), intent(hide) :: nk=len(k)
133+
integer dimension(nk), intent(in) :: k
134+
integer, optional :: ncc=0
135+
integer dimension(ncc+1), optional :: lcc
136+
integer, depend(x), intent(hide) :: n=len(x)
137+
real dimension(n), intent(in) :: x
138+
real dimension(n), intent(in) :: y
139+
real dimension(n), intent(in) :: z
140+
integer dimension(6*n-12), intent(in) :: list
141+
integer dimension(6*n-12), intent(in) :: lptr
142+
integer dimension(n), intent(in) :: lend
143+
real dimension(nk), intent(out) :: dxs
144+
real dimension(nk), intent(out) :: dys
145+
real dimension(nk), intent(out) :: dxxs
146+
real dimension(nk), intent(out) :: dxys
147+
real dimension(nk), intent(out) :: dyys
148+
integer, intent(out) :: ier
149+
end subroutine gradcs
131150
subroutine gradg(ncc,lcc,n,x,y,z,list,lptr,lend,iflgs,sigma,nit,dgmax,grad,ier) ! in :_srfpack:srfpack.f
132151
integer, optional :: ncc=0
133152
integer dimension(ncc+1), optional :: lcc
@@ -160,6 +179,22 @@ python module _srfpack ! in
160179
real, intent(out) :: dy
161180
integer, intent(out) :: ier
162181
end subroutine gradl
182+
subroutine gradls(nk,k,ncc,lcc,n,x,y,z,list,lptr,lend,dxs,dys,ier) ! in :_srfpack:srfpack.f
183+
integer, depend(k), intent(hide) :: nk=len(k)
184+
integer dimension(nk), intent(in) :: k
185+
integer, optional :: ncc=0
186+
integer dimension(ncc+1), optional :: lcc
187+
integer, depend(x), intent(hide) :: n=len(x)
188+
real dimension(n), intent(in) :: x
189+
real dimension(n), intent(in) :: y
190+
real dimension(n), intent(in) :: z
191+
integer dimension(6*n-12), intent(in) :: list
192+
integer dimension(6*n-12), intent(in) :: lptr
193+
integer dimension(n), intent(in) :: lend
194+
real dimension(nk), intent(out) :: dxs
195+
real dimension(nk), intent(out) :: dys
196+
integer, intent(out) :: ier
197+
end subroutine gradls
163198
! subroutine grcoef(sigma,dcub,d,sd) ! in :_srfpack:srfpack.f
164199
! real :: sigma
165200
! real :: dcub

0 commit comments

Comments
 (0)