Skip to content

Commit

Permalink
refactor: Unconditionally use blocked mult in EigenStepper (acts-proj…
Browse files Browse the repository at this point in the history
…ect#3009)

Just to try if this also returns clean outputs, I'm downgrading the `if` added in acts-project#1181 to an `assert`. Let's see what the CI says here.
  • Loading branch information
paulgessinger authored and EleniXoch committed May 6, 2024
1 parent 74e56b0 commit 4d47ff7
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions Core/include/Acts/Propagator/EigenStepper.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -250,24 +250,20 @@ Acts::Result<double> Acts::EigenStepper<E, A>::step(
// Furthermore, we're constructing K in place of J, and since
// K₁₁ = I₈ = J₁₁ and K₂₁ = 0₈ = D₂₁, we don't actually need to touch those
// sub-matrices at all!
if ((D.topLeftCorner<4, 4>().isIdentity()) &&
(D.bottomLeftCorner<4, 4>().isZero()) &&
(state.stepping.jacTransport.template topLeftCorner<4, 4>()
.isIdentity()) &&
(state.stepping.jacTransport.template bottomLeftCorner<4, 4>()
.isZero())) {
state.stepping.jacTransport.template topRightCorner<4, 4>() +=
D.topRightCorner<4, 4>() *
state.stepping.jacTransport.template bottomRightCorner<4, 4>();
state.stepping.jacTransport.template bottomRightCorner<4, 4>() =
(D.bottomRightCorner<4, 4>() *
state.stepping.jacTransport.template bottomRightCorner<4, 4>())
.eval();
} else {
// For safety purposes, we provide a full matrix multiplication as a
// backup strategy.
state.stepping.jacTransport = D * state.stepping.jacTransport;
}
assert((D.topLeftCorner<4, 4>().isIdentity()));
assert((D.bottomLeftCorner<4, 4>().isZero()));
assert((state.stepping.jacTransport.template topLeftCorner<4, 4>()
.isIdentity()));
assert((state.stepping.jacTransport.template bottomLeftCorner<4, 4>()
.isZero()));

state.stepping.jacTransport.template topRightCorner<4, 4>() +=
D.topRightCorner<4, 4>() *
state.stepping.jacTransport.template bottomRightCorner<4, 4>();
state.stepping.jacTransport.template bottomRightCorner<4, 4>() =
(D.bottomRightCorner<4, 4>() *
state.stepping.jacTransport.template bottomRightCorner<4, 4>())
.eval();
} else {
if (!state.stepping.extension.finalize(state, *this, navigator, h)) {
return EigenStepperError::StepInvalid;
Expand Down

0 comments on commit 4d47ff7

Please sign in to comment.