Changeset 23475 for issm/trunk-jpl/src/m


Ignore:
Timestamp:
11/29/18 03:45:58 (7 years ago)
Author:
rueckamp
Message:

CHG: make friction coupling available for frictiontemp class

File:
1 edited

Legend:

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

    r21049 r23475  
    1010                p           = NaN;
    1111                q           = NaN;
     12                coupling    = 0;
     13                effective_pressure = NaN;
    1214        end
    1315        methods
     
    1618                        self.p=project3d(md,'vector',self.p,'type','element');
    1719                        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                                        error('not implemented yet');
     28                                otherwise
     29                                        error('not supported yet');
     30                        end
    1831                end % }}}
    1932                function self = frictiontemp(varargin) % {{{
     
    3144                        %By default gamma = 1;
    3245                        self.gamma = 1;
    33 
     46                        self.coupling = 0;
    3447
    3548                end % }}}
     
    5366                        fielddisplay(self,'p','p exponent');
    5467                        fielddisplay(self,'q','q exponent');
     68                        fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]');
     69                        fielddisplay(self,'coupling','Coupling flag 0: uniform sheet (negative pressure ok, default), 1: ice pressure only, 2: water pressure assuming uniform sheet (no negative pressure), 3: use provided effective_pressure, 4: used coupled model (not implemented yet)');
    5570                end % }}}
    5671                function marshall(self,prefix,md,fid) % {{{
     
    6176                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','p','format','DoubleMat','mattype',2);
    6277                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','q','format','DoubleMat','mattype',2);
     78                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','coupling','format','Integer');
     79                        switch self.coupling
     80                                case 0
     81                                case 1
     82                                case 2
     83                                case 3
     84                                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
     85                                case 4
     86                                        error('not implemented yet');
     87                                otherwise
     88                                        error('not supported yet');
     89                        end
    6390                end % }}}
    6491        end
Note: See TracChangeset for help on using the changeset viewer.