UltraScan III
us_zsolute.h
Go to the documentation of this file.
1 #ifndef US_ZSOLUTE_H
3 #define US_ZSOLUTE_H
4 
5 #include <QtCore>
6 
7 #include "us_model.h"
8 #include "us_extern.h"
9 
13 
15 {
16  public:
21  US_ZSolute( double = 0.0, double = 0.0, double = 0.0,
22  double = 0.0 );
23 
24  double x;
25  double y;
26  double z;
27  double c;
28 
31  bool operator== ( const US_ZSolute& solute )
32  {
33  return ( x == solute.x && y == solute.y &&
34  z == solute.z );
35  }
36 
39  bool operator!= ( const US_ZSolute& solute )
40  {
41  return ( x != solute.x || y != solute.y ||
42  z != solute.z );
43  }
44 
47  bool operator< ( const US_ZSolute& solute ) const
48  {
49  if ( x < solute.x )
50  return true;
51 
52  else if ( x == solute.x && y < solute.y )
53  return true;
54 
55  else if ( x == solute.x && y == solute.y &&
56  z < solute.z )
57  return true;
58 
59  else
60  return false;
61  }
62 
65  ATTR_C=9 };
66 
71  static void put_mcomp_attr ( US_Model::SimulationComponent&,
72  double&, const int );
73 
78  static void put_solute_attr( US_ZSolute&,
79  double&, const int );
80 
85  static void get_mcomp_attr ( US_Model::SimulationComponent&,
86  double&, const int );
87 
92  static void get_solute_attr( US_ZSolute&,
93  double&, const int );
94 
100  static void set_mcomp_values ( US_Model::SimulationComponent&,
101  US_ZSolute&, const int,
102  const bool = false );
103 
108  static void set_solute_values( US_Model::SimulationComponent&,
109  US_ZSolute&, const int );
110 
122  static void init_grid_solutes( double, double, int,
123  double, double, int, int, double*,
124  QList< QVector< US_ZSolute > >& );
125 
126  private:
127  // Internal function to set a Z-coefficients function flag:
128  // 0 -> constant, 1 -> linear, 2 -> polynomial
129  static int zcoeff_flag( double* );
130 
131  // Internal function to create one vector of solutes
132  static QVector< US_ZSolute > create_grid_solutes(
133  double, double, double, double, double, double,
134  double* );
135 };
136 #endif