-
Notifications
You must be signed in to change notification settings - Fork 16
/
AVPApp.H
82 lines (68 loc) · 2.84 KB
/
AVPApp.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// ---------------------------------------------------------------
// AVPApp.H
// ---------------------------------------------------------------
#ifndef _AVPAPP_H_
#define _AVPAPP_H_
#include <Xm/Xm.h>
// ---- X defines Status, so undefine it so it does not step on mpi's Status
#undef Status
#include<string>
#include <AMReX_DataServices.H>
class Palette;
class PltAppState;
class XYPlotParameters;
class XYPlotWin;
class AVPApp
{
public:
AVPApp() { }
virtual ~AVPApp() { }
virtual const std::string &GetFileName() const { return fileNames[currentFrame]; }
PltAppState *GetPltAppState() const { return pltAppState; }
virtual XYPlotWin *GetXYPlotWin(int dir) const { return XYplotwin[dir]; }
virtual void DetachXYPlotWin(int dir) { XYplotwin[dir] = NULL; }
virtual amrex::XYPlotDataList *CreateLinePlot(int /*V*/, int /*sdir*/, int /*mal*/,
int /*ixY*/, const std::string * /*derived*/)
{ amrex::Abort("AVPApp not implemented.");
return nullptr; }
virtual Widget GetPalArea() { return wPalArea; }
virtual bool PaletteCBQ() { return paletteCBQ; }
virtual void SetPaletteCBQ(bool tf = true) { paletteCBQ = tf; }
XYPlotParameters *GetXYPlotParameters() const { return XYplotparameters; }
Palette *GetPalettePtr() { return pltPaletteptr; }
Widget WId() { return wAmrVisTopLevel; }
const std::string &GetPaletteName() const { return palFilename; }
int CurrentFrame() const { return currentFrame; }
amrex::DataServices *GetDataServicesPtr() { return dataServicesPtr[currentFrame]; }
amrex::Vector<amrex::DataServices *> &GetDataServicesPtrArray() { return dataServicesPtr; }
void DrawTimeRange(Widget wCF, int sdLineXL, int sdLineXH,
int axisLengthX, int axisLengthY,
amrex::Real subTimeRangeStart, amrex::Real subTimeRangeStop,
const std::string &yAxisLabel);
void ParseCallTraceFile(std::ifstream &ctFile);
void DeriveCallStack(std::ostream &os, amrex::Real startTime, amrex::Real endTime);
struct CallTraceLine {
int funcNumber, callStackDepth;
long nCalls;
amrex::Real inclTime, exclTime, callTime;
};
struct CallTraceData {
amrex::Vector<CallTraceLine> callTraceLines;
std::map<int, std::string> funcNumberNames; // ---- <fnumber, fname>
};
protected:
Widget wAmrVisTopLevel, wPalArea;
GC xgc;
XYPlotParameters *XYplotparameters;
Palette *pltPaletteptr;
std::string palFilename;
XYPlotWin *XYplotwin[BL_SPACEDIM];
bool paletteCBQ;
int currentFrame;
amrex::Vector<std::string> fileNames;
PltAppState *pltAppState;
amrex::Vector<amrex::DataServices *> dataServicesPtr;
CallTraceData callTraceData;
amrex::Real timelineRangeStart, timelineRangeStop;
};
#endif