本文整理汇总了C++中Parm::GetUpperLimit方法的典型用法代码示例。如果您正苦于以下问题:C++ Parm::GetUpperLimit方法的具体用法?C++ Parm::GetUpperLimit怎么用?C++ Parm::GetUpperLimit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parm
的用法示例。
在下文中一共展示了Parm::GetUpperLimit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateGroup
//.........这里部分代码省略.........
else if( uptodate[SECSWEEP_WSECT_DRIVER] && uptodate[ROOTC_WSECT_DRIVER] && uptodate[AREA_WSECT_DRIVER] )
{
double tan1 = tan( sweep->Get() * DEG_2_RAD );
double tan2 = tan( secsw->Get() * DEG_2_RAD );
double coeff = 2.0 * area->Get() * ( tan1 - tan2 ) / ( sweeploc->Get() - secswloc->Get() );
tipC->Set( sqrt( -1.0 * ( rootC->Get() * rootC->Get() + coeff ) ) );
uptodate[TIPC_WSECT_DRIVER] = true;
}
}
if( !uptodate[ROOTC_WSECT_DRIVER] )
{
if( uptodate[TAPER_WSECT_DRIVER] && uptodate[TIPC_WSECT_DRIVER] )
{
rootC->Set( tipC->Get() / taper->Get() );
uptodate[ROOTC_WSECT_DRIVER] = true;
}
else if( uptodate[TAPER_WSECT_DRIVER] && uptodate[AVEC_WSECT_DRIVER] )
{
rootC->Set( 2.0 * aveC->Get() / ( 1.0 + taper->Get() ) );
uptodate[ROOTC_WSECT_DRIVER] = true;
}
else if( uptodate[TIPC_WSECT_DRIVER] && uptodate[AVEC_WSECT_DRIVER] )
{
rootC->Set( 2.0 * aveC->Get() - tipC->Get() );
uptodate[ROOTC_WSECT_DRIVER] = true;
}
else if( uptodate[SECSWEEP_WSECT_DRIVER] && uptodate[TIPC_WSECT_DRIVER] && uptodate[SPAN_WSECT_DRIVER] )
{
double tan1 = tan( sweep->Get() * DEG_2_RAD );
double tan2 = tan( secsw->Get() * DEG_2_RAD );
rootC->Set( tipC->Get() - span->Get() * ( tan1 - tan2 ) / ( sweeploc->Get() - secswloc->Get() ) );
uptodate[ROOTC_WSECT_DRIVER] = true;
}
else if( uptodate[SECSWEEP_WSECT_DRIVER] && uptodate[TIPC_WSECT_DRIVER] && uptodate[AREA_WSECT_DRIVER] )
{
double tan1 = tan( sweep->Get() * DEG_2_RAD );
double tan2 = tan( secsw->Get() * DEG_2_RAD );
double coeff = 2.0 * area->Get() * ( tan1 - tan2 ) / ( sweeploc->Get() - secswloc->Get() );
rootC->Set( sqrt( tipC->Get() * tipC->Get() - coeff ) );
uptodate[ROOTC_WSECT_DRIVER] = true;
}
}
if( !uptodate[TAPER_WSECT_DRIVER] )
{
if( uptodate[TIPC_WSECT_DRIVER] && uptodate[ROOTC_WSECT_DRIVER] )
{
if ( rootC->Get() == 0.0 )
{
if ( tipC->Get() == 0.0 )
{
taper->Set( 1.0 );
}
else
{
taper->Set( taper->GetUpperLimit() );
}
}
else
{
taper->Set( tipC->Get() / rootC->Get() );
}
uptodate[TAPER_WSECT_DRIVER] = true;
}
else if( uptodate[SECSWEEP_WSECT_DRIVER] && uptodate[AR_WSECT_DRIVER] )
{
double tan1 = tan( sweep->Get() * DEG_2_RAD );
double tan2 = tan( secsw->Get() * DEG_2_RAD );
double coeff = AR->Get() * ( tan1 - tan2 ) / ( 2.0 * ( sweeploc->Get() - secswloc->Get() ) );
taper->Set( ( 1.0 + coeff ) / ( 1.0 - coeff ) );
uptodate[TAPER_WSECT_DRIVER] = true;
}
}
if( !uptodate[SECSWEEP_WSECT_DRIVER] )
{
if( uptodate[TAPER_WSECT_DRIVER] && uptodate[AR_WSECT_DRIVER] )
{
double tan2 = CalcTanSweepAt( secswloc->Get(), sweep->Get(), sweeploc->Get(), AR->Get(), taper->Get() );
secsw->Set( atan( tan2 ) * RAD_2_DEG );
uptodate[SECSWEEP_WSECT_DRIVER] = true;
}
else if( uptodate[ROOTC_WSECT_DRIVER] && uptodate[TIPC_WSECT_DRIVER] && uptodate[SPAN_WSECT_DRIVER] )
{
double tan1 = tan( sweep->Get() * DEG_2_RAD );
double tan2 = tan1 + ( rootC->Get() - tipC->Get() ) * ( sweeploc->Get() - secswloc->Get() ) / span->Get();
secsw->Set( atan( tan2 ) * RAD_2_DEG );
uptodate[SECSWEEP_WSECT_DRIVER] = true;
}
}
// Each pass through the loop should update at least one variable.
// With m_Nvar variables and m_Nchoice initially known, all should
// be updated in ( m_Nvar - m_Nchoice ) iterations. If not, we're
// in an infinite loop.
assert( niter < ( m_Nvar - m_Nchoice ) );
niter++;
}
}