Skip to content

Add a capability to load 1D tabulated data - #1654

Merged
btalamini merged 5 commits into
developfrom
tupek/tabulated_props
Sep 15, 2026
Merged

btalamini merged 5 commits into
developfrom
tupek/tabulated_props

Conversation

@tupek2

@tupek2 tupek2 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

have it be approximated by pchip splines (which respects local data bounds, total variation). Demo how to use within a user defined solid mechanics integral.

…ed by pchip splines (which respects local data bounds, total variation). Demo how to use within a user defined solid mechanics integral.
@btalamini
btalamini requested a review from kswartz92 August 27, 2026 22:05
@tupek2 tupek2 changed the title Add a capability to looad 1D tabulated data Add a capability to load 1D tabulated data Aug 27, 2026
@tupek2
tupek2 requested review from btalamini, ebchin and kswartz92 and removed request for kswartz92 August 28, 2026 17:28
Comment thread src/smith/numerics/pchip.hpp Outdated
@tupek2 tupek2 added the ready for review Ready for active inspection by reviewers label Sep 3, 2026
@white238
white238 requested a lite review from Copilot September 9, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new PchipData API/test usage likely won’t compile as written with std::vector arguments to std::span, and the PR also needs a release-notes entry for the new user-facing feature.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a 1D tabulated-data capability via a shape-preserving PCHIP spline evaluator in smith/numerics, along with regression tests and an end-to-end demonstration using temperature-dependent solid mechanics callbacks.

Changes:

  • Introduces PchipData/PchipView for clamped, shape-preserving PCHIP interpolation over tabulated 1D data.
  • Adds numerics and physics tests validating the interpolant and demonstrating use in solid mechanics material/traction callbacks.
  • Registers the new header and tests in the corresponding CMake test/source lists.
File summaries
File Description
src/smith/numerics/pchip.hpp Adds new PCHIP interpolant data structure and evaluator API.
src/smith/numerics/CMakeLists.txt Exposes the new numerics header in the module header list.
src/smith/numerics/tests/test_pchip.cpp Adds unit tests for clamping and monotonicity/bounds behavior.
src/smith/numerics/tests/CMakeLists.txt Adds the new numerics test to the serial test sources.
src/smith/physics/tests/test_tabulated_solid_properties.cpp Demonstrates tabulated Young’s modulus in a solid mechanics setup and validates solution accuracy.
src/smith/physics/tests/CMakeLists.txt Adds the new physics test to the serial test sources.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/smith/numerics/pchip.hpp
equation_solver.hpp
nonlinear_convergence.hpp
odes.hpp
pchip.hpp
Comment thread src/smith/numerics/pchip.hpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@btalamini btalamini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense to me.

@btalamini
btalamini merged commit a134fc0 into develop Sep 15, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Ready for active inspection by reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants