Skip to content

Exposes more functions to C-API for APFEL++#337

Merged
Radonirinaunimi merged 17 commits intomasterfrom
apfelxx-capi
Apr 12, 2025
Merged

Exposes more functions to C-API for APFEL++#337
Radonirinaunimi merged 17 commits intomasterfrom
apfelxx-capi

Conversation

@Radonirinaunimi
Copy link
Member

@Radonirinaunimi Radonirinaunimi commented Apr 8, 2025

Exposes more functions to the C-API for APFEL++, as discussed at DIS, in order to achieve two things:

  • Interface APFEL++ with PineAPPL in order to get (SI)DIS and SIA predictions (everything is already available)
  • Provide APFEL++ with an interface to read the contents of a PineAPPL grid and perform the evolution on the fly. Various ingredients are needed for this:
    • functions to get and rotate the particle ID representation
    • function that returns the list of channel combinations (see display-channels.cpp)
    • function that returns the contents for the subgrids for a given bin, order, and channel (see get-subgrids.cpp)

cc @vbertone, @enocera

@Radonirinaunimi Radonirinaunimi marked this pull request as draft April 8, 2025 10:55
@Radonirinaunimi Radonirinaunimi marked this pull request as ready for review April 11, 2025 09:49
@Radonirinaunimi
Copy link
Member Author

Perfect! Thanks @cschwan!

@cschwan
Copy link
Contributor

cschwan commented Apr 11, 2025

@Radonirinaunimi can you please write another small test case, in which you call pineappl_grid_subgrid_array on an empty subgrid? The call is enough, and the test should make sure it doesn't panic/abort.

@Radonirinaunimi
Copy link
Member Author

@Radonirinaunimi can you please write another small test case, in which you call pineappl_grid_subgrid_array on an empty subgrid? The call is enough, and the test should make sure it doesn't panic/abort.

Yes, absolutely! I will write one this evening.

@Radonirinaunimi
Copy link
Member Author

Actually, just did it now in 7797940, as it was just 2 lines.

@cschwan
Copy link
Contributor

cschwan commented Apr 12, 2025

@Radonirinaunimi please have a look at commit 9d6f897. If you think that makes sense, feel free to merge!

@Radonirinaunimi
Copy link
Member Author

@Radonirinaunimi please have a look at commit 9d6f897. If you think that makes sense, feel free to merge!

Yes, that indeed makes perfect sense, thanks! I will merge once the test are done.

@Radonirinaunimi Radonirinaunimi merged commit 1829aa5 into master Apr 12, 2025
10 checks passed
@Radonirinaunimi Radonirinaunimi deleted the apfelxx-capi branch April 12, 2025 20:02
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