Changeset 15614


Ignore:
Timestamp:
07/25/13 11:22:00 (12 years ago)
Author:
seroussi
Message:

CHG: removed md.diagnostic.icefront and added capability to recover old fronts

Location:
issm/trunk-jpl
Files:
2 added
1 deleted
18 edited
1 moved

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/matlab/install.sh

    r15336 r15614  
    11#!/bin/bash
    2 set -eu
    3 
    4 if [ ! -h install ];
    5 then
    6         echo "  ****************************************************************"
    7         echo "  *                                                              *"
    8         echo "  * you need create a symbolic link from matlab's root directory *"
    9         echo "  *                                                              *"
    10         echo "  * First, you need to locate matlab's root directory            *"
    11         echo "  * The easiest way to find it is to launch matlab and run the   *"
    12         echo "  * following command: matlabroot                                *"
    13         echo "  * Then, create a symbolic link using the command 'ln -s ' the  *"
    14         echo "  * target directory should be named 'install'                   *"
    15         echo "  *                                                              *"
    16         echo "  * Examples:                                                    *"
    17         echo "  *    ln -s /usr/local/matlab712/ install                       *"
    18         echo "  *    ln -s /Applications/MATLAB_R2012a.app/ install            *"
    19         echo "  *                                                              *"
    20         echo "  * run ./install.sh again to check that the link is correct     *"
    21         echo "  *                                                              *"
    22         echo "  ****************************************************************"
    23 else
    24 
    25         #Read link
    26         DIR=$(readlink install)
    27         if [ -d $DIR ]
    28         then
    29                 echo "Symbolic link correctly set"
    30         else
    31                 rm -rf install
    32                 echo "Incorrect symbolic link:"
    33                 echo "provided target ($DIR) does not exist or is not a directory"
    34         fi
    35 fi
     2rm -rf install
     3ln -s /usr/local/matlab80/ install
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.m

    r14529 r15614  
    2727end
    2828
    29 %segment on neumann (Ice Front) -> none
    30 if (md.mesh.dimension==2)
    31         md.diagnostic.icefront=zeros(0,4);
    32 else
    33         md.diagnostic.icefront=zeros(0,6);
    34 end
     29%No ice front: do nothing
    3530
    3631%Create zeros basal melting rate and surface mass balance if not specified
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.py

    r14529 r15614  
    3232                print "      boundary conditions for diagnostic model: spc set as zero"
    3333
    34         #segment on neumann (Ice Front) -> none
    35         if md.mesh.dimension==2:
    36                 md.diagnostic.icefront=numpy.zeros((0,4))
    37         else:
    38                 md.diagnostic.icefront=numpy.zeros((0,6))
     34        #No ice front -> do nothing
    3935
    4036        #Create zeros basal melting rate and surface mass balance if not specified
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.m

    r15595 r15614  
    4646end
    4747
    48 %segment on Ice Front
    49 %segment on Neumann (Ice Front)
    50 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2)));
    51 if (md.mesh.dimension==2)
    52         pressureload=md.mesh.segments(pos,:);
    53 elseif md.mesh.dimension==3
    54         pressureload_layer1=[md.mesh.segments(pos,1:2)  md.mesh.segments(pos,2)+md.mesh.numberofvertices2d  md.mesh.segments(pos,1)+md.mesh.numberofvertices2d  md.mesh.segments(pos,3)];
    55         pressureload=[];
    56         for i=1:md.mesh.numberoflayers-1,
    57                 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ];
    58         end
    59 end
    60 
    61 %Add water or air enum depending on the element
    62 pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))];
    63 
    64 %plug onto model
    65 md.diagnostic.icefront=pressureload;
     48%Ice front position
    6649md.mask.icelevelset(find(nodeonicefront))=0;
    6750
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py

    r15595 r15614  
    5454                print "      boundary conditions for diagnostic model: spc set as zero"
    5555
    56         #segment on Ice Front
    57         #segment on Neumann (Ice Front)
    58 #       pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2)));
    59         pos=numpy.nonzero(numpy.logical_or(nodeonicefront[md.mesh.segments[:,0]-1],nodeonicefront[md.mesh.segments[:,1]-1]))[0]
    60         if   md.mesh.dimension==2:
    61                 pressureload=md.mesh.segments[pos,:]
    62         elif md.mesh.dimension==3:
    63 #               pressureload_layer1=[md.mesh.segments(pos,1:2)  md.mesh.segments(pos,2)+md.mesh.numberofvertices2d  md.mesh.segments(pos,1)+md.mesh.numberofvertices2d  md.mesh.segments(pos,3)];
    64                 pressureload_layer1=numpy.hstack((md.mesh.segments[pos,0:2],md.mesh.segments[pos,1]+md.mesh.numberofvertices2d,md.mesh.segments[pos,0]+md.mesh.numberofvertices2d,md.mesh.segments[pos,2]))
    65                 pressureload=numpy.zeros((0,5),int)
    66                 for i in xrange(1,md.mesh.numberoflayers):
    67 #                       pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ];
    68                         pressureload=numpy.vstack((pressureload,numpy.hstack((pressureload_layer1[:,0:4]+(i-1)*md.mesh.numberofvertices2d,pressureload_layer1[:,4]+(i-1)*md.mesh.numberofelements2d))))
    69 
    70         #Add water or air enum depending on the element
    71 #       pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))];
    72         pressureload=numpy.hstack((pressureload,1*md.mask.elementonfloatingice[pressureload[:,-1]-1].reshape(-1,1)))
    73 
    74         #plug onto model
    75         md.diagnostic.icefront=pressureload
     56        #Icefront position
    7657        pos=numpy.nonzero(nodeonicefront)[0]
    7758        md.mask.icelevelset[pos]=0
  • issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m

    r15595 r15614  
    5757md.hydrology.spcwatercolumn(pos,1)=1;
    5858
    59 %segment on Neumann (Ice Front)
    60 pos=find(vertexonicefront(md.mesh.segments(:,1)) | vertexonicefront(md.mesh.segments(:,2)));
    61 if (md.mesh.dimension==2)
    62         pressureload=md.mesh.segments(pos,:);
    63 elseif md.mesh.dimension==3
    64         pressureload_layer1=[md.mesh.segments(pos,1:2)  md.mesh.segments(pos,2)+md.mesh.numberofvertices2d  md.mesh.segments(pos,1)+md.mesh.numberofvertices2d  md.mesh.segments(pos,3)];
    65         pressureload=[];
    66         for i=1:md.mesh.numberoflayers-1,
    67                 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ];
    68         end
    69 end
    70 
    71 %Add water or air enum depending on the element
    72 pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))+ 0*md.mask.elementongroundedice(pressureload(:,end))];
    73 
    74 %plug onto model
    75 md.diagnostic.icefront=pressureload;
     59%Position of ice front
    7660md.mask.icelevelset(find(vertexonicefront))=0;
    7761
  • issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py

    r15595 r15614  
    6161        md.hydrology.spcwatercolumn[pos,0]=1
    6262
    63         #segment on Neumann (Ice Front)
    64 #       pos=find(vertexonicefront(md.mesh.segments(:,1)) | vertexonicefront(md.mesh.segments(:,2)));
    65         pos=numpy.nonzero(numpy.logical_or(vertexonicefront[md.mesh.segments[:,0]-1],vertexonicefront[md.mesh.segments[:,1]-1]))[0]
    66         if   md.mesh.dimension==2:
    67                 pressureload=md.mesh.segments[pos,:]
    68         elif md.mesh.dimension==3:
    69 #               pressureload_layer1=[md.mesh.segments(pos,1:2)  md.mesh.segments(pos,2)+md.mesh.numberofvertices2d  md.mesh.segments(pos,1)+md.mesh.numberofvertices2d  md.mesh.segments(pos,3)];
    70                 pressureload_layer1=numpy.hstack((md.mesh.segments[pos,0:2],md.mesh.segments[pos,1]+md.mesh.numberofvertices2d,md.mesh.segments[pos,0]+md.mesh.numberofvertices2d,md.mesh.segments[pos,2]))
    71                 pressureload=numpy.zeros((0,5),int)
    72                 for i in xrange(1,md.mesh.numberoflayers):
    73 #                       pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ];
    74                         pressureload=numpy.vstack((pressureload,numpy.hstack((pressureload_layer1[:,0:4]+(i-1)*md.mesh.numberofvertices2d,pressureload_layer1[:,4]+(i-1)*md.mesh.numberofelements2d))))
    75 
    76         #Add water or air enum depending on the element
    77 #       pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))+ 0*md.mask.elementongroundedice(pressureload(:,end))];
    78         pressureload=numpy.hstack((pressureload,1*md.mask.elementonfloatingice[pressureload[:,-1]-1].reshape(-1,1)+0*md.mask.elementongroundedice[pressureload[:,-1]-1].reshape(-1,1)))
    79 
    80         #plug onto model
    81         md.diagnostic.icefront=pressureload
     63        #Position of ice front
    8264        pos=numpy.nonzero(vertexonicefront)[0]
    8365        md.mask.icelevelset[pos]=0
  • issm/trunk-jpl/src/m/classes/model/model.m

    r15595 r15614  
    9191                                disp('Recovering old hydrology class');
    9292                                md.hydrology=hydrologyshreve(md.materials);
     93                        end
     94                        %2013 Juli 25th
     95                        if isa(md.diagnostic,'diagnostic'),
     96                                disp('Recovering old stressbalance class');
     97                                icefront = md.diagnostic.icefront;
     98                                md.diagnostic=stressbalance(md.diagnostic);
     99
     100                                %Deal with front
     101                                md.mask.icelevelset=ones(md.mesh.numberofvertices,1);
     102                                md.mask.icelevelset(icefront(:,1:end-2))=0;
    93103                        end
    94104
     
    184194                        md.prognostic.spcthickness=project2d(md,md.prognostic.spcthickness,md.mesh.numberoflayers);
    185195                        md.thermal.spctemperature=project2d(md,md.thermal.spctemperature,md.mesh.numberoflayers);
    186 
    187                         %Extrusion of Neumann BC
    188                         if ~isnan(md.diagnostic.icefront),
    189                                 numberofneumann2d=size(md.diagnostic.icefront,1)/(md.mesh.numberoflayers-1);
    190                                 md.diagnostic.icefront=[md.diagnostic.icefront(1:numberofneumann2d,1:2) md.diagnostic.icefront(1:numberofneumann2d,5:6)]; %Add two columns on the first layer
    191                         end
    192196
    193197                        %materials
     
    499503                        end
    500504
    501                         %Diagnostic
    502                         if ~isnan(md2.diagnostic.icefront)
    503                                 md2.diagnostic.icefront(:,1)=Pnode(md1.diagnostic.icefront(:,1));
    504                                 md2.diagnostic.icefront(:,2)=Pnode(md1.diagnostic.icefront(:,2));
    505                                 md2.diagnostic.icefront(:,end-1)=Pelem(md1.diagnostic.icefront(:,end-1));
    506                                 if md1.mesh.dimension==3
    507                                         md2.diagnostic.icefront(:,3)=Pnode(md1.diagnostic.icefront(:,3));
    508                                         md2.diagnostic.icefront(:,4)=Pnode(md1.diagnostic.icefront(:,4));
    509                                 end
    510                                 md2.diagnostic.icefront=md2.diagnostic.icefront(find(md2.diagnostic.icefront(:,1) & md2.diagnostic.icefront(:,2) & md2.diagnostic.icefront(:,end)),:);
    511                         end
    512 
    513505                        %Results fields
    514506                        if isstruct(md1.results),
     
    732724                        md.diagnostic.referential=project3d(md,'vector',md.diagnostic.referential,'type','node');
    733725                        md.diagnostic.loadingforce=project3d(md,'vector',md.diagnostic.loadingforce,'type','node');
    734 
    735                         %in 3d, pressureload: [node1 node2 node3 node4 element]
    736                         pressureload_layer1=[md.diagnostic.icefront(:,1:2)  md.diagnostic.icefront(:,2)+md.mesh.numberofvertices2d  md.diagnostic.icefront(:,1)+md.mesh.numberofvertices2d  md.diagnostic.icefront(:,3:4)]; %Add two columns on the first layer
    737                         pressureload=[];
    738                         for i=1:numlayers-1,
    739                                 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d pressureload_layer1(:,6)];
    740                         end
    741                         md.diagnostic.icefront=pressureload;
    742726
    743727                        %connectivity
     
    10991083                        md.cluster          = generic();
    11001084                        md.balancethickness = balancethickness();
    1101                         md.diagnostic       = diagnostic();
     1085                        md.diagnostic       = stressbalance();
    11021086                        md.hydrology        = hydrologyshreve();
    11031087                        md.prognostic       = prognostic();
  • issm/trunk-jpl/src/m/classes/model/model.py

    r15603 r15614  
    7272
    7373                self.balancethickness = balancethickness()
    74                 self.diagnostic       = diagnostic()
     74                self.diagnostic       = stressbalance()
    7575                self.groundingline    = groundingline()
    7676                self.hydrology        = hydrologyshreve()
     
    392392                        md2.thermal.spctemperature[nodestoflag2,0]=1
    393393
    394                 #Diagnostic
    395                 if numpy.any(numpy.logical_not(numpy.isnan(md2.diagnostic.icefront))):
    396                         md2.diagnostic.icefront[:,0]=Pnode[md1.diagnostic.icefront[:,0].astype(int)-1]
    397                         md2.diagnostic.icefront[:,1]=Pnode[md1.diagnostic.icefront[:,1].astype(int)-1]
    398                         md2.diagnostic.icefront[:,-2]=Pelem[md1.diagnostic.icefront[:,-2].astype(int)-1]
    399                         if md1.mesh.dimension==3:
    400                                 md2.diagnostic.icefront[:,2]=Pnode[md1.diagnostic.icefront[:,2].astype(int)-1]
    401                                 md2.diagnostic.icefront[:,3]=Pnode[md1.diagnostic.icefront[:,3].astype(int)-1]
    402                         md2.diagnostic.icefront=md2.diagnostic.icefront[numpy.nonzero(logical_and_n(md2.diagnostic.icefront[:,0],md2.diagnostic.icefront[:,1],md2.diagnostic.icefront[:,-1]))[0],:]
    403 
    404394                #Results fields
    405395                if md1.results:
     
    627617                md.diagnostic.loadingforce=project3d(md,'vector',md.diagnostic.loadingforce,'type','node')
    628618
    629                 #in 3d, pressureload: [node1 node2 node3 node4 element]
    630                 pressureload_layer1=numpy.hstack((md.diagnostic.icefront[:,0:2],md.diagnostic.icefront[:,1:2]+md.mesh.numberofvertices2d,md.diagnostic.icefront[:,0:1]+md.mesh.numberofvertices2d,md.diagnostic.icefront[:,2:4]))    #Add two columns on the first layer
    631                 pressureload=numpy.empty((0,6),int)
    632                 for i in xrange(numlayers-1):
    633                         pressureload=numpy.vstack((pressureload,numpy.hstack((pressureload_layer1[:,0:4]+i*md.mesh.numberofvertices2d,pressureload_layer1[:,4:5]+i*md.mesh.numberofelements2d,pressureload_layer1[:,5:6]))))
    634                 md.diagnostic.icefront=pressureload
    635 
    636619                #connectivity
    637620                md.mesh.elementconnectivity=numpy.tile(md.mesh.elementconnectivity,(numlayers-1,1))
  • issm/trunk-jpl/src/m/classes/stressbalance.py

    r15612 r15614  
    77from WriteData import *
    88
    9 class diagnostic(object):
     9class stressbalance(object):
    1010        """
    11         DIAGNOSTIC class definition
     11        STRESSBALANCE class definition
    1212
    1313           Usage:
    14               diagnostic=diagnostic();
     14              stressbalance=stressbalance();
    1515        """
    1616
     
    4242        def __repr__(self): # {{{
    4343               
    44                 string='   Diagnostic solution parameters:'
     44                string='   StressBalance solution parameters:'
    4545                string="%s\n%s"%(string,'      Convergence criteria:')
    4646                string="%s\n%s"%(string,fielddisplay(self,'restol','mechanical equilibrium residual convergence criterion'))
     
    9090
    9191                #coefficient to update the viscosity between each iteration of
    92                 #a diagnostic according to the following formula
     92                #a stressbalance according to the following formula
    9393                #viscosity(n)=viscosity(n)+viscosity_overshoot(viscosity(n)-viscosity(n-1))
    9494                self.viscosity_overshoot=0
     
    109109                if DiagnosticHorizAnalysisEnum() not in analyses:
    110110                        return md
    111                 #if (DiagnosticHorizAnalysisEnum() not in analyses) | (solution==TransientSolutionEnum() and not md.transient.isdiagnostic):
    112                 #       return md
    113111
    114112                md = checkfield(md,'diagnostic.spcvx','forcing',1)
     
    161159        # }}}
    162160        def marshall(self,md,fid):    # {{{
    163                 WriteData(fid,'object',self,'fieldname','spcvx','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1)
    164                 WriteData(fid,'object',self,'fieldname','spcvy','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1)
    165                 WriteData(fid,'object',self,'fieldname','spcvz','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1)
    166                 WriteData(fid,'object',self,'fieldname','restol','format','Double')
    167                 WriteData(fid,'object',self,'fieldname','reltol','format','Double')
    168                 WriteData(fid,'object',self,'fieldname','abstol','format','Double')
    169                 WriteData(fid,'object',self,'fieldname','isnewton','format','Integer')
    170                 WriteData(fid,'object',self,'fieldname','FSreconditioning','format','Double')
    171                 WriteData(fid,'object',self,'fieldname','viscosity_overshoot','format','Double')
    172                 WriteData(fid,'object',self,'fieldname','maxiter','format','Integer')
    173                 WriteData(fid,'object',self,'fieldname','shelf_dampening','format','Integer')
    174                 WriteData(fid,'object',self,'fieldname','vertex_pairing','format','DoubleMat','mattype',3)
    175                 WriteData(fid,'object',self,'fieldname','penalty_factor','format','Double')
    176                 WriteData(fid,'object',self,'fieldname','rift_penalty_lock','format','Integer')
    177                 WriteData(fid,'object',self,'fieldname','rift_penalty_threshold','format','Integer')
    178                 WriteData(fid,'object',self,'fieldname','referential','format','DoubleMat','mattype',1)
     161                WriteData(fid,'object',self,'class','diagnostic','fieldname','spcvx','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1)
     162                WriteData(fid,'object',self,'class','diagnostic','fieldname','spcvy','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1)
     163                WriteData(fid,'object',self,'class','diagnostic','fieldname','spcvz','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1)
     164                WriteData(fid,'object',self,'class','diagnostic','fieldname','restol','format','Double')
     165                WriteData(fid,'object',self,'class','diagnostic','fieldname','reltol','format','Double')
     166                WriteData(fid,'object',self,'class','diagnostic','fieldname','abstol','format','Double')
     167                WriteData(fid,'object',self,'class','diagnostic','fieldname','isnewton','format','Integer')
     168                WriteData(fid,'object',self,'class','diagnostic','fieldname','FSreconditioning','format','Double')
     169                WriteData(fid,'object',self,'class','diagnostic','fieldname','viscosity_overshoot','format','Double')
     170                WriteData(fid,'object',self,'class','diagnostic','fieldname','maxiter','format','Integer')
     171                WriteData(fid,'object',self,'class','diagnostic','fieldname','shelf_dampening','format','Integer')
     172                WriteData(fid,'object',self,'class','diagnostic','fieldname','vertex_pairing','format','DoubleMat','mattype',3)
     173                WriteData(fid,'object',self,'class','diagnostic','fieldname','penalty_factor','format','Double')
     174                WriteData(fid,'object',self,'class','diagnostic','fieldname','rift_penalty_lock','format','Integer')
     175                WriteData(fid,'object',self,'class','diagnostic','fieldname','rift_penalty_threshold','format','Integer')
     176                WriteData(fid,'object',self,'class','diagnostic','fieldname','referential','format','DoubleMat','mattype',1)
     177                WriteData(fid,'object',self,'class','diagnostic','fieldname','requested_outputs','format','DoubleMat','mattype',3)
    179178                WriteData(fid,'data',self.loadingforce[:,0],'format','DoubleMat','mattype',1,'enum',LoadingforceXEnum())
    180179                WriteData(fid,'data',self.loadingforce[:,1],'format','DoubleMat','mattype',1,'enum',LoadingforceYEnum())
    181180                WriteData(fid,'data',self.loadingforce[:,2],'format','DoubleMat','mattype',1,'enum',LoadingforceZEnum())
    182                 WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3)
    183 
    184                 #marshall ice front
    185                 data=copy.deepcopy(self.icefront)
    186                 data[numpy.nonzero(data[:,-1]==0),-1]=AirEnum()
    187                 data[numpy.nonzero(data[:,-1]==1),-1]=WaterEnum()
    188                 data[numpy.nonzero(data[:,-1]==2),-1]=IceEnum()
    189                 WriteData(fid,'data',data,'enum',DiagnosticIcefrontEnum(),'format','DoubleMat','mattype',3)
    190181        # }}}
  • issm/trunk-jpl/src/m/consistency/checkfield.m

    r12960 r15614  
    2323%   Example:
    2424%      md = checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]);
    25 %      md = checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);
    26 %      md = checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);
    2725
    2826%get options
  • issm/trunk-jpl/src/m/consistency/checkfield.py

    r13984 r15614  
    2929           Example:
    3030              md = checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]);
    31               md = checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);
    32               md = checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);
    3331        """
    3432
  • issm/trunk-jpl/test/NightlyRun/test201.m

    r15565 r15614  
    55md.cluster=generic('name',oshostname(),'np',3);
    66md.verbose=verbose('all');
     7md.mask.icelevelset(find(md.mask.icelevelset==0))=-1;
     8
    79md=solve(md,DiagnosticSolutionEnum());
    810
  • issm/trunk-jpl/test/NightlyRun/test217.m

    r15565 r15614  
    5454nodeonicefront=zeros(md.mesh.numberofvertices,1);
    5555pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
    56 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
    57 diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
    58 md.diagnostic.icefront=diagnostic.icefront;
     56md.mask.icelevelset=1-nodeonicefront;
    5957
    6058md=solve(md,DiagnosticSolutionEnum());
  • issm/trunk-jpl/test/NightlyRun/test217.py

    r15565 r15614  
    6666pos=numpy.nonzero(md.mesh.y==ymax)
    6767nodeonicefront[pos]=1
    68 pos=numpy.nonzero(numpy.logical_or(nodeonicefront[md.mesh.segments[:,0].astype(int)-1],nodeonicefront[md.mesh.segments[:,1].astype(int)-1]))[0]
    69 diagnostic.icefront=md.mesh.segments[pos,:]
    70 diagnostic.icefront=numpy.hstack((diagnostic.icefront,1.*md.mask.elementonfloatingice[diagnostic.icefront[:,-1].astype(int)-1].reshape(-1,1)))
    71 md.diagnostic.icefront=diagnostic.icefront
     68md.mask.icelevelset=1-nodeonicefront
    7269
    7370md=solve(md,DiagnosticSolutionEnum())
  • issm/trunk-jpl/test/Par/Pig.par

    r15552 r15614  
    4747%Boundary conditions:
    4848md=SetMarineIceSheetBC(md);
    49 md.diagnostic.icefront(:,end)=1;
    5049
    5150%Change name so that no test have the same name
  • issm/trunk-jpl/test/Par/Pig.py

    r15555 r15614  
    5858#Boundary conditions:
    5959md=SetMarineIceSheetBC(md)
    60 md.diagnostic.icefront[:,-1]=1
    6160
    6261#Change name so that no test have the same name
  • issm/trunk-jpl/test/Par/RoundSheetShelf.par

    r15610 r15614  
    101101md.diagnostic.spcvy(pos)=0;
    102102
    103 pressureload=md.mesh.segments;
    104 pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end)) + 0*md.mask.elementongroundedice(pressureload(:,end))];
    105 md.diagnostic.icefront=pressureload;
    106103md.mask.icelevelset(find(md.mesh.vertexonboundary))=0;
    107104md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
  • issm/trunk-jpl/test/Par/RoundSheetShelf.py

    r15610 r15614  
    110110md.diagnostic.spcvy[pos]=0
    111111
    112 pressureload=copy.deepcopy(md.mesh.segments)
    113 pressureload=numpy.hstack((pressureload,(1*md.mask.elementonfloatingice[pressureload[:,-1].astype(int)-1] + 0*md.mask.elementongroundedice[pressureload[:,-1].astype(int)-1]).reshape(-1,1)))
    114 md.diagnostic.icefront=pressureload
    115112pos=numpy.nonzero(md.mesh.vertexonboundary)
    116113md.mask.icelevelset[pos]=0
Note: See TracChangeset for help on using the changeset viewer.