SpECTRE  v2026.06.09.01
Loading...
Searching...
No Matches
Filters::None< Dim, TagList > Class Template Reference

A no-op filter that never modifies any data and accepts any mesh basis or quadrature. More...

#include <None.hpp>

Classes

struct  BlocksToFilter
 Which blocks the filter should be applied to. More...

Public Types

using options = tmpl::list<BlocksToFilter>

Public Member Functions

 None (const std::optional< std::vector< std::string > > &blocks_to_filter, const Options::Context &context={})
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(Filter< Dim, TagList >), None)
 None (CkMigrateMessage *msg)
void pup (PUP::er &p) override
std::unique_ptr< Filter< Dim, TagList > > get_clone () const override
 Return a heap-allocated deep copy of this filter.
bool apply_volume_filter_on_substep () const override
 Whether the volume filter should be applied inside every Runge-Kutta substep.
bool apply_volume_filter_on_this_step (size_t) const override
 Whether the volume filter should be applied at the given step_number.
bool apply_boundary_filter_on_substep () const override
 Whether the boundary filter should be applied inside every Runge-Kutta substep.
bool apply_boundary_filter_on_this_step (size_t) const override
 Whether the boundary filter should be applied at the given step_number.
bool need_jacobians () const override
 Whether the filter needs the grid-to-inertial Jacobian and its inverse.
bool supports_mesh (const Mesh< Dim > &) const override
 Returns true if this filter can filter the mesh.
std::string name () const override
 A human-readable name for the concrete filter type, used in diagnostics.
const std::optional< std::vector< size_t > > & blocks_to_filter () const override
 The set of block (or block group) names the filter applies to.
void set_blocks_to_filter (const std::vector< std::string > &all_block_names, const std::unordered_map< std::string, std::unordered_set< std::string > > &block_groups) override
 Used after construction to change blocks and groups labeled by strings to size_ts, which is what is used throughout the code.
void apply_in_volume (gsl::not_null< Variables< TagList > * > vars, const Mesh< Dim > &mesh, const std::optional< InverseJacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > &inv_jac_grid_to_inertial, const std::optional< Jacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > &jac_grid_to_inertial) const override
 Apply the filter in place to the volume vars on the Dim-dimensional mesh.
void apply_on_boundary (gsl::not_null< Variables< TagList > * > vars, const Mesh< Dim - 1 > &mesh, const std::optional< InverseJacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > &inv_jac_grid_to_inertial, const std::optional< Jacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > &jac_grid_to_inertial) const override
 Apply the filter in place to face vars on the Dim - 1 face mesh.
bool is_equal (const Filter< Dim, TagList > &other) const override
 Returns true if other is the same concrete filter type and is equivalent to *this.
Public Member Functions inherited from Filters::Filter< Dim, TagList >
 WRAPPED_PUPable_abstract (Filter)
 Filter (CkMigrateMessage *m)

Static Public Attributes

static constexpr Options::String help

Friends

template<size_t LocalDim, typename LocalTagList>
bool operator== (const None< LocalDim, LocalTagList > &lhs, const None< LocalDim, LocalTagList > &rhs)

Detailed Description

template<size_t Dim, typename TagList>
class Filters::None< Dim, TagList >

A no-op filter that never modifies any data and accepts any mesh basis or quadrature.

See Filters::Filter for the general interface description.

Member Function Documentation

◆ apply_boundary_filter_on_substep()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::apply_boundary_filter_on_substep ( ) const
inlineoverridevirtual

Whether the boundary filter should be applied inside every Runge-Kutta substep.

Implements Filters::Filter< Dim, TagList >.

◆ apply_boundary_filter_on_this_step()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::apply_boundary_filter_on_this_step ( size_t step_number) const
inlineoverridevirtual

Whether the boundary filter should be applied at the given step_number.

Note
Currently the check for whether to filter on every N steps is done relative to the start of the current Slab. This means that for GTS, independent of the value of N for every N steps, every step has a filter applied since GTS has one step per slab.

Implements Filters::Filter< Dim, TagList >.

◆ apply_in_volume()

template<size_t Dim, typename TagList>
void Filters::None< Dim, TagList >::apply_in_volume ( gsl::not_null< Variables< TagList > * > vars,
const Mesh< Dim > & mesh,
const std::optional< InverseJacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > & inv_jac_grid_to_inertial,
const std::optional< Jacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > & jac_grid_to_inertial ) const
overridevirtual

