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

Functor that returns 1 if stride divide particle_id, 0 otherwise. More...

#include <FilterFunctors.H>

Public Member Functions

 UniformFilter (bool a_is_active, int a_stride)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator() (const SuperParticleType &p, const amrex::RandomEngine &) const noexcept
 return 1 if stride divide particle_id, 0 otherwise More...
 

Private Attributes

const bool m_is_active
 
const int m_stride = 0
 select all particles if false More...
 

Detailed Description

Functor that returns 1 if stride divide particle_id, 0 otherwise.

Constructor & Destructor Documentation

◆ UniformFilter()

UniformFilter::UniformFilter ( bool  a_is_active,
int  a_stride 
)
inline

constructor

Parameters
a_is_activewhether the test is active
a_strideone particle every a_stride is written to file

Member Function Documentation

◆ operator()()

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

return 1 if stride divide particle_id, 0 otherwise

Parameters
pone particle
Returns
whether or not the particle is selected

Member Data Documentation

◆ m_is_active

const bool UniformFilter::m_is_active
private

◆ m_stride

const int UniformFilter::m_stride = 0
private

select all particles if false


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