Skip to content

Add element data getters, sparse matrices and projectors#3

Merged
hverhelst merged 20 commits intomainfrom
develop
Jul 11, 2025
Merged

Add element data getters, sparse matrices and projectors#3
hverhelst merged 20 commits intomainfrom
develop

Conversation

@hverhelst
Copy link
Copy Markdown
Member

ADD:

  • gsGeometry::refine
  • gsSparseMatrix support
  • Element data export (gsBasis::elements_into, gsHTensorBasis::elements_into)
  • Clone functions for basis and geometry
  • Quasi-interpolate and L2 projection

@hverhelst hverhelst requested a review from Copilot July 11, 2025 07:35
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 extends the C API by adding new refinement and cloning operations, sparse‐matrix support, element‐export functions, and high‐level approximate operators (quasi‐interpolation and L2 projection).

  • Added C wrappers for geometry and basis cloning, element export, and refine operations
  • Exposed sparse matrix internals and triplet interfaces in the C layer
  • Introduced new modules for quasi‐interpolation and L2 projection

Reviewed Changes

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

Show a summary per file
File Description
src/gsCVectorInt.cpp Updated int‐vector wrappers: drop gismo:: prefix, add extern "C"
src/gsCVector.cpp Updated double‐vector wrappers similarly
src/gsCSparseMatrix.h Declared pointer accessors and triplet APIs for sparse matrices
src/gsCSparseMatrix.cpp Implemented new sparse‐matrix C functions
src/gsCReadFile.h Added gsCWriteFile declaration
src/gsCReadFile.cpp Prefixed info message, added C API includes
src/gsCQuasiInterpolate.h New quasi‐interpolation function declarations
src/gsCQuasiInterpolate.cpp Implemented local/Taylor/Schoenberg wrappers
src/gsCQuadRule.cpp Updated quadrature rule wrappers to use using namespace gismo
src/gsCOptionList.cpp Updated option‐list wrappers
src/gsCNurbsCreator.cpp Updated NURBS creator wrappers
src/gsCMultiPatch.h Declared multi‐patch creation, IO, refine, embed, degree elevate
src/gsCMultiPatch.cpp Implemented multi‐patch C API
src/gsCMultiBasis.h Declared multi‐basis creation and IO
src/gsCMultiBasis.cpp Implemented multi‐basis C API
src/gsCMatrixInt.cpp Updated integer‐matrix wrappers
src/gsCMatrix.cpp Updated double‐matrix wrappers
src/gsCL2Projection.h Added L2 projection C API
src/gsCL2Projection.cpp Implemented L2 projection wrapper
src/gsCKnotVector.cpp Updated knot‐vector wrappers
src/gsCGeometryTransform.cpp Updated geometry‐transform wrappers
src/gsCGeometry.h Added geometry IO, cloning, and refine declarations
src/gsCGeometry.cpp Implemented geometry IO, clone, refine (contains merge conflict)
src/gsCFunctionSet.h Declared new derivative and multi‐derivative evaluation APIs
src/gsCFunctionSet.cpp Implemented new function‐set wrappers and print formatting
src/gsCFunctionExpr.cpp Updated function‐expression wrappers
src/gsCFitting.cpp Updated fitting wrappers
src/gsCBoundaryConditions.cpp Updated BC wrapper and reordered addCondition parameters
src/gsCBasis.h Added basis IO, clone, degree elevate, boundary, and element export APIs
src/gsCBasis.cpp Implemented new basis C API and HTensor element routines
src/Cgismo.h.in Included new quasi‐interpolate and L2‐projection headers
Comments suppressed due to low confidence (3)

src/gsCGeometry.h:46

  • New refinement function gsGeometry_refine lacks accompanying C‐API tests. Consider adding tests that exercise multi‐box refinement.
    GISMO_EXPORT void gsGeometry_refine(gsCGeometry * b, gsCMatrix * boxes, int refExt);

src/gsCBasis.h:56

  • Element export API gsBasis_elements_into is new; include unit tests to verify the returned matrix of element bounds.
    GISMO_EXPORT void gsBasis_elements_into(gsCBasis * b, gsCMatrix*);

src/gsCGeometry.cpp:154

  • Leftover merge conflict markers (<<<<<<< HEAD / ======= / >>>>>>> main) must be resolved before compilation.
<<<<<<< HEAD

Comment thread src/gsCBoundaryConditions.cpp
Comment thread src/gsCQuasiInterpolate.cpp Outdated
Comment thread src/gsCQuasiInterpolate.cpp Outdated
@hverhelst hverhelst changed the title Develop Add element data getters, sparse matrices and projectors Jul 11, 2025
@hverhelst hverhelst merged commit f17f28b into main Jul 11, 2025
3 checks passed
@hverhelst hverhelst deleted the develop branch July 11, 2025 08:45
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.

3 participants