Chombo + EB  3.2
NodeNorms.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 // Norms.H
12 // petermc, 12 Aug 2002
13 // petermc, 17 Oct 2005, put integral functions into NodeIntegrals.H
14 
15 #ifndef _NODENORMS_H_
16 #define _NODENORMS_H_
17 
18 #include "LevelData.H"
19 #include "NodeFArrayBox.H"
20 #include "Vector.H"
21 #include "IntVectSet.H"
22 #include "NamespaceHeader.H"
23 
24 /// Computes L^p norm of a subbox of a NodeFArrayBox.
25 /** Computes L^p norm of the data in a subbox of <i>a_nfab</i>.
26  */
27 Real norm(/// the data on which to take the norm
28  const NodeFArrayBox& a_nfab,
29  /// mesh spacing at this level
30  const Real a_dx,
31  /// CELL-centered subbox over which to take norm
32  const Box& a_subbox,
33  /// norm to take, or 0 for max norm
34  const int a_p,
35  /// starting component
36  const int a_startComp = 0,
37  /// number of components
38  const int a_numComp = 1);
39 
40 /// Computes max norm of a subbox of a NodeFArrayBox.
41 /** Computes max norm of the data in a subbox of <i>a_nfab</i>.
42  */
43 Real maxnorm(/// the data on which to take the norm
44  const NodeFArrayBox& a_nfab,
45  /// CELL-centered subbox over which to take norm
46  const Box& a_subbox,
47  /// starting component
48  const int a_startComp = 0,
49  /// number of components
50  const int a_numComp = 1);
51 
52 /// Computes L^p norm of a BoxLayoutData<NodeFArrayBox>.
53 /** Computes L^p norm of <i>a_layout</i>.
54  Ignores ghost cells for LevelData.
55 
56  This is an internal function that should NOT normally
57  be called by the user.
58  */
59 Real norm(/// the data on which to take the norm
60  const BoxLayoutData<NodeFArrayBox>& a_layout,
61  /// mesh spacing at this level
62  const Real a_dx,
63  /// norm to take, or 0 for max norm
64  const int a_p,
65  /// interval of components to use
66  const Interval& a_interval,
67  /// verbosity, whether to print norms of each box
68  bool a_verbose = false);
69 
70 /// Computes L^p norm of a BoxLayoutData<NodeFArrayBox>.
71 /** Computes L^p norm of <i>a_layout</i>.
72  Ignores ghost cells for LevelData.
73 
74  This function uses the masks.
75  */
76 Real norm(/// the data on which to take the norm
77  const BoxLayoutData<NodeFArrayBox>& a_layout,
78  /// mask for the data
79  const LevelData<NodeFArrayBox>& a_mask,
80  /// domain of this level
81  const ProblemDomain& a_domain,
82  /// mesh spacing at this level
83  const Real a_dx,
84  /// norm to take, or 0 for max norm
85  const int a_p,
86  /// interval of components to use
87  const Interval& a_interval,
88  /// verbosity, whether to print norms of each box
89  bool a_verbose = false);
90 
91 /// Computes max norm of a BoxLayoutData<NodeFArrayBox>.
92 /** Computes max norm of <i>a_layout</i>.
93  Ignores ghost cells for LevelData.
94 
95  This function uses the masks.
96  */
97 Real maxnorm(/// the data on which to take the norm
98  const BoxLayoutData<NodeFArrayBox>& a_layout,
99  /// mask for the data
100  const LevelData<NodeFArrayBox>& a_mask,
101  /// domain of the data
102  const ProblemDomain& a_domain,
103  /// interval of components to use
104  const Interval& a_interval,
105  /// verbosity, whether to print norms of each box
106  bool a_verbose = false);
107 
108 /// Computes max norm of a BoxLayoutData<NodeFArrayBox>.
109 /** Computes max norm of <i>a_layout</i>.
110  Ignores ghost cells for LevelData.
111 
112  This is an internal function that should NOT normally
113  be called by the user.
114  */
115 Real maxnorm(/// the data on which to take the norm
116  const BoxLayoutData<NodeFArrayBox>& a_layout,
117  /// components to use in computing norm
118  const Interval& a_interval,
119  /// verbosity, whether to print norms of each box
120  bool a_verbose = false);
121 
122 /// Computes norm of multilevel array, counting only valid nodes at each level.
123 /**
124  Computes norm of multilevel array <i>a_phi</i>.
125  Only the valid nodes at each level are counted.
126  The valid nodes at a level are those that are not covered
127  by the interior of any finer level.
128  */
129 Real norm(/// multilevel data on which to take the norm
130  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
131  /// CELL-centered physical domain on each level
132  const Vector<ProblemDomain>& a_domain,
133  /// refinement ratios between successive levels
134  const Vector<int>& a_nRefFine,
135  /// mesh spacing at base level <i>a_lBase</i>
136  const Real a_dxCrse,
137  /// components to use in computing norm
138  const Interval& a_comps,
139  /// norm to take, or 0 for max norm
140  const int a_p,
141  /// index of base level to use in Vectors
142  const int a_lBase,
143  /// verbosity, whether to print norms of each box
144  bool a_verbose = false);
145 
146 /// Computes norm of multilevel array, counting only valid nodes at each level.
147 /**
148  Computes norm of multilevel array <i>a_phi</i>.
149  Only the valid nodes at each level are counted.
150  The valid nodes at a level are those that are not covered
151  by the interior of any finer level.
152 
153  a_IVSVext and a_IVSVintFinerCoarsened can be found by:
154  exteriorAndInteriorNodes(a_IVSVext, a_IVSVintFinerCoarsened,
155  layouts, a_domain, a_nRefFine);
156  where layouts is Vector<DisjointBoxLayout> on which the data in
157  a_phi live.
158  */
159 Real norm(/// multilevel data on which to take the norm
160  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
161  /// CELL-centered physical domain on each level
162  const Vector<ProblemDomain>& a_domain,
163  /// exterior boundary nodes at all level
164  const Vector<LayoutData< Vector<Box> >* >& a_IVSVext,
165  /// interior boundary nodes of coarsened finer-level grids at all levels except finest
166  const Vector<LayoutData< Vector<Box> >* >& a_IVSVintFinerCoarsened,
167  /// coarsened finer-level grids at all levels except finest
168  const Vector<DisjointBoxLayout>& a_layoutsFinerCoarsened,
169  /// refinement ratios between successive levels
170  const Vector<int>& a_nRefFine,
171  /// mesh spacing at base level <i>a_lBase</i>
172  const Real a_dxCrse,
173  /// components to use in computing norm
174  const Interval& a_comps,
175  /// norm to take, or 0 for max norm
176  const int a_p,
177  /// index of base level to use in Vectors
178  const int a_lBase,
179  /// verbosity, whether to print norms of each box
180  bool a_verbose = false);
181 
182 /// Computes norm of multilevel array, counting only valid nodes at each level.
183 /**
184  Computes norm of multilevel array <i>a_phi</i>.
185  Only the valid nodes at each level are counted.
186  The valid nodes at a level are those that are not covered
187  by the interior of any finer level.
188 
189  a_IVSVext and a_IVSVintFinerCoarsened can be found by:
190  exteriorAndInteriorNodes(a_IVSVext, a_IVSVintFinerCoarsened,
191  layouts, a_domain, a_nRefFine);
192  where layouts is Vector<DisjointBoxLayout> on which the data in
193  a_phi live.
194  */
195 Real norm(/// multilevel data on which to take the norm
196  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
197  /// CELL-centered physical domain on each level
198  const Vector<ProblemDomain>& a_domain,
199  /// exterior boundary nodes at all level
200  const Vector<LayoutData< Vector<IntVectSet> >* >& a_IVSVext,
201  /// interior boundary nodes of coarsened finer-level grids at all levels except finest
202  const Vector<LayoutData< Vector<IntVectSet> >* >& a_IVSVintFinerCoarsened,
203  /// coarsened finer-level grids at all levels except finest
204  const Vector<DisjointBoxLayout>& a_layoutsFinerCoarsened,
205  /// refinement ratios between successive levels
206  const Vector<int>& a_nRefFine,
207  /// mesh spacing at base level <i>a_lBase</i>
208  const Real a_dxCrse,
209  /// components to use in computing norm
210  const Interval& a_comps,
211  /// norm to take, or 0 for max norm
212  const int a_p,
213  /// index of base level to use in Vectors
214  const int a_lBase,
215  /// verbosity, whether to print norms of each box
216  bool a_verbose = false);
217 
218 /// Computes norm of multilevel array, counting only valid nodes at each level.
219 /**
220  Computes norm of multilevel array <i>a_phi</i>.
221  Only the valid nodes at each level are counted, with the mask vector.
222  The valid nodes at a level are those that are not covered
223  by the interior of any finer level.
224  */
225 Real norm(/// multilevel data on which to take the norm
226  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
227  /// mask at each level
228  const Vector<LevelData<NodeFArrayBox>* >& a_mask,
229  /// domain at each level
230  const Vector<ProblemDomain>& a_vectPD,
231  /// refinement ratios between successive levels
232  const Vector<int>& a_nRefFine,
233  /// mesh spacing at base level <i>a_lBase</i>
234  const Real a_dxCrse,
235  /// components to use in computing norm
236  const Interval& a_comps,
237  /// norm to take, or 0 for max norm
238  const int a_p,
239  /// index of base level to use in Vectors
240  const int a_lBase,
241  /// verbosity, whether to print norms of each box
242  bool a_verbose = false);
243 
244 /// Computes norm of multilevel array, counting only valid nodes at each level.
245 /**
246  Computes norm of multilevel array <i>a_phi</i>.
247  Only the valid nodes at each level are counted.
248  The valid nodes at a level are those that are not covered
249  by the interior of any finer level.
250  */
251 Real norm(/// multilevel data on which to take the norm
252  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
253  /// CELL-centered physical domain on each level
254  const Vector<Box>& a_domain,
255  /// refinement ratios between successive levels
256  const Vector<int>& a_nRefFine,
257  /// mesh spacing at base level <i>a_lBase</i>
258  const Real a_dxCrse,
259  /// components to use in computing norm
260  const Interval& a_comps,
261  /// norm to take, or 0 for max norm
262  const int a_p,
263  /// index of base level to use in Vectors
264  const int a_lBase,
265  /// verbosity, whether to print norms of each box
266  bool a_verbose = false);
267 
268 /// Computes norm of single-level array, counting only valid nodes.
269 /**
270  Computes norm of single-level array <i>a_phi</i>.
271  Only the valid nodes at this level are counted.
272  The valid nodes are the interior nodes of this level that are not
273  projections of interior nodes of the finer level, if any.
274 
275  This function computes exterior boundary nodes, and interior boundary
276  nodes of the coarsened finer level, if any. It is more efficient
277  to precompute these boundary-node objects and call one of the other
278  norm functions below.
279  */
280 Real norm(/// the data on which to take the norm
281  const LevelData<NodeFArrayBox>& a_phi,
282  /// CELL-centered physical domain on each level
283  const ProblemDomain& a_domain,
284  /// pointer to CELL-centered grids on the next finer level, or NULL if there is none.
285  const DisjointBoxLayout* a_finerGridsPtr,
286  /// refinement ratio to next finer level
287  const int a_nRefFine,
288  /// mesh spacing at this level
289  const Real a_dx,
290  /// interval of components to use
291  const Interval& a_comps,
292  /// norm to take, or 0 for max norm
293  const int a_p,
294  /// verbosity, whether to print norms of each box
295  bool a_verbose = false);
296 
297 /// Computes norm of single-level array, counting only valid nodes.
298 /**
299  Computes norm of single-level array <i>a_phi</i>.
300  Only the valid nodes at this level are counted.
301  The valid nodes are the interior nodes of this level that are not
302  projections of interior nodes of the finer level, if any.
303 
304  This function computes exterior boundary nodes, and interior boundary
305  nodes of the coarsened finer level, if any. It is more efficient
306  to precompute these boundary-node objects and call one of the other
307  norm functions below.
308  */
309 Real norm(/// the data on which to take the norm
310  const LevelData<NodeFArrayBox>& a_phi,
311  /// CELL-centered physical domain on each level
312  const Box& a_domain,
313  /// pointer to CELL-centered grids on the next finer level, or NULL if there is none.
314  const DisjointBoxLayout* a_finerGridsPtr,
315  /// refinement ratio to next finer level
316  const int a_nRefFine,
317  /// mesh spacing at this level
318  const Real a_dx,
319  /// interval of components to use
320  const Interval& a_comps,
321  /// norm to take, or 0 for max norm
322  const int a_p,
323  /// verbosity, whether to print norms of each box
324  bool a_verbose = false);
325 
326 /// Computes norm of single-level array, counting only valid nodes.
327 /**
328  Computes norm of single-level array <i>a_phi</i>.
329  Only the valid nodes at this level are counted.
330  The valid nodes are the interior nodes of this level that are not
331  projections of interior nodes of the finer level, if any.
332 
333  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
334  <tt>
335  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
336  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
337  </tt>
338 
339  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the call:<br>
340  <tt>
341  interiorBoundaryNodes(a_IVSVintFinerCoarsened, a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
342  </tt>
343 */
344 Real norm(/// the data on which to take the norm
345  const LevelData<NodeFArrayBox>& a_phi,
346  /// CELL-centered physical domain on each level
347  const ProblemDomain& a_domain,
348  /// CELL-centered grids on the next finer level
349  const DisjointBoxLayout& a_finerGridsCoarsened,
350  /// exterior boundary nodes of this level
351  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
352  /// interior boundary nodes of coarsened finer-level grids
353  const LayoutData< Vector<IntVectSet> >& a_IVSVintFinerCoarsened,
354  /// refinement ratio to next finer level
355  const int a_nRefFine,
356  /// mesh spacing at this level
357  const Real a_dx,
358  /// interval of components to use
359  const Interval& a_comps,
360  /// norm to take, or 0 for max norm
361  const int a_p,
362  /// verbosity, whether to print norms of each box
363  bool a_verbose = false);
364 
365 
366 /// Computes norm of single-level array, counting only valid nodes.
367 /**
368  Computes norm of single-level array <i>a_phi</i>.
369  Only the valid nodes at this level are counted.
370  The valid nodes are the interior nodes of this level that are not
371  projections of interior nodes of the finer level, if any.
372 
373  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
374  <tt>
375  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
376  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
377  </tt>
378 
379  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the call:<br>
380  <tt>
381  interiorBoundaryNodes(a_IVSVintFinerCoarsened, a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
382  </tt>
383 */
384 Real norm(/// the data on which to take the norm
385  const LevelData<NodeFArrayBox>& a_phi,
386  /// CELL-centered physical domain on each level
387  const ProblemDomain& a_domain,
388  /// CELL-centered grids on the next finer level
389  const DisjointBoxLayout& a_finerGridsCoarsened,
390  /// exterior boundary nodes of this level
391  const LayoutData< Vector<Box> >& a_IVSVext,
392  /// interior boundary nodes of coarsened finer-level grids
393  const LayoutData< Vector<Box> >& a_IVSVintFinerCoarsened,
394  /// refinement ratio to next finer level
395  const int a_nRefFine,
396  /// mesh spacing at this level
397  const Real a_dx,
398  /// interval of components to use
399  const Interval& a_comps,
400  /// norm to take, or 0 for max norm
401  const int a_p,
402  /// verbosity, whether to print norms of each box
403  bool a_verbose = false);
404 
405 
406 /// Computes norm of single-level array, counting only valid nodes.
407 /**
408  Computes norm of single-level array <i>a_phi</i>.
409  Only the valid nodes at this level are counted.
410  The valid nodes are the interior nodes of this level that are not
411  projections of interior nodes of the finer level, if any.
412 
413  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
414  <tt>
415  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
416  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
417  </tt>
418 
419  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the call:<br>
420  <tt>
421  interiorBoundaryNodes(a_IVSVintFinerCoarsened, a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
422  </tt>
423 */
424 Real norm(/// the data on which to take the norm
425  const LevelData<NodeFArrayBox>& a_phi,
426  /// CELL-centered physical domain on each level
427  const Box& a_domain,
428  /// CELL-centered grids on the next finer level
429  const DisjointBoxLayout& a_finerGridsCoarsened,
430  /// exterior boundary nodes of this level
431  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
432  /// interior boundary nodes of coarsened finer-level grids
433  const LayoutData< Vector<IntVectSet> >& a_IVSVintFinerCoarsened,
434  /// refinement ratio to next finer level
435  const int a_nRefFine,
436  /// mesh spacing at this level
437  const Real a_dx,
438  /// interval of components to use
439  const Interval& a_comps,
440  /// norm to take, or 0 for max norm
441  const int a_p,
442  /// verbosity, whether to print norms of each box
443  bool a_verbose = false);
444 
445 
446 /// Computes norm of single-level array, counting only valid nodes.
447 /**
448  Computes norm of single-level array <i>a_phi</i>.
449  Only the valid nodes at this level are counted.
450  The valid nodes are the interior nodes of this level that are not
451  projections of interior nodes of the finer level, if any.
452 
453  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
454  <tt>
455  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
456  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
457  </tt>
458 
459  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the call:<br>
460  <tt>
461  interiorBoundaryNodes(a_IVSVintFinerCoarsened, a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
462  </tt>
463 */
464 Real norm(/// the data on which to take the norm
465  const LevelData<NodeFArrayBox>& a_phi,
466  /// CELL-centered physical domain on each level
467  const Box& a_domain,
468  /// CELL-centered grids on the next finer level
469  const DisjointBoxLayout& a_finerGridsCoarsened,
470  /// exterior boundary nodes of this level
471  const LayoutData< Vector<Box> >& a_IVSVext,
472  /// interior boundary nodes of coarsened finer-level grids
473  const LayoutData< Vector<Box> >& a_IVSVintFinerCoarsened,
474  /// refinement ratio to next finer level
475  const int a_nRefFine,
476  /// mesh spacing at this level
477  const Real a_dx,
478  /// interval of components to use
479  const Interval& a_comps,
480  /// norm to take, or 0 for max norm
481  const int a_p,
482  /// verbosity, whether to print norms of each box
483  bool a_verbose = false);
484 
485 
486 /// Computes norm of single-level array, counting only valid nodes, with no finer level.
487 /**
488  Computes norm of single-level array <i>a_phi</i>, where there is no
489  finer level. Only the valid nodes at this level are counted.
490  The valid nodes are the interior nodes of this level.
491 
492  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
493  <tt>
494  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
495  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
496  </tt>
497 */
498 Real norm(/// the data on which to take the norm
499  const LevelData<NodeFArrayBox>& a_phi,
500  /// CELL-centered physical domain on each level
501  const ProblemDomain& a_domain,
502  /// exterior boundary nodes of this level
503  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
504  /// mesh spacing at this level
505  const Real a_dx,
506  /// interval of components to use
507  const Interval& a_comps,
508  /// norm to take, or 0 for max norm
509  const int a_p,
510  /// verbosity, whether to print norms of each box
511  bool a_verbose = false);
512 
513 
514 /// Computes norm of single-level array, counting only valid nodes, with no finer level.
515 /**
516  Computes norm of single-level array <i>a_phi</i>, where there is no
517  finer level. Only the valid nodes at this level are counted.
518  The valid nodes are the interior nodes of this level.
519 
520  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
521  <tt>
522  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
523  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
524  </tt>
525 */
526 Real norm(/// the data on which to take the norm
527  const LevelData<NodeFArrayBox>& a_phi,
528  /// CELL-centered physical domain on each level
529  const ProblemDomain& a_domain,
530  /// exterior boundary nodes of this level
531  const LayoutData< Vector<Box> >& a_IVSVext,
532  /// mesh spacing at this level
533  const Real a_dx,
534  /// interval of components to use
535  const Interval& a_comps,
536  /// norm to take, or 0 for max norm
537  const int a_p,
538  /// verbosity, whether to print norms of each box
539  bool a_verbose = false);
540 
541 
542 /// Computes max norm of multilevel array, counting only valid nodes at each level.
543 /**
544  Computes max norm of multilevel array <i>a_phi</i>.
545  Only the valid nodes at each level are counted.
546  The valid nodes at a level are those that are not covered
547  by the interior of any finer level.
548  */
549 Real maxnorm(/// multilevel data on which to take the norm
550  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
551  /// CELL-centered physical domain on each level
552  const Vector<ProblemDomain>& a_domain,
553  /// refinement ratios between successive levels
554  const Vector<int>& a_nRefFine,
555  /// components to use in computing norm
556  const Interval& a_comps,
557  /// index of base level to use in Vectors
558  const int a_lBase,
559  /// verbosity, whether to print norms of each box
560  bool a_verbose = false);
561 
562 /// Computes max norm of multilevel array, counting only valid nodes at each level.
563 /**
564  Computes max norm of multilevel array <i>a_phi</i>.
565  Only the valid nodes at each level are counted.
566  The valid nodes at a level are those that are not covered
567  by the interior of any finer level.
568  */
569 Real maxnorm(/// multilevel data on which to take the norm
570  const Vector<LevelData<NodeFArrayBox>* >& a_phi,
571  /// CELL-centered physical domain on each level
572  const Vector<Box>& a_domain,
573  /// refinement ratios between successive levels
574  const Vector<int>& a_nRefFine,
575  /// components to use in computing norm
576  const Interval& a_comps,
577  /// index of base level to use in Vectors
578  const int a_lBase,
579  /// verbosity, whether to print norms of each box
580  bool a_verbose = false);
581 
582 /// Computes max norm of single-level array, counting only valid nodes.
583 /**
584  Computes max norm of single-level array <i>a_phi</i>.
585  Only the valid nodes at this level are counted.
586  The valid nodes are the interior nodes of this level that are not
587  projections of interior nodes of the finer level, if any.
588 
589  This function computes exterior boundary nodes, and interior boundary
590  nodes of the coarsened finer level, if any. It is more efficient
591  to precompute these boundary-node objects and call one of the other
592  maxnorm functions below.
593  */
594 Real maxnorm(/// the data on which to take the norm
595  const LevelData<NodeFArrayBox>& a_phi,
596  /// CELL-centered physical domain on each level
597  const ProblemDomain& a_domain,
598  /// pointer to CELL-centered grids on the next finer level, or NULL if there is none.
599  const DisjointBoxLayout* a_finerGridsPtr,
600  /// refinement ratio to next finer level
601  const int a_nRefFine,
602  /// interval of components to use
603  const Interval& a_comps,
604  /// verbosity, whether to print norms of each box
605  bool a_verbose = false);
606 
607 /// Computes max norm of single-level array, counting only valid nodes.
608 /**
609  Computes max norm of single-level array <i>a_phi</i>.
610  Only the valid nodes at this level are counted.
611  The valid nodes are the interior nodes of this level that are not
612  projections of interior nodes of the finer level, if any.
613 
614  This function computes exterior boundary nodes, and interior boundary
615  nodes of the coarsened finer level, if any. It is more efficient
616  to precompute these boundary-node objects and call one of the other
617  maxnorm functions below.
618  */
619 Real maxnorm(/// the data on which to take the norm
620  const LevelData<NodeFArrayBox>& a_phi,
621  /// CELL-centered physical domain on each level
622  const Box& a_domain,
623  /// pointer to CELL-centered grids on the next finer level, or NULL if there is none.
624  const DisjointBoxLayout* a_finerGridsPtr,
625  /// refinement ratio to next finer level
626  const int a_nRefFine,
627  /// interval of components to use
628  const Interval& a_comps,
629  /// verbosity, whether to print norms of each box
630  bool a_verbose = false);
631 
632 
633 /// Computes max norm of single-level array, counting only valid nodes.
634 /**
635  Computes max norm of single-level array <i>a_phi</i>.
636  Only the valid nodes at this level are counted.
637  The valid nodes are the interior nodes of this level that are not
638  projections of interior nodes of the finer level, if any.
639 
640  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
641  <tt>
642  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
643  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
644  </tt>
645 
646  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the calls:<br>
647  <tt>
648  interiorBoundaryNodes(a_IVSVintFinerCoarsened,
649  a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
650  </tt>
651 */
652 Real maxnorm(/// the data on which to take the norm
653  const LevelData<NodeFArrayBox>& a_phi,
654  /// CELL-centered physical domain on each level
655  const ProblemDomain& a_domain,
656  /// CELL-centered grids on the next finer level
657  const DisjointBoxLayout& a_finerGridsCoarsened,
658  /// exterior boundary nodes of this level
659  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
660  /// interior boundary nodes of coarsened finer-level grids
661  const LayoutData< Vector<IntVectSet> >& a_IVSVintFinerCoarsened,
662  /// refinement ratio to next finer level
663  const int a_nRefFine,
664  /// interval of components to use
665  const Interval& a_comps,
666  /// verbosity, whether to print norms of each box
667  bool a_verbose = false);
668 
669 
670 /// Computes max norm of single-level array, counting only valid nodes.
671 /**
672  Computes max norm of single-level array <i>a_phi</i>.
673  Only the valid nodes at this level are counted.
674  The valid nodes are the interior nodes of this level that are not
675  projections of interior nodes of the finer level, if any.
676 
677  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
678  <tt>
679  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
680  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
681  </tt>
682 
683  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the calls:<br>
684  <tt>
685  interiorBoundaryNodes(a_IVSVintFinerCoarsened,
686  a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
687  </tt>
688 */
689 Real maxnorm(/// the data on which to take the norm
690  const LevelData<NodeFArrayBox>& a_phi,
691  /// CELL-centered physical domain on each level
692  const ProblemDomain& a_domain,
693  /// CELL-centered grids on the next finer level
694  const DisjointBoxLayout& a_finerGridsCoarsened,
695  /// exterior boundary nodes of this level
696  const LayoutData< Vector<Box> >& a_IVSVext,
697  /// interior boundary nodes of coarsened finer-level grids
698  const LayoutData< Vector<Box> >& a_IVSVintFinerCoarsened,
699  /// refinement ratio to next finer level
700  const int a_nRefFine,
701  /// interval of components to use
702  const Interval& a_comps,
703  /// verbosity, whether to print norms of each box
704  bool a_verbose = false);
705 
706 
707 /// Computes max norm of single-level array, counting only valid nodes.
708 /**
709  Computes max norm of single-level array <i>a_phi</i>.
710  Only the valid nodes at this level are counted.
711  The valid nodes are the interior nodes of this level that are not
712  projections of interior nodes of the finer level, if any.
713 
714  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
715  <tt>
716  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
717  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
718  </tt>
719 
720  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the calls:<br>
721  <tt>
722  interiorBoundaryNodes(a_IVSVintFinerCoarsened,
723  a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
724  </tt>
725 */
726 Real maxnorm(/// the data on which to take the norm
727  const LevelData<NodeFArrayBox>& a_phi,
728  /// CELL-centered physical domain on each level
729  const Box& a_domain,
730  /// CELL-centered grids on the next finer level
731  const DisjointBoxLayout& a_finerGridsCoarsened,
732  /// exterior boundary nodes of this level
733  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
734  /// interior boundary nodes of coarsened finer-level grids
735  const LayoutData< Vector<IntVectSet> >& a_IVSVintFinerCoarsened,
736  /// refinement ratio to next finer level
737  const int a_nRefFine,
738  /// interval of components to use
739  const Interval& a_comps,
740  /// verbosity, whether to print norms of each box
741  bool a_verbose = false);
742 
743 
744 /// Computes max norm of single-level array, counting only valid nodes.
745 /**
746  Computes max norm of single-level array <i>a_phi</i>.
747  Only the valid nodes at this level are counted.
748  The valid nodes are the interior nodes of this level that are not
749  projections of interior nodes of the finer level, if any.
750 
751  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
752  <tt>
753  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
754  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
755  </tt>
756 
757  The <i>a_IVSVintFinerCoarsened</i> argument is obtained from the calls:<br>
758  <tt>
759  interiorBoundaryNodes(a_IVSVintFinerCoarsened,
760  a_phi.getBoxes(), a_finerGridsCoarsened, a_domain);
761  </tt>
762 */
763 Real maxnorm(/// the data on which to take the norm
764  const LevelData<NodeFArrayBox>& a_phi,
765  /// CELL-centered physical domain on each level
766  const Box& a_domain,
767  /// CELL-centered grids on the next finer level
768  const DisjointBoxLayout& a_finerGridsCoarsened,
769  /// exterior boundary nodes of this level
770  const LayoutData< Vector<Box> >& a_IVSVext,
771  /// interior boundary nodes of coarsened finer-level grids
772  const LayoutData< Vector<Box> >& a_IVSVintFinerCoarsened,
773  /// refinement ratio to next finer level
774  const int a_nRefFine,
775  /// interval of components to use
776  const Interval& a_comps,
777  /// verbosity, whether to print norms of each box
778  bool a_verbose = false);
779 
780 
781 /// Computes max norm of single-level array, counting only valid nodes, with no finer level.
782 /**
783  Computes max norm of single-level array <i>a_phi</i>, where there is no
784  finer level.
785 
786  Only the valid nodes at this level are counted.
787  The valid nodes are the interior nodes of this level.
788 
789  The a_IVSVext argument is obtained from the calls:<br>
790  <tt>
791  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
792  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
793  </tt>
794 */
795 Real maxnorm(/// the data on which to take the norm
796  const LevelData<NodeFArrayBox>& a_phi,
797  /// CELL-centered physical domain on each level
798  const ProblemDomain& a_domain,
799  /// exterior boundary nodes of this level
800  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
801  /// interval of components to use
802  const Interval& a_comps,
803  /// verbosity, whether to print norms of each box
804  bool a_verbose = false);
805 
806 /// Computes max norm of single-level array, counting only valid nodes, with no finer level.
807 /**
808  Computes max norm of single-level array <i>a_phi</i>, where there is no
809  finer level.
810 
811  Only the valid nodes at this level are counted.
812  The valid nodes are the interior nodes of this level.
813 
814  The a_IVSVext argument is obtained from the calls:<br>
815  <tt>
816  interiorBoundaryNodes(IVSVint, a_phi.getBoxes(), a_domain);<br>
817  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_phi.getBoxes();
818  </tt>
819 */
820 Real maxnorm(/// the data on which to take the norm
821  const LevelData<NodeFArrayBox>& a_phi,
822  /// CELL-centered physical domain on each level
823  const Box& a_domain,
824  /// exterior boundary nodes of this level
825  const LayoutData< Vector<Box> >& a_IVSVext,
826  /// interval of components to use
827  const Interval& a_comps,
828  /// verbosity, whether to print norms of each box
829  bool a_verbose = false);
830 
831 #include "NamespaceFooter.H"
832 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
one dimensional dynamic array
Definition: Vector.H:53
Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout.
Definition: BoxLayout.H:26
Real maxnorm(const NodeFArrayBox &a_nfab, const Box &a_subbox, const int a_startComp=0, const int a_numComp=1)
Computes max norm of a subbox of a NodeFArrayBox.
Structure for passing component ranges in code.
Definition: Interval.H:23
double Real
Definition: REAL.H:33
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
Real norm(const NodeFArrayBox &a_nfab, const Real a_dx, const Box &a_subbox, const int a_p, const int a_startComp=0, const int a_numComp=1)
Computes L^p norm of a subbox of a NodeFArrayBox.
A wrapper for an FArrayBox to contain NODE-centered data.
Definition: NodeFArrayBox.H:122