OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ParticleDebug.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 // The IPPL Framework - Visit http://people.web.psi.ch/adelmann/ for more details
4 //
5 // This program was prepared by the Regents of the University of California at
6 // ParticleDebug.h , Tim Williams 8/6/1998
7 // Helper functions to print out (formatted ASCII) ParticleAttrib elements.
8 // Intended mainly for use from within a debugger, called interactively, but
9 // also callable as template functions from source code. To call from many
10 // debuggers, the user has to provide nontemplate wrapper functions, as
11 // described in ParticleDebugFunctions.cpp.
12 
13 #ifndef PARTICLE_DEBUG_H
14 #define PARTICLE_DEBUG_H
15 
17 
18 // forward declarations
19 class Inform;
20 template<class T> class ParticleAttrib;
21 
22 // extern declarations of global variables in ParticleDebugFunctions.cpp
23 extern Inform* PtclDbgInform;
24 extern bool PtclDbgInformIsSet;
25 // extern declarations of global variables in FieldDebugFunctions.cpp
26 extern Inform* FldDbgInform;
27 extern bool FldDbgInformIsSet;
28 extern int elementsPerLine;
29 extern int digitsPastDecimal;
30 extern int widthOfElements;
31 
32 
33 //=============================================================================
34 // Helper functions to print out (formatted ASCII) ParticleAttrib elements.
35 // Intended mainly for use from within a debugger, called interactively.
36 // pap(ParticleAttrib&) print all elements of ParticleAttrib
37 // epap(ParticleAttrib&,....) prints single element of ParticleAttrib
38 // specification of integer particle index
39 // spap(ParticleAttrib&,....) prints strided range of elements of
40 // ParticleAttrib; requires specification
41 // of (base,bound,stride) for particle index values
42 //=============================================================================
43 
44 //------------------------------------------------------
45 // Function prototypes; see ParticleDebug.cpp for comments:
46 //------------------------------------------------------
47 // For printing all elements of a ParticleAttrib:
48 #ifdef __MWERKS__
49 // Work around CW4 bug with default arguments of template functions
50 template<class T>
51 void pap(ParticleAttrib<T>& pattr) {pap(pattr,true);}
52 #endif // __MWERKS__
53 template<class T>
54 void pap(ParticleAttrib<T>& pattr, bool docomm = true);
55 
56 // For printing one element of a ParticleAttrib:
57 #ifdef __MWERKS__
58 // Work around CW4 bug with default arguments of template functions
59 template<class T>
60 void epap(ParticleAttrib<T>& pattr, int i) {epap(pattr,i,true);}
61 #endif // __MWERKS__
62 template<class T>
63 void epap(ParticleAttrib<T>& pattr, int i, bool docomm = true);
64 
65 // For printing strided subrange of elements of a ParticleAttrib:
66 #ifdef __MWERKS__
67 // Work around CW4 bug with default arguments of template functions
68 template<class T>
69 void spap(ParticleAttrib<T>& pattr,
70  int ibase, int ibound, int istride) {
71  spap(pattr,ibase,ibound,istride,true);}
72 #endif // __MWERKS__
73 template<class T>
74 void spap(ParticleAttrib<T>& pattr,
75  int ibase, int ibound, int istride, bool docomm = true);
76 
78 
79 #endif // PARTICLE_DEBUG_H
80 
81 // $Id: ParticleDebug.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
82 
83 /***************************************************************************
84  * $RCSfile: addheaderfooter,v $ $Author: adelmann $
85  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:17 $
86  * IPPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
87  ***************************************************************************/
88 
bool PtclDbgInformIsSet
void epap(ParticleAttrib< T > &pattr, int i, bool docomm=true)
void pap(ParticleAttrib< T > &pattr, bool docomm=true)
int digitsPastDecimal
void spap(ParticleAttrib< T > &pattr, int ibase, int ibound, int istride, bool docomm=true)
int elementsPerLine
Inform * FldDbgInform
int widthOfElements
Definition: Inform.h:41
bool FldDbgInformIsSet
Inform * PtclDbgInform