Implementation of Love surface waves. More...
#include <Love.h>
Public Member Functions | |
double | ellipticity () |
Love (const Seismic1DModel *model) | |
const Seismic1DModel * | model () const |
void | setOmega (double o) |
double | y (double slowness) |
Implementation of Love surface waves.
It is a layered model able to calculate the roots corresponding to the theoretical Love dispersion curve.
QGpCoreWave::Love::Love | ( | const Seismic1DModel * | model | ) | [inline] |
{_model=model;}
double QGpCoreWave::Love::ellipticity | ( | ) | [inline] |
Useless for Love case
{return 0;}
const Seismic1DModel* QGpCoreWave::Love::model | ( | ) | const [inline] |
{return _model;}
void QGpCoreWave::Love::setOmega | ( | double | o | ) | [inline] |
Referenced by QGpCoreWave::ModalCurve::determinantMisfit(), DispersionReader::parse(), and QGpCoreWave::LoveFunction::value().
{_omega=o;}
double QGpCoreWave::Love::y | ( | double | slowness | ) |
Computation of the Love function whose roots are located at the Love dispersion curves.
References QGpCoreTools::cos(), QGpCoreTools::exp(), QGpCoreWave::Seismic1DModel::h(), QGpCoreWave::Seismic1DModel::layerCount(), QGpCoreWave::Seismic1DModel::mu(), QGpCoreWave::Seismic1DModel::rho(), QGpCoreTools::sin(), QGpCoreWave::Seismic1DModel::slowS(), QGpCoreTools::sqrt(), and TRACE.
Referenced by QGpCoreWave::ModalCurve::determinantMisfit(), DispersionReader::parse(), and QGpCoreWave::LoveFunction::value().
{ TRACE; register int i=_model->layerCount()-1; // slowness is the inverse of V_L, the Love velocity double k=_omega*slowness; // inverse of V_s double slowS=_model->slowS(i); // Wave number for S waves double ks=_omega*slowS; double nu=sqrt(fabs(k*k-ks*ks)); double l21=_model->rho(i)*nu; double l22=slowS*slowS; double g11, sinq, g12, g21, q, mui, numui; for(i--;i>=0;i--) { slowS=_model->slowS(i); ks=_omega*slowS; nu=sqrt(fabs(k*k-ks*ks)); q=_model->h(i)*nu; // Q is always positive mui=_model->mu(i); numui=nu*mui; if(k<ks) { g11=cos(q); //=g22 sinq=sin(q); g12=sinq/numui; g21=-numui*sinq; // minus sign comes from i*i=-1 } else if(k==ks) { g11=1; //=g22 g12=_model->h(i)/mui; g21=0; } else { double fac=0; if(q<21.2) fac=exp(-2.0*q); /* min significative number is 1e-19 19/2 *ln(10)=21.2, 0.0<fac<1.0 */ g11=(1.0+fac)*0.5; //=g22 0.5<g11<2 sinq=(1.0-fac)*0.5; // 0<sinq<0.5 g12=sinq/numui; // 0<g12<0.5/numui g21=numui*sinq; // 0<g21<numui*0.5 } /* Normalization (we can multiply both elements by any constant factor, the root will be unchanged) to avoid possible overflow. */ double l21n=l21*g11+l22*g21; double l22n=l21*g12+l22*g11; double maxL=fabs(l21n); if(fabs(l22n)>maxL) maxL=fabs(l22n); if(maxL>1.0e5) { maxL=1.0e5/maxL; l21=l21n*maxL; l22=l22n*maxL; } else { l21=l21n; l22=l22n; } } return l21; }