All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <ShAmplification.h>
Public Member Functions | |
| Curve< Point2D > | curve (int fcount, double fmax, float theta) |
| ShAmplification (const Seismic1DModel *model) | |
Brief description of class still missing.
Full description of class still missing
| QGpCoreWave::ShAmplification::ShAmplification | ( | const Seismic1DModel * | model | ) | [inline] |
{_model=model;}
| Curve< Point2D > QGpCoreWave::ShAmplification::curve | ( | int | fcount, |
| double | fmax, | ||
| float | theta | ||
| ) |
Kennett method for computation of transfert function
References QGpCoreWave::Seismic1DModel::h(), QGpCoreWave::Seismic1DModel::layerCount(), QGpCoreWave::Seismic1DModel::qp(), QGpCoreWave::Seismic1DModel::qs(), QGpCoreWave::Seismic1DModel::rho(), QGpCoreTools::Point2D::setX(), QGpCoreTools::Point2D::setY(), QGpCoreWave::Seismic1DModel::slowP(), and QGpCoreWave::Seismic1DModel::slowS().
{
// This first version use a code in fortran to calculate the transfert function
float *fr, *u1, *v1, *w3, *al0, *be0, *dens, *th, *qp, *qs, ffmax;
fr=new float[fcount];
u1=new float[fcount];
v1=new float[fcount];
w3=new float[fcount];
al0=new float[_model->layerCount()];
be0=new float[_model->layerCount()];
dens=new float[_model->layerCount()];
th=new float[_model->layerCount()];
qp=new float[_model->layerCount()];
qs=new float[_model->layerCount()];
ffmax=fmax;
// Copy model parameter in appropriate float vectors
for(int i=0;i<_model->layerCount();i++) {
if(i<_model->layerCount()-1) th[i]=_model->h(i); else th[i]=1;
al0[i]=1.0/_model->slowP(i);
be0[i]=1.0/_model->slowS(i);
dens[i]=_model->rho(i);
qp[i]=_model->qp(i);
qs[i]=_model->qs(i);
}
// Compute site respons
//long nl=_model->layerCount();
//qtbFortran.kensh(&nl, &theta, &ffmax, &fcountl, al0, be0, dens, th, qp, qs, fr, u1, v1,w3);
// Get fr and u1 in a list of point_2D
Curve<Point2D> c(fcount);
for(int i=0;i<fcount;i++) {
Point2D& p=c[i];
p.setX(Number::toDouble(fr[i] ));
p.setY(Number::toDouble(u1[i] ));
}
delete [] fr;
delete [] u1;
delete [] v1;
delete [] w3;
delete [] al0;
delete [] be0;
delete [] dens;
delete [] th;
delete [] qp;
delete [] qs;
return c;
}