Brief description of class still missing. More...
#include <DispersionFactory.h>
Public Member Functions | |
| bool | calculate (const Seismic1DModel *model, EllipticityFactory *ellFactory) |
| DispersionFactory () | |
| Dispersion * | groupLove () const |
| Dispersion * | groupRayleigh () const |
| virtual const RealValue * | mode (const Mode &m) const |
| Dispersion * | phaseLove () const |
| Dispersion * | phaseRayleigh () const |
| virtual void | setMode (const Mode &m) |
| virtual ModalStorage * | storage (int storageIndex) const |
| virtual int | storageCount () const |
| void | validate (EllipticityFactory *ellFactory, AutocorrFactory *autocorr) |
| ~DispersionFactory () | |
Protected Member Functions | |
| virtual ModalStorage * | newStorage (int nModes) |
Brief description of class still missing.
Full description of class still missing
| bool QGpCoreWave::DispersionFactory::calculate | ( | const Seismic1DModel * | m, |
| EllipticityFactory * | ellFactory | ||
| ) |
Calculate theoretical curves
References QGpCoreWave::ModalStorage::abs(), QGpCoreWave::Dispersion::calculate(), QGpCoreWave::Dispersion::setGroupSlowness(), TRACE, and QGpCoreWave::EllipticityFactory::values().
Referenced by SpacReader::parse(), and DinverDCCore::TargetList::surfaceMisfit().
{
TRACE;
if(_phaseRayleigh) {
Rayleigh rayleigh(m);
Ellipticity * ell;
if(ellFactory) {
ell=ellFactory->values();
} else {
ell=0;
}
if(!_phaseRayleigh->calculate(&rayleigh, ell)) {
return false;
}
if(ell) { // Since 2011-01-07, signed ellipticity is computed
ell->abs();
}
if(_groupRayleigh) {
*_groupRayleigh=*_phaseRayleigh;
_groupRayleigh->setGroupSlowness();
}
}
if(_phaseLove) {
Love love(m);
if(!_phaseLove->calculate(&love)) {
return false;
}
if(_groupLove) {
*_groupLove=*_phaseLove;
_groupLove->setGroupSlowness();
}
}
return true;
}
| Dispersion* QGpCoreWave::DispersionFactory::groupLove | ( | ) | const [inline] |
{return _groupLove;}
| Dispersion* QGpCoreWave::DispersionFactory::groupRayleigh | ( | ) | const [inline] |
Referenced by DinverDCCore::TargetList::dispersionSampleCount().
{return _groupRayleigh;}
| const RealValue * QGpCoreWave::DispersionFactory::mode | ( | const Mode & | m | ) | const [virtual] |
Implements QGpCoreWave::ModalFactory.
References QGpCoreWave::Mode::Group, QGpCoreWave::Mode::index(), QGpCoreWave::Mode::Love, QGpCoreWave::ModalStorage::mode(), QGpCoreWave::Mode::Phase, QGpCoreWave::Mode::polarisation(), QGpCoreWave::Mode::Radial, QGpCoreWave::Mode::Rayleigh, QGpCoreWave::Mode::slowness(), QGpCoreWave::Mode::Transverse, and QGpCoreWave::Mode::Vertical.
{
switch (m.slowness()) {
case Mode::Phase:
switch (m.polarisation()) {
case Mode::Vertical:
case Mode::Radial:
case Mode::Rayleigh:
return _phaseRayleigh ? _phaseRayleigh->mode(m.index()) : 0;
case Mode::Love:
case Mode::Transverse:
return _phaseLove ? _phaseLove->mode(m.index()) : 0;
}
break;
case Mode::Group:
switch (m.polarisation()) {
case Mode::Vertical:
case Mode::Radial:
case Mode::Rayleigh:
return _groupRayleigh ? _groupRayleigh->mode(m.index()) : 0;
case Mode::Love:
case Mode::Transverse:
return _groupLove ? _groupLove->mode(m.index()) : 0;
}
break;
}
return 0; // just to avoid warning
}
| virtual ModalStorage* QGpCoreWave::DispersionFactory::newStorage | ( | int | nModes | ) | [inline, protected, virtual] |
Implements QGpCoreWave::ModalFactory.
{return new Dispersion(nModes, x());}
| Dispersion* QGpCoreWave::DispersionFactory::phaseLove | ( | ) | const [inline] |
Referenced by QGpCoreWave::AutocorrFactory::calculateHorizontal(), and Spac3CForward::setModel().
{return _phaseLove;}
| Dispersion* QGpCoreWave::DispersionFactory::phaseRayleigh | ( | ) | const [inline] |
| void QGpCoreWave::DispersionFactory::setMode | ( | const Mode & | m | ) | [virtual] |
Implements QGpCoreWave::ModalFactory.
References QGpCoreWave::Mode::Group, QGpCoreWave::Mode::index(), QGpCoreWave::Mode::Love, QGpCoreWave::Mode::Phase, QGpCoreWave::Mode::polarisation(), QGpCoreWave::Mode::Radial, QGpCoreWave::Mode::Rayleigh, QGpCoreWave::Mode::slowness(), TRACE, QGpCoreWave::Mode::Transverse, and QGpCoreWave::Mode::Vertical.
{
TRACE;
switch (m.slowness()) {
case Mode::Phase:
switch (m.polarisation()) {
case Mode::Vertical:
case Mode::Radial:
case Mode::Rayleigh:
upgrade<Dispersion>(_phaseRayleigh, m.index()); break;
case Mode::Love:
case Mode::Transverse:
upgrade<Dispersion>(_phaseLove, m.index()); break;
}
break;
case Mode::Group:
switch (m.polarisation()) {
case Mode::Vertical:
case Mode::Radial:
case Mode::Rayleigh:
upgrade<Dispersion>(_groupRayleigh, m.index()); break;
case Mode::Love:
case Mode::Transverse:
upgrade<Dispersion>(_groupLove, m.index()); break;
default:
ASSERT(false); break;
}
break;
}
}
| ModalStorage * QGpCoreWave::DispersionFactory::storage | ( | int | storageIndex | ) | const [inline, virtual] |
Implements QGpCoreWave::ModalFactory.
References TRACE.
{
TRACE;
switch (storageIndex) {
case 1:
return _groupRayleigh;
case 2:
return _phaseLove;
case 3:
return _groupLove;
default:
return _phaseRayleigh;
}
}
| virtual int QGpCoreWave::DispersionFactory::storageCount | ( | ) | const [inline, virtual] |
Implements QGpCoreWave::ModalFactory.
{return 4;}
| void QGpCoreWave::DispersionFactory::validate | ( | EllipticityFactory * | ell, |
| AutocorrFactory * | autocorr | ||
| ) |
Validate modes, make sure that the number of modes for group slowness is greater than for phase slowness.
References QGpCoreWave::AutocorrFactory::horizontalModeCount(), QGpCoreWave::ModalStorage::modeCount(), TRACE, QGpCoreWave::EllipticityFactory::values(), and QGpCoreWave::AutocorrFactory::verticalModeCount().
Referenced by Spac3CForward::setCurves(), SpacReader::setOptions(), and DinverDCCore::TargetList::validateTargets().
{
TRACE;
if(ell && ell->values()) {
upgrade<Dispersion>(_phaseRayleigh, ell->values()->modeCount()-1);
}
if(autocorr) {
if(autocorr->verticalModeCount()>0) {
upgrade<Dispersion>(_phaseRayleigh, autocorr->verticalModeCount()-1);
}
if(autocorr->horizontalModeCount()>0) {
upgrade<Dispersion>(_phaseRayleigh, autocorr->horizontalModeCount()-1);
upgrade<Dispersion>(_phaseLove, autocorr->horizontalModeCount()-1);
}
}
if(_groupRayleigh) {
upgrade<Dispersion>(_phaseRayleigh, _groupRayleigh->modeCount()-1);
}
if(_groupLove) {
upgrade<Dispersion>(_phaseLove, _groupLove->modeCount()-1);
}
}