-
Notifications
You must be signed in to change notification settings - Fork 19
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
Replace constant magnetic field with covfie fields #311
Replace constant magnetic field with covfie fields #311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice and integrates into the detector view much better than I thought!
tests/common/include/tests/common/check_geometry_navigation.inl
Outdated
Show resolved
Hide resolved
// Use rectangular surfaces | ||
constexpr bool rectangular = false; | ||
|
||
using b_field_t = decltype(create_telescope_detector<rectangular>(std::declval<vecmem::host_memory_resource&>(), std::declval<std::vector<scalar>&>()))::bfield_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, same goes for the telescope of course, but I have to fix that detector anyways, so I will look into this
@@ -273,8 +276,12 @@ auto create_telescope_detector( | |||
scalar m_thickness; | |||
}; | |||
|
|||
typename detector_t::bfield_type bfield( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, nice, then I just have to make it configurable somehow
Do you mind if we merge #294 first though? |
Of course! |
f53d1a2
to
23e2466
Compare
This PR has been rebased. |
80027fa
to
1c36017
Compare
Formatting has been adjusted, all tests pass. |
9229a6a
to
e46a5be
Compare
This change migrates all existing usage of magnetic fields -- all constant -- to use the covfie library. From here, integrating analytical solenoidal fields or data-based fields should be (relatively) trivial.
e46a5be
to
0b5d29b
Compare
@@ -37,7 +37,6 @@ class rk_stepper final | |||
using point3 = typename transform3_type::point3; | |||
using vector2 = typename transform3_type::point2; | |||
using vector3 = typename transform3_type::vector3; | |||
using context_type = typename magnetic_field_t::context_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have a look shortly how to handle the context objects, so let's see
const auto d = create_toy_geometry(host_mr, n_brl_layers, n_edc_layers); | ||
|
||
// Construct the constant magnetic field. | ||
using b_field_t = decltype( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we just need to find a way to make the backend configurable from here, but let's do that when we switch to the solenoid
Let's get this in asap |
This change migrates all existing usage of magnetic fields -- all constant -- to use the covfie library. From here, integrating analytical solenoidal fields or data-based fields should be relatively trivial.