UltraScan III
us_astfem_rsa.h
Go to the documentation of this file.
1 #ifndef US_ASTFEM_RSA_H
3 #define US_ASTFEM_RSA_H
4 
5 #include <QtCore>
6 #include "us_extern.h"
7 #include "us_model.h"
8 #include "us_simparms.h"
9 #include "us_dataIO.h"
10 #include "us_astfem_math.h"
11 #include "us_stiffbase.h"
12 
13 #ifndef DbgLv
14 #define DbgLv(a) if(dbg_level>=a)qDebug()
15 #endif
16 
18 class US_UTIL_EXTERN US_Astfem_RSA : public QObject
19 {
20  Q_OBJECT
21 
22  public:
28 
32  int calculate ( US_DataIO::RawData& );
33 
36  void setTimeCorrection ( bool flag ){ time_correction = flag; };
37 
40  void setTimeInterpolation( bool flag ){ use_time = flag; };
41 
44  void setStopFlag ( bool flag ){ stopFlag = flag; };
45 
48  void set_movie_flag ( bool flag ){ show_movie = flag; };
49 
54  void set_simout_flag ( bool flag ){ simout_flag = flag; };
55 
58  void set_debug_flag ( int flag ){ dbg_level = flag; };
59 
60  signals:
65  void new_scan ( QVector< double >*, double* );
66 
71  void new_time ( double );
72 
77  void current_component( int );
78 
83  void current_speed ( int );
84 
90  void calc_start ( int );
91 
96  void calc_progress ( int );
97 
102  void calc_done ( void );
103 
104  private:
105  bool stopFlag;
107 
109  bool use_time;
110 
116 
118  double last_time;
119 
120  double w2t_integral;
121  int Nx;
123 
127 
128  double* xA; //<! x values array
129  QVector< double > x; //<! Radii of grid points
130  QVector< US_AstfemMath::ReactionGroup > rg;
133 
134  // Functions
135  void update_assocv ( void );
136  void adjust_limits ( int speed );
137  double stretch ( double*, int );
138  void initialize_rg ( void );
139  void initialize_conc( int, US_AstfemMath::MfemInitial&, bool );
140 
141  int calculate_ni ( double, double, US_AstfemMath::MfemInitial&,
142  US_AstfemMath::MfemData&, bool );
143  void mesh_gen ( QVector< double >&, int );
144  void mesh_gen_s_pos ( const QVector< double >& );
145  void mesh_gen_s_neg ( const QVector< double >& );
146  void mesh_gen_RefL ( int, int );
147 
148  void ComputeCoefMatrixFixedMesh( double, double, double**, double** );
149  void decompose ( US_AstfemMath::MfemInitial* );
150 
151  void ComputeCoefMatrixMovingMeshR( double, double, double**, double** );
152  void ComputeCoefMatrixMovingMeshL( double, double, double**, double** );
153 
154  void ReactionOneStep_Euler_imp ( int, double**, double );
155 
156  void Reaction_dydt ( double*, double* );
157  void Reaction_dfdy ( double*, double** );
158 
159  int calculate_ra2 ( double, double, US_AstfemMath::MfemInitial*,
160  US_AstfemMath::MfemData&, bool );
161 
162  void GlobalStiff ( double*, double**, double**,
163  double, double );
164 
165  void load_mfem_data ( US_DataIO::RawData&, US_AstfemMath::MfemData& );
166  void store_mfem_data( US_DataIO::RawData&, US_AstfemMath::MfemData& );
167 
168 #ifdef NEVER
169  void GlobalStiff_ellam( QVector <double> *, double **, double **,
170  double, double );
171  void adjust_grid( int /*old speed*/, int /*new speed*/,
172  QVector <double> * /*radial grid*/ );
173 #endif
174 };
175 
176 
177 #endif
178