Skip to content

Conversation

@GuySten
Copy link
Contributor

@GuySten GuySten commented May 19, 2025

Description

This pull request implement more interpolation types in Tabular by using inverse transform sampling algorithm.

Fixes #2409.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@GuySten GuySten changed the title Tabular More interpolation types in Tabular. May 19, 2025
@GuySten GuySten force-pushed the tabular branch 2 times, most recently from 332056f to 1f7d62c Compare June 9, 2025 17:37
@GuySten GuySten marked this pull request as draft June 10, 2025 04:13
@GuySten GuySten marked this pull request as ready for review June 11, 2025 02:41
@shimwell
Copy link
Member

shimwell commented Nov 4, 2025

While working through the open PRs I just noticed that a conflict has crept into this one

@GuySten GuySten requested a review from shimwell November 4, 2025 14:50
@GuySten
Copy link
Contributor Author

GuySten commented Nov 4, 2025

I fixed the conflicts.

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together @GuySten and sorry it has taken me a long time to look this one over. In general, I feel like the addition of the Lambert W function on the C++ side is a lot of code for something that would almost never be used. I would be comfortable adding the sampling routines on the Python side (where we already have access to lambertw from scipy) but would prefer not to include the C++ portion. If someone really needs to sample a lin-log distribution on the C++ side, I think a better option is to just linearize it first and we already have the openmc.data.grid.linearize function that can handle that.

@GuySten
Copy link
Contributor Author

GuySten commented Dec 2, 2025

I removed lin log interpolation from cpp side.

@GuySten GuySten requested a review from paulromano December 2, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for all interpolation laws in Tabular class

3 participants