|
| template<int Spin> |
| auto | Spectral::Swsh::swsh_buffer (const size_t l_max, const size_t number_of_radial_points) noexcept |
| | Produces a SpinWeighted<ComplexModalVector, Spin> of the appropriate size to be used as a modal buffer for Spectral::Swsh::AngularDerivatives or Spectral::Swsh::angular_derivatives. More...
|
| |
| template<typename DerivativeKindList , ComplexRepresentation Representation = ComplexRepresentation::Interleaved, typename... ArgumentTypes> |
| void | Spectral::Swsh::angular_derivatives (const size_t l_max, const size_t number_of_radial_points, const ArgumentTypes &... arguments) noexcept |
| | Evaluate all of the spin-weighted derivatives in DerivKindList on input SpinWeighted<ComplexDataVector, Spin> collocation data, returning by pointer. More...
|
| |
|
template<typename DerivKind , ComplexRepresentation Representation = ComplexRepresentation::Interleaved, int Spin> |
| SpinWeighted< ComplexDataVector, Tags::derivative_spin_weight< DerivKind >+Spin > | Spectral::Swsh::angular_derivative (size_t l_max, size_t number_of_radial_points, const SpinWeighted< ComplexDataVector, Spin > &to_differentiate) noexcept |
| | Evaluate the spin-weighted derivative DerivKind on the provided SpinWeighted<ComplexDataVector, Spin> collocation data, returning by value.
|
| |
| template<size_t Dim> |
| void | to_modal_coefficients (gsl::not_null< ComplexModalVector * > modal_coefficients, const ComplexDataVector &nodal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the modal coefficients from the nodal coefficients. More...
|
| |
| template<size_t Dim> |
| void | to_modal_coefficients (gsl::not_null< ModalVector * > modal_coefficients, const DataVector &nodal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the modal coefficients from the nodal coefficients. More...
|
| |
| template<size_t Dim> |
| ModalVector | to_modal_coefficients (const DataVector &nodal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the modal coefficients from the nodal coefficients. More...
|
| |
| template<size_t Dim> |
| ComplexModalVector | to_modal_coefficients (const ComplexDataVector &nodal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the modal coefficients from the nodal coefficients. More...
|
| |
| template<size_t Dim> |
| void | to_nodal_coefficients (gsl::not_null< ComplexDataVector * > nodal_coefficients, const ComplexModalVector &modal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the nodal coefficients from the modal coefficients. More...
|
| |
| template<size_t Dim> |
| void | to_nodal_coefficients (gsl::not_null< DataVector * > nodal_coefficients, const ModalVector &modal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the nodal coefficients from the modal coefficients. More...
|
| |
| template<size_t Dim> |
| DataVector | to_nodal_coefficients (const ModalVector &modal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the nodal coefficients from the modal coefficients. More...
|
| |
| template<size_t Dim> |
| ComplexDataVector | to_nodal_coefficients (const ComplexModalVector &modal_coefficients, const Mesh< Dim > &mesh) noexcept |
| | Compute the nodal coefficients from the modal coefficients. More...
|
| |
Things related to spectral transformations.
template<typename DerivativeTagList ,
ComplexRepresentation Representation = ComplexRepresentation::Interleaved>
| using Spectral::Swsh::AngularDerivatives = typedef detail::AngularDerivativesImpl< DerivativeTagList, typename detail::unique_derived_from_list<DerivativeTagList>::type, Representation> |
A DataBox mutate-compatible computational struct for computing a set of spin-weighted spherical harmonic derivatives by grouping and batch-computing spin-weighted spherical harmonic transforms.
Details
A derivative is evaluated for each tag in DerivativeTagList. All entries in DerivativeTagList must be the tag Spectral::Swsh::Tags::Derivative<Tag, DerivativeKind> prefixing the Tag to be differentiated, and indicating the spin-weighted derivative DerivativeKind to be taken. A DataBox on which this struct is invoked must contain:
- each of the tags in
DerivativeTagList (the results of the computation)
- each of the tags
Tag prefixed by Spectral::Swsh::Tags::Derivative in DerivativeTagList (the inputs of the computation).
- each of the tags
Spectral::Swsh::Tags::SwshTransform<DerivativeTag> for DerivativeTagin DerivativeTagList (the buffers for the derivative applied to the modes)
- each of the tags
Spectral::Swsh::Tags::SwshTransform<Tag> for Tag prefixed by any DerivativeTag in DerivativeTagList (the buffers for the transforms of the input data).
This function optimizes the derivative taking process by clustering like spins of tags, forward-transforming each spin cluster together, applying the factor for the derivative to each modal vector, re-clustering according to the new spin weights (the derivatives alter the spin weights), and finally inverse-transforming in clusters.
template<typename DerivativeKindList ,
ComplexRepresentation Representation = ComplexRepresentation::Interleaved, typename... ArgumentTypes>
| void Spectral::Swsh::angular_derivatives |
( |
const size_t |
l_max, |
|
|
const size_t |
number_of_radial_points, |
|
|
const ArgumentTypes &... |
arguments |
|
) |
| |
|
noexcept |
Evaluate all of the spin-weighted derivatives in DerivKindList on input SpinWeighted<ComplexDataVector, Spin> collocation data, returning by pointer.
Details
This function provides two interfaces, one in which the caller provides the intermediate coefficient buffers needed during the computation of the derivatives, and one in which those buffers are temporarily allocated during the derivative function calls.
For the interface in which the caller does not provide buffers, the arguments must take the following structure (enforced by internal function calls):
size_t l_max : angular resolution for the spherical representation
size_t number_of_radial_points : radial resolution (number of consecutive blocks to evaluate derivatives, for each input vector )
- for each
DerivKind in DerivKindList, a gsl::not_null<SpinWeighted<ComplexDataVector, Spin + Tags::derivative_spin_weight<DerivKind>>> : the output of the derivative evaluation
- for each
DerivKind in DerivKindList, a const SpinWeighted<ComplexDataVector, Spin>& (where the Spin for these arguments matches the corresponding vector from the previous set) : the input to the derivative evaluation.
For the interface in which the caller does provide buffers, the arguments must take the following structure (enforced by internal function calls):
size_t l_max : angular resolution for the spherical representation
size_t number_of_radial_points : radial resolution (number of consecutive blocks to evaluate derivatives, for each input vector )
- for each
DerivKind in DerivKindList, a gsl::not_null<SpinWeighted<ComplexModalVector, Spin + Tags::derivative_spin_weight<DerivKind>>> : the buffer for the spin-weighted spherical harmonic modes of the derivative quantities.
- for each
DerivKind in DerivKindList, a const SpinWeighted<ComplexModalVector, Spin> (where the Spin for these arguments matches the corresponding vector from the previous set) : the buffer for the spin-weighted spherical harmonic modes of the input quantities.
- for each
DerivKind in DerivKindList, a gsl::not_null<SpinWeighted<ComplexDataVector, Spin + Tags::derivative_spin_weight<DerivKind>>> : the output of the derivative evaluation
- for each
DerivKind in DerivKindList, a const SpinWeighted<ComplexDataVector, Spin> (where the Spin for these arguments matches the corresponding vector from the previous set) : the input to the derivative evaluation.
The function swsh_buffer assists in generating the modal buffers of appropriate size.