OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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
19class Inform;
20template<class T> class ParticleAttrib;
21
22// extern declarations of global variables in ParticleDebugFunctions.cpp
23extern Inform* PtclDbgInform;
24extern bool PtclDbgInformIsSet;
25// extern declarations of global variables in FieldDebugFunctions.cpp
26extern Inform* FldDbgInform;
27extern bool FldDbgInformIsSet;
28extern int elementsPerLine;
29extern int digitsPastDecimal;
30extern 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:
48template<class T>
49void pap(ParticleAttrib<T>& pattr, bool docomm = true);
50
51// For printing one element of a ParticleAttrib:
52template<class T>
53void epap(ParticleAttrib<T>& pattr, int i, bool docomm = true);
54
55// For printing strided subrange of elements of a ParticleAttrib:
56template<class T>
57void spap(ParticleAttrib<T>& pattr,
58 int ibase, int ibound, int istride, bool docomm = true);
59
61
62#endif // PARTICLE_DEBUG_H
63
64// $Id: ParticleDebug.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
65
66/***************************************************************************
67 * $RCSfile: addheaderfooter,v $ $Author: adelmann $
68 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:17 $
69 * IPPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
70 ***************************************************************************/
71
Inform * FldDbgInform
bool FldDbgInformIsSet
int widthOfElements
bool PtclDbgInformIsSet
int digitsPastDecimal
void epap(ParticleAttrib< T > &pattr, int i, bool docomm=true)
void pap(ParticleAttrib< T > &pattr, bool docomm=true)
int elementsPerLine
Inform * PtclDbgInform
void spap(ParticleAttrib< T > &pattr, int ibase, int ibound, int istride, bool docomm=true)
Definition: Inform.h:42