SpECTRE  v2025.08.19
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. More...
 
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. More...
 
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. More...
 
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. More...
 
double relative_truncation_error (const DataVector &power_monitor, size_t num_modes_to_use)
 Compute the relative truncation error. More...
 
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. More...
 

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).