46template <
class FT,
unsigned Dim,
class M,
class C,
class PT,
class IntOp>
62 for (ppiter = pp.
cbegin(); i < pp.size(); ++i, ++ppiter) {
65 for (
unsigned int d = 0; d <
Dim; ++d)
66 inside = inside && (pos[d] >= domain[d].
min() && pos[d] < domain[d].max());
68 IntOp::scatter(FT(1), f, pos, mesh);
83template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy>
99 ERRORMSG(
"Cannot repartition particles: uninitialized layout." <<
endl);
117 bool CenterOffset[
Dim];
118 int CenteringTotal = 0;
120 for (d=0; d<
Dim; ++d) {
121 CenterOffset[d] = (TotalDomain[d].length() < mesh.gridSizes[d]);
122 CenteringTotal += CenterOffset[d];
127 const bool outsideToNearest = PB.getLayout().getOutsideToNearest();
129 if (CenteringTotal ==
Dim) {
137 if (outsideToNearest)
153 else if (CenteringTotal == 0) {
161 if (outsideToNearest)
178 ERRORMSG(
"Not implemented for face- and edge-centered Fields!!" <<
endl);
190template<
class T,
unsigned Dim>
NDIndex< Dim > CalcBinaryRepartition(FieldLayout< Dim > &, BareField< double, Dim > &)
void scatterInsideDomain(Field< FT, Dim, M, C > &f, const ParticleAttrib< Vektor< PT, Dim > > &pp, const NDRegion< PT, Dim > &domain, const IntOp &)
bool BinaryRepartition(IpplParticleBase< ParticleSpatialLayout< T, Dim, Mesh, CachingPolicy > > &PB, double offset)
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
bool scatter(Communicate &, InputIterator, InputIterator, RandomIterator, int *, int *, const ScatterOp &)
Inform & endl(Inform &inf)
#define INCIPPLSTAT(stat)
const_iterator cbegin() const
Mesh_t & get_mesh() const
void setGuardCells(const T &) const
const NDIndex< Dim > & getDomain() const
void RepartitionLayout(NDIndex< Dim > *, NDIndex< Dim > *)
const NDRegion< T, Dim > & getDomain() const
FieldLayout< Dim > & getFieldLayout()
static void abort(const char *=0)