19#ifndef OPAL_PartBunch_HH
20#define OPAL_PartBunch_HH
54 double getRho(
int x,
int y,
int z);
117 void swap(
unsigned int i,
unsigned int j);
155 void computeFarField(
double gamma,
const std::vector<CoreFitSC::ParticleClass>& particleClass);
190 return rho_m[x][y][z].get();
Inform & operator<<(Inform &os, PartBunch &p)
PETE_TTTree< OpWhere, typename Cond_t::PETE_Expr_t, typename True_t::PETE_Expr_t, PETE_Scalar< Vektor< T, Dim > > > where(const PETE_Expr< Cond_t > &c, const PETE_Expr< True_t > &t, const Vektor< T, Dim > &f)
std::shared_ptr< AbstractParticle< double, Dim > > pbase_m
std::pair< Vector_t, Vector_t > VectorPair_t
static const unsigned Dimension
void resetInterpolationCache(bool clearCache=false)
ParticleAttrib< double > maskedQ_m
scatterMasked(): the charges and positions of the particles that a predicate accepts
BConds< double, 3, Mesh_t, Center_t > bc_m
for defining the boundary conditions
double getRho(int x, int y, int z)
PartBunch & operator=(const PartBunch &)=delete
IpplParticleBase< Layout_t > pbase_t
void scatterMasked(const ParticleMask_t &accept)
CIC scatter of Q onto rho_m, of the particles with Bin >= 0 and accept(i) true.
Field_t rho_m
scalar potential
void swap(unsigned int i, unsigned int j)
const ParticleLayout< double, 3 > & getLayout() const
void computeFarField(double gamma, const std::vector< CoreFitSC::ParticleClass > &particleClass)
MESHFIT=CORE: field of the particles outside the core bounds.
ParticleLayout< double, 3 > & getLayout()
void initialize(FieldLayout_t *fLayout)
void gatherMasked(const ParticleMask_t &accept)
CIC gather of eg_m into Ef, at the particles with accept(i) true.
bool interpolationCacheSet_m
Inform & print(Inform &os)
ParticleAttrib< Vector_t > maskedR_m
void checkUnmaskedInterpolation(const std::string &where) const
void updateDomainLength(Vektor< int, 3 > &grid)
FieldLayout_t & getFieldLayout()
VField_t eg_m
vector field on the grid
VectorPair_t getEExtrema()
const Mesh_t & getMesh() const
PartBunch(const PartBunch &)=delete
ParticleAttrib< CacheDataCIC< double, 3U > > interpolationCache_m
void resizeMesh()
resize mesh to geometry specified
BConds< Vector_t, 3, Mesh_t, Center_t > vbc_m
void computeSelfFields_cycl(double gamma)
Calculates the self electric field from the charge density distribution for use in cyclotrons.
void updateFields(const Vector_t &hr, const Vector_t &origin)
std::function< bool(size_t)> ParticleMask_t
Per-particle predicate on the local index, for scatterMasked() and gatherMasked().
RegionLayout< T, Dim, Mesh > & getLayout()