LISOUSI: Line Source Simulation

◆ wnintegration()

TFourier::Tcoeff wnintegration ( const Exco ec,
const double &  f,
const double &  offset,
const Ebasis fb 
)

Wavenumber integration function

Definition at line 132 of file wnintegration.cc.

References Exco::dp(), Fbessel0, Fbessel1, Fcos, and Fsin.

Referenced by singlevelocitytransformation().

136 {
137  TFourier::Tcoeff retval=0.;
138  double dpxw=M_PI*2.*f*offset*ec.dp();
139  if (4.*dpxw > M_PI)
140  {
141  cout << " frequency: " << f << " Hz\n"
142  << " offset: " << offset << " m\n"
143  << " slowness stepsize: " << ec.dp() << " s/m\n"
144  << " argument stepsize: " << dpxw << std::endl;
145  }
146  TFXX_assert((4.*dpxw <= M_PI),
147  "argument increase in each trapezoid step is too large; "
148  "increase number of steps");
149  switch(fb)
150  {
151  case Fbessel0:
152  for (unsigned int i=0; i< ec.size(); ++i)
153  { retval += ec(i)*ec.dp()*double(i)*gsl_sf_bessel_J0(i*dpxw); }
154  break;
155  case Fbessel1:
156  for (unsigned int i=0; i< ec.size(); ++i)
157  { retval += ec(i)*double(i)*ec.dp()*gsl_sf_bessel_J1(i*dpxw); }
158  break;
159  case Fsin:
160  for (unsigned int i=0; i< ec.size(); ++i)
161  { retval += ec(i)*sin(i*dpxw); }
162  break;
163  case Fcos:
164  for (unsigned int i=0; i< ec.size(); ++i)
165  { retval += ec(i)*cos(i*dpxw); }
166  break;
167  }
168  return(retval);
169 } // TFourier::Tcoeff wnintegration()
Bessel function of order 1.
cosine function
Bessel function of order 0.
double dp() const
return slowness interval
sine function
Here is the call graph for this function:
Here is the caller graph for this function: