Chombo + EB  3.0
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  /// does a copy first
39  void dumpLDFPar(const LevelData<FArrayBox>* a_ldfabPtr);
40 
41  /// does a copy first
42  void dumpNodeLDFPar(const LevelData<NodeFArrayBox>* a_ldfabPtr);
43 
44  /// dumps points on this proc
45  void dumpNodeLDFLoc(const LevelData<NodeFArrayBox>* a_ldfabPtr);
46 
47  ///
48  void dumpNodeFAB(const NodeFArrayBox* a_fabPtr);
49 
50  ///
51  void dumpFAB(const FArrayBox* a_fabPtr);
52 
53  ///
54  void dumpBFR(const BaseFab<Real>* a_fabPtr);
55 
56  ///
57  void dumpBFI(const BaseFab<int>* a_fabPtr);
58 
59  ///
60  /**
61  Dump a 2D slice and print it as an ordered rectangle (very pretty for small
62  boxes)
63  \param[in] a_fabPtr
64  Data to dump
65  \param[in] a_comp Component
66  \param[in] a_ivSml
67  Lower bound of box to print (default IntVect::Zero)
68  \param[in] a_ivBig
69  Upper bound of box to print (default IntVect::Zero)
70  \param[in] a_prec Number of digits after decimal (default 2)
71  \note
72  <ul>
73  <li> If a_ivSml == IntVect::Zero && a_ivBig == IntVect::Zero then the
74  full extent of a_fabPtr.box() is printed. But this only works in
75  2D because...
76  <li> a_ivSml and a_ivBig must have only 2 directions that differ in value
77  so the slice is properly defined
78  </ul>
79  */
80  void dumpFAB2DSlicePretty(const FArrayBox *const a_fabPtr,
81  const int a_comp = 0,
82  IntVect a_ivSml = IntVect::Zero,
83  IntVect a_ivBig = IntVect::Zero,
84  const int a_prec = 2,
85  std::ostream& a_out = pout());
86 
87  ///
88  /**
89  Dump boxlayout of inputs to standard out. For use inside debuggers.
90  */
91  void dumpIVSFAB(const IVSFAB<Real>* a_ivsfabPtr);
92 
93  ///
94  /**
95  Dump inputs to standard out. For use inside debuggers.
96  */
97  void dumpDBL(const DisjointBoxLayout* a_dblInPtr);
98 
99  ///
100  /**
101  Dump inputs to standard out. For use inside debuggers.
102  */
103  void dumpBL(const BoxLayout* a_dblInPtr);
104 
105  ///
106  /**
107  Dump inputs to standard out. For use inside debuggers.
108  */
109  void dumpIVS(const IntVectSet* a_ivsPtr);
110 
111  ///
112  /**
113  Dump inputs to standard out. For use inside debuggers.
114  */
115  void dumpBox(const Box* a_boxPtr);
116 
117  ///
118  /**
119  Dump inputs to standard out. For use inside debuggers.
120  */
121  void dumpVBox(const Vector<Box>* a_vectPtr);
122 
123  ///
124  /**
125  Dump inputs to standard out. For use inside debuggers.
126  */
127  void dumpVVBox(const Vector<Vector<Box> >* a_vectPtr);
128 
129  ///
130  /**
131  Dump inputs to standard out. For use inside debuggers.
132  */
133  void dumpLDDBL(const LevelData<FArrayBox>* a_ldfabPtr);
134 
135  ///
136  /**
137  Dump inputs to standard out. For use inside debuggers.
138  */
139  void dumpNodeLDDBL(const LevelData<NodeFArrayBox>* a_ldfabPtr);
140 
141 
142 #include "NamespaceFooter.H"
143 #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:146
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:32
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:31
void dumpLDDBL(const LevelData< FArrayBox > *a_ldfabPtr)
void dumpBFR(const BaseFab< Real > *a_fabPtr)
static const IntVect Zero
Definition: IntVect.H:627
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:44
void dumpNodeLDDBL(const LevelData< NodeFArrayBox > *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:87