Brief description of class still missing. More...
#include <ModelGenerator.h>
Public Member Functions | |
AbstractForward * | clone () const |
bool | isFussyOk (const Parameter *from) |
virtual double | misfit (bool &ok) |
ModelGenerator () | |
bool | setParamSpace (ParamGroundModel *gm) |
virtual void | valueChanged (const Parameter *from=0) |
~ModelGenerator () |
Brief description of class still missing.
Full description of class still missing
Description of constructor still missing
Referenced by clone().
{ _vp=0; _vs=0; _rho=0; _poissonCondition=0; }
Description of destructor still missing
{ // Poisson's condition deleted by parameter space // Profiles deleted by ground model }
AbstractForward * ModelGenerator::clone | ( | ) | const [virtual] |
Implements DinverCore::AbstractForward.
References ModelGenerator(), setParamSpace(), and TRACE.
{ TRACE; ModelGenerator * forward=new ModelGenerator; forward->setParamSpace(new ParamGroundModel(*_paramModel)); return forward; }
bool ModelGenerator::isFussyOk | ( | const Parameter * | from | ) | [inline, virtual] |
Reimplemented from DinverCore::AbstractForward.
References DinverDCCore::PoissonCondition::isOk().
{ if(_poissonCondition) return _poissonCondition->isOk(static_cast<const GroundParameter *>(from)); else return true; }
double ModelGenerator::misfit | ( | bool & | ok | ) | [virtual] |
Provided for convenience, it calls misfit(double *, bool) to compute misfit from a vector of parameter values. Reimplement this function if you do not need values under this format (direct access to parameter space).
Reimplemented from DinverCore::AbstractForward.
References QGpCoreWave::Profile::depths(), QGpCoreTools::endl(), QGpCoreWave::Seismic1DModel::initCalculation(), DinverCore::AbstractForward::modelIndex(), DinverDCCore::ParamProfile::resampledProfile(), QGpCoreWave::Seismic1DModel::toStream(), QGpCoreWave::Seismic1DModel::toString(), QGpCoreTools::tr(), TRACE, and QGpCoreWave::Profile::values().
Referenced by main().
{ TRACE; Seismic1DModel * surfModel = DCReportBlock::surfaceWaveModel(_vp->resampledProfile().depths(), _vp->resampledProfile().values(), _vs->resampledProfile().values(), _rho->resampledProfile().values()); if( !surfModel->initCalculation()) { App::stream() << tr( " *** WARNING *** : bad physical model" ) << endl; App::stream() << surfModel->toString() << endl; ok=false; } QTextStream s(stdout); s << QString("# Model %1").arg(modelIndex()) << endl; surfModel->toStream(s); delete surfModel; return 0.0; }
bool ModelGenerator::setParamSpace | ( | ParamGroundModel * | gm | ) |
References DinverCore::RealSpace::addCondition(), DinverCore::RealSpace::clearParameters(), DinverDCCore::ParamGroundModel::find(), DinverCore::AbstractForward::parameterSpace(), DinverDCCore::ParamGroundModel::toParameters(), TRACE, and DinverDCCore::ParamProfile::type().
Referenced by clone(), and main().
{ TRACE; _paramModel=gm; parameterSpace().clearParameters(); if( !_paramModel->toParameters(parameterSpace()) ) return false; _vp=_paramModel->find( "Vp" ); _vs=_paramModel->find( "Vs" ); _rho=_paramModel->find( "Rho" ); if(_vp && _vs) { ParamProfile * nu=_paramModel->find( "Nu" ); ASSERT(nu && nu->type()==ParamProfile::Condition); _poissonCondition=new PoissonCondition(_vp, _vs, nu); parameterSpace().addCondition(_poissonCondition); } return true; }
void ModelGenerator::valueChanged | ( | const Parameter * | from = 0 | ) | [inline, virtual] |
Reimplemented from DinverCore::AbstractForward.
References DinverDCCore::ParamGroundModel::updateFinalProfiles().
{ _paramModel->updateFinalProfiles(static_cast<const GroundParameter *>(from)); }