IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 1708579e authored by ralfulrich's avatar ralfulrich
Browse files

rebase typos

parent 3e560cf2
No related branches found
No related tags found
No related merge requests found
......@@ -71,14 +71,6 @@ namespace corsika::setup {
#elif defined(__GNUC__) || defined(__GNUG__)
using StackView = corsika::MakeView<setup::Stack>::type;
#endif
} // namespace detail
#endif
// ---------------------------------------
// this is the FINAL stackitertor (particle type) we use in C8:
using StackView = detail::TheStackView;
#endif // WITH_HISTORY
......
......@@ -177,64 +177,6 @@ TEST_CASE("transformations between CoordinateSystems") {
zPrime.getComponents(rootCS).getEigenVector()) ==
Approx((5_m * 5_m).magnitude()));
}
SECTION("RotateToZ positive") {
Vector const v{rootCS, 0_m, 1_m, 1_m};
auto const csPrime = rootCS.RotateToZ(v);
Vector const zPrime{csPrime, 0_m, 0_m, 5_m};
Vector const xPrime{csPrime, 5_m, 0_m, 0_m};
Vector const yPrime{csPrime, 0_m, 5_m, 0_m};
CHECK(xPrime.dot(v).magnitude() == Approx(0).margin(absMargin));
CHECK(yPrime.dot(v).magnitude() == Approx(0).margin(absMargin));
CHECK((zPrime.dot(v) / 1_m).magnitude() == Approx(5 * sqrt(2)));
CHECK(zPrime.GetComponents(rootCS)[1].magnitude() ==
Approx(zPrime.GetComponents(rootCS)[2].magnitude()));
CHECK(zPrime.GetComponents(rootCS)[0].magnitude() == Approx(0));
CHECK(xPrime.GetComponents(rootCS).eVector.dot(
yPrime.GetComponents(rootCS).eVector) == Approx(0));
CHECK(zPrime.GetComponents(rootCS).eVector.dot(
xPrime.GetComponents(rootCS).eVector) == Approx(0));
CHECK(yPrime.GetComponents(rootCS).eVector.dot(
zPrime.GetComponents(rootCS).eVector) == Approx(0));
CHECK(yPrime.GetComponents(rootCS).eVector.dot(
yPrime.GetComponents(rootCS).eVector) == Approx((5_m * 5_m).magnitude()));
CHECK(xPrime.GetComponents(rootCS).eVector.dot(
xPrime.GetComponents(rootCS).eVector) == Approx((5_m * 5_m).magnitude()));
CHECK(zPrime.GetComponents(rootCS).eVector.dot(
zPrime.GetComponents(rootCS).eVector) == Approx((5_m * 5_m).magnitude()));
}
SECTION("RotateToZ negative") {
Vector const v{rootCS, 0_m, 0_m, -1_m};
auto const csPrime = rootCS.RotateToZ(v);
Vector const zPrime{csPrime, 0_m, 0_m, 5_m};
Vector const xPrime{csPrime, 5_m, 0_m, 0_m};
Vector const yPrime{csPrime, 0_m, 5_m, 0_m};
CHECK(zPrime.dot(v).magnitude() > 0);
CHECK(xPrime.GetComponents(rootCS).eVector.dot(v.GetComponents().eVector) ==
Approx(0));
CHECK(yPrime.GetComponents(rootCS).eVector.dot(v.GetComponents().eVector) ==
Approx(0));
CHECK(xPrime.GetComponents(rootCS).eVector.dot(
yPrime.GetComponents(rootCS).eVector) == Approx(0));
CHECK(zPrime.GetComponents(rootCS).eVector.dot(
xPrime.GetComponents(rootCS).eVector) == Approx(0));
CHECK(yPrime.GetComponents(rootCS).eVector.dot(
zPrime.GetComponents(rootCS).eVector) == Approx(0));
CHECK(yPrime.GetComponents(rootCS).eVector.dot(
yPrime.GetComponents(rootCS).eVector) == Approx((5_m * 5_m).magnitude()));
CHECK(xPrime.GetComponents(rootCS).eVector.dot(
xPrime.GetComponents(rootCS).eVector) == Approx((5_m * 5_m).magnitude()));
CHECK(zPrime.GetComponents(rootCS).eVector.dot(
zPrime.GetComponents(rootCS).eVector) == Approx((5_m * 5_m).magnitude()));
}
}
TEST_CASE("CoordinateSystem hirarchy") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment