Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove incomplete initialisation from InterpolatedBFieldMap #1467

Merged
merged 4 commits into from
Jun 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Core/include/Acts/MagneticField/InterpolatedBFieldMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class InterpolatedBFieldMap : public InterpolatedMagneticField {

// loop through all corner points
constexpr size_t nCorners = 1 << DIM_POS;
std::array<Vector3, nCorners> neighbors{Vector3{0.0, 0.0, 0.0}};
std::array<Vector3, nCorners> neighbors;
const auto& cornerIndices = m_cfg.grid.closestPointsIndices(gridPosition);

if (!isInsideLocal(gridPosition)) {
Expand All @@ -211,6 +211,8 @@ class InterpolatedBFieldMap : public InterpolatedMagneticField {
neighbors.at(i++) = m_cfg.transformBField(m_cfg.grid.at(index), position);
}

assert(i == nCorners);

return FieldCell(lowerLeft, upperRight, std::move(neighbors));
}

Expand Down