Changeset 20024


Ignore:
Timestamp:
01/29/16 17:16:33 (9 years ago)
Author:
Eric.Larour
Message:

CHG: default is now to precompute legendre polynomials.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/slr.m

    r20015 r20024  
    1616                eustatic         = 0;
    1717                legendre_precompute = 0;
    18                 legendre_coefficients = NaN;
    1918                store_green_functions = 0;
    2019        end
     
    4342               
    4443                %legendre coefficients:
    45                 self.legendre_precompute = 0;
    46                 self.legendre_coefficients = NaN;
     44                self.legendre_precompute = 1;
    4745
    4846                %optimization:
     
    6664                        end
    6765
    68                         %check that the legendre coefficients have indeed been computed if requested:
    69                         if self.legendre_precompute,
    70                                 md = checkfield(md,'fieldname','slr.legendre_coefficients','NaN',1,'Inf',1,'size',[NaN length(self.love_h)]);
    71                         end
    72 
    7366                end % }}}
    7467                function disp(self) % {{{
     
    8679                        fielddisplay(self,'store_green_functions','store green functions (default 1) to speed up solutoin (though memory intense)');
    8780                        fielddisplay(self,'legendre_precompute','precompute legendre coefficients? (default is 0)');
    88                         if(self.legendre_precompute)
    89                                 fielddisplay(self,'legendre_coefficients','precomputed legendre coefficients');
    90                         end
    9181
    9282                end % }}}
     
    10393                        WriteData(fid,'object',self,'class','sealevelrise','fieldname','store_green_functions','format','Boolean');
    10494                        WriteData(fid,'object',self,'class','sealevelrise','fieldname','legendre_precompute','format','Boolean');
    105                         if(self.legendre_precompute),
    106                                 WriteData(fid,'object',self,'class','sealevelrise','fieldname','legendre_coefficients','format','DoubleMat','mattype',1);
    107                         end
    10895                end % }}}
    10996                function savemodeljs(self,fid,modelname) % {{{
     
    119106                        writejsdouble(fid,[modelname '.slr.eustatic'],self.eustatic);
    120107                        writejsdouble(fid,[modelname '.slr.legendre_precompute'],self.legendre_precompute);
    121                         if self.legendre_precompute,
    122                                 writejs2Darray(fid,[modelname '.srl.legendre_coefficients'],self.legendre_coefficients);
    123                         end
    124108
    125109                end % }}}
Note: See TracChangeset for help on using the changeset viewer.