SpECTRE
v2024.12.16
|
A cached exponential filter. More...
#include <ExponentialFilter.hpp>
Classes | |
struct | Alpha |
The value of exp(-alpha) is what the highest modal coefficient is rescaled by. More... | |
struct | BlocksToFilter |
struct | Enable |
Turn the filter off. More... | |
struct | HalfPower |
Half of the exponent in the exponential. More... | |
Public Types | |
using | options = implementation defined |
Public Member Functions | |
Exponential (double alpha, unsigned half_power, bool enable, const std::optional< std::vector< std::string > > &blocks_to_filter, const Options::Context &context={}) | |
const Matrix & | filter_matrix (const Mesh< 1 > &mesh) const |
A cached matrix used to apply the filter to the given mesh. | |
bool | enable () const |
const std::optional< std::unordered_set< std::string > > & | blocks_to_filter () const |
void | pup (PUP::er &p) |
Static Public Member Functions | |
static std::string | name () |
Static Public Attributes | |
static constexpr Options::String | help = {"An exponential filter."} |
Friends | |
template<size_t LocalFilterIndex> | |
bool | operator== (const Exponential< LocalFilterIndex > &lhs, const Exponential< LocalFilterIndex > &rhs) |
A cached exponential filter.
Applies an exponential filter in each logical direction to each component of the tensors TagsToFilter
. The exponential filter rescales the 1d modal coefficients
where HalfPower
option) determines how aggressive/broad the filter is (lower values means filtering more coefficients). Setting
size_t
template parameter is to allow for different Alpha
and HalfPower
parameters for different tensors while still being able to cache the matrices. If different Alpha
or HalfPower
parameters are desired for filtering different tensors, then multiple filters must be inserted into the GlobalCache with different FilterIndex
values. In the input file these will be specified as ExpFilterFILTER_INDEX
, e.g.