19 #define ID_DIAGPORT "DiagPort"
20 #define ID_DIAGNOSTIC "Diagnostic"
25 #define GID_1DGRID "1d-grid"
26 #define GID_VALUE "scalar"
27 #define GID_1DPOS "1d-vec"
28 #define GID_1DPS "4d-vec"
35 #define DOUBLEVEC std::vector<double>
70 virtual void BeginStep (
const std::string& strType =
"",
const std::string&
strName =
"") = 0;
71 virtual void EndStep () = 0;
72 virtual void Out (
const double d) = 0;
73 virtual void Out (
const Position &pos) = 0;
74 virtual void Out (
const DOUBLEVEC& vec) = 0;
75 virtual void Out (
const Velocity& V,
double dF = 1.0) = 0;
76 virtual void Out (
const grid<double>& g,
double dF = 1.0) = 0;
121 virtual void Init ();
126 virtual void BeginStep (
const std::string& strType =
"",
const std::string&
strName =
"");
134 virtual void Out (
double d);
141 virtual void Out (
const DOUBLEVEC& vec);
147 virtual void Out (
const Velocity& V,
double dF = 1.0);
168 virtual PARAMETERMAP*
MakeParamMap (PARAMETERMAP* pm = NULL);
179 std::string strDiagPort;
196 virtual void Init ();
198 virtual PARAMETERMAP*
MakeParamMap (PARAMETERMAP* pm = NULL);
222 virtual void Init ();
230 virtual PARAMETERMAP*
MakeParamMap (PARAMETERMAP* pm = NULL);
248 virtual void Init ();
291 virtual PARAMETERMAP*
MakeParamMap (PARAMETERMAP* pm = NULL);
324 virtual void Init ();
328 virtual PARAMETERMAP*
MakeParamMap (PARAMETERMAP* pm = NULL);
331 #ifndef ONE_DIMENSIONAL
355 virtual void Init ();
359 virtual PARAMETERMAP*
MakeParamMap (PARAMETERMAP* pm = NULL);
372 if (nEnd<0)
return true;
373 int nCycle = pProcess->GetCycle();
375 if (nCycle>LastOne+nStep-Mean) {
379 if (!DoNow())
return false;
380 DP->BeginStep(GID_VALUE, strName);
381 DP->Out( Val/
double(F) );
412 if (nEnd < 0)
return true;
413 int nCycle = pProcess->GetCycle();
414 if (nCycle>LastOne+nStep-Mean) {
419 if (!DoNow())
return false;
420 DP->BeginStep(GID_1DGRID, strName);
421 DP->Out(G, 1 / (F*Scale));
439 #ifndef ONE_DIMENSIONAL
448 if ((dir<0) || (dir>=Dimension)) {
449 std::cerr <<
"Invalid direction " << dir <<
" in " << GetName() << std::endl;
455 if (nEnd < 0)
return true;
456 int nCycle = pProcess->GetCycle();
457 if (!DoNow())
return false;
458 DP->BeginStep(GID_1DGRID, strName);
463 for (i[dir]=0; i[dir]<=NX[dir]; i[dir]++) DP->Out((*pG)[i]);
475 #endif // DIAGNOSTIC_H