Changeset 20023
- Timestamp:
- 01/29/16 17:16:08 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r20018 r20023 3558 3558 /*recover legendre coefficients if they have been precomputed:*/ 3559 3559 this->parameters->FindParam(&legendre_precompute,SealevelriseLegendrePrecomputeEnum); 3560 if(legendre_precompute)this->parameters->FindParam(&legendre_coefficients,&M,NULL,SealevelriseLegendreCoefficientsEnum); 3560 if(legendre_precompute){ 3561 DoubleMatParam* parameter = static_cast<DoubleMatParam*>(this->parameters->FindParamObject(SealevelriseLegendreCoefficientsEnum)); _assert_(parameter); 3562 parameter->GetParameterValueByPointer(&legendre_coefficients,NULL,&M); 3563 } 3561 3564 3562 3565 /*how many dofs are we working with here? */ … … 3644 3647 G_elastic = (love_k[nl-1]-love_h[nl-1])/2.0/sin(alpha/2.0); 3645 3648 if(legendre_precompute){ 3646 for(int n=0;n<nl;n++) G_elastic += deltalove[n]*legendre_coefficients[reCast<int,IssmDouble>((M-1)*(cosalpha+1.0)/2.0)*nl+n]; 3649 int index=reCast<int,IssmDouble>((M-1)*(1-alpha/PI)); 3650 for(int n=0;n<nl;n++) G_elastic += deltalove[n]*legendre_coefficients[M*n + index]; 3647 3651 } 3648 3652 else{ … … 3804 3808 /*recover legendre coefficients if they have been precomputed:*/ 3805 3809 this->parameters->FindParam(&legendre_precompute,SealevelriseLegendrePrecomputeEnum); 3806 if(legendre_precompute)this->parameters->FindParam(&legendre_coefficients,&M,NULL,SealevelriseLegendreCoefficientsEnum); 3810 if(legendre_precompute){ 3811 DoubleMatParam* parameter = static_cast<DoubleMatParam*>(this->parameters->FindParamObject(SealevelriseLegendreCoefficientsEnum)); _assert_(parameter); 3812 parameter->GetParameterValueByPointer(&legendre_coefficients,NULL,&M); 3813 } 3807 3814 3808 3815 /*Speed up of love number comutation for elastic mode: */ … … 3845 3852 G_elastic[i] = (love_k[nl-1]-love_h[nl-1])/2.0/sin(alpha/2.0); 3846 3853 if(legendre_precompute){ 3847 for(int n=0;n<nl;n++) G_elastic[i] += deltalove[n]*legendre_coefficients[reCast<int,IssmDouble>((M-1)*(cosalpha+1.0)/2.0)*nl+n]; 3854 int index=reCast<int,IssmDouble>((M-1)*(1-alpha/PI)); 3855 for(int n=0;n<nl;n++) G_elastic[i] += deltalove[n]*legendre_coefficients[M*n + index]; 3848 3856 } 3849 3857 else{
Note:
See TracChangeset
for help on using the changeset viewer.