Chombo + EB  3.2
DebugOut.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 _DEBUGOUT_H_
12 #define _DEBUGOUT_H_
13 
14 #include "DisjointBoxLayout.H"
15 #include "BoxLayout.H"
16 #include "Vector.H"
17 #include "Box.H"
18 #include "IVSFAB.H"
19 #include "IntVectSet.H"
20 #include "FArrayBox.H"
21 #include "NodeFArrayBox.H"
22 #include "LevelData.H"
23 #include "LayoutIterator.H"
24 #include "BoxIterator.H"
25 #include "NamespaceHeader.H" // Don't need this now (everything is extern "C")
26  // but maybe will need it in the future.
27 #ifdef CH_MULTIDIM
28 #include "BoxTools_ExternC_Mangler.H" // Generated by lib/utils/multidim/mangle_externs.sh
29 #endif
30 
31  ///
32  /**
33  Dump boxlayout of inputs to standard out. For use inside debuggers.
34  dumps points on this proc
35  */
36  void dumpLDFLoc(const LevelData<FArrayBox>* a_ldfabPtr);
37 
38  void dumpMaxMin(const LevelData<FArrayBox>* a_ldfabPtr);
39 
40  /// does a copy first
41  void dumpLDFPar(const LevelData<FArrayBox>* a_ldfabPtr);
42 
43  /// does a copy first
44  void dumpNodeLDFPar(const LevelData<NodeFArrayBox>* a_ldfabPtr);
45 
46  /// dumps points on this proc
47  void dumpNodeLDFLoc(const LevelData<NodeFArrayBox>* a_ldfabPtr);
48 
49  ///
50  void dumpNodeFAB(const NodeFArrayBox* a_fabPtr);
51 
52  ///
53  void dumpFAB(const FArrayBox* a_fabPtr);
54 
55  ///
56  void dumpBFR(const BaseFab<Real>* a_fabPtr);
57 
58  ///
59  void dumpBFI(const BaseFab<int>* a_fabPtr);
60 
61  ///
62  /**
63  Dump a 2D slice and print it as an ordered rectangle (very pretty for small
64  boxes)
65  \param[in] a_fabPtr
66  Data to dump
67  \param[in] a_comp Component
68  \param[in] a_ivSml
69  Lower bound of box to print (default IntVect::Zero)
70  \param[in] a_ivBig
71  Upper bound of box to print (default IntVect::Zero)
72  \param[in] a_prec Number of digits after decimal (default 2)
73  \note
74  <ul>
75  <li> If a_ivSml == IntVect::Zero && a_ivBig == IntVect::Zero then the
76  full extent of a_fabPtr.box() is printed. But this only works in
77  2D because...
78  <li> a_ivSml and a_ivBig must have only 2 directions that differ in value
79  so the slice is properly defined
80  </ul>
81  */
82  void dumpFAB2DSlicePretty(const FArrayBox *const a_fabPtr,
83  const int a_comp = 0,
84  IntVect a_ivSml = IntVect::Zero,
85  IntVect a_ivBig = IntVect::Zero,
86  const int a_prec = 2,
87  std::ostream& a_out = pout());
88 
89  ///
90  /**
91  Dump boxlayout of inputs to standard out. For use inside debuggers.
92  */
93  void dumpIVSFAB(const IVSFAB<Real>* a_ivsfabPtr);
94 
95  ///
96  /**
97  Dump inputs to standard out. For use inside debuggers.
98  */
99  void dumpDBL(const DisjointBoxLayout* a_dblInPtr);
100 
101  ///
102  /**
103  Dump inputs to standard out. For use inside debuggers.
104  */
105  void dumpBL(const BoxLayout* a_dblInPtr);
106 
107  ///
108  /**
109  Dump inputs to standard out. For use inside debuggers.
110  */
111  void dumpIVS(const IntVectSet* a_ivsPtr);
112 
113  ///
114  /**
115  Dump inputs to standard out. For use inside debuggers.
116  */
117  void dumpBox(const Box* a_boxPtr);
118 
119  ///
120  /**
121  Dump inputs to standard out. For use inside debuggers.
122  */
123  void dumpVBox(const Vector<Box>* a_vectPtr);
124 
125  ///
126  /**
127  Dump inputs to standard out. For use inside debuggers.
128  */
129  void dumpVVBox(const Vector<Vector<Box> >* a_vectPtr);
130 
131  ///
132  /**
133  Dump inputs to standard out. For use inside debuggers.
134  */
135  void dumpLDDBL(const LevelData<FArrayBox>* a_ldfabPtr);
136 
137  ///
138  /**
139  Dump inputs to standard out. For use inside debuggers.
140  */
141  void dumpNodeLDDBL(const LevelData<NodeFArrayBox>* a_ldfabPtr);
142 
143 #include "NamespaceFooter.H"
144 
145 #endif
std::ostream & pout()
Use this in place of std::cout for program output.
void dumpNodeLDFPar(const LevelData< NodeFArrayBox > *a_ldfabPtr)
does a copy first
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:145
void dumpDBL(const DisjointBoxLayout *a_dblInPtr)
void dumpVBox(const Vector< Box > *a_vectPtr)
void dumpNodeLDFLoc(const LevelData< NodeFArrayBox > *a_ldfabPtr)
dumps points on this proc
void dumpBFI(const BaseFab< int > *a_fabPtr)
Definition: IVSFAB.H:31
void dumpNodeFAB(const NodeFArrayBox *a_fabPtr)
void dumpFAB(const FArrayBox *a_fabPtr)
void dumpIVSFAB(const IVSFAB< Real > *a_ivsfabPtr)
void dumpFAB2DSlicePretty(const FArrayBox *const a_fabPtr, const int a_comp=0, IntVect a_ivSml=IntVect::Zero, IntVect a_ivBig=IntVect::Zero, const int a_prec=2, std::ostream &a_out=pout())
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
void dumpLDDBL(const LevelData< FArrayBox > *a_ldfabPtr)
void dumpBFR(const BaseFab< Real > *a_fabPtr)
static const IntVect Zero
Definition: IntVect.H:654
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
void dumpLDFLoc(const LevelData< FArrayBox > *a_ldfabPtr)
void dumpVVBox(const Vector< Vector< Box > > *a_vectPtr)
void dumpLDFPar(const LevelData< FArrayBox > *a_ldfabPtr)
does a copy first
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Definition: FArrayBox.H:45
void dumpNodeLDDBL(const LevelData< NodeFArrayBox > *a_ldfabPtr)
void dumpMaxMin(const LevelData< FArrayBox > *a_ldfabPtr)
void dumpIVS(const IntVectSet *a_ivsPtr)
void dumpBL(const BoxLayout *a_dblInPtr)
void dumpBox(const Box *a_boxPtr)
A wrapper for an FArrayBox to contain NODE-centered data.
Definition: NodeFArrayBox.H:122