Brief description of class still missing. More...
#include <PoissonCondition.h>
Public Member Functions | |
virtual void | getLimits (int paramIndex, double &min, double &max) const |
virtual void | humanInfo () const |
bool | isOk (const GroundParameter *from) |
virtual bool | operator== (const AbstractCondition &o) const |
PoissonCondition (ParamProfile *vp, ParamProfile *vs, ParamProfile *nu) | |
virtual const QString & | xml_tagName () const |
Static Public Attributes | |
static const QString | xmlPoissonConditionTag = "PoissonCondition" |
Protected Member Functions | |
virtual uint | internalChecksum () const |
Brief description of class still missing.
Full description of class still missing
DinverDCCore::PoissonCondition::PoissonCondition | ( | ParamProfile * | vp, |
ParamProfile * | vs, | ||
ParamProfile * | nu | ||
) |
Description of constructor still missing
References DinverDCCore::ParamProfile::collectValueParameters(), DinverCore::AbstractCondition::parameterList(), and TRACE.
{ TRACE; _vp=vp; _vs=vs; _nu=nu; // Build the list of involved parameters (all value parameters from vp, vs and nu) _vp->collectValueParameters(parameterList()); _vs->collectValueParameters(parameterList()); _nu->collectValueParameters(parameterList()); }
void DinverDCCore::PoissonCondition::getLimits | ( | int | paramIndex, |
double & | min, | ||
double & | max | ||
) | const [virtual] |
Implements DinverCore::AbstractCondition.
References DinverDCCore::ProfileLimits::bottomDepth, DinverDCCore::ParamLayer::bottomDepth(), DinverDCCore::ProfileLimits::bottomIndex, DinverDCCore::ProfileLimits::depths, QGpCoreWave::Profile::depths(), DinverDCCore::ProfileLimits::layer, DinverDCCore::GroundParameter::layer(), DinverDCCore::ProfileLimits::maxP, DinverDCCore::ParamProfile::maxResampledProfile(), DinverDCCore::ProfileLimits::minP, DinverDCCore::ParamProfile::minResampledProfile(), DinverDCCore::ParamLayer::profile(), DinverDCCore::ParamProfile::resampledProfile(), QGpCoreTools::sqrt(), DinverDCCore::ProfileLimits::topDepth, DinverDCCore::ParamLayer::topDepth(), DinverDCCore::ProfileLimits::topIndex, TRACE, DinverDCCore::GroundParameter::type(), DinverDCCore::GroundParameter::ValueBottom, QGpCoreWave::Profile::values(), and DinverDCCore::GroundParameter::ValueTop.
{ TRACE; const GroundParameter& gParam=parameter(paramIndex); ProfileLimits pl; pl.layer=gParam.layer(0); /* Only depth parameters may be linked to several layers from distinct profiles Depth parameters are never associated a poisson condition directly */ const ParamProfile * profile=pl.layer->profile(); pl.depths=profile->resampledProfile().depths(); const QVector<double>& minNu=_nu->minResampledProfile().values(); const QVector<double>& maxNu=_nu->maxResampledProfile().values(); int n=pl.depths.count(); pl.minP.resize(n); pl.maxP.resize(n); pl.topDepth=pl.layer->topDepth(); pl.bottomDepth=pl.layer->bottomDepth(); pl.topIndex=-1; if(profile==_vp) { // Compute minP and maxP for Vp const QVector<double>& values=_vs->resampledProfile().values(); int i=0; for(; i<n && pl.depths[i]<=pl.topDepth; i++) {} pl.topIndex=i; for(; i<n && pl.depths[i]<=pl.bottomDepth; i++) { if(minNu[i]<maxNu[i]) { if(minNu[i]==0.5) pl.minP[i]=1e99; else pl.minP[i]=values[i]*sqrt((minNu[i]-1.0)/(minNu[i]-0.5)); if(maxNu[i]==0.5) pl.maxP[i]=1e99; else pl.maxP[i]=values[i]*sqrt((maxNu[i]-1.0)/(maxNu[i]-0.5)); } else { // Constant Nu, ignore Vp values pl.minP[i]=0.0; pl.maxP[i]=1e99; } } pl.bottomIndex=i-1; } else if(profile==_vs) { // Compute minP and maxP for Vs const QVector<double>& values=_vp->resampledProfile().values(); int i=0; for(; i<n && pl.depths[i]<=pl.topDepth; i++) {} pl.topIndex=i; for(; i<n && pl.depths[i]<=pl.bottomDepth; i++) { if(minNu[i]<maxNu[i]) { pl.minP[i]=values[i]*sqrt((maxNu[i]-0.5)/(maxNu[i]-1.0)); pl.maxP[i]=values[i]*sqrt((minNu[i]-0.5)/(minNu[i]-1.0)); } else { // Constant Nu, ignore condition forced by Vp values // Vp values will be forced later on pl.minP[i]=0.0; pl.maxP[i]=1e99; } } pl.bottomIndex=i-1; } // Find min and max for parameter gParam that belongs to layer within minP and maxP profiles switch (gParam.type()) { case GroundParameter::ValueTop: getTopLimits(pl, min, max); break; case GroundParameter::ValueBottom: getBottomLimits(pl, min, max); break; default: // Never occur, depth parameters are handled differently: fussy parameters are adjusted by trial and error break; } }
void DinverDCCore::PoissonCondition::humanInfo | ( | ) | const [virtual] |
Print human readable information about condition to stream.
Implements DinverCore::AbstractCondition.
References TRACE.
{ TRACE; App::stream() << " Poisson's ratio checked\n"; }
uint DinverDCCore::PoissonCondition::internalChecksum | ( | ) | const [protected, virtual] |
Return a number that uniquely identify this condition
Implements DinverCore::AbstractCondition.
References TRACE.
{ TRACE; uint cs=0; return cs; }
bool DinverDCCore::PoissonCondition::isOk | ( | const GroundParameter * | from | ) |
By design this function is called only for fussy parameters (depth and thickness only). All profiles are supposed to be correctly built, it return false if Poisson's ratio is not valid.
References DinverDCCore::GroundParameter::count(), QGpCoreWave::Profile::depths(), DinverDCCore::ParamLayer::fixedBottomDepth(), DinverDCCore::GroundParameter::layer(), DinverDCCore::ParamProfile::maxResampledProfile(), DinverDCCore::ParamProfile::minResampledProfile(), DinverDCCore::ParamLayer::profile(), DinverDCCore::ParamProfile::resampledProfile(), QGpCoreTools::sqrt(), DinverDCCore::ParamLayer::topDepth(), TRACE, and QGpCoreWave::Profile::values().
Referenced by ModelGenerator::isFussyOk(), DinverDCCore::TargetList2D::isPoissonRatioOk(), and DinverDCCore::TargetList::isPoissonRatioOk().
{ TRACE; for(int iLayer=from->count()-1; iLayer>=0; iLayer-- ) { const ParamLayer * layer=from->layer(iLayer); const ParamProfile * profile=layer->profile(); QVector<double> depths=profile->resampledProfile().depths(); int n=depths.count(); double topDepth=layer->topDepth(); double bottomDepth=layer->fixedBottomDepth(); const QVector<double>& vs=_vs->resampledProfile().values(); const QVector<double>& vp=_vp->resampledProfile().values(); const QVector<double>& minNu=_nu->minResampledProfile().values(); const QVector<double>& maxNu=_nu->maxResampledProfile().values(); int i=0; for( ; i<n && depths[i]<=topDepth; i++ ) {} for( ; i<n && depths[i]<=bottomDepth; i++ ) { if(minNu[i]<maxNu[i]) { if(vs[i]<vp[i]*sqrt((maxNu[i]-0.5)/(maxNu[i]-1.0))) return false; if(vs[i]>vp[i]*sqrt((minNu[i]-0.5)/(minNu[i]-1.0))) return false; } // Else constant Nu: no condition from this side } } return true; }
bool DinverDCCore::PoissonCondition::operator== | ( | const AbstractCondition & | o | ) | const [virtual] |
Reimplemented from DinverCore::AbstractCondition.
References TRACE, DinverCore::AbstractCondition::xml_tagName(), and xml_tagName().
{ TRACE; if(xml_tagName()==o.xml_tagName()) { return AbstractCondition::operator==(o); } else return false; }
virtual const QString& DinverDCCore::PoissonCondition::xml_tagName | ( | ) | const [inline, virtual] |
Reimplemented from DinverCore::AbstractCondition.
Referenced by operator==().
{return xmlPoissonConditionTag;}
const QString DinverDCCore::PoissonCondition::xmlPoissonConditionTag = "PoissonCondition" [static] |