Skip to content

added: support for newer GoTools#837

Open
akva2 wants to merge 1 commit intoOPM:masterfrom
akva2:newer_gotools
Open

added: support for newer GoTools#837
akva2 wants to merge 1 commit intoOPM:masterfrom
akva2:newer_gotools

Conversation

@akva2
Copy link
Copy Markdown
Member

@akva2 akva2 commented Nov 21, 2025

This adds support for GoTools 5, ie, newer versions, while maintaining compatibility with our GoTools 4 packages. It's not too bad, so maybe we can carry it for a while?

@akva2
Copy link
Copy Markdown
Member Author

akva2 commented Nov 21, 2025

jenkins build this please

@akva2
Copy link
Copy Markdown
Member Author

akva2 commented Nov 21, 2025

jenkins build this please

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates IFEM’s GoTools integration to build against newer GoTools (v5+) while preserving compatibility with the existing GoTools 4 API, primarily by introducing version-dependent type aliases for volume basis evaluation structs and updating call sites accordingly.

Changes:

  • Added GoTools-version-aware aliases (GoBasisPtsVol, GoBasisDerivsVol, GoBasisDerivsVol2) and switched volume-basis call sites to use them.
  • Updated SplineUtils::extractBasis overloads to accept the version-abstracted volume basis-derivative types.
  • Adjusted CMake dependency discovery/linking to prefer GoToolsCore-based packages and to propagate HAS_LRSPLINE via the IFEM target.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Utility/Test/TestSplineUtils.C Updates test types to use the new version-abstracted volume basis derivative aliases.
src/Utility/SplineUtils.h Introduces GoTools v4/v5 conditional forward decls and global aliases for volume basis structs; updates extractBasis signatures.
src/Utility/SplineUtils.C Updates extractBasis implementations to use the new aliased volume basis derivative types.
src/ASM/Test/TestPiolaMapping.C Updates test code to use GoBasisPtsVol / GoBasisDerivsVol aliases.
src/ASM/SplineFields3Dmx.C Switches basis evaluation storage type to GoBasisPtsVol.
src/ASM/SplineFields3D.C Switches basis evaluation storage type to GoBasisPtsVol.
src/ASM/SplineField3D.C Initializes nsd in the direct-volume ctor and switches basis evaluation storage type to GoBasisPtsVol.
src/ASM/SplineField.C Switches mapping/basis evaluation derivative storage types to GoBasisDerivsVol{,2}.
src/ASM/LR/LRSplineFields3Dmx.C Switches LR basis evaluation storage type to GoBasisPtsVol.
src/ASM/LR/LRSplineFields3D.C Adds include for aliases and switches basis evaluation storage type to GoBasisPtsVol.
src/ASM/LR/LRSplineFields2D.C Formatting-only change (extra blank line).
src/ASM/LR/LRSplineField3D.C Adds include for aliases and switches basis evaluation storage type to GoBasisPtsVol.
src/ASM/LR/LRSplineField.C Switches LR volume derivative storage types to GoBasisDerivsVol{,2}.
src/ASM/LR/ASMu3Drecovery.C Switches basis/derivative storage types to GoBasis*Vol aliases.
src/ASM/LR/ASMu3Dmx.C Switches basis/derivative storage types to GoBasis*Vol aliases.
src/ASM/LR/ASMu3D.C Switches basis/derivative storage types to GoBasis*Vol aliases.
src/ASM/ASMs3Drecovery.C Switches basis/derivative grid storage types to GoBasis*Vol aliases.
src/ASM/ASMs3Dmx.C Switches basis/derivative grid storage types to GoBasis*Vol aliases.
cmake/IFEMSetupDependencies.cmake Links against GoTools::GoToolsCore and sets HAS_LRSPLINE on the IFEM target when LR splines are enabled.
cmake/IFEMFindDependencies.cmake Adds GoToolsCore/GoTrivariate discovery path and sets GoTools_VERSION_MAJOR for conditional compilation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +10 to +12
if(TARGET GoToolsCore)
add_library(GoTools::GoToolsCore IMPORTED INTERFACE)
string(REPLACE "." ";" GoVersion ${GoToolsCore_VERSION})
GOTOOLS_HAS_BASISDERIVS_SF3=1
)
target_link_libraries(GoTools::GoToolsCore INTERFACE GoToolsCore)
add_library(GoTools::GoTrivariate IMPORTED INTERFACE)
target_link_directories(GoTools::GoTrivariate INTERFACE ${GoTrivariate_LIBRARY_DIRS})
find_package(SISL QUIET)
find_package(GoToolsCore QUIET)
find_package(GoTrivariate QUIET)
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.

2 participants