37 #define TF_FCSINGLEFORCE_CC_VERSION \ 38 "TF_FCSINGLEFORCE_CC V1.0 " 46 TFourier::Tspectrum
zfpointfc(
const int& n,
const double& dt,
53 const double tp=offset/vp;
54 const double ts=offset/vs;
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)
67 for (
int i=0; i<n; ++i)
70 if ((tp <= t) && (t >= ts))
72 gPN(i)=-t/(offset*offset*offset);
79 TFXX_debug(debug,
"zfpointfc",
"Fourier Transformation");
80 TFourier::Tspectrum FCgPN=
Fourier(gPN, dt);
82 TFourier::Tspectrum retval(FCgPN.shape());
84 TFXX_debug(debug,
"zfpointfc",
"total field " 85 << TFXX_value(retval.l()) <<
" " 86 << TFXX_value(FCgPN.l()));
87 const double df=1./(n*dt);
89 for (
int i=FCgPN.f(); i<=FCgPN.l(); ++i)
91 double f=(i-FCgPN.f())*df;
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))));
99 retval(i) += FCgPN(i);
102 TFXX_debug(debug,
"zfpointfc",
"finished");
112 double sqrtfct(
const double& psample,
const double& v)
115 double arg=(v*v*psample*psample)-1.;
116 TFXX_assert(arg>=0.,
"negative argument of sqrt: " 117 "programming error - check source code!");
127 TFourier::Tspectrum
zflinefc(
const int& n,
const double& dt,
128 const double& offset,
134 const double tp=offset/vp;
135 const double ts=offset/vs;
138 for (
int i=0; i<n; ++i)
146 gLN(i) -=
sqrtfct(t/offset,vs);
148 gLN(i) *= (-2./offset);
155 TFourier::Tspectrum FCgLN=
Fourier(gLN, dt);
157 TFourier::Tspectrum retval(FCgLN.shape());
159 const double df=1./(n*dt);
161 for (
int i=FCgLN.f(); i<=FCgLN.l(); ++i)
163 double f=(i-FCgLN.f())*df;
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))));
171 retval(i) += FCgLN(i);
Ttimeseries::Tseries Tseries
prototypes and structs for lisousi (prototypes)
const TFourier::Tcoeff IME
TFourier::Tspectrum zfpointfc(const int &n, const double &dt, const double &offset, const double &vs, const double &vp, const bool &debug)
TFourier::Tspectrum zflinefc(const int &n, const double &dt, const double &offset, const double &vs, const double &vp, const bool &debug)
TFourier::Tcoeff hankel(const double &arg)
lisousi functions (prototypes)
double sqrtfct(const double &psample, const double &v)