44 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy>
60 ERRORMSG(
"Cannot repartition particles: uninitialized layout." <<
endl);
78 bool CenterOffset[
Dim];
79 int CenteringTotal = 0;
81 for (d=0; d<
Dim; ++d) {
82 CenterOffset[d] = (TotalDomain[d].length() < mesh.gridSizes[d]);
83 CenteringTotal += CenterOffset[d];
87 if (CenteringTotal == Dim) {
108 else if (CenteringTotal == 0) {
130 ERRORMSG(
"Not implemented for face- and edge-centered Fields!!" <<
endl);
142 template<
class T,
unsigned Dim>
void BinaryRepartition(FieldLayout< Dim > &layout, BareField< double, Dim > &weights)
Inform & endl(Inform &inf)
bool scatter(Communicate &, InputIterator, InputIterator, RandomIterator, int *, int *, const ScatterOp &)
void RepartitionLayout(NDIndex< Dim > *, NDIndex< Dim > *)
FieldLayout< Dim > & getFieldLayout()
NDIndex< Dim > CalcBinaryRepartition(FieldLayout< Dim > &, BareField< double, Dim > &)
const NDIndex< Dim > & getDomain() const
static void abort(const char *=0)