Chombo + EB  3.2
CFArrayBox.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 _CFARRAYBOX_H_
12 #define _CFARRAYBOX_H_
13 
14 #include "Box.H"
15 #include "BaseFab.H"
16 
17 #include "CH_Complex.H"
18 #include "NamespaceHeader.H"
19 
20 ///
21 /**
22  Complex Fortran Array Boxes (generally called CFArrayBoxs) are objects constructed
23  to interface with arrays in Fortran. Useful operations can be performed
24  upon FABs in C++, and they provide a convenient interface to
25  Fortran when it is necessary to retreat into that language for
26  doing arithmetic operations when performance matters.
27 
28  CFArrayBox is derived from BaseFab<Complex>.
29  CFArrayBox adds additional useful capabilities which make sense
30  for Complex types, such as I/O and L**p norms.
31 
32  The C pre-processor macro `CH_SPACEDIM' must be defined to use
33  this class. The internal precision of CFArrayBox objects is
34  set by defining either `CH_USE_FLOAT' or `CH_USE_DOUBLE'
35 
36  This class does NOT provide a copy constructor or assignment operator.
37 */
38 class CFArrayBox: public BaseFab<Complex>
39 {
40 public:
41 
42  ///
43  /**
44  Constructs an invalid CFArrayBox with no memory.
45  */
46  CFArrayBox ();
47 
48  ///
49  /**
50  Constructs an initial CFArrayBox with the data space allocated but not
51  inititialized. a_ncomp is the number of components (variables) at each
52  data point in the Box.
53  */
54  CFArrayBox(const Box& a_box,
55  int a_ncomp,
56  Complex* a_alias = NULL);
57 
58  ///
59  /**
60  Construct an aliaed CFArrayBox. See BaseFab class for details.
61  */
62  CFArrayBox(const Interval& a_comps,
63  CFArrayBox& a_original)
64  :
65  BaseFab<Complex>(a_comps, a_original)
66  {}
67 
68  virtual void define(const Box& a_box, int a_ncomp, Complex* a_alias=NULL)
69  {
70  BaseFab<Complex>::define(a_box, a_ncomp, a_alias);
71  }
72  ///
73  /**
74  Defines CFArrayBox with the data space allocated but not
75  inititialized. a_ncomp is the number of components (variables) at each
76  data point in the Box.
77  */
78  // virtual void define(const Box& a_box,
79  // int a_ncomp,
80  // Complex* a_alias = NULL)
81  // {
82  // BaseFab<Complex>::resize(a_box, a_ncomp, a_alias);
83  // }
84 
85  ///
86  /**
87  The (virtual) destructor.
88  */
89  virtual ~CFArrayBox ();
90 
91  CFArrayBox(CFArrayBox&& a_in)=default;
92 
93  CFArrayBox& operator=(CFArrayBox&& a_in)=default;
94  ///
95  /**
96  Constructs an 'aliased' BaseFab of the requested interval of the
97  argument BaseFab. This BaseFab does not allocate any memory, but
98  sets its data pointer into the memory pointed to by the argument
99  BaseFab. It is the users responsiblity to ensure this aliased
100  BaseFab is not used after the original BaseFab has deleted its data ptr
101  (resize, define(..) called, or destruction, etc.).
102 
103  This aliased BaseFab will also generate side effects (modifying the values
104  of data in one will modify the other's data).
105 
106  This aliased BaseFab will have a_comps.size() components, starting at zero.
107  */
108  virtual void define(const Interval& a_comps,
109  CFArrayBox& a_original)
110  {
111  BaseFab<Complex>::define(a_comps, a_original);
112  }
113 
114  ///
115  /**
116  * This is here only to make the Intel compiler stop warning about
117  * partial override.
118  */
119  virtual void define(const Interval& a_comps,
120  BaseFab<Complex>& a_original)
121  {
122  BaseFab<Complex>::define(a_comps, a_original);
123  }
124 
125  ///
126  /**
127  Constructs CFArrayBox by reading it from istream.
128  */
129  explicit CFArrayBox(std::istream& a_is);
130 
131  ///
132  /**
133  Returns the Lp-norm of this FAB using components
134  (a_comp : a_comp+a_numcomp-1) and within the a_subbox.
135  a_p < 0 -> ERROR
136  a_p = 0 -> infinity norm (max absolute value)
137  a_p = 1 -> sum of ABS(FAB)
138  a_p > 1 -> Lp-norm
139  */
140  virtual Real norm(const Box& a_subbox,
141  int a_p = 2,
142  int a_comp = 0,
143  int a_numcomp = 1) const;
144 
145  ///
146  /**
147  Returns the Lp-norm of this FAB using components
148  (a_comp : a_comp+a_numcomp-1).
149  a_p < 0 -> ERROR
150  a_p = 0 -> infinity norm (max absolute value)
151  a_p = 1 -> sum of ABS(FAB)
152  a_p > 1 -> Lp-norm
153  */
154  virtual Real norm(int a_p = 2,
155  int a_comp = 0,
156  int a_numcomp = 1) const;
157 
158  ///
159  /**
160  Returns sum of pow(fab[i,c],p): i in a_subbox, a_comp <= c <
161  a_comp+a_numcomp, a_p >= 2 only
162  */
163  virtual Complex sumPow(const Box& a_subbox,
164  int a_p = 2,
165  int a_comp = 0,
166  int a_numcomp = 1) const;
167 
168  /// Return the dot product of this CFArrayBox with another
169  /**
170  Return the dot product of this CFArrayBox and "a_fab2" over their common
171  box and all components.
172  */
173  Complex dotProduct(const CFArrayBox& a_fab2) const;
174 
175  /// Return the dot product of this CFArrayBox with another
176  /**
177  Return the dot product of this CFArrayBox and "a_fab2" over the
178  a_box box and all components.
179  */
180  Complex dotProduct(const CFArrayBox& a_fab2, const Box& a_box) const;
181 
182 
183  ///
184  /**
185  Modifies this CFArrayBox by replacing each value with its absolute value.
186  */
187  void abs();
188 
189  ///
190  /**
191  Modifies this CFArrayBox by replacing each value with its absolute value,
192  for components (a_comp : a_comp+a_numcomp-1).
193  */
194  void abs(int a_comp,
195  int a_numcomp = 1);
196 
197  ///
198  /**
199  Modifies this CFArrayBox by replacing eahc value with its absolute value,
200  for components (a_comp : a_comp+a_numcomp-1) and within the a_subbox.
201  */
202  void abs (const Box& a_subbox,
203  int a_comp = 0,
204  int a_numcomp = 1);
205 
206  ///
207  /**
208  Returns sum of given component of CFArrayBox.
209  */
210  Complex sum(int a_comp,
211  int a_numcomp = 1) const;
212 
213  ///
214  /**
215  Returns sum of component of this CFArrayBox in given a_subbox.
216  */
217  Complex sum(const Box& a_subbox,
218  int a_comp,
219  int a_numcomp = 1) const;
220 
221  ///
222  /**
223  Modifies this CFArrayBox by replacing each value x with a_r/x.
224  */
225  CFArrayBox& invert(Complex a_r);
226 
227  ///
228  /**
229  Modifies this CFArrayBox by replacing each value x with a_r/x. For
230  given range of components.
231  */
232  CFArrayBox& invert(Complex a_r,
233  int a_comp,
234  int a_numcomp = 1);
235 
236  ///
237  /**
238  Modifies this CFArrayBox by replacing each value x with a_r/x. For
239  given range of components and within given a_subbox.
240  */
241  CFArrayBox& invert(Complex a_r,
242  const Box& a_subbox,
243  int a_comp = 0,
244  int a_numcomp = 1);
245 
246  ///
247  /**
248  Modifies this CFArrayBox by replacing each value with its additive
249  inverse. For given range of components and within given a_subbox.
250  */
251  CFArrayBox& negate(const Box& a_subbox,
252  int a_comp = 0,
253  int a_numcomp = 1);
254 
255  ///
256  /**
257  Modifies this CFArrayBox by replacing each value with its additive
258  inverse. For given range of components.
259  */
260  CFArrayBox& negate(int a_comp,
261  int a_numcomp = 1);
262 
263  ///
264  /**
265  Modifies this CFArrayBox by replacing each value with its additive
266  inverse.
267  */
268  CFArrayBox& negate();
269 
270  ///
271  /**
272  Modifies this CFArrayBox by adding the scalar Complex a_r to all values. For
273  given range of components and within given a_subbox.
274  */
275  CFArrayBox& plus(Complex a_r,
276  const Box& a_subbox,
277  int a_comp = 0,
278  int a_numcomp = 1);
279 
280  ///
281  /**
282  Modifies this CFArrayBox by adding the scalar Complex a_r to all values. For
283  given range of components.
284  */
285  CFArrayBox& plus(Complex a_r,
286  int a_comp,
287  int a_numcomp = 1);
288 
289  ///
290  /**
291  Modifies this CFArrayBox by adding the scalar Complex a_r to all values.
292  */
293  CFArrayBox& operator += (Complex a_r);
294 
295  ///
296  /**
297  Modifies this CFArrayBox by pointwise addition of the values of the
298  argument CFArrayBox. You might come to grief if the domains of the
299  CFArrayBoxes don't match.
300  */
301  CFArrayBox& operator += (const CFArrayBox& a_x);
302 
303  ///
304  /**
305  Modifies this CFArrayBox by adding the scalar Complex a_r to all values.
306  */
307  CFArrayBox& plus(Complex a_r);
308 
309 
310  ///
311  /**
312  Modifies this CFArrayBox by pointwise addition of the values of the
313  argument CFArrayBox. You might come to grief if the domains of the
314  CFArrayBoxes don't match. The same as += operator.
315 
316  */
317  CFArrayBox& plus(const CFArrayBox& a_x);
318 
319  ///
320  /**
321  Modifies this CFArrayBox by pointwise scaled addition of the
322  argument CFArrayBox (a[i] <- a[i] + a_scale * a_src[i]). Uses domain
323  of the intersection of these two CFArrayBoxes.
324  */
325  CFArrayBox& plus(const CFArrayBox& a_src,
326  const Complex& a_scale);
327 
328  ///
329  /**
330  Modifies this CFArrayBox by pointwise scaled addition of the
331  argument CFArrayBox (a[i] <- a[i] + a_scale * a_src[i]). Uses domain
332  of the intersection of these two CFArrayBoxes.
333  */
334  CFArrayBox& plus(const CFArrayBox& a_src,
335  const Complex& a_scale,
336  int a_srccomp,
337  int a_destcomp,
338  int a_numcomp = 1);
339 
340  ///
341  /**
342  Modifies this CFArrayBox by pointwise addition of values in the argument
343  CFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1)
344  to this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1)
345  where the domains of the two CFArrayBoxes intersect.
346  */
347  CFArrayBox& plus(const CFArrayBox& a_src,
348  int a_srccomp,
349  int a_destcomp,
350  int a_numcomp = 1);
351 
352  ///
353  /**
354  Modifies this CFArrayBox by pointwise addition of values in the argument
355  CFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1)
356  to this CFArrayBox's components (a_destcomp : a_destcomp+numcomp-1)
357  where the domain of this CFArrayBox intersects the a_subbox. NOTE:
358  a_subbox must be contained in this FAB.
359  */
360  CFArrayBox& plus(const CFArrayBox& a_src,
361  const Box& a_subbox,
362  int a_srccomp,
363  int a_destcomp,
364  int a_numcomp = 1);
365 
366  ///
367  /**
368  Modifies this CFArrayBox by pointwise addition of values in the argument
369  CFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1)
370  in the Box a_srcbox to this CFArrayBox's components (a_destcomp :
371  a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations
372  within the two CFArrayBoxes are indexed relative to a_srcbox and a_destbox,
373  and will in general not be the same. The a_srcbox and a_destbox must be
374  same size. The results are UNDEFINED if the a_src and dest CFArrayBoxes
375  are the same and the a_srcbox and a_destbox overlap.
376 
377  */
378  CFArrayBox& plus(const CFArrayBox& a_src,
379  const Box& a_srcbox,
380  const Box& a_destbox,
381  int a_srccomp,
382  int a_destcomp,
383  int a_numcomp = 1);
384 
385  ///
386  CFArrayBox& plus(const CFArrayBox& a_src,
387  const Box& a_srcbox,
388  const Box& a_destbox,
389  const Complex& a_scale,
390  int a_srccomp,
391  int a_destcomp,
392  int a_numcomp = 1);
393 
394  ///
395  /**
396  Modifies this CFArrayBox by subtracting the scalar Complex a_r to all values.
397  Note: use plus(-a_r) for more general operations.
398  */
399  CFArrayBox& operator -= (Complex a_r);
400 
401  ///
402  /**
403  Modifies this CFArrayBox by pointwise subtraction of the values of the
404  argument CFArrayBox. You might come to grief if the domains of the
405  CFArrayBoxes don't match.
406  */
407  CFArrayBox& operator -= (const CFArrayBox& a_x);
408 
409  ///
410  /**
411  Modifies this CFArrayBox by pointwise subtraction of the values of the
412  argument CFArrayBox. You might come to grief if the domains of the
413  CFArrayBoxes don't match. The same as -= operator.
414  */
415  CFArrayBox& minus(const CFArrayBox& a_x);
416 
417  /**
418  Modifies this CFArrayBox by pointwise subtraction of values in the
419  argument CFArrayBox. Subtracts a_src's components (a_srccomp :
420  a_srccomp+a_numcomp-1) from this CFArrayBox's components (a_destcomp :
421  a_destcomp+a_numcomp-1) where the domains of the two CFArrayBoxes
422  intersect.
423  */
424  CFArrayBox& minus(const CFArrayBox& a_src,
425  int a_srccomp,
426  int a_destcomp,
427  int a_numcomp = 1);
428 
429  /**
430  Modifies this CFArrayBox by pointwise subtraction of values in the
431  argument CFArrayBox. Subtracts a_src's components (a_srccomp :
432  a_srccomp+a_numcomp-1) from this CFArrayBox's components (a_destcomp :
433  a_destcomp+a_numcomp-1) where the domain of this CFArrayBox intersects
434  the a_subbox. NOTE: a_subbox must be contained in this FAB.
435  */
436  CFArrayBox& minus(const CFArrayBox& a_src,
437  const Box& a_subbox,
438  int a_srccomp,
439  int a_destcomp,
440  int a_numcomp = 1);
441 
442  ///
443  /**
444  Modifies this CFArrayBox by pointwise subtraction of values in the
445  argument CFArrayBox. Subtracts a_src's components (a_srccomp :
446  a_srccomp+a_numcomp-1) in the Box a_srcbox from this CFArrayBox's
447  components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox.
448  Corresponding locations within the two CFArrayBoxes are indexed relative
449  to a_srcbox and a_destbox, and will in general not be the same. The
450  a_srcbox and a_destbox must be same size. The results are UNDEFINED
451  if the a_src and dest CFArrayBoxes are the same and the a_srcbox and
452  a_destbox overlap.
453  */
454  CFArrayBox& minus(const CFArrayBox& a_src,
455  const Box& a_srcbox,
456  const Box& a_destbox,
457  int a_srccomp,
458  int a_destcomp,
459  int a_numcomp = 1);
460 
461  ///
462  /**
463  Modifies this CFArrayBox by multiplying all values by the scalar Complex a_r.
464  */
465  CFArrayBox& operator *= (Complex a_r);
466 
467  ///
468  /**
469  Modifies this CFArrayBox by multiplying all values by the scalar Complex a_r.
470  */
471  CFArrayBox& mult(Complex a_r);
472 
473  ///
474  /**
475  Modifies this CFArrayBox by multiplying all values by the scalar
476  Complex a_r. For given range of components.
477  */
478  CFArrayBox& mult(Complex a_r,
479  int a_comp,
480  int a_numcomp = 1);
481 
482  ///
483  /**
484  Modifies this CFArrayBox by multiplying all values by the scalar
485  Complex a_r. For given range of components and within given a_subbox.
486  */
487  CFArrayBox& mult(Complex a_r,
488  const Box& a_subbox,
489  int a_comp = 0,
490  int a_numcomp = 1);
491 
492  ///
493  /**
494  Modifies this CFArrayBox by pointwise multiplication of the values by the
495  argument CFArrayBox. You might come to grief if the domains of the
496  CFArrayBoxes don't match.
497  */
498  CFArrayBox& operator *= (const CFArrayBox& a_x);
499 
500  ///
501  /**
502  Modifies this CFArrayBox by pointwise multiplication by the values in the
503  argument CFArrayBox. You might come to grief if the domains of the
504  CFArrayBoxes don't match. The same as the *= operator.
505  */
506  CFArrayBox& mult(const CFArrayBox& a_x);
507 
508  ///
509  /**
510  Modifies this CFArrayBox by pointwise multiplication by values in the
511  argument CFArrayBox. Multiplies a_src's components (a_srccomp :
512  a_srccomp+a_numcomp-1) by this CFArrayBox's components (a_destcomp :
513  a_destcomp+a_numcomp-1) where the domains of the two CFArrayBoxes
514  intersect.
515  */
516  CFArrayBox& mult(const CFArrayBox& a_src,
517  int a_srccomp,
518  int a_destcomp,
519  int a_numcomp = 1);
520 
521  ///
522  /**
523  Modifies this CFArrayBox by pointwise multiplication by values in the
524  argument CFArrayBox. Multiplies a_src's components (a_srccomp :
525  a_srccomp+a_numcomp-1) by this CFArrayBox's components (a_destcomp :
526  a_destcomp+a_numcomp-1) where the domain of this CFArrayBox intersects
527  the a_subbox. NOTE: a_subbox must be contained in this FAB.
528  */
529  CFArrayBox& mult(const CFArrayBox& a_src,
530  const Box& a_subbox,
531  int a_srccomp,
532  int a_destcomp,
533  int a_numcomp = 1);
534 
535  ///
536  /**
537  Modifies this CFArrayBox by pointwise multiplication by values in the
538  argument CFArrayBox. Multiplies a_src's components (a_srccomp :
539  a_srccomp+a_numcomp-1) in the Box a_srcbox by this CFArrayBox's
540  components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox.
541  Corresponding locations within the two CFArrayBoxes are indexed relative
542  to a_srcbox and a_destbox, and will in general not be the same. The
543  a_srcbox and a_destbox must be same size. The results are UNDEFINED if
544  the a_src and dest CFArrayBoxes are the same and the a_srcbox and a_destbox
545  overlap.
546  */
547  CFArrayBox& mult(const CFArrayBox& a_src,
548  const Box& a_srcbox,
549  const Box& a_destbox,
550  int a_srccomp,
551  int a_destcomp,
552  int a_numcomp = 1);
553 
554  ///
555  /**
556  Modify this CFArrayBox by multiplying each element by the Real value in a_r
557  */
558  CFArrayBox& mult(const BaseFab<Real>& a_r);
559 
560 ///
561  /**
562  Modify this CFArrayBox by multiplying each element by the Real value in a_r
563  in the region defined by a_box
564  */
565  CFArrayBox& mult(const BaseFab<Real>& a_r,
566  const Box& a_box);
567 
568  ///
569  /**
570  Modifies this CFArrayBox by dividing all values by the scalar Complex a_r.
571  */
572  CFArrayBox& operator /= (Complex a_r);
573 
574  ///
575  /**
576  Modifies this CFArrayBox by dividing all values by the scalar Complex a_r.
577  */
578  CFArrayBox& divide(Complex a_r);
579 
580  ///
581  /**
582  Modifies this CFArrayBox by dividing all values by the scalar Complex a_r.
583  For given range of components.
584  */
585  CFArrayBox& divide(Complex a_r,
586  int a_comp,
587  int a_numcomp = 1);
588 
589  ///
590  /**
591  Modifies this CFArrayBox by dividing all values by the scalar Complex
592  a_r. For given range of components and within given a_subbox.
593  */
594  CFArrayBox& divide(Complex a_r,
595  const Box& a_subbox,
596  int a_comp = 0,
597  int a_numcomp = 1);
598 
599  ///
600  /**
601  Modifies this CFArrayBox by pointwise division of the values by the
602  argument CFArrayBox. You might come to grief if the domains of the
603  CFArrayBoxes don't match.
604  */
605  CFArrayBox& operator /= (const CFArrayBox& a_x);
606 
607  ///
608  /**
609  Modifies this CFArrayBox by pointwise division by the values in the
610  argument CFArrayBox. You might come to grief if the domains of the
611  CFArrayBoxes don't match. The same as the /= operator.
612  */
613  CFArrayBox& divide(const CFArrayBox& a_x);
614 
615  ///
616  /**
617  Modifies this CFArrayBox by pointwise division by values in the argument
618  CFArrayBox. Divides this CFArrayBox's components (a_destcomp :
619  a_destcomp+a_numcomp-1) by a_src's components (a_srccomp :
620  a_srccomp+a_numcomp-1) where the domains of the two CFArrayBoxes intersect.
621  */
622  CFArrayBox& divide(const CFArrayBox& a_src,
623  int a_srccomp,
624  int a_destcomp,
625  int a_numcomp = 1);
626 
627  ///
628  /**
629  Modifies this CFArrayBox by pointwise division by values in the argument
630  CFArrayBox. Divides this CFArrayBox's components (a_destcomp :
631  a_destcomp+a_numcomp-1) by a_src's components (a_srccomp :
632  a_srccomp+a_numcomp-1) where the domain of this CFArrayBox intersects
633  the a_subbox. NOTE: a_subbox must be contained in this FAB.
634  */
635  CFArrayBox& divide(const CFArrayBox& a_src,
636  const Box& a_subbox,
637  int a_srccomp,
638  int a_destcomp,
639  int a_numcomp = 1);
640 
641  ///
642  /**
643  Modifies this CFArrayBox by pointwise division by values in the argument
644  CFArrayBox. Divides this CFArrayBox's components (a_destcomp :
645  a_destcomp+a_numcomp-1) in the Box a_destbox by a_src's components
646  (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox. Corresponding
647  locations within the two CFArrayBoxes are indexed relative to a_srcbox and
648  a_destbox, and will in general not be the same. The a_srcbox and
649  a_destbox must be same size. The results are UNDEFINED if the a_src and
650  dest CFArrayBoxes are the same and the a_srcbox and a_destbox overlap.
651  */
652  CFArrayBox& divide(const CFArrayBox& a_src,
653  const Box& a_srcbox,
654  const Box& a_destbox,
655  int a_srccomp,
656  int a_destcomp,
657  int a_numcomp = 1);
658 
659  ///
660  Complex get(const IntVect& a_iv,
661  int a_comp) const
662  {
663  return this->operator()(a_iv, a_comp);
664  }
665 
666  ///
667  void set(const IntVect& a_iv,
668  int a_comp,
669  Complex a_val)
670  {
671  this->operator()(a_iv, a_comp) = a_val;
672  }
673 
674  //! Computes a_A * a_X + a_B * a_Y, placing the result in this CFArrayBox.
675  CFArrayBox& axby(const CFArrayBox& a_X, const CFArrayBox& a_Y,
676  Complex a_A, Complex a_B);
677 
678  //! Computes a_A * a_X + a_B * a_Y, placing the result in this CFArrayBox.
679  //! This version performs this operation only for the given component
680  //! in each CFArrayBox.
681  CFArrayBox& axby(const CFArrayBox& a_X, const CFArrayBox& a_Y,
682  Complex a_A, Complex a_B,
683  int a_destComp, int a_xComp, int a_yComp);
684 
685 protected:
686  virtual void performCopy(const BaseFab<Complex>& a_src,
687  const Box& a_srcbox,
688  int a_srccomp,
689  const Box& a_destbox,
690  int a_destcomp,
691  int a_numcomp);
692 
693 
694 private:
695  //
696  // These are disallowed.
697  //
698  CFArrayBox (const CFArrayBox&);
700 };
701 
702 #include "NamespaceFooter.H"
703 #endif
virtual Real norm(const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const
virtual ~CFArrayBox()
virtual void performCopy(const BaseFab< Complex > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
Complex dotProduct(const CFArrayBox &a_fab2) const
Return the dot product of this CFArrayBox with another.
CFArrayBox & plus(Complex a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
virtual void define(const Interval &a_comps, CFArrayBox &a_original)
Definition: CFArrayBox.H:108
virtual void define(const Box &a_box, int a_ncomp, Complex *a_alias=NULL)
Definition: CFArrayBox.H:68
CFArrayBox & negate()
Structure for passing component ranges in code.
Definition: Interval.H:23
CFArrayBox & divide(Complex a_r)
double Real
Definition: REAL.H:33
void define()
Definition: BaseFabImplem.H:672
virtual Complex sumPow(const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const
CFArrayBox(const Interval &a_comps, CFArrayBox &a_original)
Definition: CFArrayBox.H:62
Definition: BaseFab.H:77
virtual void define(const Interval &a_comps, BaseFab< Complex > &a_original)
Definition: CFArrayBox.H:119
CFArrayBox & mult(Complex a_r)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
CFArrayBox & axby(const CFArrayBox &a_X, const CFArrayBox &a_Y, Complex a_A, Complex a_B)
Computes a_A * a_X + a_B * a_Y, placing the result in this CFArrayBox.
CFArrayBox & invert(Complex a_r)
CFArrayBox & operator=(CFArrayBox &&a_in)=default
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Complex & operator()(const IntVect &a_p, int a_N)
Definition: BaseFabImplem.H:291
Definition: CFArrayBox.H:38
CFArrayBox & operator/=(Complex a_r)
CFArrayBox & minus(const CFArrayBox &a_x)
CFArrayBox & operator*=(Complex a_r)
void abs()
CFArrayBox & operator+=(Complex a_r)
Complex sum(int a_comp, int a_numcomp=1) const
CFArrayBox & operator-=(Complex a_r)