Gathers ModalStorage to compute misfit for Rayleigh/Love and Phase/Group slowness. More...
#include <ModalFactory.h>
Public Member Functions | |
| void | linkX (QList< ModalCurve > &curves) const |
| void | linkX (ModalCurve &c) const |
| ModalFactory () | |
| virtual const RealValue * | mode (const Mode &m) const =0 |
| void | setAngularFrequency () |
| virtual void | setMode (const Mode &m)=0 |
| void | setModes (const QList< ModalCurve > &curves) |
| void | setModes (const ModalCurve &c) |
| void | setX (ModalFactory &f) |
| void | setX (const QList< ModalCurve > &curves) |
| void | setX (const ModalCurve &c) |
| virtual ModalStorage * | storage (int storageIndex) const =0 |
| virtual int | storageCount () const =0 |
| virtual void | writeReportHeader (QDataStream &) const |
| const QVector< double > * | x () const |
| virtual | ~ModalFactory () |
Protected Member Functions | |
| virtual ModalStorage * | newStorage (int nModes)=0 |
| template<class StorageType > | |
| void | upgrade (StorageType *&s, int requestedMode) |
Protected Attributes | |
| QVector< double > | _x |
Gathers ModalStorage to compute misfit for Rayleigh/Love and Phase/Group slowness.
Initialized is achieved with three distinct steps:
Never mix these steps.
| QGpCoreWave::ModalFactory::ModalFactory | ( | ) | [inline] |
{}
| virtual QGpCoreWave::ModalFactory::~ModalFactory | ( | ) | [inline, virtual] |
{}
| void QGpCoreWave::ModalFactory::linkX | ( | QList< ModalCurve > & | curves | ) | const |
Repeat calls to linkX()
References TRACE.
Referenced by Spac3CForward::setCurves(), SpacReader::setOptions(), and DinverDCCore::TargetList::validateTargets().
| void QGpCoreWave::ModalFactory::linkX | ( | ModalCurve & | c | ) | const |
Must be called before setModes()
References _x, QGpCoreTools::endl(), QGpCoreWave::ModalCurve::linkX(), QGpCoreTools::tr(), and TRACE.
| virtual const RealValue* QGpCoreWave::ModalFactory::mode | ( | const Mode & | m | ) | const [pure virtual] |
Implemented in QGpCoreWave::AutocorrFactory, QGpCoreWave::DispersionFactory, and QGpCoreWave::EllipticityFactory.
Referenced by QGpCoreWave::ModalCurve::misfit().
| virtual ModalStorage* QGpCoreWave::ModalFactory::newStorage | ( | int | nModes | ) | [protected, pure virtual] |
Implemented in QGpCoreWave::AutocorrFactory, QGpCoreWave::DispersionFactory, and QGpCoreWave::EllipticityFactory.
Referenced by upgrade().
Switch to omega from frequency. Must be called only once.
Referenced by Spac3CForward::setCurves(), SpacReader::setOptions(), and DinverDCCore::TargetList::validateTargets().
{
TRACE;
double factor=2*M_PI;
for(QVector<double>::iterator it=_x.begin(); it!=_x.end(); it++ ) {
(*it) *= factor;;
}
}
| virtual void QGpCoreWave::ModalFactory::setMode | ( | const Mode & | m | ) | [pure virtual] |
Implemented in QGpCoreWave::AutocorrFactory, QGpCoreWave::DispersionFactory, and QGpCoreWave::EllipticityFactory.
Referenced by setModes().
| void QGpCoreWave::ModalFactory::setModes | ( | const QList< ModalCurve > & | curves | ) |
Repeat calls to setModes()
References TRACE.
Referenced by Spac3CForward::setCurves(), and DinverDCCore::TargetList::validateTargets().
| void QGpCoreWave::ModalFactory::setModes | ( | const ModalCurve & | c | ) |
References _x, QGpCoreTools::endl(), QGpCoreWave::ModalCurve::modes(), setMode(), QGpCoreTools::tr(), and TRACE.
| void QGpCoreWave::ModalFactory::setX | ( | ModalFactory & | f | ) |
Merge x vectors of the two factories
References _x, TRACE, and QGpCoreTools::unique().
Referenced by SpacSelector::createObjects(), SpacSelector::inverse(), SpacSelector::inverseAt(), SpacSelector::selectSamples(), Spac3CForward::setCurves(), SpacReader::setOptions(), setX(), and DinverDCCore::TargetList::validateTargets().
| void QGpCoreWave::ModalFactory::setX | ( | const QList< ModalCurve > & | curves | ) |
| void QGpCoreWave::ModalFactory::setX | ( | const ModalCurve & | c | ) |
Must be called before setModes()
References _x, QGpCoreTools::Curve< pointType >::begin(), QGpCoreTools::Curve< pointType >::count(), QGpCoreTools::Curve< pointType >::end(), TRACE, and QGpCoreTools::unique().
| virtual ModalStorage* QGpCoreWave::ModalFactory::storage | ( | int | storageIndex | ) | const [pure virtual] |
Implemented in QGpCoreWave::AutocorrFactory, QGpCoreWave::DispersionFactory, and QGpCoreWave::EllipticityFactory.
| virtual int QGpCoreWave::ModalFactory::storageCount | ( | ) | const [pure virtual] |
Implemented in QGpCoreWave::AutocorrFactory, QGpCoreWave::DispersionFactory, and QGpCoreWave::EllipticityFactory.
| void QGpCoreWave::ModalFactory::upgrade | ( | StorageType *& | s, |
| int | requestedMode | ||
| ) | [protected] |
References newStorage(), and TRACE.
Referenced by QGpCoreWave::EllipticityFactory::setMode().
{
TRACE;
if( !s || requestedMode >= s->modeCount()) {
StorageType * tmp_s=static_cast<StorageType *>(newStorage(requestedMode + 1));
delete s;
s=tmp_s;
}
}
| virtual void QGpCoreWave::ModalFactory::writeReportHeader | ( | QDataStream & | ) | const [inline, virtual] |
Reimplemented in QGpCoreWave::AutocorrFactory.
{}
| const QVector<double>* QGpCoreWave::ModalFactory::x | ( | ) | const [inline] |
Referenced by QGpCoreWave::AutocorrFactory::calculateHorizontal(), QGpCoreWave::AutocorrFactory::calculateVertical(), and Spac3CForward::omegasCount().
{return &_x;}
QVector<double> QGpCoreWave::ModalFactory::_x [protected] |