WarpX
Public Member Functions | List of all members
Compute_shape_factor< depos_order > Struct Template Reference

#include <ShapeFactors.H>

Public Member Functions

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int operator() (T *const sx, T xmid) const
 

Detailed Description

template<int depos_order>
struct Compute_shape_factor< depos_order >

Compute shape factor and return index of leftmost cell where particle writes. Specializations are defined for orders 0 to 4 (using "if constexpr"). Shape factor functors may be evaluated with double arguments in current deposition to ensure that current deposited by particles that move only a small distance is still resolved. Without this safeguard, single and double precision versions can give disagreeing results in the time evolution for some problem setups.

Member Function Documentation

◆ operator()()

template<int depos_order>
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int Compute_shape_factor< depos_order >::operator() ( T *const  sx,
xmid 
) const
inline

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