LISOUSI: Line Source Simulation

◆ zfpointfc()

TFourier::Tspectrum zfpointfc ( const int &  n,
const double &  dt,
const double &  offset,
const double &  vs,
const double &  vp,
const bool &  debug 
)

Fourier coefficients of the wave field of a vertical single point source in homogeneous full space

Definition at line 46 of file fcsingleforce.cc.

References Fourier, and IME.

Referenced by singlevelocitytransformation().

51 {
52  TFourier::Tseries gPN(0,n-1);
53  const double tp=offset/vp;
54  const double ts=offset/vs;
55 
56  TFXX_debug(debug, "zfpointfc", "go..."
57  << " " << TFXX_value(n)
58  << " " << TFXX_value(vp)
59  << " " << TFXX_value(vs)
60  << " " << TFXX_value(offset)
61  << " " << TFXX_value(dt)
62  << " " << TFXX_value(tp)
63  << " " << TFXX_value(ts)
64  );
65 
66  // prepare near-field response
67  for (int i=0; i<n; ++i)
68  {
69  double t=i*dt;
70  if ((tp <= t) && (t >= ts))
71  {
72  gPN(i)=-t/(offset*offset*offset);
73  }
74  else
75  {
76  gPN(i)=0.;
77  }
78  }
79  TFXX_debug(debug, "zfpointfc", "Fourier Transformation");
80  TFourier::Tspectrum FCgPN=Fourier(gPN, dt);
81 
82  TFourier::Tspectrum retval(FCgPN.shape());
83 
84  TFXX_debug(debug, "zfpointfc", "total field "
85  << TFXX_value(retval.l()) << " "
86  << TFXX_value(FCgPN.l()));
87  const double df=1./(n*dt);
88  // prepare total response
89  for (int i=FCgPN.f(); i<=FCgPN.l(); ++i)
90  {
91  double f=(i-FCgPN.f())*df;
92  // far-field
93  retval(i) = exp(-IME*2.*M_PI*f*ts)/(offset*vs*vs);
94  TFXX_debug(debug, "zfpointfc",
95  TFXX_value(i) << " " <<
96  TFXX_value(f) << " " <<
97  TFXX_value(abs(retval(i))/abs(FCgPN(i))));
98  // near-field
99  retval(i) += FCgPN(i);
100  }
101 
102  TFXX_debug(debug, "zfpointfc", "finished");
103  return(retval);
104 }
Ttimeseries::Tseries Tseries
Definition: lisousi.h:71
const TFourier::Tcoeff IME
Definition: lisousi.h:85
TFourier Fourier
Definition: globaldata.cc:44
Here is the caller graph for this function: