Repository navigation
Expand file tree
/
Copy pathsyngen.h
More file actions
73 lines (58 loc) · 1.73 KB
/
Copy pathsyngen.h
File metadata and controls
73 lines (58 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* syngen.h - forward traveltime calculation
*
* Jun Korenaga, MIT/WHOI
* January 1999
*/
#ifndef _TOMO_SYNGEN_H_
#define _TOMO_SYNGEN_H_
#include <array.h>
#include <geom.h>
#include "smesh.h"
#include "graph.h"
#include "bend.h"
#include "interface.h"
class SyntheticTraveltimeGenerator2d {
public:
SyntheticTraveltimeGenerator2d(SlownessMesh2d& m, const char* ifn,
int xorder=3, int zorder=3, double clen=0.0,
int nintp=8, double cg_tol=1e-4, double br_tol=1e-7);
void conduct();
void readRefl(const char *);
void doFullRefl();
void outputRay(const char* fn);
void useClock(const char* fn);
void graphOnly();
void setVerbose(int i=0);
void printSource(ostream&) const;
void printSynTime(ostream&, double) const;
void printObsTime(ostream&, double) const;
void printDiff(ostream&, double& misfit, double& chisq) const;
friend ostream& operator<<(ostream&,
const SyntheticTraveltimeGenerator2d&);
private:
void read_file(const char* ifn);
SlownessMesh2d& smesh;
GraphSolver2d graph;
BetaSpline2d betasp;
BendingSolver2d bend;
Array1d<Point2d> src;
Array1d< Array1d<Point2d> > rcv;
Array1d< Array1d<int> > raytype;
Array1d< Array1d<double> > obs_ttime, syn_ttime;
Array1d< Array1d<double> > obs_dt;
int nrefl;
Array1d<int> start_i, end_i;
Array1d<const Interface2d*> interp;
const Interface2d *bathyp, *reflp;
bool do_full_refl;
bool outray;
const char* rayfn;
bool use_clock, graph_only;
const char* timefn;
double graph_time, bend_time;
int verbose_level;
};
ostream&
operator<<(ostream&, const SyntheticTraveltimeGenerator2d&);
#endif /* _TOMO_SYNGEN_H_ */