Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
780c668
GRIDEDIT-2102 Add closing point of polygon only if not already added
BillSenior May 27, 2026
187140e
GRIDEDIT-2102 First working version of calling the sepran triangulati…
BillSenior May 27, 2026
36cfc3f
GRIDEDIT-2102 Some testing changes (will be removed when finished, pa…
BillSenior Jun 4, 2026
a54942f
GRIDEDIT-2102 Added hole in mesh
BillSenior Jun 4, 2026
d369ca6
GRIDEDIT-2102 Can now handle triangulation around holes
BillSenior Jun 4, 2026
d706e40
GRIDEDIT-2102 Added the SEPRAN triangulation library
BillSenior Jun 4, 2026
f708af6
GRIDEDIT-2102 Remvoed executable mode bit from files
BillSenior Jun 4, 2026
a9762e7
GRIDEDIT-2102 Added sepran directory
BillSenior Jun 4, 2026
b934f2f
GRIDEDIT-2102 Added sepran library
BillSenior Jun 4, 2026
ae8c19d
GRIDEDIT-2102 Added sepran library cmake file
BillSenior Jun 4, 2026
aa72117
GRIDEDIT-2102 Moved triangulation to polymorphic triangulation generator
BillSenior Jun 4, 2026
65d4778
GRIDEDIT-2102 Removing triangulation test code temporaily
BillSenior Jun 4, 2026
b8638c9
GRIDEDIT-2102 Added sepran library mk api cmake file
BillSenior Jun 4, 2026
c9a7dbd
GRIDEDIT-2102 Added unit test for sepran triangulation
BillSenior Jun 4, 2026
538eb84
GRIDEDIT-2102 Added back test that removed during development of sepr…
BillSenior Jun 4, 2026
a0c06fa
GRIDEDIT-2102 Fixed clang formatting warning
BillSenior Jun 8, 2026
125d18e
GRIDEDIT-2102 Fixed doxygen warnings
BillSenior Jun 8, 2026
0554ec1
GRIDEDIT-2102 Try to get working under macos
BillSenior Jun 8, 2026
118742f
DST-112 Moved generation of points to separate function
BillSenior Jun 8, 2026
db3f402
GRIDEDIT-2102 Try again to get working on macos
BillSenior Jun 8, 2026
a8981f0
GRIDEDIT-2102 Try again to get working on macos
BillSenior Jun 8, 2026
fe899bd
GRIDEDIT-2102 Try again to get working on macos
BillSenior Jun 8, 2026
de8535f
GRIDEDIT-2102 Fixed compilation error under macos
BillSenior Jun 8, 2026
8854122
GRIDEDIT-2102 Fixed linking error under macos
BillSenior Jun 8, 2026
e57eeae
GRIDEDIT-2102 Attempt tofix linking error under macos
BillSenior Jun 8, 2026
6a2b0fb
GRIDEDIT-2102 Attempt to fix linking error under macos
BillSenior Jun 8, 2026
3293e1d
GRIDEDIT-2102 Attempt to fix linking error under macos
BillSenior Jun 8, 2026
6128d67
GRIDEDIT-2102 Attempt to fix linking error under macos
BillSenior Jun 8, 2026
f955bd2
GRIDEDIT-2102 Attempt to fix linking error under macos
BillSenior Jun 8, 2026
a31039f
GRIDEDIT-2102 Try to get working under macos
BillSenior Jun 8, 2026
d22b907
GRIDEDIT-2102 Try to get working under macos
BillSenior Jun 8, 2026
074acbf
GRIDEDIT-2102 Try to get working under macos
BillSenior Jun 8, 2026
7e3c133
Fix macOS gfortran discovery to include symlinks
Copilot Jun 8, 2026
c366478
GRIDEDIT-2102 Added c++ conversion of the fortran Sepran code
BillSenior Jun 10, 2026
3079dd6
GRIDEDIT-2102 Fixed clang formatting warning
BillSenior Jun 10, 2026
32c0772
GRIDEDIT-2102 Fixed windows build failure
BillSenior Jun 10, 2026
e07a79e
GRIDEDIT-2102 Fixed windows build failure
BillSenior Jun 10, 2026
d67608a
GRIDEDIT-2102 Fixed unit test failure (temporary)
BillSenior Jun 10, 2026
83b41b1
GRIDEDIT-2102 Missed polygon file in last commit
BillSenior Jun 10, 2026
6327a9f
GRIDEDIT-2102 Fix macos build failures
BillSenior Jun 10, 2026
fef1ac8
GRIDEDIT-2102 Added license header
BillSenior Jun 11, 2026
1b4b538
GRIDEDIT-2102 Removed unnecessary Fortran files
BillSenior Jun 25, 2026
2eceff8
GRIDEDIT-2102 Fix compilation under macos
BillSenior Jul 13, 2026
8fcae70
GRIDEDIT-2102 Changes made after reiview comments
BillSenior Jul 28, 2026
70fddfe
GRIDEDIT-2102 Fixed a number of review comments
BillSenior Jul 28, 2026
9d70eae
GRIDEDIT-2102 Fixed a number of review comments
BillSenior Jul 28, 2026
892dac9
GRIDEDIT-2102 Fixed a number of review comments
BillSenior Jul 28, 2026
c422fe6
Fix macOS 26 build: add CheckCXXCompilerFlag to properly detect -Wno-…
Copilot Jul 28, 2026
fc3343d
GRIDEDIT-2102 Fixed macos builds
BillSenior Jul 28, 2026
94c43a1
GRIDEDIT-2102 Fixed clang formatting
BillSenior Jul 28, 2026
2308577
GRIDEDIT-2102 Removed reference to fortran compiler
BillSenior Jul 28, 2026
15b52ce
GRIDEDIT-2102 Updated README file
BillSenior Jul 30, 2026
cce5b85
GRIDEDIT-2102 Changes suggested by sonarcloud
BillSenior Aug 5, 2026
0976ac6
GRIDEDIT-2102 Removed PRNG, suggested by sonarcloud
BillSenior Aug 5, 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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Install system-provided dependencies
run: |
brew install boost doxygen libaec libomp
brew install boost doxygen gcc libaec libomp

# Step: Set OpenMP environment variables (architecture-aware)
- name: Set OpenMP environment variables
Expand All @@ -58,7 +58,7 @@ jobs:
else
HOMEBREW_PREFIX="/usr/local"
fi

echo "HOMEBREW_PREFIX=$HOMEBREW_PREFIX" >> $GITHUB_ENV
echo "LDFLAGS=-L$HOMEBREW_PREFIX/opt/libomp/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$HOMEBREW_PREFIX/opt/libomp/include" >> $GITHUB_ENV
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
# Suppress unused parameter warnings on macOS 15 Intel runner (known platform-specific issue)
SUPPRESS_PARAM_FLAG="-DSUPPRESS_UNUSED_PARAMETER_WARNING=ON"
fi

cmake \
-S ${{ github.workspace }} \
-B ${{ steps.paths.outputs.build_dir }} \
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
if [ -f "${{ steps.paths.outputs.ext_deps_dir }}/netcdf-c/install/netcdf-c/bin/libz.dylib" ]; then
ln -sf libz.dylib ${{ steps.paths.outputs.ext_deps_dir }}/netcdf-c/install/netcdf-c/bin/libz.1.dylib
fi

export DYLD_LIBRARY_PATH="${{ steps.paths.outputs.ext_deps_dir }}/netcdf-c/install/netcdf-c/bin:$DYLD_LIBRARY_PATH"
ctest --test-dir ${{ steps.paths.outputs.build_dir }} \
-C ${{ inputs.build_type }} \
Expand Down
9 changes: 9 additions & 0 deletions cmake/compiler_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ if(APPLE)
message(STATUS "Configuring build for macOS with ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION}).")
# Common warning and visibility flags
add_compile_options("-fvisibility=hidden;-Wall;-Wextra;-pedantic;-Werror;-Wno-unused-function")

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Wno-character-conversion" SUPPORTS_WNO_CHARACTER_CONVERSION)

if(SUPPORTS_WNO_CHARACTER_CONVERSION)
# Disable warnings about implicit conversions between character types
add_compile_options("-Wno-character-conversion")
endif()

# Conditionally suppress unused parameter warnings (used for platform-specific compiler issues)
if(SUPPRESS_UNUSED_PARAMETER_WARNING)
add_compile_options("-Wno-unused-parameter")
Expand Down
235 changes: 235 additions & 0 deletions data/test/data/northbank_001b.pol
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
*
* Deltares, RGFGRID Version 7.03.00.77422 (Win64), Nov 30 2022, 15:52:41
* File creation date: 2025-12-01, 21:04:21
*
* Coordinate System = Cartesian
*
L000001
227 2
4.8269651E+04 4.1104092E+05
4.8309201E+04 4.1101690E+05
4.8348617E+04 4.1099271E+05
4.8387901E+04 4.1096835E+05
4.8427367E+04 4.1094396E+05
4.8465908E+04 4.1091938E+05
4.8503840E+04 4.1089477E+05
4.8541162E+04 4.1087013E+05
4.8578186E+04 4.1084545E+05
4.8614778E+04 4.1082038E+05
4.8651248E+04 4.1079491E+05
4.8687598E+04 4.1076905E+05
4.8724086E+04 4.1074251E+05
4.8758623E+04 4.1071678E+05
4.8791471E+04 4.1069159E+05
4.8822627E+04 4.1066693E+05
4.8852209E+04 4.1064235E+05
4.8881096E+04 4.1061850E+05
4.8909403E+04 4.1059494E+05
4.8937131E+04 4.1057166E+05
4.8964120E+04 4.1054840E+05
4.8990744E+04 4.1052578E+05
4.9016843E+04 4.1050354E+05
4.9042417E+04 4.1048167E+05
4.9067297E+04 4.1045999E+05
4.9091808E+04 4.1043902E+05
4.9115781E+04 4.1041857E+05
4.9139217E+04 4.1039866E+05
4.9161994E+04 4.1037919E+05
4.9184333E+04 4.1036030E+05
4.9206113E+04 4.1034191E+05
4.9227334E+04 4.1032402E+05
4.9247984E+04 4.1030662E+05
4.9268183E+04 4.1028959E+05
4.9287921E+04 4.1027292E+05
4.9307197E+04 4.1025661E+05
4.9326096E+04 4.1024074E+05
4.9344349E+04 4.1022525E+05
4.9362041E+04 4.1021021E+05
4.9379173E+04 4.1019564E+05
4.9395813E+04 4.1018150E+05
4.9412005E+04 4.1016765E+05
4.9427817E+04 4.1015406E+05
4.9443251E+04 4.1014074E+05
4.9458364E+04 4.1012766E+05
4.9473152E+04 4.1011479E+05
4.9487675E+04 4.1010209E+05
4.9501933E+04 4.1008957E+05
4.9515984E+04 4.1007721E+05
4.9529797E+04 4.1006498E+05
4.9543432E+04 4.1005287E+05
4.9556888E+04 4.1004086E+05
4.9570226E+04 4.1002895E+05
4.9583380E+04 4.1001712E+05
4.9596410E+04 4.1000536E+05
4.9609317E+04 4.0999367E+05
4.9622162E+04 4.0998202E+05
4.9634852E+04 4.0997043E+05
4.9647450E+04 4.0995888E+05
4.9659954E+04 4.0994738E+05
4.9672429E+04 4.0993590E+05
4.9684762E+04 4.0992446E+05
4.9697017E+04 4.0991306E+05
4.9709194E+04 4.0990168E+05
4.9721358E+04 4.0989032E+05
4.9733383E+04 4.0987900E+05
4.9745335E+04 4.0986770E+05
4.9757214E+04 4.0985643E+05
4.9769089E+04 4.0984517E+05
4.9780823E+04 4.0983395E+05
4.9792486E+04 4.0982275E+05
4.9804077E+04 4.0981158E+05
4.9815668E+04 4.0980042E+05
4.9827116E+04 4.0978930E+05
4.9838491E+04 4.0977820E+05
4.9849794E+04 4.0976713E+05
4.9861102E+04 4.0975606E+05
4.9872260E+04 4.0974504E+05
4.9883345E+04 4.0973405E+05
4.9894357E+04 4.0972308E+05
4.9905376E+04 4.0971212E+05
4.9916239E+04 4.0970121E+05
4.9927028E+04 4.0969032E+05
4.9937741E+04 4.0967946E+05
4.9948459E+04 4.0966860E+05
4.9959021E+04 4.0965779E+05
4.9969507E+04 4.0964701E+05
4.9979916E+04 4.0963626E+05
4.9990329E+04 4.0962551E+05
5.0000590E+04 4.0961481E+05
5.0010779E+04 4.0960414E+05
5.0020896E+04 4.0959350E+05
5.0031029E+04 4.0958287E+05
5.0041006E+04 4.0957229E+05
5.0050915E+04 4.0956174E+05
5.0060756E+04 4.0955121E+05
5.0070630E+04 4.0954072E+05
5.0080330E+04 4.0953023E+05
5.0089956E+04 4.0951977E+05
5.0099508E+04 4.0950931E+05
5.0109053E+04 4.0949883E+05
5.0118458E+04 4.0948839E+05
5.0127790E+04 4.0947794E+05
5.0137049E+04 4.0946750E+05
5.0146223E+04 4.0945694E+05
5.0155375E+04 4.0944650E+05
5.0164493E+04 4.0943607E+05
5.0173578E+04 4.0942565E+05
5.0182618E+04 4.0941513E+05
5.0191672E+04 4.0940473E+05
5.0200728E+04 4.0939434E+05
5.0209787E+04 4.0938397E+05
5.0218920E+04 4.0937358E+05
5.0227979E+04 4.0936305E+05
5.0237036E+04 4.0935235E+05
5.0246091E+04 4.0934149E+05
5.0255245E+04 4.0933030E+05
5.0264132E+04 4.0931934E+05
5.0272856E+04 4.0930847E+05
5.0281415E+04 4.0929767E+05
5.0289830E+04 4.0928695E+05
5.0298329E+04 4.0927611E+05
5.0306931E+04 4.0926513E+05
5.0315637E+04 4.0925403E+05
5.0324558E+04 4.0924254E+05
5.0333321E+04 4.0923127E+05
5.0342038E+04 4.0921996E+05
5.0350709E+04 4.0920861E+05
5.0359216E+04 4.0919720E+05
5.0367862E+04 4.0918569E+05
5.0376529E+04 4.0917408E+05
5.0385217E+04 4.0916234E+05
5.0393847E+04 4.0915032E+05
5.0402585E+04 4.0913832E+05
5.0411349E+04 4.0912618E+05
5.0420140E+04 4.0911390E+05
5.0429022E+04 4.0910131E+05
5.0437815E+04 4.0908879E+05
5.0446584E+04 4.0907617E+05
5.0455328E+04 4.0906347E+05
5.0464075E+04 4.0905051E+05
5.0472787E+04 4.0903760E+05
5.0481493E+04 4.0902458E+05
5.0490192E+04 4.0901144E+05
5.0498869E+04 4.0899802E+05
5.0507582E+04 4.0898462E+05
5.0516316E+04 4.0897107E+05
5.0525070E+04 4.0895737E+05
5.0533803E+04 4.0894336E+05
5.0542640E+04 4.0892931E+05
5.0551538E+04 4.0891504E+05
5.0560498E+04 4.0890058E+05
5.0579910E+04 4.0888206E+05
5.0598392E+04 4.0885159E+05
5.0617156E+04 4.0881975E+05
5.0636716E+04 4.0878676E+05
5.0678375E+04 4.0874172E+05
5.0721626E+04 4.0866610E+05
5.0768423E+04 4.0858381E+05
5.0818108E+04 4.0849554E+05
5.0868762E+04 4.0840250E+05
5.0968545E+04 4.0833842E+05
5.1027975E+04 4.0841417E+05
5.1099739E+04 4.0847768E+05
5.1072798E+04 4.0857736E+05
5.0987017E+04 4.0862324E+05
5.0893257E+04 4.0866713E+05
5.0804816E+04 4.0870770E+05
5.0741644E+04 4.0878350E+05
5.0701081E+04 4.0887194E+05
5.0681464E+04 4.0891949E+05
5.0661848E+04 4.0896703E+05
5.0633254E+04 4.0900593E+05
5.0604661E+04 4.0904483E+05
5.0587704E+04 4.0909304E+05
5.0570747E+04 4.0914125E+05
5.0551796E+04 4.0918547E+05
5.0532844E+04 4.0922970E+05
5.0506245E+04 4.0927425E+05
5.0479647E+04 4.0931880E+05
5.0470670E+04 4.0936435E+05
5.0461693E+04 4.0940990E+05
5.0472000E+04 4.0946044E+05
5.0482307E+04 4.0951098E+05
5.0492281E+04 4.0955786E+05
5.0502256E+04 4.0960474E+05
5.0513560E+04 4.0965428E+05
5.0524864E+04 4.0970382E+05
5.0536942E+04 4.0976462E+05
5.0526089E+04 4.0982664E+05
5.0486296E+04 4.0988336E+05
5.0421129E+04 4.0995584E+05
5.0352638E+04 4.1002965E+05
5.0285476E+04 4.1010014E+05
5.0216319E+04 4.1017528E+05
5.0150488E+04 4.1024577E+05
5.0080001E+04 4.1032157E+05
5.0014169E+04 4.1039272E+05
4.9946342E+04 4.1046654E+05
4.9877186E+04 4.1053702E+05
4.9796725E+04 4.1059687E+05
4.9720253E+04 4.1065738E+05
4.9643117E+04 4.1072321E+05
4.9566646E+04 4.1078372E+05
4.9488845E+04 4.1084690E+05
4.9412373E+04 4.1090741E+05
4.9333907E+04 4.1097058E+05
4.9258766E+04 4.1103176E+05
4.9180964E+04 4.1108629E+05
4.9093854E+04 4.1104306E+05
4.9023085E+04 4.1101596E+05
4.8954210E+04 4.1098920E+05
4.8908328E+04 4.1097125E+05
4.8861447E+04 4.1095396E+05
4.8814567E+04 4.1093667E+05
4.8768684E+04 4.1094099E+05
4.8722802E+04 4.1094531E+05
4.8681241E+04 4.1097357E+05
4.8639681E+04 4.1100183E+05
4.8598785E+04 4.1102943E+05
4.8557890E+04 4.1105703E+05
4.8512339E+04 4.1107465E+05
4.8466789E+04 4.1109227E+05
4.8418911E+04 4.1108429E+05
4.8371034E+04 4.1107631E+05
4.8320342E+04 4.1105861E+05
4.8269651E+04 4.1104092E+05
1 change: 1 addition & 0 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(triangle)
add_subdirectory(sepran)
79 changes: 79 additions & 0 deletions extern/sepran/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# C++20 translation of the SEPRAN mesh-generation library.
# Replaces the original Fortran sources.
Comment thread
BillSenior marked this conversation as resolved.

set(target_name Sepran)


# source directories
set(SRC_DIR src)
set(INC_DIR include)

set(
TARGET_SRC_LIST
${SRC_DIR}/SepranSort.cpp
${SRC_DIR}/SepranGeometry.cpp
${SRC_DIR}/SepranCurveIntersection.cpp
${SRC_DIR}/SepranBoundary.cpp
${SRC_DIR}/SepranTransform.cpp
${SRC_DIR}/SepranTopology.cpp
${SRC_DIR}/SepranFront.cpp
${SRC_DIR}/SepranQuadratic.cpp
${SRC_DIR}/Msho2d.cpp
${SRC_DIR}/Mshoce.cpp
)

set(
TARGET_HEADER_LIST
${INC_DIR}/Msho2d.hpp
${INC_DIR}/Mshoce.hpp
${INC_DIR}/SepranBoundary.hpp
${INC_DIR}/SepranContext.hpp
${INC_DIR}/SepranCurveIntersection.hpp
${INC_DIR}/SepranFront.hpp
${INC_DIR}/SepranGeometry.hpp
${INC_DIR}/SepranQuadratic.hpp
${INC_DIR}/SepranSort.hpp
${INC_DIR}/SepranTopology.hpp
${INC_DIR}/SepranTransform.hpp
)

add_library(${target_name} STATIC ${TARGET_SRC_LIST} ${TARGET_HEADER_LIST})

# IMPROVEMENT: Explicitly include the include directory for cleaner downstream usage
target_include_directories(${target_name}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}>
$<INSTALL_INTERFACE:include>
)

target_include_directories(${target_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

target_compile_features(${target_name} PUBLIC cxx_std_20)

Comment thread
BillSenior marked this conversation as resolved.
# Add precompiled headers to speed up compilation
target_precompile_headers(${target_name}
PRIVATE
<algorithm>
<array>
<cassert>
<cmath>
<iostream>
<limits>
<map>
<memory>
<numeric>
<span>
<stdexcept>
<string>
<string_view>
<utility>
<vector>
)

set_target_properties(
${target_name}
PROPERTIES
POSITION_INDEPENDENT_CODE ON
)

source_group("Source Files" FILES ${TARGET_HEADER_LIST} ${TARGET_SRC_LIST})
10 changes: 10 additions & 0 deletions extern/sepran/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Sepran library
## Information
A Two-Dimensional mesh triangular generator for an area which is defined by a closed polygon.

Library: https://repos.deltares.nl/repos/ds/trunk/guis/plugins_qt/packages/sepran/

## Modifications
1. All original Fortran source code was completely translated to standard C++.
2. Although arrays on the C++ side can be indexed with a 0-based indexing, any index values assigned
must follow Fortran's 1-based indexing
Loading
Loading