4#ifndef DATADISP_READIOTUPLE_CC
5#define DATADISP_READIOTUPLE_CC
8#define USE_GRAPE_DISPLAY
41 double & time ,
int n,
42 int timestep,
int myRank,
int mySize,
46 const bool fixedMesh = (
info->
fix_mesh == 1) ?
true :
false;
49 const bool newGrid = ( ! fixedMesh ||
gridStack.empty() );
58 Fem::IOTuple<GR_DiscFuncType>::ReturnType* tup =
59 Fem::IOTuple<GR_DiscFuncType>::input(grid,time,myRank,mySize,
path,fn);
69 Fem::IOTuple<GR_DiscFuncType>::addToDisplayOrRemove(*disp,dinf,time,*tup);
80 int i_delta,
int n,
double timestep,
int numProcs)
82 double t_start = 1e308;
83 double t_end = -t_start, t_act = 0.0;
84 typedef CombinedGrapeDisplay < GrapeDispType > CombinedDisplayType;
86 CombinedGrapeDisplay < GrapeDispType > * comdisp =
new CombinedDisplayType ();
88 int ntime, n_step = 0;
90 for (ntime = i_start; ntime <= i_end; ntime += i_delta)
92 printf(
"timestep = %d | last timestep = %d | stepsize = %d\n", ntime, i_end, i_delta);
94 int anzProcs = numProcs;
96 for(
int proc=0; proc<anzProcs; ++proc)
98 assert(
path || numProcs <= 1);
102 for(
int i=0; i<anz; ++i)
106 Fem::IOInterface::createRecoverPath(
path,proc,
info[i].
name,ntime);
109 t_act , i , ntime, proc, anzProcs,
info);
113 assert(newdisp != 0);
115 comdisp->addDisplay( *newdisp );
119 newdisp->addMyMeshToTimeScene(
info[0].tsc,t_act,proc);
125 comdisp->addMyMeshToGlobalTimeScene(t_act,0);
128 printf(
"actual time: %f (timestep size: %e)\n\n",t_act,timestep);
131 if (ntime == i_start) t_start = t_end = t_act;
135 if (timestep > 0) t_act += timestep*i_delta;
144 while(! stack.
empty() )
146 T * obj = stack.
top();
void postProcessing(const GrapeDispType &disp, const GR_GridType &grid, const double time, const IOTupleType &data)
Definition programtemplate.cc:25
void dataDispErrorExit(std::string msg)
Definition readiotupledata.cc:33
Dune::GridSelector::GridType GR_GridType
type of used grid
Definition readiotupledata.cc:19
static std::stack< GrapeDispType * > dispStack
Definition readiotupledata.cc:28
void deleteAllObjects()
Definition readiotupledata.cc:153
static std::stack< GR_GridType * > gridStack
Definition readiotupledata.cc:27
void deleteObjects(std::stack< T * > &stack)
Definition readiotupledata.cc:142
INFO * readData(INFO *info, const char *path, int i_start, int i_end, int i_delta, int n, double timestep, int numProcs)
Definition readiotupledata.cc:79
GrapeDispType * readTupleData(const char *path, const char *filename, double &time, int n, int timestep, int myRank, int mySize, INFO *info)
Definition readiotupledata.cc:40
GrapeDataDisplay< GR_GridType > GrapeDispType
type of GrapeDisplay
Definition readiotupledata.cc:22
GR_InputType GR_DiscFuncType
type of discrete function tuple
Definition readiotupledata.cc:25
InTupleType GR_InputType
Definition converttemplate.cc:20
std::string path
Definition readioparams.cc:156
Definition grcommon.hh:19
Definition grcommon.hh:31
int fix_mesh
Definition grcommon.hh:32
const char * name
Definition grcommon.hh:33
DATAINFO * datinf
Definition grcommon.hh:34