Ignore:
Timestamp:
04/08/21 14:07:35 (4 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added possibility to couple with friciton schoof

File:
1 edited

Legend:

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

    r25688 r26187  
    66classdef friction
    77        properties (SetAccess=public)
    8                 coefficient = NaN;
    9                 p           = NaN;
    10                 q           = NaN;
    11                 coupling    = 0;
    12                 effective_pressure = NaN;
     8                coefficient              = NaN;
     9                p                        = NaN;
     10                q                        = NaN;
     11                coupling                 = 0;
     12                effective_pressure       = NaN;
    1313                effective_pressure_limit = 0;
    1414        end
     
    1818                        self.p=project3d(md,'vector',self.p,'type','element');
    1919                        self.q=project3d(md,'vector',self.q,'type','element');
    20                         switch self.coupling
    21                                 case 0
    22                                 case 1
    23                                 case 2
    24                                 case 3
    25                                         self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
    26                                 case 4
    27                                         self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
    28                                 otherwise
    29                                         error('not supported yet');             
     20                        if self.coupling==3 || self.coupling==4
     21                                self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
    3022                        end
    3123                end % }}}
     
    5749                        md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0:4]);
    5850                        md = checkfield(md,'fieldname','friction.effective_pressure_limit','numel',[1],'>=',0);
    59                         switch self.coupling
    60                                 case 0
    61                                 case 1
    62                                 case 2
    63                                 case 3
    64                                         md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
    65                                 case 4
    66                                
    67                                 otherwise
    68                                         error('not supported yet');
     51         if self.coupling==3
     52            md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
    6953                        end
    7054                end % }}}
     
    9276                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','coupling','format','Integer');
    9377                        WriteData(fid,prefix,'object',self,'class','friction','fieldname','effective_pressure_limit','format','Double');
    94                         switch self.coupling
    95                                 case 0
    96                                 case 1
    97                                 case 2
    98                                 case 3
    99                                         WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    100                                 case 4
    101                                         WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    102                                 otherwise
    103                                         error('not supported yet');             
     78                        if self.coupling==3 || self.coupling==4
     79                                WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    10480                        end
    10581                end % }}}
Note: See TracChangeset for help on using the changeset viewer.