Overview
Comment:Prepended std:: to iostream classes to satisfy g++.
cmath is preferred to math.h
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 5ad98a88175f1f7a21854dea4ceb87ef69bac028612825f4badc23c7167ed59e
User & Date: geraint@users.sourceforge.net on 2004-08-09 17:49:06
Other Links: branch diff | manifest | tags
Context
2004-08-09
17:49:52
string header file is required.
cmath is preferred to math.h
check-in: 110ca310cf user: geraint@users.sourceforge.net tags: origin/master, trunk
17:49:06
Prepended std:: to iostream classes to satisfy g++.
cmath is preferred to math.h
check-in: 5ad98a8817 user: geraint@users.sourceforge.net tags: origin/master, trunk
17:46:52
Declarations of class string prepended with std:: to satisfy g++.
cmath is preferred to math.h
check-in: 7850422450 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/cr/hh/fade.hh from [8a88d4173b] to [ea57877552].

1
2
3
4

5
6
7
8
9
10
11
1
2
3

4
5
6
7
8
9
10
11



-
+







#ifndef FADE_HH
#define FADE_HH

#include <math.h>		// tanh
#include <cmath>		// tanh

#include "constants.hh"		// pi

inline double
fade(const double x,
     const double x1,
     const double x2,
29
30
31
32
33
34
35
36

37
38
39
40
41
42
43
29
30
31
32
33
34
35

36
37
38
39
40
41
42
43







-
+







	const double x1,
	const double x2,
	const double y1,
	const double y2)
{
  double X1 = x1, X2 = x2;
  if (x1 > x2) {
    cerr << "* Warning: chkfade; x2 > x1, swapping" << endl;
    std::cerr << "* Warning: chkfade; x2 > x1, swapping" << std::endl;
    X1 = x2;
    X2 = x1;
  }
  return ((x <= X1) ? y1 : (x > X2) ? y2 : fade(x, X1, X2, y1, y2));
}

#endif // FADE_HH

Modified mttroot/mtt/lib/cr/hh/kinematicviscosity.hh from [ee21aaf89a] to [ebebe8b69e].

1
2
3
4

5
6
7
8
9
10
11
1
2
3

4
5
6
7
8
9
10
11



-
+







#ifndef KINEMATICVISCOSITY_HH
#define KINEMATICVISCOSITY_HH

#include <math.h>		// pow
#include <cmath>		// pow
#include <string>

inline double
kerosenekinematicviscosity(const double T)
  /*
   * B.S.Massey
   * Mechanics of fluids
43
44
45
46
47
48
49
50

51
52
53
54
55
56

57
58
59
60
61
43
44
45
46
47
48
49

50
51
52
53
54
55

56
57
58
59
60
61







-
+





-
+





   * nu = 1.78598097e6 * T^(-4.781567507)
   */
{
  return 1.79e6 * pow(T, -4.78);
}

inline double
kinematicviscosity(const string fluid,
kinematicviscosity(const std::string fluid,
		   const double T)
{
  if ("kerosene" == fluid) {
    return kerosenekinematicviscosity(T);
  } else {
    cerr << __FILE__ << ": fluid \"" << fluid << "\" unknown" << endl;
    std::cerr << __FILE__ << ": fluid \"" << fluid << "\" unknown" << std::endl;
    exit(-1);
  }
}

#endif // KINEMATICVISCOSITY_HH


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]