LISOUSI: Line Source Simulation

◆ zflinefc()

TFourier::Tspectrum zflinefc ( 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 line source in homogeneous full space

Definition at line 127 of file fcsingleforce.cc.

References Fourier, hankel(), IME, and sqrtfct().

Referenced by singlevelocitytransformation().

132 {
133  TFourier::Tseries gLN(0,n-1);
134  const double tp=offset/vp;
135  const double ts=offset/vs;
136 
137  // prepare near-field response
138  for (int i=0; i<n; ++i)
139  {
140  double t=i*dt;
141  if (t >= tp)
142  {
143  gLN(i) = sqrtfct(t/offset,vp);
144  if (t>=ts)
145  {
146  gLN(i) -= sqrtfct(t/offset,vs);
147  }
148  gLN(i) *= (-2./offset);
149  }
150  else
151  {
152  gLN(i)=0.;
153  }
154  }
155  TFourier::Tspectrum FCgLN=Fourier(gLN, dt);
156 
157  TFourier::Tspectrum retval(FCgLN.shape());
158 
159  const double df=1./(n*dt);
160  // prepare total response
161  for (int i=FCgLN.f(); i<=FCgLN.l(); ++i)
162  {
163  double f=(i-FCgLN.f())*df;
164  // far-field
165  retval(i) = -IME*M_PI*hankel(ts*2.*M_PI*f)/(vs*vs);
166  TFXX_debug(debug, "zflinefc",
167  TFXX_value(i) << " " <<
168  TFXX_value(f) << " " <<
169  TFXX_value(abs(retval(i))/abs(FCgLN(i))));
170  // near-field
171  retval(i) += FCgLN(i);
172  }
173  return(retval);
174 }
Ttimeseries::Tseries Tseries
Definition: lisousi.h:71
const TFourier::Tcoeff IME
Definition: lisousi.h:85
TFourier Fourier
Definition: globaldata.cc:44
TFourier::Tcoeff hankel(const double &arg)
Definition: hankel.cc:41
double sqrtfct(const double &psample, const double &v)
Here is the call graph for this function:
Here is the caller graph for this function: