11 #ifndef PARTICLE_BCONDS_H
12 #define PARTICLE_BCONDS_H
40 return (maxval - (minval - t));
42 return (minval + (t - maxval));
51 return (minval + (minval - t));
53 return (maxval - (t - maxval));
72 template<
class T,
unsigned Dim>
83 for (
int d=(2*
Dim - 1); d >= 0; --d)
89 for (
int d=(2*
Dim - 1); d >= 0; --d)
108 return apply(t, d, ni[d].first(), ni[d].last() + 1);
113 T apply(
const T t,
const unsigned d,
const T m1,
const T m2)
const {
115 return (
BCList[d+d])(t, m1, m2);
117 return (
BCList[d+d+1])(t, m1, m2);
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
T ParticlePeriodicBCond(const T t, const T minval, const T maxval)
T ParticleSinkBCond(const T t, const T minval, const T maxval)
T ParticleReflectiveBCond(const T t, const T minval, const T maxval)
T ParticleNoBCond(const T t, const T, const T)
T apply(const T t, const unsigned d, const NDRegion< T, Dim > &nr) const
T(* ParticleBCond)(const T, const T, const T)
ParticleBCond BCList[2 *Dim]
ParticleBCond & operator[](unsigned d)
T apply(const T t, const unsigned d, const NDIndex< Dim > &ni) const
ParticleBConds< T, Dim > & operator=(const ParticleBConds< T, Dim > &pbc)
T apply(const T t, const unsigned d, const T m1, const T m2) const