Apply the filter in place to the volume vars on the Dim-dimensional mesh.

The grid-to-inertial Jacobian jac_grid_to_inertial and its inverse inv_jac_grid_to_inertial are populated only when need_jacobians() returns true; otherwise both arguments are std::nullopt.

Implements Filters::Filter< Dim, TagList >.

◆ apply_on_boundary()

template<size_t Dim, typename TagList>
void Filters::None< Dim, TagList >::apply_on_boundary ( gsl::not_null< Variables< TagList > * > vars,
const Mesh< Dim - 1 > & mesh,
const std::optional< InverseJacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > & inv_jac_grid_to_inertial,
const std::optional< Jacobian< DataVector, Dim, Frame::Grid, Frame::Inertial > > & jac_grid_to_inertial ) const
overridevirtual

Apply the filter in place to face vars on the Dim - 1 face mesh.

Used to filter the lifted boundary corrections produced by the DG numerical flux before they enter the volume right-hand side. The grid-to-inertial Jacobian jac_grid_to_inertial and its inverse inv_jac_grid_to_inertial are populated only when need_jacobians() returns true; otherwise both arguments are std::nullopt.

Implements Filters::Filter< Dim, TagList >.

◆ apply_volume_filter_on_substep()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::apply_volume_filter_on_substep ( ) const
inlineoverridevirtual

Whether the volume filter should be applied inside every Runge-Kutta substep.

Implements Filters::Filter< Dim, TagList >.

◆ apply_volume_filter_on_this_step()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::apply_volume_filter_on_this_step ( size_t step_number) const
inlineoverridevirtual

Whether the volume filter should be applied at the given step_number.

Note
Currently the check for whether to filter on every N steps is done relative to the start of the current Slab. This means that for GTS, independent of the value of N for every N steps, every step has a filter applied since GTS has one step per slab.

Implements Filters::Filter< Dim, TagList >.

◆ blocks_to_filter()

template<size_t Dim, typename TagList>
const std::optional< std::vector< size_t > > & Filters::None< Dim, TagList >::blocks_to_filter ( ) const
overridevirtual

The set of block (or block group) names the filter applies to.

std::nullopt means the filter applies to every block in the domain.

Implements Filters::Filter< Dim, TagList >.

◆ get_clone()

template<size_t Dim, typename TagList>
std::unique_ptr< Filter< Dim, TagList > > Filters::None< Dim, TagList >::get_clone ( ) const
inlineoverridevirtual

Return a heap-allocated deep copy of this filter.

Implements Filters::Filter< Dim, TagList >.

◆ is_equal()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::is_equal ( const Filter< Dim, TagList > & other) const
overridevirtual

Returns true if other is the same concrete filter type and is equivalent to *this.

Implements Filters::Filter< Dim, TagList >.

◆ name()

template<size_t Dim, typename TagList>
std::string Filters::None< Dim, TagList >::name ( ) const
inlineoverridevirtual

A human-readable name for the concrete filter type, used in diagnostics.

Implements Filters::Filter< Dim, TagList >.

◆ need_jacobians()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::need_jacobians ( ) const
inlineoverridevirtual

Whether the filter needs the grid-to-inertial Jacobian and its inverse.

When false, the driving action passes std::nullopt for the Jacobian arguments of apply_in_volume and apply_on_boundary and avoids constructing them.

Implements Filters::Filter< Dim, TagList >.

◆ set_blocks_to_filter()

template<size_t Dim, typename TagList>
void Filters::None< Dim, TagList >::set_blocks_to_filter ( const std::vector< std::string > & all_block_names,
const std::unordered_map< std::string, std::unordered_set< std::string > > & block_groups )
overridevirtual

Used after construction to change blocks and groups labeled by strings to size_ts, which is what is used throughout the code.

Implements Filters::Filter< Dim, TagList >.

◆ supports_mesh()

template<size_t Dim, typename TagList>
bool Filters::None< Dim, TagList >::supports_mesh ( const Mesh< Dim > & mesh) const
inlineoverridevirtual

Returns true if this filter can filter the mesh.

Implements Filters::Filter< Dim, TagList >.

Member Data Documentation

◆ help

template<size_t Dim, typename TagList>
Options::String Filters::None< Dim, TagList >::help
staticconstexpr
Initial value:
= {
"A no-op filter that never modifies any data and is valid for any basis "
"or quadrature."}

The documentation for this class was generated from the following file:
  • src/NumericalAlgorithms/LinearOperators/Filters/None.hpp