38 template<
unsigned int Dim>
 
   46 template<
unsigned int Dim>
 
   57 template<
unsigned int Dim>
 
   59   : Layout(si.Layout), 
Offset(si.
Offset), IndexList(si.IndexList),
 
   60     BoundingBox(si.BoundingBox)
 
   74 template<
unsigned int Dim>
 
   76   : Layout(si.Layout), 
Offset(si.
Offset), IndexList(si.IndexList),
 
   77     BoundingBox(si.BoundingBox)
 
   94 template<
unsigned int Dim>
 
   96   : Layout(si.Layout), 
Offset(si.
Offset), IndexList(si.IndexList),
 
   97     BoundingBox(si.BoundingBox)
 
  112 template<
unsigned int Dim>
 
  116     Layout->checkout(*
this);
 
  123 template<
unsigned int Dim>
 
  136 template<
unsigned int Dim>
 
  141   Layout->checkin(*
this);
 
  144   IndexList.reserve(Layout->size_iv());
 
  148   for ( ; locvn != Layout->
end_iv(); ++locvn)
 
  149     IndexList.push_back(
new LSIndex<Dim>((*locvn).second.get()));
 
  152   BoundingBox = Layout->getDomain();
 
  159 template<
unsigned int Dim>
 
  166   for (
iterator_iv curr = begin_iv(); curr != end_iv(); ++curr) {
 
  167     if (addIndex(curr, so)) {
 
  181 template<
unsigned int Dim>
 
  188   if ((*curr)->contains(so) && ! (*curr)->hasIndex(so)) {
 
  189     (*curr).CopyForWrite();
 
  190     (*curr)->addIndex(so);
 
  203 template<
unsigned int Dim>
 
  212   unsigned int d, totalnum = ndi.
size();
 
  214   for (d=0; d < 
Dim; ++d)
 
  215     counter[d] = ndi[d].begin();
 
  217   while (totalnum-- > 0) {
 
  220     for (d=0; d < 
Dim; ++d)
 
  221       newpoint[d] = *(counter[d]);
 
  225     unsigned int chkdim = 0;
 
  226     while(chkdim < Dim) {
 
  228       if (counter[chkdim] == ndi[chkdim].end()) {
 
  229         counter[chkdim] = ndi[chkdim].begin();
 
  242 template<
unsigned int Dim>
 
  249   for (
iterator_iv curr = begin_iv(); curr != end_iv(); ++curr)
 
  250     if (removeIndex(curr, so))
 
  262 template<
unsigned int Dim>
 
  267   if ((*curr)->hasIndex(so)) {
 
  268     (*curr).CopyForWrite();
 
  269     (*curr)->removeIndex(so);
 
  280 template<
unsigned int Dim>
 
  289   unsigned int d, totalnum = ndi.
size();
 
  291   for (d=0; d < 
Dim; ++d)
 
  292     counter[d] = ndi[d].begin();
 
  294   while (totalnum-- > 0) {
 
  297     for (d=0; d < 
Dim; ++d)
 
  298       newpoint[d] = *(counter[d]);
 
  299     removeIndex(newpoint);
 
  302     unsigned int chkdim = 0;
 
  303     while(chkdim < Dim) {
 
  305       if (counter[chkdim] == ndi[chkdim].end()) {
 
  306         counter[chkdim] = ndi[chkdim].begin();
 
  319 template<
unsigned int Dim>
 
  321   for (
iterator_iv a = begin_iv(); a != end_iv(); ++a) {
 
  323     if (fraction < 0.9999 && fraction > 0.0)
 
  325                                 static_cast<double>(newcapacity));
 
  326     (*a)->reserve(newcapacity);
 
  333 template<
unsigned int Dim>
 
  338   for (
iterator_iv a = begin_iv(); a != end_iv(); ++a) {
 
  347 template<
unsigned int Dim>
 
  353     if ((*a)->hasIndex(so))
 
  362 template<
unsigned int Dim>
 
  370     if (Layout == 0 || Layout != si.
Layout) {
 
  372         Layout->checkout(*
this);
 
  374       Layout->checkin(*
this);
 
  391 template<
unsigned int Dim>
 
  401   toNDIndex(so, BoundingBox);
 
  410 template<
unsigned int Dim>
 
  429 template<
unsigned int Dim>
 
  440     for ( ; a != ea; ++a, ++na) {
 
  443       for ( ; ls_i != ls_e ; ++ls_i) {
 
  454     BoundingBox = BoundingBox.intersect(si.
BoundingBox);
 
  463 template<
unsigned int Dim>
 
  468   bool found = hasIndex(so);
 
  472   toNDIndex(so, BoundingBox);
 
  480 template<
unsigned int Dim>
 
  490   for ( ; a != ea; ++a, ++na) {
 
  493     for ( ; ls_i != ls_e ; ++ls_i) {
 
  494       if ((*ls_i).inside(ndi))
 
  501   BoundingBox = BoundingBox.intersect(ndi);
 
  513 template<
unsigned int Dim>
 
  522     for ( ; a != ea; ++a, ++na) {
 
  525       for ( ; ls_i != ls_e ; ++ls_i)
 
  530     BoundingBox = Layout->getDomain();
 
  540 template<
unsigned int Dim>
 
  548   BoundingBox = Layout->getDomain();
 
  557 template<
unsigned int Dim>
 
  565   BoundingBox = Layout->getDomain();
 
  575 template<
unsigned int Dim>
 
  584 template<
unsigned int Dim>
 
  592 template<
unsigned int Dim>
 
  601 template<
unsigned int Dim>
 
  610 template<
unsigned int Dim>
 
  619 template<
unsigned int Dim>
 
  629 template<
unsigned int Dim>
 
  637 template<
unsigned int Dim>
 
  651 template<
unsigned int Dim>
 
  666 template<
unsigned int Dim>
 
  671   for (
unsigned int d=0; d < 
Dim; ++d) {
 
  672     int m = val[d] + 
Offset[d];
 
  673     NDI[d] = 
Index(m, m);
 
  680 template<
unsigned int Dim>
 
  687     retval += (*a)->size();
 
  697 template<
unsigned int Dim>
 
  715 template<
unsigned int Dim>
 
  720   if (Layout != 0 && userlist->
getUserListID() == Layout->get_Id()) {
 
  724     setFieldLayout(*Layout);
 
  731 template<
unsigned int Dim>
 
  736   if (Layout != 0 && userlist->
getUserListID() == Layout->get_Id())
 
  743 template<
unsigned int Dim>
 
  744 std::ostream& operator<<(std::ostream& o, const SIndex<Dim>& si) {
 
  748   o << 
"vnodes = " << si.size_iv();
 
  749   o << 
", offset = " << si.getOffset();
 
  750   o << 
", bounding box = " << si.getDomain();
 
  751   o << 
", points in each LField (w/offset):" << 
std::endl;
 
  753     o << 
"  In LField w/domain=" << (*a)->getDomain() << 
":" << 
std::endl;
 
  754     o <<   
"    compressed = " << (*a)->IsCompressed() << 
std::endl;
 
  755     unsigned int lsize = (*a)->size();
 
  756     for (
unsigned int i=0; i < lsize; ++i)
 
  757       o << 
"    " << (*a)->getIndex(i) + si.getOffset() << 
std::endl;
 
  766 template<
unsigned int Dim>
 
void printDebug(Inform &) const 
void toNDIndex(const SOffset< Dim > &, NDIndex< Dim > &)
ID_t getUserListID() const 
void setFieldLayout(FieldLayout< Dim > &)
container_t::const_iterator const_iterator
virtual void notifyUserOfDelete(UserList *)
container_t::const_iterator const_iterator_iv
bool addIndex(const SOffset< Dim > &)
FieldLayout< Dim > * Layout
bool removeIndex(const SOffset< Dim > &)
SIndex< Dim > & operator=(const PETE_Expr< T1 > &rhs)
container_t::iterator iterator_iv
ac_id_vnodes::iterator iterator_iv
bool hasIndex(const SOffset< Dim > &) const 
SIndex< Dim > & operator&=(const SIndex< Dim > &)
SIndex< Dim > operator()(int)
void initialize(FieldLayout< Dim > &)
IndexedSIndex< Dim, 1 > operator[](const Index &)
SIndex< Dim > & operator|=(const SIndex< Dim > &)
container_t::size_type size_type
virtual void Repartition(UserList *)
size_type_iv size() const 
container_t::size_type size_type_iv
NDIndex< Dim > BoundingBox
Inform & endl(Inform &inf)