Skip to content

Update hmsh for gmsh 4.14.0 compatibility - #1

Open
H-Fukagawa wants to merge 1 commit into
mainfrom
gmsh-4.14.0-compatibility
Open

Update hmsh for gmsh 4.14.0 compatibility#1
H-Fukagawa wants to merge 1 commit into
mainfrom
gmsh-4.14.0-compatibility

Conversation

@H-Fukagawa

Copy link
Copy Markdown

Major changes:

  • Updated type system: NodeTag and ElementTag now use CSize instead of CInt
  • Updated Stack LTS resolver to lts-21.25 for GHC 9.4.8 compatibility
  • Added gmsh library paths to stack.yaml for proper linking
  • Updated C FFI function signatures to match gmsh 4.14.0 API

C FFI updates:

  • gmshInitialize: Added 'run' parameter (hardcoded to True)
  • gmshModelAddPhysicalGroup: Added 'name' parameter (hardcoded to empty string)
  • gmshModelMeshGetElement: Added 'dim' and 'tag' output parameters
  • gmshModelMeshRemoveDuplicateNodes: Added 'dimTags' parameter (hardcoded to empty vector)
  • gmshModelOccAddSurfaceFilling: Added 10 parameters with default values:
    • degree=3, numPointsOnCurves=0, numIter=100, anisotropic=0
    • tol2d=1e-4, tol3d=1e-4, tolAng=1e-2, tolCurv=1e-2
    • maxDegree=0, maxSegments=0
  • gmshModelOccAddCircle: Added 'zAxis' and 'xAxis' parameters (hardcoded to empty vectors)
  • gmshModelOccAddEllipse: Added 'zAxis' and 'xAxis' parameters (hardcoded to empty vectors)
  • gmshModelOccAddSpline: Added 'tangents' parameter (hardcoded to empty vector)

Type system fixes:

  • Replaced problematic 'coerce' calls with 'S.unsafeCast' for vector type conversions
  • Added UndecidableSuperClasses language extension to handle superclass constraints

Note: Several parameters are hardcoded with default values to maintain API compatibility. Future versions should consider making these configurable through optional parameters or configuration types.

🤖 Generated with Claude Code

Major changes:
- Updated type system: NodeTag and ElementTag now use CSize instead of CInt
- Updated Stack LTS resolver to lts-21.25 for GHC 9.4.8 compatibility
- Added gmsh library paths to stack.yaml for proper linking
- Updated C FFI function signatures to match gmsh 4.14.0 API

C FFI updates:
- gmshInitialize: Added 'run' parameter (hardcoded to True)
- gmshModelAddPhysicalGroup: Added 'name' parameter (hardcoded to empty string)
- gmshModelMeshGetElement: Added 'dim' and 'tag' output parameters
- gmshModelMeshRemoveDuplicateNodes: Added 'dimTags' parameter (hardcoded to empty vector)
- gmshModelOccAddSurfaceFilling: Added 10 parameters with default values:
  * degree=3, numPointsOnCurves=0, numIter=100, anisotropic=0
  * tol2d=1e-4, tol3d=1e-4, tolAng=1e-2, tolCurv=1e-2
  * maxDegree=0, maxSegments=0
- gmshModelOccAddCircle: Added 'zAxis' and 'xAxis' parameters (hardcoded to empty vectors)
- gmshModelOccAddEllipse: Added 'zAxis' and 'xAxis' parameters (hardcoded to empty vectors)
- gmshModelOccAddSpline: Added 'tangents' parameter (hardcoded to empty vector)

Type system fixes:
- Replaced problematic 'coerce' calls with 'S.unsafeCast' for vector type conversions
- Added UndecidableSuperClasses language extension to handle superclass constraints

Note: Several parameters are hardcoded with default values to maintain API compatibility.
Future versions should consider making these configurable through optional parameters
or configuration types.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant