00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 #ifndef _DEBUGOUT_H_ 00012 #define _DEBUGOUT_H_ 00013 00014 #include "DisjointBoxLayout.H" 00015 #include "BoxLayout.H" 00016 #include "Vector.H" 00017 #include "Box.H" 00018 #include "IVSFAB.H" 00019 #include "IntVectSet.H" 00020 #include "FArrayBox.H" 00021 #include "NodeFArrayBox.H" 00022 #include "LevelData.H" 00023 #include "LayoutIterator.H" 00024 #include "BoxIterator.H" 00025 #include "NamespaceHeader.H" // Don't need this now (everything is extern "C") 00026 // but maybe will need it in the future. 00027 #ifdef CH_MULTIDIM 00028 #include "BoxTools_ExternC_Mangler.H" // Generated by lib/utils/multidim/mangle_externs.sh 00029 #endif 00030 00031 /// 00032 /** 00033 Dump boxlayout of inputs to standard out. For use inside debuggers. 00034 dumps points on this proc 00035 */ 00036 void dumpLDFLoc(const LevelData<FArrayBox>* a_ldfabPtr); 00037 00038 void dumpMaxMin(const LevelData<FArrayBox>* a_ldfabPtr); 00039 00040 /// does a copy first 00041 void dumpLDFPar(const LevelData<FArrayBox>* a_ldfabPtr); 00042 00043 /// does a copy first 00044 void dumpNodeLDFPar(const LevelData<NodeFArrayBox>* a_ldfabPtr); 00045 00046 /// dumps points on this proc 00047 void dumpNodeLDFLoc(const LevelData<NodeFArrayBox>* a_ldfabPtr); 00048 00049 /// 00050 void dumpNodeFAB(const NodeFArrayBox* a_fabPtr); 00051 00052 /// 00053 void dumpFAB(const FArrayBox* a_fabPtr); 00054 00055 /// 00056 void dumpBFR(const BaseFab<Real>* a_fabPtr); 00057 00058 /// 00059 void dumpBFI(const BaseFab<int>* a_fabPtr); 00060 00061 /// 00062 /** 00063 Dump a 2D slice and print it as an ordered rectangle (very pretty for small 00064 boxes) 00065 \param[in] a_fabPtr 00066 Data to dump 00067 \param[in] a_comp Component 00068 \param[in] a_ivSml 00069 Lower bound of box to print (default IntVect::Zero) 00070 \param[in] a_ivBig 00071 Upper bound of box to print (default IntVect::Zero) 00072 \param[in] a_prec Number of digits after decimal (default 2) 00073 \note 00074 <ul> 00075 <li> If a_ivSml == IntVect::Zero && a_ivBig == IntVect::Zero then the 00076 full extent of a_fabPtr.box() is printed. But this only works in 00077 2D because... 00078 <li> a_ivSml and a_ivBig must have only 2 directions that differ in value 00079 so the slice is properly defined 00080 </ul> 00081 */ 00082 void dumpFAB2DSlicePretty(const FArrayBox *const a_fabPtr, 00083 const int a_comp = 0, 00084 IntVect a_ivSml = IntVect::Zero, 00085 IntVect a_ivBig = IntVect::Zero, 00086 const int a_prec = 2, 00087 std::ostream& a_out = pout()); 00088 00089 /// 00090 /** 00091 Dump boxlayout of inputs to standard out. For use inside debuggers. 00092 */ 00093 void dumpIVSFAB(const IVSFAB<Real>* a_ivsfabPtr); 00094 00095 /// 00096 /** 00097 Dump inputs to standard out. For use inside debuggers. 00098 */ 00099 void dumpDBL(const DisjointBoxLayout* a_dblInPtr); 00100 00101 /// 00102 /** 00103 Dump inputs to standard out. For use inside debuggers. 00104 */ 00105 void dumpBL(const BoxLayout* a_dblInPtr); 00106 00107 /// 00108 /** 00109 Dump inputs to standard out. For use inside debuggers. 00110 */ 00111 void dumpIVS(const IntVectSet* a_ivsPtr); 00112 00113 /// 00114 /** 00115 Dump inputs to standard out. For use inside debuggers. 00116 */ 00117 void dumpBox(const Box* a_boxPtr); 00118 00119 /// 00120 /** 00121 Dump inputs to standard out. For use inside debuggers. 00122 */ 00123 void dumpVBox(const Vector<Box>* a_vectPtr); 00124 00125 /// 00126 /** 00127 Dump inputs to standard out. For use inside debuggers. 00128 */ 00129 void dumpVVBox(const Vector<Vector<Box> >* a_vectPtr); 00130 00131 /// 00132 /** 00133 Dump inputs to standard out. For use inside debuggers. 00134 */ 00135 void dumpLDDBL(const LevelData<FArrayBox>* a_ldfabPtr); 00136 00137 /// 00138 /** 00139 Dump inputs to standard out. For use inside debuggers. 00140 */ 00141 void dumpNodeLDDBL(const LevelData<NodeFArrayBox>* a_ldfabPtr); 00142 00143 #include "NamespaceFooter.H" 00144 00145 #endif