Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <array>
7 : #include <limits>
8 :
9 : /// \cond
10 : namespace ylm {
11 : template <typename Frame>
12 : class Strahlkorper;
13 : } // namespace ylm
14 : namespace gsl {
15 : template <typename T>
16 : class not_null;
17 : } // namespace gsl
18 : /// \endcond
19 :
20 : namespace ylm {
21 : /// Changes the expansion center of a Strahlkorper, where the
22 : /// expansion center is defined as the point about which the spectral
23 : /// basis of the Strahlkorper is expanded, which is the quantity
24 : /// returned by `Strahlkorper::expansion_center()`.
25 : template <typename Frame>
26 1 : void change_expansion_center_of_strahlkorper(
27 : gsl::not_null<Strahlkorper<Frame>*> strahlkorper,
28 : const std::array<double, 3>& new_center);
29 :
30 : /// Changes the expansion center of a Strahlkorper to the physical
31 : /// center. Because `Strahlkorper::physical_center()` returns only an
32 : /// approximate quantity,
33 : /// `change_expansion_center_of_strahlkorper_to_physical` is
34 : /// iterative, and does not return exactly the same result as passing
35 : /// `Strahlkorper::physical_center()` to
36 : /// `change_expansion_center_of_strahlkorper`.
37 : template <typename Frame>
38 1 : void change_expansion_center_of_strahlkorper_to_physical(
39 : gsl::not_null<Strahlkorper<Frame>*> strahlkorper,
40 : double relative_tolerance = 2.0 * std::numeric_limits<double>::epsilon());
41 : } // namespace ylm
|