Skip to content

feat: first snapshot of (partly) BinUtility-freed SurfaceMaterial#5521

Open
asalzburger wants to merge 17 commits into
acts-project:mainfrom
asalzburger:feat-change-material-to-proto-axis
Open

feat: first snapshot of (partly) BinUtility-freed SurfaceMaterial#5521
asalzburger wants to merge 17 commits into
acts-project:mainfrom
asalzburger:feat-change-material-to-proto-axis

Conversation

@asalzburger

Copy link
Copy Markdown
Contributor

This PR makes a first step towards removing BinUtility from the Material classes.

BinnedSurfaceMaterial and ProtoSurfaceMaterial are now fully based on DirectedProtoAxis,
the legacy constructors with BinUtility are marked deprecated and translate the BinUtility into the axis right away.

Tests, clients and I/O is updated.

--- END COMMIT MESSAGE ---

Any further description goes here, @-mentions are ok here!

  • Use a conventional commits prefix: quick summary
    • We mostly use feat, fix, refactor, docs, chore and build types.
  • A milestone will be assigned by one of the maintainers

@asalzburger asalzburger requested a review from niermann999 as a code owner May 29, 2026 12:59
Comment thread Plugins/Detray/src/DetrayMaterial.cpp
@github-actions github-actions Bot added this to the next milestone May 29, 2026
@github-actions github-actions Bot added Component - Core Affects the Core module Component - Plugins Affects one or more Plugins Component - Detray Affects the Detray project labels May 29, 2026
@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for 98eb5a9

Full contents

physmon summary

@asalzburger asalzburger force-pushed the feat-change-material-to-proto-axis branch from 909ef79 to 616ad72 Compare June 1, 2026 13:41
@asalzburger asalzburger force-pushed the feat-change-material-to-proto-axis branch from 37c1aae to d4a816e Compare June 3, 2026 14:05
@sonarqubecloud

sonarqubecloud Bot commented Jun 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
2 New Bugs (required ≤ 0)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

/// @param materialMatrix is the matrix of material slabs (moved)
/// @param splitFactor is the pre/post splitting directive
/// @param mappingType is the type of surface mapping associated to the surface
BinnedSurfaceMaterial(std::array<DirectedProtoAxis, 2> axes,

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.

do we strictly need DirectedProtoAxis here? the two things I know of it provides additionally to an IAxis is the direction, which I want to add with #5540, and the auto sizing from ProtoAxis. I imagine this cannot rely on auto sizing since the material matrix is already generated with some given binning.

ultimately we could use IMultiAxisND<N> from here #5531. what do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exactly, I think we should use IMultiAxisND<2> here, shall we wait until we are through with the IAxis reordering?

Comment on lines +26 to +29
/// Convert a BinUtility to a pair of two DirectedProtoAxis.
/// For a 1D BinUtility a single-bin dummy axis is appended as the second axis.
/// This helper is intended for migration code that still works with BinUtility.
std::array<DirectedProtoAxis, 2> protoAxesFromBinUtility(const BinUtility& bu);

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.

should we elevate this to an utility?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, actually something that can disappear with the BinUtility.

Comment thread Core/src/Material/BinnedSurfaceMaterial.cpp Outdated
Comment thread Core/src/Material/BinnedSurfaceMaterial.cpp Outdated
Comment on lines +86 to +87
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

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.

can we use ACTS_PUSH_IGNORE_DEPRECATED() and ACTS_POP_IGNORE_DEPRECATED for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, let's do this.

Comment thread Core/src/Material/BinnedSurfaceMaterial.cpp Outdated
Comment thread Core/src/Material/ProtoSurfaceMaterial.cpp Outdated
Comment thread Core/src/Material/ProtoSurfaceMaterial.cpp Outdated
Comment thread Core/src/Material/ProtoSurfaceMaterial.cpp Outdated
Comment on lines +93 to +94
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

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.

can we use ACTS_PUSH_IGNORE_DEPRECATED() and ACTS_POP_IGNORE_DEPRECATED for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should.

asalzburger and others added 6 commits June 8, 2026 09:51
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Core Affects the Core module Component - Detray Affects the Detray project Component - Plugins Affects one or more Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants