Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
07e78a7
Update jigsaw src to jigsaw-1.1.1.xx
dengwirda Nov 12, 2026
f593a07
Squashed 'external/jigsaw/' changes from d7859d7..c13d9bc
dengwirda Nov 12, 2026
2490335
Update bindings for jigsaw-1.1.1.xx
dengwirda Nov 12, 2026
83d161b
Refactor and simplify API bindings
dengwirda Nov 12, 2026
e731fde
Refactor and simplify I/O bindings
dengwirda Nov 13, 2026
67964ed
Clean-up and validation of bindings and tools
dengwirda Nov 13, 2026
d9e954d
Update jigsaw src to jigsaw-1.1.1.xx
dengwirda Nov 13, 2026
dd5813f
Squashed 'external/jigsaw/' changes from c13d9bc..b17a889
dengwirda Nov 13, 2026
c78d78c
Update build and CI workflow
dengwirda Nov 13, 2026
1d30603
Update jigsaw src to jigsaw-1.1.1.xx
dengwirda Nov 13, 2026
2738db8
Squashed 'external/jigsaw/' changes from b17a889..56ad4d0
dengwirda Nov 13, 2026
1ba7426
Initial JIGSAWpy
dengwirda Nov 13, 2026
e2c73e6
Add initial support for NetCDF-based I/O
dengwirda Nov 14, 2026
c7e0acc
Add netCDF4 as an (optional) dependency
dengwirda Nov 14, 2026
790b244
Add cmd-line option for mesh conversion
dengwirda Nov 14, 2026
1fb9113
Finalise jigsaw-1.1.1.xx updates
dengwirda Nov 14, 2026
1c75ef7
Squashed 'external/jigsaw/' changes from 56ad4d0e..3777fe7f
dengwirda Nov 14, 2026
6073a11
Update jigsaw src to jigsaw-1.1.1.xx
dengwirda Nov 14, 2026
b4af77f
Update MANIFEST.in and setup for robust package build
dengwirda Nov 14, 2026
bc6868e
Add OS-specific packaging tests
dengwirda Nov 14, 2026
ff59b0f
Ensure mesh objects are reset through API calls
dengwirda Nov 14, 2026
c8f8187
Correct indexing issue in quadrilateral mesh bisect
dengwirda Nov 14, 2026
c4c44bf
Ensure consistent h(x) scaling in multi-level meshing scheme
dengwirda Nov 14, 2026
5da14aa
Correct indexing issues in dual mesh quality metrics
dengwirda Nov 15, 2026
3f1c1d3
Correct dual weight scaling through stereographic projections
dengwirda Nov 15, 2026
89acc5e
Correct undefined inverse projection asymptote
dengwirda Nov 15, 2026
ec55904
Tighten certification on *.nc file parsing
dengwirda Nov 15, 2026
28e68ec
Ensure *.msh file parsers support 1d cases
dengwirda Nov 15, 2026
8e588f0
Tighten memory safety of API-based calls
dengwirda Nov 15, 2026
ee55f6d
Expand scalar values through stereographic projections
dengwirda Nov 15, 2026
d671f2b
Tighten certification of multi-dimensional array shapes
dengwirda Nov 15, 2026
e6e08ff
Ensure vertex degree metrics encompass isolated entities
dengwirda Nov 15, 2026
8d9e5e3
Ensure cmd-line bindings clear previous state from returned objects
dengwirda Nov 15, 2026
038609b
Handle numerical issues near stereographic projection poles
dengwirda Nov 15, 2026
6f9ddd4
Ensure associative arrays are cleared on bisect operations
dengwirda Nov 15, 2026
86ba7b1
Ensure memory buffers passed to backend are writable
dengwirda Nov 15, 2026
3a5d99f
Ensure cmd-line utilities clear previous state from mesh objects
dengwirda Nov 15, 2026
8b99f98
Fix dual mesh optimisation schedule in multi-level schemes
dengwirda Nov 15, 2026
aefe46e
Ensure full *.geojson specification is supported
dengwirda Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12"]
python-version: ["3.14"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Print environment
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -63,3 +63,11 @@ jobs:

- name: Eval. jigsaw-python
run: python example.py --IDnumber=-1

- name: Check installed package
working-directory: ${{ runner.temp }}
run: >-
python -I -c "
import jigsawpy;
import jigsawpy.libsaw;
print(jigsawpy.__file__)"
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jigsaw things
# jigsaw things
*
!/**/
!*.*
Expand All @@ -10,7 +10,7 @@ cache/*.log
cache/*.jig
cache/*.msh

# python things
# python things
__pycache__/
*.py[cod]

Expand Down
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ include MANIFEST.in
include README.md
include LICENSE.md
include example.py
include build.py
recursive-include cache *.*
recursive-include external *.*
recursive-include files *.*
recursive-include jigsawpy *.*
recursive-include tests *.*
recursive-exclude external/jigsaw/bin *
recursive-exclude external/jigsaw/lib *
recursive-exclude jigsawpy/_bin *
recursive-exclude jigsawpy/_lib *
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ This package provides a <a href="http://www.python.org">`Python`</a> based scrip
python3 example.py --IDnumber=0

Note: installation of `JIGSAW` requires a `c++` compiler and the `cmake` utility.

Note: Run `python3 build.py` before building a wheel or installing from source.
Prebuilt wheels are platform- and Python-version-specific and may require the
native libraries used when the backend was compiled (such as NetCDF or OpenMP)
on the target system.

### `Function Listing`

Expand All @@ -35,8 +40,8 @@ See `jigsawpy` for a description of the various functions available.
jigsaw.py - cmd-line interface to JIGSAW's backend
libsaw.py - api-lib. interface to JIGSAW's backend

loadmsh.py - load *.msh files.
savemsh.py - save *.msh files.
loadmsh.py - load *.msh or NetCDF *.nc files.
savemsh.py - save *.msh or NetCDF *.nc files.
loadjig.py - load *.jig files.
savejig.py - save *.jig files.

Expand Down Expand Up @@ -87,4 +92,3 @@ There are a number of publications that describe the algorithms used in `JIGSAW`
`[4]` - Darren Engwirda, David Ivers, Off-centre Steiner points for Delaunay-refinement on curved surfaces, Computer-Aided Design, 72, pp. 157-171, http://dx.doi.org/10.1016/j.cad.2015.10.007, 2016.

`[5]` - Darren Engwirda, Locally-optimal Delaunay-refinement and optimisation-based mesh generation, Ph.D. Thesis, School of Mathematics and Statistics, The University of Sydney, http://hdl.handle.net/2123/13148, 2014.

1 change: 1 addition & 0 deletions cache/.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,54 @@ on:
pull_request:
push:

env:
BUILD_TYPE: Debug

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
config:
- {
name: "Windows Latest MSVC", artifact: "Windows-MSVC.tar.xz",
os: windows-latest,
cc: "cl", cxx: "cl"
}
- {
name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz",
os: ubuntu-latest,
cc: "gcc", cxx: "g++"
}
- {
name: "macOS Latest Clang", artifact: "macOS.tar.xz",
os: macos-latest,
cc: "clang", cxx: "clang++"
}
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
os: windows-latest
cc: "cl"
cxx: "cl"

- name: "Ubuntu Latest GCC"
artifact: "Linux.tar.xz"
os: ubuntu-latest
cc: "gcc"
cxx: "g++"

- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-latest
cc: "clang"
cxx: "clang++"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Print environment
timeout-minutes: 1
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}

- name: Install dependencies on win
timeout-minutes: 5
if: startsWith(matrix.config.os, 'windows')
run: |
choco install ninja cmake
ninja --version
cmake --version

- name: Install dependencies on unx
timeout-minutes: 5
if: startsWith(matrix.config.name, 'ubuntu')
run: |
sudo apt-get update
Expand All @@ -57,6 +62,7 @@ jobs:
g++ --version

- name: Install dependencies on osx
timeout-minutes: 5
if: startsWith(matrix.config.os, 'macos')
run: |
brew install ninja cmake llvm libomp
Expand All @@ -65,39 +71,46 @@ jobs:
clang++ --version

- name: Configure jigsaw
timeout-minutes: 1
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
mkdir ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build jigsaw
timeout-minutes: 10
run: |
cd ${{github.workspace}}/build
cmake --build . --config ${{env.BUILD_TYPE}} --target install
cd ${{ github.workspace }}/build
cmake --build . --config ${{ matrix.build_type }} --target install

- name: Clean jigsaw
run: rm -r ${{github.workspace}}/build
timeout-minutes: 1
run: rm -r ${{ github.workspace }}/build

- name: Configure tests for jigsaw
timeout-minutes: 1
run: |
mkdir ${{github.workspace}}/uni/build
cd ${{github.workspace}}/uni/build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
mkdir ${{ github.workspace }}/tests/build
cd ${{ github.workspace }}/tests/build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build tests for jigsaw
timeout-minutes: 5
run: |
cd ${{github.workspace}}/uni/build
cmake --build . --config ${{env.BUILD_TYPE}} --target install
cd ${{ github.workspace }}/tests/build
cmake --build . --config ${{ matrix.build_type }} --target install

- name: Prep. tests for jigsaw
timeout-minutes: 1
if: startsWith(matrix.config.os, 'windows')
run: |
cd ${{github.workspace}}/uni
cd ${{ github.workspace }}/tests
cp ../lib/jigsaw.dll .

- name: Tests for cmd-jigsaw
timeout-minutes: 5
run: |
cd ${{github.workspace}}
cd ${{ github.workspace }}
./bin/jigsaw example.jig
./bin/jigsaw geo/airfoil.jig
./bin/jigsaw geo/bunny.jig
Expand All @@ -106,9 +119,11 @@ jobs:
./bin/jigsaw geo/lakes.jig

- name: Tests for lib-jigsaw
timeout-minutes: 5
run: |
cd ${{github.workspace}}/uni
cd ${{ github.workspace }}/tests
./test_all

- name: Clean tests for jigsaw
run: rm -r ${{github.workspace}}/uni/build
timeout-minutes: 1
run: rm -r ${{ github.workspace }}/tests/build
1 change: 0 additions & 1 deletion external/jigsaw/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
*.dll
*.so
*.dylib

1 change: 1 addition & 0 deletions external/jigsaw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ cmake_minimum_required (VERSION 3.9.4)
project (JIGSAW)

add_subdirectory ("${PROJECT_SOURCE_DIR}/src")

8 changes: 4 additions & 4 deletions external/jigsaw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This package provides the underlying `c++` source for `JIGSAW`; defining a basic
├── lib -- JIGSAW's lib binaries live here
├── geo -- geometry definitions and input data
├── out -- default folder for JIGSAW output
└── uni -- unit tests and libjigsaw example programs
└── tests -- unit tests and libjigsaw example programs

### `Getting Started`

Expand Down Expand Up @@ -55,16 +55,16 @@ A repository of additional surface models generated using `JIGSAW` can be found

### `libJIGSAW Scripts`

A set of unit-tests and `libjigsaw` example programs are contained in <a href="../master/uni/">`../jigsaw/uni/`</a>. The `JIGSAW-API` is documented via the header files in <a href="../master/inc/">`../jigsaw/inc/`</a>.
A set of unit-tests and `libjigsaw` example programs are contained in <a href="../master/tests/">`../jigsaw/tests/`</a>. The `JIGSAW-API` is documented via the header files in <a href="../master/inc/">`../jigsaw/inc/`</a>.

The unit-tests can be built using the <a href="https://cmake.org/">`cmake`</a> utility:

Navigate to the ../jigsaw/uni/ directory.
Navigate to the ../jigsaw/tests/ directory.
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=BUILD_MODE
cmake --build . --config BUILD_MODE --target install EXTRAS

This process will build the unit-tests as a set of executables in <a href="../master/uni/">`../jigsaw/uni/`</a>. `BUILD_MODE` is a compiler configuration flag (either `Release` or `Debug`). `EXTRAS` can be used to pass additional compile-time arguments.
This process will build the unit-tests as a set of executables in <a href="../master/tests/">`../jigsaw/tests/`</a>. `BUILD_MODE` is a compiler configuration flag (either `Release` or `Debug`). `EXTRAS` can be used to pass additional compile-time arguments.

### `Contributors`

Expand Down
1 change: 1 addition & 0 deletions external/jigsaw/bin/.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

14 changes: 14 additions & 0 deletions external/jigsaw/example.jig
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@
# GEOM_ETA2 = 60


# ---> GEOM_PHI1 - {default=60deg} 1-dim. sharp-feature
# angle, to be "protected" during mesh refinement.
#

# GEOM_PHI1 = 60


# ---> GEOM_PHI2 - {default=60deg} 2-dim. sharp-feature
# angle, to be "protected" during mesh refinement.
#

# GEOM_PHI2 = 60


#
# OPTIONAL fields (HFUN):
# ----------------------
Expand Down
10 changes: 8 additions & 2 deletions external/jigsaw/inc/jigsaw_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
*
--------------------------------------------------------
*
* Last updated: 29 May, 2022
* Last updated: 11 Nov., 2026
*
* Copyright 2013-2022
* Copyright 2013-2026
* Darren Engwirda
* d.engwirda@gmail.com
* https://github.com/dengwirda
Expand Down Expand Up @@ -106,4 +106,10 @@
# define JIGSAW_KERN_AREA_LEN +410
# define JIGSAW_KERN_SKEW_COS +411

# define JIGSAW_MESH_RULE_SINK +3
# define JIGSAW_MESH_RULE_OFFH +4
# define JIGSAW_MESH_RULE_OFFC +5
# define JIGSAW_MESH_RULE_OFFE +6
# define JIGSAW_MESH_RULE_OFFT +7


33 changes: 31 additions & 2 deletions external/jigsaw/inc/jigsaw_jig_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
*
--------------------------------------------------------
*
* Last updated: 27 Jul., 2025
* Last updated: 11 Nov., 2026
*
* Copyright 2013-2025
* Copyright 2013-2026
* Darren Engwirda
* d.engwirda@gmail.com
* https://github.com/dengwirda
Expand Down Expand Up @@ -121,6 +121,24 @@

real_t _geom_eta2 ;

/*
--------------------------------------------------------
* GEOM_PHI1 - {default = 60deg} 1-dim. sharp-feature
* angle, to be "protected" during mesh refinement.
--------------------------------------------------------
*/

real_t _mesh_phi1 ;

/*
--------------------------------------------------------
* GEOM_PHI2 - {default = 60deg} 2-dim. sharp-feature
* angle, to be "protected" during mesh refinement.
--------------------------------------------------------
*/

real_t _mesh_phi2 ;

/*
--------------------------------------------------------
* INIT_NEAR - {default = 1.E-8} relative "zip" tol.
Expand Down Expand Up @@ -209,6 +227,17 @@

indx_t _mesh_iter ;

/*
--------------------------------------------------------
* MESH_RULE - bitmask selecting which refinement
* rules are utilised, with e.g. the status of the bit
* RULE[MESH_RULE_OFFH] selecting mesh-size adaptive
* off-centres, see jigsaw_const.h for options.
--------------------------------------------------------
*/

indx_t _mesh_rule ;

/*
--------------------------------------------------------
* MESH_ORPH - {default=true} allow "orphaned" facets
Expand Down
Loading
Loading