Changeset 19369


Ignore:
Timestamp:
05/14/15 12:41:19 (10 years ago)
Author:
adhikari
Message:

functions related to SH formulation of PSL model removed

Location:
issm/trunk-jpl/src/m/psl
Files:
12 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/psl/p_polynomial_value.m

    r19341 r19369  
    104104
    105105  v = ones ( m, n + 1 );
    106   %v = zeros ( m, n + 1 );
    107 
    108 %  v(1:m,1) = 1.0;
    109106
    110107  if ( n < 1 )
     
    113110
    114111  v(1:m,2) = x;
    115   %v(1:m,2) = x(1:m,1);
    116112
    117113  for i = 2 : n
    118114 
    119     %v(1:m,i+1) = ( ( 2 * i - 1 ) * x(1:m,1) .* v(1:m,i)   ...
    120     %            -  (     i - 1 ) *             v(1:m,i-1) ) ...
    121115    v(:,i+1) = ( ( 2 * i - 1 ) * x .* v(:,i)   ...
    122                 -  (     i - 1 ) *             v(:,i-1) ) ...
     116                -  (     i - 1 ) *    v(:,i-1) ) ...
    123117                /  (     i     );
    124118 
    125119  end
    126120 
    127 %  return
    128 %end
  • issm/trunk-jpl/src/m/psl/sharmonics.m

    r19319 r19369  
    1818lon=lon*pi/180;
    1919
    20 disp(['Spherical harmonics of degree and orders up to ',num2str(lMax),' being computed...']);
     20%disp(['Spherical harmonics of degree and orders up to ',num2str(lMax),' being computed...']);
    2121%ortho-normalized SH
    2222for l=0:lMax
    23         plm = legendre(l,cos(lat),'norm');
     23   plm = legendre(l,cos(lat),'norm'); %nromalized Plm (see Matlab documents)
    2424   for m=-l:l
    25                 if(m<0)
    26                         sh(:,1+q)=(-1)^(abs(m))*2.*plm(abs(m)+1,:)'.*sin(abs(m).*lon);
    27       elseif(m==0)
    28          sh(:,1+q)=sqrt(2)*plm(abs(m)+1,:)';
    29       else
    30          sh(:,1+q)=(-1)^(abs(m))*2.*plm(abs(m)+1,:)'.*cos(abs(m).*lon);
    31       end
     25                sh(:,1+q)=(-1)^(abs(m)).*plm(abs(m)+1,:)'.*(cos(abs(m).*lon)*(m>=0)+sin(abs(m).*lon)*(m<0)).*sqrt((2-(m==0))/(2*pi)); %orthonormalized
    3226      q=q+1;
    3327   end
    3428   %disp(['Spherical Harmonics of degree ',num2str(l),' (of ',num2str(lMax),') computed!']);
    3529end
    36 disp(['... done!']);
     30%disp(['... done!']);
    3731
    3832
  • issm/trunk-jpl/src/m/psl/shlm.m

    r19323 r19369  
    2020for l=0:lMax
    2121   for m=-l:l
     22      %func0 = sh(:,1+p).*(func<1);
    2223      func0 = sh(:,1+p).*func;
    2324      sh_lm(1+p) = sum(mean(func0(index),2).*areas);
     
    2526   end
    2627end
    27 sh_lm = sh_lm/sum(areas);
    28 %sh_lm = sh_lm*4*pi/sum(areas);
     28%sh_lm = sh_lm/sum(areas);
     29sh_lm = sh_lm*4*pi/sum(areas);
    2930
     31
  • issm/trunk-jpl/src/m/psl/shlm_element.m

    r19342 r19369  
    1919for l=0:lMax
    2020   for m=-l:l
    21       %func0 = sh(:,1+p).*(func<1);
    2221      func0 = sh(:,1+p).*func;
    2322      sh_lm(1+p) = sum(func0.*areas);
     
    2524   end
    2625end
    27 %sh_lm = sh_lm/sum(areas);
    2826sh_lm = sh_lm*4*pi/sum(areas);
    2927
Note: See TracChangeset for help on using the changeset viewer.