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