38template<
unsigned int Dim>
46template<
unsigned int Dim>
57template<
unsigned int Dim>
59 : Layout(si.Layout),
Offset(si.
Offset), IndexList(si.IndexList),
74template<
unsigned int Dim>
76 : Layout(si.Layout),
Offset(si.
Offset), IndexList(si.IndexList),
94template<
unsigned int Dim>
96 : Layout(si.Layout),
Offset(si.
Offset), IndexList(si.IndexList),
112template<
unsigned int Dim>
116 Layout->checkout(*
this);
123template<
unsigned int Dim>
136template<
unsigned int Dim>
141 Layout->checkin(*
this);
144 IndexList.reserve(Layout->size_iv());
148 for ( ; locvn != Layout->
end_iv(); ++locvn)
149 IndexList.push_back(std::make_shared<
LSIndex<Dim>>((*locvn).second.get()));
159template<
unsigned int Dim>
166 for (
iterator_iv curr = begin_iv(); curr != end_iv(); ++curr) {
167 if (addIndex(curr, so)) {
181template<
unsigned int Dim>
188 if ((*curr)->contains(so) && ! (*curr)->hasIndex(so)) {
189 (*curr)->addIndex(so);
202template<
unsigned int Dim>
211 unsigned int d, totalnum = ndi.
size();
213 for (d=0; d <
Dim; ++d)
214 counter[d] = ndi[d].
begin();
216 while (totalnum-- > 0) {
219 for (d=0; d <
Dim; ++d)
220 newpoint[d] = *(counter[d]);
224 unsigned int chkdim = 0;
225 while(chkdim <
Dim) {
227 if (counter[chkdim] == ndi[chkdim].
end()) {
228 counter[chkdim] = ndi[chkdim].begin();
241template<
unsigned int Dim>
248 for (
iterator_iv curr = begin_iv(); curr != end_iv(); ++curr)
249 if (removeIndex(curr, so))
261template<
unsigned int Dim>
266 if ((*curr)->hasIndex(so)) {
267 (*curr)->removeIndex(so);
278template<
unsigned int Dim>
287 unsigned int d, totalnum = ndi.
size();
289 for (d=0; d <
Dim; ++d)
290 counter[d] = ndi[d].
begin();
292 while (totalnum-- > 0) {
295 for (d=0; d <
Dim; ++d)
296 newpoint[d] = *(counter[d]);
297 removeIndex(newpoint);
300 unsigned int chkdim = 0;
301 while(chkdim <
Dim) {
303 if (counter[chkdim] == ndi[chkdim].
end()) {
304 counter[chkdim] = ndi[chkdim].begin();
317template<
unsigned int Dim>
321 if (fraction < 0.9999 && fraction > 0.0)
323 static_cast<double>(newcapacity));
324 (*a)->reserve(newcapacity);
331template<
unsigned int Dim>
344template<
unsigned int Dim>
350 if ((*a)->hasIndex(so))
359template<
unsigned int Dim>
367 if (Layout == 0 || Layout != si.
Layout) {
369 Layout->checkout(*
this);
371 Layout->checkin(*
this);
388template<
unsigned int Dim>
407template<
unsigned int Dim>
426template<
unsigned int Dim>
437 for ( ;
a != ea; ++
a, ++na) {
440 for ( ; ls_i != ls_e ; ++ls_i) {
460template<
unsigned int Dim>
465 bool found = hasIndex(so);
477template<
unsigned int Dim>
487 for ( ;
a != ea; ++
a, ++na) {
490 for ( ; ls_i != ls_e ; ++ls_i) {
491 if ((*ls_i).inside(ndi))
510template<
unsigned int Dim>
519 for ( ;
a != ea; ++
a, ++na) {
522 for ( ; ls_i != ls_e ; ++ls_i)
537template<
unsigned int Dim>
554template<
unsigned int Dim>
572template<
unsigned int Dim>
581template<
unsigned int Dim>
589template<
unsigned int Dim>
598template<
unsigned int Dim>
607template<
unsigned int Dim>
616template<
unsigned int Dim>
626template<
unsigned int Dim>
634template<
unsigned int Dim>
648template<
unsigned int Dim>
663template<
unsigned int Dim>
668 for (
unsigned int d=0; d <
Dim; ++d) {
669 int m = val[d] +
Offset[d];
670 NDI[d] =
Index(m, m);
677template<
unsigned int Dim>
684 retval += (*a)->size();
694template<
unsigned int Dim>
712template<
unsigned int Dim>
717 if (Layout != 0 && userlist->
getUserListID() == Layout->get_Id()) {
721 setFieldLayout(*Layout);
728template<
unsigned int Dim>
733 if (Layout != 0 && userlist->
getUserListID() == Layout->get_Id())
740template<
unsigned int Dim>
745 o <<
"vnodes = " << si.
size_iv();
747 o <<
", bounding box = " << si.
getDomain();
748 o <<
", points in each LField (w/offset):" <<
std::endl;
750 o <<
" In LField w/domain=" << (*a)->getDomain() <<
":" <<
std::endl;
751 o <<
" compressed = " << (*a)->IsCompressed() <<
std::endl;
752 unsigned int lsize = (*a)->size();
753 for (
unsigned int i=0; i < lsize; ++i)
763template<
unsigned int Dim>
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
PartBunchBase< T, Dim >::ConstIterator begin(PartBunchBase< T, Dim > const &bunch)
std::ostream & operator<<(std::ostream &o, const SIndex< Dim > &si)
Inform & endl(Inform &inf)
ac_id_vnodes::iterator iterator_iv
container_t::const_iterator const_iterator
container_t::size_type size_type
container_t::iterator iterator_iv
size_type_iv size_iv() const
bool addIndex(const SOffset< Dim > &)
void initialize(FieldLayout< Dim > &)
container_t::size_type size_type_iv
FieldLayout< Dim > * Layout
size_type_iv size() const
bool removeIndex(const SOffset< Dim > &)
void printDebug(Inform &) const
const NDIndex< Dim > & getDomain() const
bool hasIndex(const SOffset< Dim > &) const
virtual void notifyUserOfDelete(UserList *)
SIndex< Dim > & operator=(const PETE_Expr< T1 > &rhs)
container_t::const_iterator const_iterator_iv
IndexedSIndex< Dim, 1 > operator[](const Index &)
SOffset< Dim > & getOffset()
virtual void Repartition(UserList *)
SIndex< Dim > operator()(int)
SIndex< Dim > & operator&=(const SIndex< Dim > &)
NDIndex< Dim > BoundingBox
void setFieldLayout(FieldLayout< Dim > &)
void toNDIndex(const SOffset< Dim > &, NDIndex< Dim > &)
SIndex< Dim > & operator|=(const SIndex< Dim > &)
ID_t getUserListID() const