UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rt_wavecalc.hpp
1 // rt_wavecalc.H
2 // $Id: rt_wavecalc.hpp,v 1.2 2006/10/05 07:49:01 guser4 Exp $
3 //-----------------------------------------------------------------------------
4 #ifndef __rtWaveCalcH
5 #define __rtWaveCalcH
6 
7 #include "rt_shooter.hpp"
8 #include <zm/ZmProgress.H>
9 #include <mth/interpol.h>
10 
11 //============================================================================
12 //-- Structures --------------------------------------------------------------
13 
15 struct TrInfo
16 {
17  float *am;
18  float dp;
19  int num;
20 };
21 
22 // Dynamic array of Trace info sructures
24 
25 //=============================================================================
27 class RTHod
28 {
29 public:
30  RTHod(int N);
31  ~RTHod();
32  void InitHod(int N, double *hodZ1, double *hodT1, double *fi1, double *ix1, double *iz1, double *coeff1,
33  double *iA1, double *inF1, double *outF1, int *recNum1);
34 
35  void Remove(int i, int n);
36  void SetValues(int i, double hodZ1, double hodT1, double fi1, double ix1, double iz1, double coeff1,
37  double iA1, double inF1, double outF1, int recNum1);
38  void SetRTHod(int i, RTHod *Hod);
39  void OverturnHod();
40  void SortRTHod(int i_beg, int i_end);
41  void Print(int i, char *print=NULL);
42 
43  int *recNum;
44  int hodNum;
45  double *hodZ, *hodT, *fi, *ix, *iz, *coeff, *iA, *inF, *outF;
46 private:
47  bool ready;
48 };
49 
50 
51 //=============================================================================
53 class RTWaveCalc : public RayShooter
54 {
55 public:
56 
57  RTWaveCalc(Vel2dModelLDB *VelMod2d, ObservSys *OSys=NULL);
58  ~RTWaveCalc();
59 
61  bool DirectWaveCalc(WAVE_TYPE wt, bool &stop_pressed_flag);
62 
64  bool LSWaveCalc(LSList *ls, LSCode *lsc, bool reflect, WAVE_TYPE wt, bool &stop_pressed_flag, int segment_num = -1);
65 
67  void CalcWaveParams(LSList *init_List, CodeAr rCode, RTHod *&HODO, int &prog_val, bool &stop_pressed_flag);
68 
70  double GetCoeff(double start_angle, CodeAr rCode); //double ix, double iz, double inF, double outF, CodeAr rCode);
71 
73  void DirectWaveParamsCalc(WAVE_TYPE wType, RTHod *&HODO, bool &stop_pressed_flag, bool load_LSList);
74 
76  void GetDirectWaveTimes(WAVE_TYPE wType, double eps, RTHod *&HODO, bool &stop_pressed_flag);
77 
79  void InitLSLoading(CodeAr rCode, LSList *&init_List, int &count, int &prog_val);
80 
82  void InitLSForming(CodeAr rCode, LSList *&init_List, int &prog_val, bool &stop_pressed_flag, bool dir_wave=FALSE);
83 
85  void WaveCalculation(CodeAr rCode, double *&hodZ, double *&hodT, double *&fi,
86  double *&ix, double *&iz, double *&coeff, double *&iA, double *&inF, double *&outF,
87  int *&recNum, int &hodNum, bool &stop_pressed_flag, bool load_LSList = TRUE);
88 
90  void CalcComplicatedWaveParams(CodeAr rCode, RTHod *&HODO, bool &stop_pressed_flag, LSList *&init_List, int count, int &prog_val);
91 
94  void LS_LSWaveCalc(LSList *in_ls, LSList *&out_ls, WAVE_TYPE wt, bool tr_flag, int end_bound_num, int &prog_val, bool &stop_pressed_flag);
95 
96 private:
97 
98  bool CheckLS(LSList *ls, int &bn);
99  void AddCodeLine(int bn, bool rt, bool ps, LSCode *lsc);
100  bool CheckBN(int bn, bool direction);
101 
103  void SortRecInfo(RecInfoAr &rInfoAr);
104 
106  void RecInterpol(RecInfoAr &recInfos, int i, CodeAr rCode, double *&fi, double *&coeff, RTHod *&HODO, int &i0, bool amplitude);
107 
108  void stop_wave_calc(bool &stop_pressed_flag, LSList *&init_list, LSList *&end_list);
109 
110 };
111 
112 
113 //==============================================================================
114 //-- Global functions ----------------------------------------------------------
115 void TrTime2Depth(double t0, double dt, float *a, long N, double h0, double hb, float dh, float *b, long &M);
116 void TrDXReCalc(float dx, float_ar *xs, int &stN, TrInfoAr *InTr, TrInfoAr *OutAr);
117 
118 #endif
bool LSWaveCalc(LSList *ls, LSCode *lsc, bool reflect, WAVE_TYPE wt, bool &stop_pressed_flag, int segment_num=-1)
Definition: rt_shooter.hpp:80
void GetDirectWaveTimes(WAVE_TYPE wType, double eps, RTHod *&HODO, bool &stop_pressed_flag)
void InitLSForming(CodeAr rCode, LSList *&init_List, int &prog_val, bool &stop_pressed_flag, bool dir_wave=FALSE)
Class RTHod.
Definition: rt_wavecalc.hpp:27
LS code structure.
Definition: rt_shooter.hpp:50
Observation system class.
Definition: os.hpp:13
Definition: vel2dmod_ldb.hpp:16
void LS_LSWaveCalc(LSList *in_ls, LSList *&out_ls, WAVE_TYPE wt, bool tr_flag, int end_bound_num, int &prog_val, bool &stop_pressed_flag)
Class RTWaveCalc.
Definition: rt_wavecalc.hpp:53
Definition: objectar.hpp:56
bool DirectWaveCalc(WAVE_TYPE wt, bool &stop_pressed_flag)
void DirectWaveParamsCalc(WAVE_TYPE wType, RTHod *&HODO, bool &stop_pressed_flag, bool load_LSList)
void CalcWaveParams(LSList *init_List, CodeAr rCode, RTHod *&HODO, int &prog_val, bool &stop_pressed_flag)
void InitLSLoading(CodeAr rCode, LSList *&init_List, int &count, int &prog_val)
void CalcComplicatedWaveParams(CodeAr rCode, RTHod *&HODO, bool &stop_pressed_flag, LSList *&init_List, int count, int &prog_val)
void WaveCalculation(CodeAr rCode, double *&hodZ, double *&hodT, double *&fi, double *&ix, double *&iz, double *&coeff, double *&iA, double *&inF, double *&outF, int *&recNum, int &hodNum, bool &stop_pressed_flag, bool load_LSList=TRUE)
Definition: objectar.hpp:17
double GetCoeff(double start_angle, CodeAr rCode)
One trace information.
Definition: rt_wavecalc.hpp:15
Definition: rt_shooter.hpp:151