FreeFOAM The Cross-Platform CFD Toolkit
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);
53  }
54  }
55 }
56 
57 
58 
59 // ************************ vim: set sw=4 sts=4 et: ************************ //