Chombo + EB + MF  3.2
BaseFab.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _BASEFAB_H_
12 #define _BASEFAB_H_
13 
14 #include <cstdlib>
15 #include "SPACE.H"
16 #include <string>
17 #include <typeinfo>
18 #include <cmath>
19 
20 #include "Box.H"
21 #include "Arena.H"
22 #include "Interval.H"
23 #include "REAL.H"
24 #include "NamespaceHeader.H"
25 
26 #ifdef USE_PROTO
27 #include "Proto.H"
28 #endif
29 
30 struct SliceSpec;
31 
32 /** A Fortran Array-like Container
33 
34  BaseFab emulates the Fortran array concept.
35  Useful operations can be performed upon
36  BaseFab's in C++, and they provide a convenient interface to
37  Fortran when it is necessary to retreat into that language.
38 
39  `BaseFab' is a template class. Through use of the
40  template, a `BaseFab' may be based upon any class. So far at least,
41  most applications have been based upon simple types like `integer's,
42  `real's, or `doubleprecision's. Most applications do not use BaseFab's
43  directly, but utilize specialized classes derived from BaseFab.
44 
45  It will be easier to use a `BaseFab' if you understand the following
46  concepts. `BaseFab' objects depend on the dimensionality of space
47  (indirectly through the DOMAIN `Box' member). It is
48  typical to define the macro `CH_SPACEDIM' to be 1, 2, or 3 to indicate
49  the dimension of space. See the discussion of class `Box' for more
50  information. A `BaseFab' contains a `Box' DOMAIN, which indicates the
51  integer indexing space over which the array is defined. A `BaseFab'
52  also has NVAR components. By components, we mean that for each
53  point in the rectangular indexing space, there are NVAR values
54  associated with that point. A Fortran array corresponding to a
55  `BaseFab' would have (CH_SPACEDIM+1) dimensions.
56 
57  By design, the array layout in a `BaseFab' mirrors that of a
58  Fortran array. The first index (x direction for example) varies
59  most rapidly, the next index (y direction), if any, varies next
60  fastest. The component index varies last, after all the spatial
61  indices.
62 
63  It is sometimes convenient to be able to treat a sub-array within an
64  existing `BaseFab' as a `BaseFab' in its own right. This is often
65  referred to as 'aliasing' the `BaseFab'. Note that when aliasing is
66  used, the BaseFab's domain will not, in general, be the same as the
67  parent BaseFab's domain, nor will the number of components.
68  BaseFab is a dimension dependent class, so CH_SPACEDIM must be
69  defined as either 1, 2, or 3 when compiling.
70 
71  This is NOT a polymorphic class.
72 
73  It does NOT provide a copy constructor or assignment operator.
74 
75  T MUST have a default constructor and an assignment operator.
76 */
77 
78 extern Real BaseFabRealSetVal;
79 
80 template <class T> class BaseFab
81 {
82 public:
83  /// {\bf constructors, destructor and defines}
84 
85  ///for AggStencil and its minions
86  virtual long offset(const IntVect& a_iv, const int& a_ivar) const
87  {
88  CH_assert(a_ivar >= 0);
89  CH_assert(a_ivar < m_nvar);
90  CH_assert(!(m_dptr == 0));
92 
93  IntVect ivDiff = a_iv - m_domain.smallEnd();
94  IntVect ivSize = m_domain.size();
95  long offset = ivDiff[0];
96 
97 #if CH_SPACEDIM > 1
98  offset += ivDiff[1]*ivSize[0] ;
99 #endif
100 #if CH_SPACEDIM > 2
101  offset += ivDiff[2]*ivSize[0]*ivSize[1];
102 #endif
103 #if CH_SPACEDIM > 3
104  offset += ivDiff[3]*ivSize[0]*ivSize[1]*ivSize[2];
105 #endif
106 #if CH_SPACEDIM > 4
107  offset += ivDiff[4]*ivSize[0]*ivSize[1]*ivSize[2]*ivSize[3];
108 #endif
109 #if CH_SPACEDIM > 5
110  offset += ivDiff[5]*ivSize[0]*ivSize[1]*ivSize[2]*ivSize[3]*ivSize[4];
111 #endif
112  offset += m_numpts * a_ivar;
113 
114  return offset;
115  }
116 
117  /**
118  Constructs an invalid `BaseFab'. The domain is invalid, the
119  number of components is zero, and no actual array memory is
120  allocated. An invalid `BaseFab' must be resize()d
121  (see `BaseFab::resize') before use.
122  */
123  BaseFab ();
124 
125  ///
126  /**
127  Constructs a BaseFab with desired domain and number of components.
128  */
129  BaseFab(const Box& a_bx,
130  int a_n,
131  T* a_alias = NULL);
132 
133  /**
134  Constructs an 'aliased' BaseFab of the requested interval of the
135  argument BaseFab. This BaseFab does not allocate any memory, but
136  sets its data pointer into the memory pointed to by the argument
137  BaseFab. It is the users responsiblity to ensure this aliased
138  BaseFab is not used after the original BaseFab has deleted its data ptr
139  (resize, define(..) called, or destruction, etc.).
140 
141  This aliased BaseFab will also generate side effects (modifying the values
142  of data in one will modify the other's data).
143 
144  This aliased BaseFab will have a_comps.size() components, starting at zero.
145  */
146  BaseFab(const Interval& a_comps,
147  BaseFab<T>& a_original);
148 
149 #ifdef USE_PROTO
150  template <unsigned int C>
151  void define(Proto::BoxData<T,C,1,1>& a_original);
152 
153  template<unsigned int C>
154  operator Proto::BoxData<T,C>()
155  {
156  Proto::BoxData<T,C> bd;
157  bd.define(this->dataPtr(0), this->box(), C);
158  return bd;
159  }
160 
161  template<unsigned int C>
162  operator const Proto::BoxData<T,C>() const
163  {
164  Proto::BoxData<T,C> bd;
165  bd.define(this->dataPtr(0), this->box(), C);
166  return bd;
167  }
168 
169  template <unsigned int C>
170  inline BaseFab(const Proto::BoxData<T,C>& a_bd, const Proto::Point a_center = Proto::Point::Zeros())
171  {
172  m_domain = Box(a_bd.box().low(), a_bd.box().high(), a_center);
173  m_nvar = C;
174  m_numpts = a_bd.box().size();
175  m_truesize = a_bd.size();
176  m_dptr = const_cast<T*>(a_bd.data(a_bd.box().low()));
177  m_aliased = true;
178  }
179 #endif
180 
181  /// move constructor
182  BaseFab(BaseFab<T>&& a_in) noexcept;
183  ///
184  /**
185  The destructor deletes the array memory. Unless this was an aliased
186  BaseFab.
187  */
188  virtual ~BaseFab();
189 
190  /**
191  This function resizes a `BaseFab' so it covers the `Box' a_b with a_n
192  components. If a_alias is not NULL the memory it points to is used
193  (without checking size); otherwise the existing data is lost and the
194  new data is uninitialized.
195  */
196  void resize(const Box& a_b,
197  int a_n = 1,
198  T* a_alias=NULL);
199 
200  /**
201  Make BaseFab with desired domain and number of components. Existing
202  data is lost. Data is in uninialized state.
203  */
204  virtual void define(const Box& a_box,
205  int a_comps,
206  T* a_alias = NULL)
207  {
208  resize(a_box, a_comps, a_alias);
209  }
210 
211  /**
212  alias define. no memory allocated. this BaseFab sets its data ptr
213  directly in the a_original BaseFab data.
214  */
215  virtual void define(const Interval& a_comps,
216  BaseFab<T>& a_original);
217 
218  /**
219  The function returns the `BaseFab' to the invalid state. (See
220  comments for constructors above.) The memory is freed.
221  */
222  void clear();
223 
224  /// {\bf accessors}
225 
226  ///
227  /**
228  Returns the number of components.
229  */
230  int nComp() const;
231 
232  ///
233  /**
234  Returns the domain (box) where the array is defined.
235  */
236  const Box& box() const;
237 
238  /**
239  Returns an IntVect giving the length
240  of the domain in each direction.
241  */
242  IntVect size() const;
243 
244  /**
245  Returns the lower corner of the domain. See class `Box' for analogue.
246  */
247  const IntVect& smallEnd() const;
248 
249  /**
250  Returns the upper corner of the domain. See class `Box' for analogue.
251  */
252  const IntVect& bigEnd() const;
253 
254  ///
255  /**
256  Returns an Interval for the entire range on components.
257  */
259  {
260  return Interval(0, m_nvar-1);
261  }
262 
263  /// move assignment
264  inline BaseFab<T>& operator= (BaseFab<T>&&) noexcept;
265  /**
266  Returns a modifiable lvalue reference to the Nth component value defined
267  at position p in the domain. This operator may be inefficient if the
268  C++ compiler is unable to optimize the C++ code.
269  */
270  T& operator () (const IntVect& a_p,
271  int a_N);
272 
273  T& operator () (const IntVect& a_p);
274 
275  /**
276  Returns a conatant reference to the Nth component value defined at
277  position p in the domain. This operator may be inefficient if the C++
278  compiler is unable to optimize the C++ code.
279  */
280  const T& operator () (const IntVect& p,
281  int N) const;
282 
283  const T& operator () (const IntVect& p) const;
284 
285  /**
286  This function puts numcomp component values, starting at component N,
287  from position pos in the domain into array data, that must be allocated
288  by the user.
289  */
290  void getVal(T* a_data,
291  const IntVect& a_pos,
292  int a_N,
293  int a_numcomp) const;
294 
295  /**
296  This function puts all component values, starting at component 0,
297  from position pos in the domain into array data, that must be allocated
298  by the user.
299  */
300  void getVal(T* a_data,
301  const IntVect& a_pos) const;
302 
303  ///{\bf Fortran interface functions}
304 
305  /**
306  Returns the lower corner of the domain. Instead of returning them in
307  the form of IntVects, as in smallEnd and bigEnd, it returns the values
308  as a pointer to an array of constant integers. This is useful when
309  interfacing to Fortran subroutines. It should not be used in any other
310  context!!!
311  */
312  const int* loVect() const;
313 
314  /**
315  Returns the upper corner of the domain. Instead of returning them in
316  the form of IntVects, as in smallEnd and bigEnd, it returns the values
317  as a pointer to an array of constant integers. This is useful when
318  interfacing to Fortran subroutines. It should not be used in any other
319  context!!!
320  */
321  const int* hiVect() const;
322 
323  /**
324  Returns a pointer to an integer that contains the number of components
325  in the BaseFab. This is useful when interfacing to Fortran subroutines.
326  It should not be used in any other context!!!
327  */
328  const int* nCompPtr() const;
329 
330  /**
331  Returns a pointer to an object of type T that is the value of the a_nth
332  component associated with the cell at the low end of the domain. This
333  is commonly used to get a pointer to data in the array which is then
334  handed off to a Fortran subroutine. It should not be used in any other
335  context!!! Remember that data is stored in Fortran array order, with
336  the component index coming last. In other words, `dataPtr' returns a
337  pointer to all the a_nth components.
338  */
339  T* dataPtr(int a_n = 0);
340 
341  /**
342  Returns a constant pointer to an object of type T that is the value of
343  the a_nth component associated with the cell at the low end of the domain.
344  This is commonly used to get a pointer to data in the array which is
345  then handed off to a Fortran subroutine. It should not be used in any
346  other context!!! Remember that data is stored in Fortran array order,
347  with the component index coming last. In other words, `dataPtr' returns
348  a pointer to all the a_nth components.
349  */
350  const T* dataPtr(int a_n = 0) const;
351 
352  ///{\bf comparison functions}
353 
354  /**
355  Returns true if the domain of a_fab is totally contained within the domain
356  of this `BaseFab'.
357  */
358  bool contains(const BaseFab<T>& a_fab) const;
359 
360  /**
361  Returns true if a_bx is totally contained within the domain of this
362  `BaseFab'.
363  */
364  bool contains(const Box& a_bx) const;
365 
366  ///{\bf data modification functions}
367 
368  /**
369  The setVal functions set subregions in the `BaseFab' to a constant value.
370  This most general form specifies the subbox, the starting component
371  number, and the number of components to be set.
372  */
373  void setVal(T a_x,
374  const Box& a_bx,
375  int a_nstart,
376  int a_numcomp);
377 
378  ///
379  /**
380  Modifies this BaseFab so that all values of a component, a_n, in the
381  specified Box, a_bx, are set to the given value, a_x.
382  */
383  void setVal(T a_x,
384  const Box& a_bx,
385  int a_n);
386 
387  ///
388  /**
389  Modifies this BaseFab so that all values of a component, a_n, are set to
390  the given value, a_x.
391  */
392  void setVal(T a_x,
393  int a_n);
394 
395  ///
396  /**
397  Modifies this BaseFab so that all values of all components are set to
398  the given value, a_x.
399  */
400  void setVal(T a_x);
401 
402  /**
403  Modifies this BaseFab by copying the contents of the argument BaseFab
404  into it. This, the most general form of copy, specifies the contents
405  of any sub-box a_srcbox in `BaseFab' a_src may be copied into a (possibly
406  different) a_destbox in the destination `BaseFab'. Note that although
407  the a_srcbox and the a_destbox may be disjoint, they must be the same size
408  and shape. If the sizes differ, the copy is undefined and a runtime
409  error results. This copy function is the only one of the copy
410  functions to allow a copy between differing boxes. The user also
411  specifies how many components are copied, starting at component
412  a_srccomp in a_src and stored starting at component a_destcomp. The
413  results are UNDEFINED if the a_src and dest BaseFabs are the same and
414  the a_srcbox and a_destbox overlap.
415 
416  */
417  BaseFab<T>& copy(const BaseFab<T>& a_src,
418  const Box& a_srcbox,
419  int a_srccomp,
420  const Box& a_destbox,
421  int a_destcomp,
422  int a_numcomp);
423 
424  /**
425  Modifies this BaseFab by copying the contents of the argument BaseFab
426  into it. A copy within the intersecting region of the domains of the
427  two BaseFabs is performed. The user specifies how many components are
428  copied, starting at component a_srccomp in a_src and stored starting at
429  component a_destcomp.
430  */
431  BaseFab<T>& copy(const BaseFab<T>& a_src,
432  int a_srccomp,
433  int a_destcomp,
434  int a_numcomp = 1);
435 
436  /**
437  Modifies this BaseFab by copying the contents of the argument BaseFab
438  into it. A copy within the intersecting region of the domains of the
439  two BaseFabs and the specified Box a_destbox is performed. All
440  components are copied.
441  */
442  BaseFab<T>& copy(const BaseFab<T>& a_src,
443  const Box& a_destbox);
444 
445  /**
446  Modifies this BaseFab by copying the contents of the argument BaseFab
447  into it. A copy within the intersecting region of the domains of the
448  two BaseFabs is performed. All components are copied.
449  */
450  BaseFab<T>& copy(const BaseFab<T>& a_src);
451 
452  ///
453  /**
454  Copy from a subsection of one box into another. Assumes the boxes are
455  both in the same index space, and that box R is completely contained
456  in both the source and destination boxes.
457  */
458  void copy(const Box& a_RegionFrom,
459  const Interval& a_Cdest,
460  const Box& a_RegionTo,
461  const BaseFab<T>& a_src,
462  const Interval& a_Csrc);
463 
464  /// {\bf domain modification functions}
465 
466  ///
467  /**
468  Modifies the domain of this BaseFab by shifting. Equivalent to
469  fab.shift(0,a_v[0]).shift(1,a_v[1])... There is no effect upon
470  the array memory.
471  */
472  BaseFab<T>& shift(const IntVect& a_v);
473 
474  ///
475  /**
476  Modifies the domain of this BaseFab by shifting it a_ncells
477  indexing positions in coordinate direction a_idir. Directions are
478  zero-based. It is an error if not 0 <= a_idir < SpaceDim. There is
479  no effect upon the array memory.
480  */
481  BaseFab<T>& shift(int a_idir,
482  int a_ncells);
483 
484  ///
485  /**
486  Modifies the domain of this BaseFab by shifting by "half" indices,
487  thereby converting the Box from type CELL to NODE or vice-versa.
488  fab.shiftHalf(0,1) shifts the domain to the right by 1/2 cells.
489  fab.shiftHalf(1,-3) shifts the domain in the -j direction by 3/2 cells.
490  NOTE: If a_numHalfs is EVEN the shift is a_numHalfs/2 full zones
491  and hence will not change the type. This is: fab.shiftHalf(1,4) ==
492  fab.shift(1,2). Directions are zero-based. It is an error if not 0
493  <= a_dir < SpaceDim. There is no effect upon the array memory.
494  */
495  BaseFab<T>& shiftHalf(int a_dir,
496  int a_numHalfs);
497 
498  ///
499  /**
500  Modifies the domain of this BaseFab by shifting by half indices.
501  Equivalent to fab.shiftHalf(0,a_v[0]).shiftHalf(1,a_v[1]) ...
502  There is no effect upon the array memory.
503  */
504  BaseFab<T>& shiftHalf(const IntVect& a_v);
505 
506  ///{\bf linearization functions}
507 
508  ///
509  /**
510  Returns the size, in number of bytes, of a flat linear
511  representation of the data in this object in the area defined
512  by the input Box a_box and the component Interval a_comps. The size
513  does not include the size of a_box and a_comps.
514  */
515  virtual size_t size(const Box& a_box,
516  const Interval& a_comps) const;
517 
518  ///
519  /**
520  Write a linear representation of the internal data. Assumes that
521  sufficient memory for the buffer has already been allocated by the
522  caller.
523  */
524  virtual void linearOut(void* a_buf,
525  const Box& a_R,
526  const Interval& a_comps) const;
527 
528  /// Same as linearOut, but returns the current location in the buffer
529  virtual void* linearOut2(void* a_buf,
530  const Box& a_R,
531  const Interval& a_comps) const;
532 
533  ///
534  virtual void linearIn(void* a_buf,
535  const Box& a_R,
536  const Interval& a_comps);
537 
538  /// same as linearIn, but returns the current location in the buffer
539  virtual void* linearIn2(void* a_buf,
540  const Box& a_R,
541  const Interval& a_comps);
542 
543  /// These functions are required for broadcast & gather.
544 
545  void linearOut(void* a_buf) const;
546  ///
547  void linearIn(const void* const a_buf);
548  ///
549  int linearSize(void) const;
550 
551  ///
552  static int preAllocatable()
553  {
554  return 0; // static preAllocatable
555  }
556 
557  /**
558  Turns a_slice into a BaseFab that's the same as *this except that it's just
559  one cell thick in the a_sliceSpec.direction-th direction, and its
560  coordinate in that direction is a_sliceSpec.position.
561 
562  If a_sliceSpec.position is outside the range of *this, that's a fatal error.
563  */
564  void degenerate(BaseFab<T>& a_slice, const SliceSpec& a_sliceSpec) const;
565 
566  ///
567  bool isAliased() const;
568 
569  ///regression test
570  static int test();
571 
572  ///regression test
573  static int testBoxAndComp();
574 protected:
575  //
576  // Allocates memory for the `BaseFab<T>'.
577  //
578  void define();
579 
580  //
581  // Deallocates memory for the `BaseFab<T>'.
582  //
583  void undefine();
584 
585  static std::string name();
586 
587  //
588  // The function called by BaseFab copy operations.
589  //
590  virtual void performCopy(const BaseFab<T>& a_src,
591  const Box& a_srcbox,
592  int a_srccomp,
593  const Box& a_destbox,
594  int a_destcomp,
595  int a_numcomp);
596 
597  //
598  // This function is called by the `BaseFab' setVal operations.
599  //
600  void performSetVal(T a_x,
601  const Box& a_bx,
602  int a_nstart,
603  int a_numcomp);
604 
605  //
606  // template class static data member. not sure if this will
607  // work with all compilers. It has been in the draft standard
608  // for some time
609  //
610  static Arena* s_Arena;
611 
612  Box m_domain; // My index space.
613  int m_nvar; // Number components.
614  long m_numpts; // Cached number of points in FAB.
615  long m_truesize; // m_nvar * m_numpts that was allocated on heap
616  // (only if m_aliased == false).
617  T* __restrict m_dptr; // The data pointer.
618  bool m_aliased; // The BaseFab is not allocated memory, but is an alias. bvs
619 
620 private:
621  //
622  // These functions are made private to prevent use of the default
623  // functions provided by the C++ compiler.
624  //
626  BaseFab (const BaseFab<T>&);
627 };
628 
629 #include "NamespaceFooter.H"
630 
631 #include "BaseFabImplem.H"
632 
633 #endif
int linearSize(void) const
Definition: BaseFabImplem.H:621
void clear()
Definition: BaseFabImplem.H:225
virtual long offset(const IntVect &a_iv, const int &a_ivar) const
{ constructors, destructor and defines}
Definition: BaseFab.H:86
const int * loVect() const
{ Fortran interface functions}
Definition: BaseFabImplem.H:326
static Arena * s_Arena
Definition: BaseFab.H:610
#define CH_assert(cond)
Definition: CHArray.H:37
void setVal(T a_x, const Box &a_bx, int a_nstart, int a_numcomp)
{ data modification functions}
Definition: BaseFabImplem.H:369
bool contains(const BaseFab< T > &a_fab) const
{ comparison functions}
Definition: BaseFabImplem.H:359
BaseFab< T > & shift(const IntVect &a_v)
{ domain modification functions}
Definition: BaseFabImplem.H:486
virtual void linearIn(void *a_buf, const Box &a_R, const Interval &a_comps)
Definition: BaseFabImplem.H:542
Definition: SliceSpec.H:41
IntVect size() const
size functions
Definition: Box.H:1819
static std::string name()
Definition: BaseFabImplem.H:717
Box m_domain
Definition: BaseFab.H:612
int m_nvar
Definition: BaseFab.H:613
virtual void linearOut(void *a_buf, const Box &a_R, const Interval &a_comps) const
Definition: BaseFabImplem.H:522
BaseFab< T > & operator=(BaseFab< T > &&) noexcept
move assignment
Definition: BaseFabImplem.H:97
BaseFab()
Definition: BaseFabImplem.H:108
const IntVect & smallEnd() const
Definition: BaseFabImplem.H:251
int nComp() const
{ accessors}
Definition: BaseFabImplem.H:234
void const char const int const int const int const Real const Real const int const Real const int const Real Real * C
Definition: Lapack.H:83
static int preAllocatable()
Definition: BaseFab.H:552
BaseFab< T > & shiftHalf(int a_dir, int a_numHalfs)
Definition: BaseFabImplem.H:501
bool isAliased() const
Definition: BaseFabImplem.H:771
Structure for passing component ranges in code.
Definition: Interval.H:23
Interval interval() const
Definition: BaseFab.H:258
A Virtual Base Class for Dynamic Memory Managemen.
Definition: Arena.H:40
double Real
Definition: REAL.H:33
void define()
Definition: BaseFabImplem.H:626
virtual void performCopy(const BaseFab< T > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
Definition: BaseFabImplem.H:725
BaseFab< T > & copy(const BaseFab< T > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
Definition: BaseFabImplem.H:396
const int * hiVect() const
Definition: BaseFabImplem.H:331
Definition: BaseFab.H:80
T * dataPtr(int a_n=0)
Definition: BaseFabImplem.H:343
virtual void * linearOut2(void *a_buf, const Box &a_R, const Interval &a_comps) const
Same as linearOut, but returns the current location in the buffer.
Definition: BaseFabImplem.H:528
T *__restrict m_dptr
Definition: BaseFab.H:617
Real BaseFabRealSetVal
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
bool m_aliased
Definition: BaseFab.H:618
long m_truesize
Definition: BaseFab.H:615
bool contains(const IntVect &p) const
Definition: Box.H:1887
const int * nCompPtr() const
Definition: BaseFabImplem.H:336
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
void getVal(T *a_data, const IntVect &a_pos, int a_N, int a_numcomp) const
Definition: BaseFabImplem.H:303
void const char const int const int * N
Definition: Lapack.H:83
void resize(const Box &a_b, int a_n=1, T *a_alias=NULL)
Definition: BaseFabImplem.H:158
void undefine()
Definition: BaseFabImplem.H:682
static int testBoxAndComp()
regression test
Definition: BaseFabImplem.H:39
void performSetVal(T a_x, const Box &a_bx, int a_nstart, int a_numcomp)
Definition: BaseFabImplem.H:744
static int test()
regression test
Definition: BaseFabImplem.H:77
virtual void * linearIn2(void *a_buf, const Box &a_R, const Interval &a_comps)
same as linearIn, but returns the current location in the buffer
Definition: BaseFabImplem.H:550
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1770
IntVect size() const
Definition: BaseFabImplem.H:246
void degenerate(BaseFab< T > &a_slice, const SliceSpec &a_sliceSpec) const
Definition: BaseFabImplem.H:777
long m_numpts
Definition: BaseFab.H:614
const IntVect & bigEnd() const
Definition: BaseFabImplem.H:256
const Box & box() const
Definition: BaseFabImplem.H:241