SpECTRE  v2026.08.27
Loading...
Searching...
No Matches
PowerMonitors Namespace Reference

Items for assessing truncation error in spectral methods. More...

Classes

struct  ConvergenceInfo
 Holds convergence rate and pile up modes of a power monitor. More...

Functions

template<typename VectorType, size_t Dim>
std::array< double, Dim > relative_truncation_error (const VectorType &tensor_component, const Mesh< Dim > &mesh)
 The relative truncation error in each logical direction of the grid.
ConvergenceInfo convergence_rate_and_number_of_pile_up_modes (const DataVector &power_monitor, size_t number_of_filtered_modes=0)
 Returns the convergence rate and the number of pile up modes of a power monitor as a ConvergenceInfo.
template<typename VectorType, size_t Dim>
void power_monitors (gsl::not_null< std::array< DataVector, Dim > * > result, const VectorType &u, const Mesh< Dim > &mesh)
 Returns array of power monitors in each spatial dimension.
template<typename VectorType, size_t Dim>
std::array< DataVector, Dim > power_monitors (const VectorType &u, const Mesh< Dim > &mesh)
 Returns array of power monitors in each spatial dimension.
double relative_truncation_error (const DataVector &power_monitor, size_t num_modes_to_use)
 Compute the relative truncation error.
template<typename VectorType, size_t Dim>
std::array< double, Dim > absolute_truncation_error (const VectorType &tensor_component, const Mesh< Dim > &mesh)
 Returns an estimate of the absolute truncation error in each dimension.
void spherical_shell_radial_power_monitor (gsl::not_null< DataVector * > result, const DataVector &tensor_component, const Mesh< 3 > &mesh)
 Return the radial power monitor for a tensor component on a spherical shell.
DataVector spherical_shell_radial_power_monitor (const DataVector &tensor_component, const Mesh< 3 > &mesh)
 Return the radial power monitor for a tensor component on a spherical shell.
void spherical_shell_angular_power_monitor (gsl::not_null< DataVector * > result, const DataVector &tensor_ylm_component, const Mesh< 3 > &mesh, int spin_weight, bool zero_m_is_real)
 Return the angular power monitor for one TensorYlm component on a spherical shell.
DataVector spherical_shell_angular_power_monitor (const DataVector &tensor_ylm_component, const Mesh< 3 > &mesh, int spin_weight, bool zero_m_is_real)
 Return the angular power monitor for one TensorYlm component on a spherical shell.

Detailed Description

Items for assessing truncation error in spectral methods.

Function Documentation

◆ relative_truncation_error()

template<typename VectorType, size_t Dim>
std::array< double, Dim > PowerMonitors::relative_truncation_error ( const VectorType & tensor_component,
const Mesh< Dim > & mesh )

The relative truncation error in each logical direction of the grid.

This overload is intended for visualization purposes only. It takes a tensor component as input, so it can be used as a kernel to post-process volume data with Python bindings (see TransformVolumeData.py).

◆ spherical_shell_angular_power_monitor() [1/2]

DataVector PowerMonitors::spherical_shell_angular_power_monitor ( const DataVector & tensor_ylm_component,
const Mesh< 3 > & mesh,
int spin_weight,
bool zero_m_is_real )

Return the angular power monitor for one TensorYlm component on a spherical shell.

The mesh dimensions are assumed to be ordered (radial, theta, phi), with l_max == m_max. TensorYlm coefficients use the radial dimension as the fastest-moving extent. As reviewed in Sec. II of [31], spin-weighted spherical harmonics with l < |spin_weight| vanish, so these modes are omitted from both the sum and its normalization. Set zero_m_is_real for real scalar coefficients, which have no imaginary m=0 coefficients in Spherepack storage.

◆ spherical_shell_angular_power_monitor() [2/2]

void PowerMonitors::spherical_shell_angular_power_monitor ( gsl::not_null< DataVector * > result,
const DataVector & tensor_ylm_component,
const Mesh< 3 > & mesh,
int spin_weight,
bool zero_m_is_real )

Return the angular power monitor for one TensorYlm component on a spherical shell.

The mesh dimensions are assumed to be ordered (radial, theta, phi), with l_max == m_max. TensorYlm coefficients use the radial dimension as the fastest-moving extent. As reviewed in Sec. II of [31], spin-weighted spherical harmonics with l < |spin_weight| vanish, so these modes are omitted from both the sum and its normalization. Set zero_m_is_real for real scalar coefficients, which have no imaginary m=0 coefficients in Spherepack storage.

◆ spherical_shell_radial_power_monitor() [1/2]

DataVector PowerMonitors::spherical_shell_radial_power_monitor ( const DataVector & tensor_component,
const Mesh< 3 > & mesh )

Return the radial power monitor for a tensor component on a spherical shell.

The mesh dimensions are assumed to be ordered (radial, theta, phi). The radial grid points are contiguous, so each angular point supplies one radial slice to the one-dimensional modal transform.

◆ spherical_shell_radial_power_monitor() [2/2]

void PowerMonitors::spherical_shell_radial_power_monitor ( gsl::not_null< DataVector * > result,
const DataVector & tensor_component,
const Mesh< 3 > & mesh )

Return the radial power monitor for a tensor component on a spherical shell.

The mesh dimensions are assumed to be ordered (radial, theta, phi). The radial grid points are contiguous, so each angular point supplies one radial slice to the one-dimensional modal transform.