USERD_set_time_set_and_step.H
Go to the documentation of this file.
1 //======================================================================
3 (
4  int timeset_number,
5  int time_step
6 )
7 {
8 #ifdef ENSIGHTDEBUG
9  Info<< "Entering: USERD_set_time_set_and_step" << endl << flush;
10 #endif
11  // update the global pointers and variables
12  // to the current time-step
13 
14  // at exit time_step < 0
15  if (time_step >= 0)
16  {
17  Time& runTime = *runTimePtr;
18  Current_time_step = time_step;
19  // add 1, since the first timestep is 'constant'
20 
21  if (time_step == 0)
22  {
23  runTime.setTime
24  (
26  Current_time_step
27  );
28  }
29  else
30  {
31  runTime.setTime
32  (
35  );
36  }
37 
38  meshPtr->readUpdate();
39 
40  if (time_step == 0)
41  {
42  runTime.setTime
43  (
46  );
47  }
48 
50  {
51  delete sprayPtr;
52  sprayPtr = new Cloud<passiveParticle>(*meshPtr, cloud::defaultName);
53  }
54  }
55 }
label nPatches
Definition: readKivaGrid.H:402
static fvMesh * meshPtr
Definition: globalFoam.H:52
static Cloud< passiveParticle > * sprayPtr
Definition: globalFoam.H:53
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
static int Current_time_step
Definition: globalFoam.H:22
static int Numparts_available
Definition: globalFoam.H:13
static instantList timeDirs
Definition: globalFoam.H:44
static Time * runTimePtr
Definition: globalFoam.H:51
void USERD_set_time_set_and_step(int timeset_number, int time_step)
Ostream & flush(Ostream &os)
Flush stream.
Definition: Ostream.H:243
messageStream Info