Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
utilities
postProcessing
graphics
ensightFoamReader
USERD_get_sol_times.H
Go to the documentation of this file.
1
//======================================================================
2
// Negative values of the time is not allowed in EnSight.
3
// So for engines, where the time is CAD's we need to correct
4
// this so that all CAD's are positive. NN
5
//======================================================================
6
int
USERD_get_sol_times
7
(
8
int
timeset_number,
9
float
*solution_times
10
)
11
{
12
#ifdef ENSIGHTDEBUG
13
Info
<<
"Entering: USERD_get_sol_times\n"
<<
timeDirs
<<
endl
;
14
#endif
15
16
for
(label n=0; n<
Num_time_steps
;n++)
17
{
18
solution_times[n] =
timeDirs
[n+1].value();
19
}
20
21
if
(
timeDirs
[1].value() < 0)
22
{
23
scalar addCAD = 360.0;
24
while
(
timeDirs
[1].value() + addCAD < 0.0)
25
{
26
addCAD += 360.0;
27
}
28
for
(label n=0; n<
Num_time_steps
;n++)
29
{
30
solution_times[n] += addCAD;
31
32
Info
<<
"Time["
<< n <<
"] = "
<<
timeDirs
[n+1].value()
33
<<
" was corrected to "
<< solution_times[n] <<
endl
;
34
}
35
36
}
37
38
#ifdef ENSIGHTDEBUG
39
Info
<<
"Leaving: USERD_get_sol_times"
<<
endl
;
40
#endif
41
42
return
Z_OK;
43
}
44
45
46
// ************************ vim: set sw=4 sts=4 et: ************************ //