|
SpECTRE
v2026.04.01
|
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 = tmpl::list<Alpha, HalfPower, Enable, BlocksToFilter> |
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 \(c_i\) as:
\begin{align*} c_i\to c_i \exp\left[-\alpha_{\mathrm{ef}} \left(\frac{i}{N}\right)^{2\beta_{\mathrm{ef}}}\right] \end{align*}
where \(N\) is the basis degree (number of grid points per element per dimension minus one), \(\alpha_{\mathrm{ef}}\) determines how much the coefficients are rescaled, and \(\beta_{\mathrm{ef}}\) (given by the HalfPower option) determines how aggressive/broad the filter is (lower values means filtering more coefficients). Setting \(\alpha_{\mathrm{ef}}=36\) results in effectively zeroing the highest coefficient (in practice it gets rescaled by machine epsilon). The same \(\alpha_{\mathrm{ef}}\) and \(\beta_{\mathrm{ef}}\) are used in each logical direction. For a discussion of filtering see section 5.3 of [101].