OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
SubFieldIter.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /***************************************************************************
3  *
4  * The IPPL Framework
5  *
6  *
7  * Visit http://people.web.psi.ch/adelmann/ for more details
8  *
9  ***************************************************************************/
10 
11 #ifndef SUB_FIELD_ITER_H
12 #define SUB_FIELD_ITER_H
13 
14 /***************************************************************************
15  SubFieldIter is a class is required for each type of object which is used to
16  store a subset for a BareField. For example, NDIndex specifies a rect-
17  angular block, SIndex specifies a (sparse) list of individual elements,
18  and SOffset specifies a single point (which is assumed to be the same
19  on all nodes). SubFieldIter acts as the iterator for the SubBareField
20  class which uses that particular type of subset object to select a view of
21  the field.
22 
23  To add a new subset object and define a new SubFieldIter class:
24  * Add a new item to the enumeration at the top of this file.
25  * Define a new SubFieldIter class, templated on the type of object (e.g.,
26  NDIndex<Dim>), following the pattern for the examples below. The
27  required elements in SubFieldIter are
28  (which can be set up by copying an existing class and modifying it):
29 
30  - derive from SubFieldIterBase
31 
32  - two construction options, one with needed iterator args, the other
33  a default constructor (this is needed by PETE). You can also
34  define a copy constructor, or else make sure that element-wise
35  copying will suffice for your iterator class.
36 
37  - override the versions of all the functions in the base class which
38  need to be overridden, to supply the special functionality for that
39  subset. For example, some classes need special initialization when
40  they are used in an expression - if so, make a specific version of
41  'initialize' in your subset specialization class.
42 
43  - add specialization in SubFieldTraits to indicate how this subset
44  object can be constructed from other subset objects, and what kind
45  of combinations of subset objects will work.
46 
47  - static bool matchType(int t) { return (t == Type_u); } ... return
48  whether the type of subset object matches the given type. Some
49  objects, like SOffset, match all subset types (since SOffset used
50  as a subset object appears to the rest of the expression like a
51  single value, e.g., as a scalar.
52 
53  - static void makeNDIndex(Subset_t& s, NDIndex<Dim>& i) ... convert
54  the given subset object data to an NDIndex
55 
56  - bool findIntersection() { } ... find the intersection between a
57  the current component and a given NDIndex, and return the intersection
58  as an NDIndex. Also return a boolean flag indicating if this
59  intersection did indeed contain some points (true). This is then used
60  in a BrickExpression to take data from the RHS and store it into the
61  LHS. findIntersection is only called for an iterator which occurs
62  on the LHS; if something is on the RHS, then plugBase will be called
63  instead, with an argument of the domain as calculated by
64  findIntersection.
65 
66  - void nextLField() { } ... for subsets which must keep track of their
67  current vnode (e.g., SIndex), this increments a vnode iterator.
68 
69  - NDIndex<Dim> plugBase(const NDIndex<Dim>& i) const ... this is the
70  function which takes the NDIndex component on the LHS, and plugs it
71  in to the RHS. This results in each SubBareField on the RHS setting
72  internal iterators to point to the proper section of data
73  based on any offsets it may have and on the subset from the LHS.
74  For some subset objects, this will not depend on the given subdomain.
75 
76  - setLFieldData(LField<T,Dim>*, NDIndex<Dim>&) ... for iterators
77  which occur on the LHS of an expression, the LField referred to by
78  its internal LField iterator may need to be changed to a new one
79  which is a copy of the existing LField (to handle the case where a
80  Field occurs on the LHS and the RHS). This function, which has a
81  default definition, changes the iterator to use a different LField
82  and to iterate over the region specified in the second argument.
83  It is only called for iterators on the LHS.
84 
85  - bool CanTryCompress() ... Some subset objects cannot easily be
86  used on the LHS with compressed LFields. If the new one can not
87  (for example, if it is not possible to determine if all the points
88  referred to by the subset have the same value), this should return
89  false, and all the other compression routines can just be no-ops.
90 
91  ***************************************************************************/
92 
93 
94 // include files
95 #include "Index/NDIndex.h"
96 #include "Index/SIndex.h"
97 #include "Field/BareField.h"
98 #include "Field/LField.h"
99 #include "Utility/PAssert.h"
100 #include "PETE/IpplExpressions.h"
101 
102 
104 // type codes for different subset objects
106 
107 
109 // A base class for all specialized versions of the SubFieldIter class.
110 // This provides common functionality and storage, and default versions of
111 // functions which may be overridden in the specialized classes.
112 
113 template<class T, unsigned int Dim, class S, unsigned int ExprDim>
115 
116 public:
117  // How many indices we must loop over when doing an expression involving
118  // this object
119  enum { ExprDim_u = ExprDim };
120 
121  // Construct with a SubField and the domain to use
123  const typename BareField<T,Dim>::iterator_if& ldf,
124  const S& s,
125  unsigned int B)
126  : MyBareField(&(const_cast<BareField<T,Dim> &>(df))),
127  MyDomain(&(const_cast<S&>(s))),
128  CurrentLField(ldf),
129  MyBrackets(B) {
130  LFPtr = (*CurrentLField).second.get();
131  }
132 
133  // Default constructor
135 
136  // destructor: nothing to do
138 
139  // Return the BareField, for which this iterator represents a particular
140  // subset or view of
142  const BareField<T,Dim> &getBareField() const { return *MyBareField; }
143 
144  // Return a copy of the current iterator pointing to the active LField
146  return CurrentLField;
147  }
148 
149  // Return the subset object
150  S &getDomain() { return *MyDomain; }
151  const S &getDomain() const { return *MyDomain; }
152 
153  // Check if our brackets are properly balanced
154  bool checkBrackets() const { return MyBrackets == Dim; }
155  unsigned int getBrackets() const { return MyBrackets; }
156 
157  // Go to the next LField.
159  ++CurrentLField;
160  LFPtr = (*CurrentLField).second.get();
161  return CurrentLField;
162  }
163 
164  // Return the LField pointed to by LFPtr
166  const LField<T,Dim>* getLField() const { return LFPtr; }
167 
168  // Use a new LField
169  void setLField(LField<T,Dim>* p) { LFPtr = p; }
170 
171  // Use a new LField, where we use data on the given NDIndex region
173 
174  /* tjw 3/3/99: try to mimic changes made in
175  IndexedBareFieldIterator::FillGCIfNecessary:
176 
177  // Fill the guard cells for our field, if necessary. We punt on
178  // trying to check for a stencil op, just fill GC's if the Field has
179  // it's dirty flag set.
180  // If we were trying to check for a stencil op, the arguments are
181  // the domain we are doing the expression on, and the NDIndex domain
182  // which is the bounding box for this subset object.
183  void FillGCIfNecessary(const NDIndex<Dim> &, const NDIndex<Dim> &) {
184  bool isdirty = getBareField().isDirty();
185  // bool isstencil = isStencil(i, j);
186  // if (isdirty && isstencil) {
187  if (isdirty)
188  getBareField().fillGuardCells();
189  }
190  tjw 3/3/99 */
191 
192  //tjw 3/3/99:
193  // Fill the guard cells for our field, if necessary. We punt on
194  // trying to check for a stencil op, just fill GC's if the Field has
195  // it's dirty flag set.
196  // If we were trying to check for a stencil op, the arguments are
197  // the domain we are doing the expression on, and the NDIndex domain
198  // which is the bounding box for this subset object.
199  void FillGCIfNecessary() const {
200  bool isdirty = this->getBareField().isDirty();
201  if (isdirty)
202  ( const_cast<BareField<T,Dim> &>(this->getBareField()) ).fillGuardCells();
203  }
204  //tjw 3/3/99.
205 
206 private:
207  // ptr to the subfield we are iterating over
209 
210  // pointer to the subset object
212 
213  // a pointer to the LField we're working with, which generally starts out
214  // as the LField pointed to by CurrentLField, but can change if, say, we're
215  // using a copy of the LField on the LHS of an expression
217 
218  // iterator pointing to the current LField we're looping over
220 
221  // how many brackets have been applied so far
222  unsigned int MyBrackets;
223 };
224 
225 
227 // The general subset-object-templated class definition for the SubField
228 // iterator.
229 
230 template<class T, unsigned int Dim, class S>
231 class SubFieldIter { };
232 
233 
235 // A specialized versions of the SubFieldIter class for an NDIndex
236 // subset object. This overrides certain functions from the base class,
237 // and provides definitions of needed functions not available in the base.
238 
239 template<class T, unsigned int Dim>
241  : public SubFieldIterBase<T, Dim, NDIndex<Dim>, Dim>,
242  public PETE_Expr<SubFieldIter<T, Dim, NDIndex<Dim> > >
243 {
244 
245 public:
246  // public typedefs
249 
250  // Construct with a SubField and the domain to use
252  const typename BareField<T,Dim>::iterator_if& ldf,
253  const NDIndex<Dim>& s, unsigned int B)
254  : SubFieldIterBase<T,Dim,Subset_t,Dim>(df, ldf, s, B) { }
255 
256  // Default constructor
258 
259  // destructor: nothing to do
261 
262  //
263  // Methods overriding base class behavior
264  //
265 
266  // Use a new LField, where we use data on the given NDIndex region
269  P = this->getLField()->begin(n);
270  }
271 
272  // Return a special code indicating what the subset type is, and match the
273  // types together.
274  static int getSubsetType() { return NDIndexSubsetType; }
275  static bool matchType(int t) { return (t == NDIndexSubsetType); }
276 
277  // If necessary, this routine will distribute any data it needs to
278  // among the processors. For example, single-value subset objects must
279  // broadcast the single value to all the nodes.
280  void initialize() { }
281 
282  // Calculate the intersection with the current component and the given
283  // subdomain. Return true if an intersection exists, and the intersection
284  // domain in the second argument.
285  bool findIntersection(const NDIndex<Dim>& loc, NDIndex<Dim>& inter) {
286  inter = this->getDomain().intersect(loc);
287  return ( ! inter.empty() );
288  }
289 
290  // convert this subset object into an NDIndex object
291  static void makeNDIndex(const Subset_t& s, NDIndex<Dim>& i) { i = s; }
292 
293  // The LHS tells this guy about a given local domain. Not all
294  // subsetting operations will care about this. The LField iterator P
295  // will be set in this call to iterate through the values it needs to.
296  bool plugBase(const NDIndex<Dim>& i) {
297  // make sure we have a fully indexed object
298  PInsist(this->checkBrackets(),"Field not fully indexed!!");
299 
300  // Find the modified domain after we plug in the information from what
301  // domain is being iterated over on the LHS
302  NDIndex<Dim> plugged = this->getDomain().plugBase(i);
303 
304  // Try to find a single local array that has all of the rhs.
305  // Loop over all the local arrays.
306  typename BareField<T,Dim>::iterator_if lf_i = this->getBareField().begin_if();
307  typename BareField<T,Dim>::iterator_if lf_e = this->getBareField().end_if();
308  for ( ; lf_i != lf_e; ++lf_i) {
309  // is the search domain completely within the LField we're examining?
310  if ((*lf_i).second->getAllocated().contains(plugged)) {
311  // Found it. Make this one current and go.
312  setLFieldData((*lf_i).second.get(), plugged);
313  return true;
314  }
315  }
316 
317  // Didn't find it.
318  return false;
319  }
320 
321  // Finished this dimension, rewind.
322  void rewind(unsigned d) { P.rewind(d); }
323 
324  // Step one or n in a given dimension.
325  void step(unsigned int d) { P.step(d); }
326  void step(unsigned int d, int n) { P.step(d, n); }
327 
328  // How big in this dimension.
329  int size(unsigned d) const { return P.size(d); }
330 
331  // return the value currently pointed at, or offset in 1,2, or 3 dims
332  T& operator*() { return *P; }
333  T& offset() { return *P; }
334  T& offset(int i) { return P.offset(i); }
335  T& offset(int i, int j) { return P.offset(i, j); }
336  T& offset(int i, int j, int k) { return P.offset(i, j, k); }
337  T& unit_offset(int i) { return P.unit_offset(i); }
338  T& unit_offset(int i, int j) { return P.unit_offset(i, j); }
339  T& unit_offset(int i, int j, int k) { return P.unit_offset(i, j, k); }
340  int Stride(int d) const { return P.Stride(d); }
341 
342  // Compression interface
343  bool CanCompress() const { return this->getLField()->CanCompress(); }
344  void Compress(T v) { return this->getLField()->Compress(v); }
345  bool TryCompress() { return this->getLField()->TryCompress(); }
346  bool TryCompress(T v) { return this->getLField()->TryCompress(v);}
347  bool IsCompressed() const {
348  PAssert_EQ(this->getLField()->IsCompressed(), P.IsCompressed());
349  return this->getLField()->IsCompressed();
350  }
351  bool DomainCompressed() const { return true; }
352 
353  //
354  // PETE Interface
355  //
356 
357  enum { IsExpr = 1 };
358  typedef SFI PETE_Expr_t;
359  typedef T PETE_Return_t;
360  PETE_Expr_t MakeExpression() const { return *this; }
361 
362 private:
363  // where in this LField are we
365 };
366 
367 
369 // A specialized versions of the SubFieldIter class for an SIndex
370 // subset object. This overrides certain functions from the base class,
371 // and provides definitions of needed functions not available in the base.
372 
373 template<class T, unsigned int Dim>
375  : public SubFieldIterBase<T, Dim, SIndex<Dim>, 1U>,
376  public PETE_Expr<SubFieldIter<T, Dim, SIndex<Dim> > >
377 {
378 public:
379  // public typedefs
382 
383  // Construct with a SubField and the domain to use
385  const typename BareField<T,Dim>::iterator_if& ldf,
386  const SIndex<Dim>& s, unsigned int B)
387  : SubFieldIterBase<T,Dim,Subset_t,1U>(df, ldf, s, B) {
388  ComponentLF = this->getDomain().begin_iv();
389  computeLSOffset();
390  }
391 
392  // Default constructor
394 
395  // destructor: nothing to do
397 
398  //
399  // Methods overriding base class behavior
400  //
401 
402  // Go to the next LField.
404  typename BareField<T,Dim>::iterator_if lfi =
406  ++ComponentLF;
407  computeLSOffset();
408  return lfi;
409  }
410 
411  // Return a special code indicating what the subset type is, and match the
412  // types together.
413  static int getSubsetType() { return SIndexSubsetType; }
414  static bool matchType(int t) { return (t == SIndexSubsetType); }
415 
416  // If necessary, this routine will distribute any data it needs to
417  // among the processors. For example, single-value subset objects must
418  // broadcast the single value to all the nodes.
419  void initialize() { }
420 
421  // Calculate the intersection with the current LField domain and the
422  // given subdomain. Return true if an intersection exists, and the
423  // intersection domain in the second argument.
425  // If there are any points in the LField, we return the owned domain
426  // for the LField.
427  if ((*ComponentLF)->size() > 0) {
428  inter = this->getLField()->getOwned();
429  return true;
430  }
431  return false;
432  }
433 
434  // convert this subset object into an NDIndex object
435  static void makeNDIndex(const Subset_t& s, NDIndex<Dim>& i) {
436  //i = s.getFieldLayout().getDomain();
437  i = s.getDomain();
438  }
439 
440  // The LHS tells this guy about a given local domain. Not all
441  // subsetting operations will care about this.
442  bool plugBase(const NDIndex<Dim>&) { return true; }
443 
444  // Finished this dimension, rewind.
445  void rewind(unsigned) { }
446 
447  // Step one or n in a given dimension.
448  void step(unsigned int) { }
449  void step(unsigned int, int) { }
450 
451  // How big in this dimension
452  int size(unsigned d) const { return (d == 0 ? (*ComponentLF)->size() : 0); }
453 
454  // return the value currently pointed at, or the Nth value. We only provide
455  // options for 1D, since SIndex looks like a 1D array of values to the
456  // BrickExpression object.
457  T& operator*() { return offset(0); }
458  T& offset() { return offset(0); }
459  T& offset(int i) {
460  SOffset<Dim> loc = (*ComponentLF)->getIndex(i);
461  loc -= LFOffset;
462  return this->getLField()->begin().offset(loc.begin());
463  }
464  T& unit_offset(int i) { return offset(i); }
465  int Stride(int) { return 1; }
466 
467  // Compression interface
468  bool CanCompress() const { return false; }
469  void Compress(T) { }
470  bool TryCompress() { return false; }
471  bool TryCompress(T) { return false; }
472  bool IsCompressed() const { return this->getLField()->IsCompressed(); }
473  bool DomainCompressed() const { return (*ComponentLF)->IsCompressed(); }
474 
475  //
476  // PETE Interface
477  //
478 
479  enum { IsExpr = 1 };
480  typedef SFI PETE_Expr_t;
481  typedef T PETE_Return_t;
482  PETE_Expr_t MakeExpression() const { return *this; }
483 
484 private:
487 
488  // calculate the offset for the current LField. This is the position of
489  // the lower-left corner of owned domain, minus the offset we are adding to
490  // our sparse indices.
492  if (this->getLFieldIter() != this->getBareField().end_if()) {
493  NDIndex<Dim> owned = this->getLField()->getOwned();
494  for (unsigned int d=0; d < Dim; ++d)
495  LFOffset[d] = (owned[d].first() - this->getDomain().getOffset()[d]);
496  }
497  }
498 };
499 
500 
502 // A specialized versions of the SubFieldIter class for an SOffset, which
503 // is used to act as a single-value
504 // subset object. This overrides certain functions from the base class,
505 // and provides definitions of needed functions not available in the base.
506 template<class T, unsigned int Dim>
508  : public SubFieldIterBase<T, Dim, SOffset<Dim>, 1U>,
509  public PETE_Expr<SubFieldIter<T, Dim, SOffset<Dim> > >
510 {
511 
512 public:
513  // public typedefs
516 
517  // Construct with a SubField and the domain to use
519  const typename BareField<T,Dim>::iterator_if& ldf,
520  const SOffset<Dim>& s, unsigned int B)
521  : SubFieldIterBase<T,Dim,Subset_t,1U>(df, ldf, s, B), SingleValPtr(0) { }
522 
523  // Default constructor
525 
526  // destructor: nothing to do
528 
529  //
530  // Methods overriding base class behavior
531  //
532 
533  // Use a new LField, where we use data on the given NDIndex region
536  // the following if test COULD be removed if we assume this function is
537  // called after 'findIntersection' is called and while we're still working
538  // on the same LField.
539  if (n.contains(Component)) {
540  SOffset<Dim> s = this->getDomain();
541  NDIndex<Dim> owned = p->getOwned();
542  for (unsigned int d=0; d < Dim; ++d)
543  s[d] -= owned[d].first();
544  SingleValPtr = &(p->begin().offset(s.begin()));
545  }
546  }
547 
548  // Return a special code indicating what the subset type is, and match the
549  // types together.
550  static int getSubsetType() { return SOffsetSubsetType; }
551  static bool matchType(int) { return true; }
552 
553  // initialization routines
554  void initialize() {
555  // make an NDIndex with the point in it
556  makeNDIndex(this->getDomain(), Component);
557 
558  // distribute the value to all the nodes
559  this->getBareField().getsingle(Component, SingleValStore);
560  }
561 
562  // Calculate the intersection with the current component and the given
563  // subdomain. Return true if an intersection exists, and the intersection
564  // domain in the second argument.
565  bool findIntersection(const NDIndex<Dim>& loc, NDIndex<Dim>& inter) {
566  inter = Component.intersect(loc);
567  return ( ! inter.empty() );
568  }
569 
570  // convert this subset object into an NDIndex object
571  static void makeNDIndex(const Subset_t& s, NDIndex<Dim>& i) {
572  for (unsigned int d=0; d < Dim; ++d)
573  i[d] = Index(s[d], s[d]);
574  }
575 
576  // The LHS tells this guy about a given local domain. Not all
577  // subsetting operations will care about this.
578  bool plugBase(const NDIndex<Dim>&) { return true; }
579 
580  // Finished this dimension, rewind.
581  void rewind(unsigned) { }
582 
583  // Step one or n in a given dimension.
584  void step(unsigned int) { }
585  void step(unsigned int, int) { }
586 
587  // How big in this dimension.
588  int size(unsigned int d) const { return (d == 0 ? 1 : 0); }
589 
590  // return the value currently pointed at, or the Nth value. We only provide
591  // options for 1D, since SOffset looks like a 1D array of values to the
592  // BrickExpression object.
593  T& operator*() { return offset(0); }
594  T& offset() { return offset(0); }
595  T& offset(int) {
596  return (SingleValPtr == 0 ? SingleValStore : *SingleValPtr);
597  }
598  T& unit_offset(int) { return offset(0); }
599  int Stride(int d) { return 0; }
600 
601  // Compression interface
602  bool CanCompress() const { return false; }
603  void Compress(T) { }
604  bool TryCompress() { return false; }
605  bool TryCompress(T) { return false; }
606  bool IsCompressed() const { return false; }
607  bool DomainCompressed() const { return true; }
608 
609  //
610  // PETE Interface
611  //
612 
613  enum { IsExpr = 1 };
614  typedef SFI PETE_Expr_t;
615  typedef T PETE_Return_t;
616  PETE_Expr_t MakeExpression() const { return *this; }
617 
618 private:
622 };
623 
624 
625 #endif // SUB_FIELD_ITER_H
626 
627 /***************************************************************************
628  * $RCSfile: SubFieldIter.h,v $ $Author: adelmann $
629  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
630  * IPPL_VERSION_ID: $Id: SubFieldIter.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
631  ***************************************************************************/
bool findIntersection(const NDIndex< Dim > &loc, NDIndex< Dim > &inter)
Definition: SubFieldIter.h:565
unsigned int MyBrackets
Definition: SubFieldIter.h:222
Definition: PETE.h:80
ac_id_larray::iterator iterator_if
Definition: BareField.h:91
bool plugBase(const NDIndex< Dim > &i)
Definition: SubFieldIter.h:296
T & unit_offset(int i, int j, int k)
Definition: SubFieldIter.h:339
BareField< T, Dim >::iterator_if nextLField()
Definition: SubFieldIter.h:403
LField< T, Dim > * LFPtr
Definition: SubFieldIter.h:216
Definition: rbendmap.h:8
const NDIndex< Dim > & getOwned() const
Definition: LField.h:93
Definition: SIndex.h:28
T & offset(int i) const
static void makeNDIndex(const Subset_t &s, NDIndex< Dim > &i)
Definition: SubFieldIter.h:291
void FillGCIfNecessary() const
Definition: SubFieldIter.h:199
SubFieldIter< T, Dim, Subset_t > SFI
Definition: SubFieldIter.h:248
const S & getDomain() const
Definition: SubFieldIter.h:151
BareField< T, Dim >::iterator_if getLFieldIter() const
Definition: SubFieldIter.h:145
BareField< T, Dim > & getBareField()
Definition: SubFieldIter.h:141
SubFieldIter(const BareField< T, Dim > &df, const typename BareField< T, Dim >::iterator_if &ldf, const SOffset< Dim > &s, unsigned int B)
Definition: SubFieldIter.h:518
void setLFieldData(LField< T, Dim > *p, NDIndex< Dim > &n)
Definition: SubFieldIter.h:267
Definition: FFT.h:31
bool findIntersection(const NDIndex< Dim > &loc, NDIndex< Dim > &inter)
Definition: SubFieldIter.h:285
SubFieldIter(const BareField< T, Dim > &df, const typename BareField< T, Dim >::iterator_if &ldf, const NDIndex< Dim > &s, unsigned int B)
Definition: SubFieldIter.h:251
bool plugBase(const NDIndex< Dim > &)
Definition: SubFieldIter.h:442
const iterator & begin() const
Definition: LField.h:104
NDIndex< Dim > plugBase(const NDIndex< 1 > &i) const
Definition: NDIndex.h:118
void step(unsigned int d, int n)
Definition: SubFieldIter.h:326
BareField< T, Dim >::iterator_if nextLField()
Definition: SubFieldIter.h:158
iterator_iv begin_iv()
Definition: SIndex.h:246
#define PAssert_EQ(a, b)
Definition: PAssert.h:119
Definition: Index.h:236
bool empty() const
T & offset(int i, int j, int k)
Definition: SubFieldIter.h:336
container_t::iterator iterator_iv
Definition: SIndex.h:71
BareField< T, Dim > * MyBareField
Definition: SubFieldIter.h:208
SubFieldIter< T, Dim, Subset_t > SFI
Definition: SubFieldIter.h:515
bool findIntersection(const NDIndex< Dim > &, NDIndex< Dim > &inter)
Definition: SubFieldIter.h:424
LField< T, Dim >::iterator P
Definition: SubFieldIter.h:364
LField< T, Dim > * getLField()
Definition: SubFieldIter.h:165
const NDIndex< Dim > & getDomain() const
Definition: SIndex.h:154
Definition: FFT.h:30
static void makeNDIndex(const Subset_t &s, NDIndex< Dim > &i)
Definition: SubFieldIter.h:571
iterator begin()
Definition: SOffset.h:132
SubFieldIter(const BareField< T, Dim > &df, const typename BareField< T, Dim >::iterator_if &ldf, const SIndex< Dim > &s, unsigned int B)
Definition: SubFieldIter.h:384
const LField< T, Dim > * getLField() const
Definition: SubFieldIter.h:166
void setLField(LField< T, Dim > *p)
Definition: SubFieldIter.h:169
bool contains(const NDIndex< Dim > &a) const
bool checkBrackets() const
Definition: SubFieldIter.h:154
void setLFieldData(LField< T, Dim > *p, NDIndex< Dim > &)
Definition: SubFieldIter.h:172
NDIndex< Dim > intersect(const NDIndex< Dim > &) const
SubFieldIterBase(const BareField< T, Dim > &df, const typename BareField< T, Dim >::iterator_if &ldf, const S &s, unsigned int B)
Definition: SubFieldIter.h:122
unsigned int getBrackets() const
Definition: SubFieldIter.h:155
#define PInsist(c, m)
Definition: PAssert.h:135
const unsigned Dim
int size(unsigned int d) const
Definition: SubFieldIter.h:588
Interface for a single beam element.
Definition: Component.h:51
const BareField< T, Dim > & getBareField() const
Definition: SubFieldIter.h:142
BareField< T, Dim >::iterator_if CurrentLField
Definition: SubFieldIter.h:219
void setLFieldData(LField< T, Dim > *p, NDIndex< Dim > &n)
Definition: SubFieldIter.h:534
static void makeNDIndex(const Subset_t &s, NDIndex< Dim > &i)
Definition: SubFieldIter.h:435
SubFieldIter< T, Dim, Subset_t > SFI
Definition: SubFieldIter.h:381
bool plugBase(const NDIndex< Dim > &)
Definition: SubFieldIter.h:578