WarpX
Public Member Functions | Public Attributes | Private Attributes | List of all members
ParserFilter Struct Reference

Functor that returns 0 or 1 depending on a parser selection. More...

#include <FilterFunctors.H>

Public Member Functions

 ParserFilter (bool a_is_active, amrex::ParserExecutor< 7 > const &a_filter_parser, const amrex::ParticleReal a_mass, const amrex::Real time)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator() (const SuperParticleType &p, const amrex::RandomEngine &) const noexcept
 return 1 if the particle is selected by the parser More...
 

Public Attributes

amrex::ParserExecutor< 7 > const m_function_partparser
 
amrex::ParticleReal m_mass
 
amrex::Real m_t
 
InputUnits m_units {InputUnits::WarpX}
 

Private Attributes

const bool m_is_active
 

Detailed Description

Functor that returns 0 or 1 depending on a parser selection.

Constructor & Destructor Documentation

◆ ParserFilter()

ParserFilter::ParserFilter ( bool  a_is_active,
amrex::ParserExecutor< 7 > const &  a_filter_parser,
const amrex::ParticleReal  a_mass,
const amrex::Real  time 
)
inline

constructor

Parameters
a_is_activewhether the test is active
a_filter_parserparser taking t, x, y, z, ux, uy, and uz, and returning a boolean for selected particle
a_massmass of the particle species
timesimulation time on the coarsest level

Member Function Documentation

◆ operator()()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool ParserFilter::operator() ( const SuperParticleType p,
const amrex::RandomEngine  
) const
inlinenoexcept

return 1 if the particle is selected by the parser

Parameters
pone particle
Returns
whether or not the particle is selected

Member Data Documentation

◆ m_function_partparser

amrex::ParserExecutor<7> const ParserFilter::m_function_partparser

Parser function with 7 input variables, t,x,y,z,ux,uy,uz

◆ m_is_active

const bool ParserFilter::m_is_active
private

Whether this diagnostics is activated. Select all particles if false

◆ m_mass

amrex::ParticleReal ParserFilter::m_mass

Mass of particle species

◆ m_t

amrex::Real ParserFilter::m_t

Store physical time on the coarsest level.

◆ m_units

InputUnits ParserFilter::m_units {InputUnits::WarpX}

keep track of momentum units particles will come in with


The documentation for this struct was generated from the following file: