Tudat/Mathematics/BasicMathematics/sphericalHarmonics.cpp
//! Update maximum degree and order of cache
Update maximum degree and order of cache
Update maximum degree and order of cache
void SphericalHarmonicsCache::resetMaximumDegreeAndOrder( const int maximumDegree, const int maximumOrder )
{
    maximumDegree_ = maximumDegree;
    maximumOrder_ = maximumOrder;
    if( maximumOrder_ > maximumDegree_ )
    {
        maximumOrder_ = maximumDegree_;
    }
    legendreCache_->resetMaximumDegreeAndOrder( maximumDegree_, maximumOrder_ );
    sinesOfLongitude_.resize( maximumOrder_ + 1 );
    cosinesOfLongitude_.resize( maximumOrder_ + 1 );
    referenceRadiusRatioPowers_.resize( maximumDegree_ + 2 );
}
void SphericalHarmonicsCache :: resetMaximumDegreeAndOrder ( const int maximumDegree , const int maximumOrder ) { maximumDegree_ = maximumDegree ; maximumOrder_ = maximumOrder ; if ( maximumOrder_ > maximumDegree_ ) { maximumOrder_ = maximumDegree_ ; } legendreCache_ -> resetMaximumDegreeAndOrder ( maximumDegree_ , maximumOrder_ ) ; sinesOfLongitude_ . resize ( maximumOrder_ + 1 ) ; cosinesOfLongitude_ . resize ( maximumOrder_ + 1 ) ; referenceRadiusRatioPowers_ . resize ( maximumDegree_ + 2 ) ; }
Update maximum degree and order of cache
Update maximum degree and order of cache