Changeset 19167


Ignore:
Timestamp:
02/27/15 08:31:27 (10 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed calvinglevermann with spc levelset

Location:
issm/trunk-jpl
Files:
5 edited

Legend:

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

    r19048 r19167  
    77        properties (SetAccess=public)
    88                stabilization = 0;
     9                spclevelset   = NaN;
    910                coeff         = NaN;
    1011                meltingrate   = NaN;
     
    3031                end % }}}
    3132                function self = extrude(self,md) % {{{
     33                        self.spclevelset=project3d(md,'vector',self.spclevelset,'type','node');
    3234                        self.coeff=project3d(md,'vector',self.coeff,'type','node');
    3335                        self.meltingrate=project3d(md,'vector',self.meltingrate,'type','node');
     
    4547                        if (solution~=TransientSolutionEnum() | md.transient.iscalving==0), return; end
    4648
     49                        md = checkfield(md,'fieldname','calving.spclevelset','timeseries',1);
    4750                        md = checkfield(md,'fieldname','calving.stabilization','values',[0 1 2]);
    4851                        md = checkfield(md,'fieldname','calving.coeff','>',0,'size',[md.mesh.numberofvertices 1]);
     
    5255                        disp(sprintf('   Calving Levermann parameters:'));
    5356                        fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: streamline upwinding');
     57                        fielddisplay(self,'spclevelset','Levelset constraints (NaN means no constraint)');
    5458                        fielddisplay(self,'coeff','proportionality coefficient in Levermann model');
    5559                        fielddisplay(self,'meltingrate','melting rate at given location [m/a]');
     
    6064                        WriteData(fid,'enum',CalvingLawEnum(),'data',CalvingLevermannEnum(),'format','Integer');
    6165                        WriteData(fid,'enum',LevelsetStabilizationEnum(),'data',self.stabilization,'format','Integer');
     66                        WriteData(fid,'enum',SpcLevelsetEnum(),'data',self.spclevelset,'format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
    6267                        WriteData(fid,'enum',CalvinglevermannCoeffEnum(),'data',self.coeff,'format','DoubleMat','mattype',1);
    6368                        WriteData(fid,'object',self,'fieldname','meltingrate','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'scale',1./yts);
  • issm/trunk-jpl/src/m/classes/calvinglevermann.py

    r19048 r19167  
    1414
    1515        def __init__(self): # {{{
     16
    1617                self.stabilization = 0
     18                self.spclevelset   = float('NaN')
    1719                self.coeff         = float('NaN')
    1820                self.meltingrate   = float('NaN')
     
    2426        def __repr__(self): # {{{
    2527                string='   Calving Levermann parameters:'
     28                string="%s\n%s"%(string,fielddisplay(self,'spclevelset','levelset constraints (NaN means no constraint)'))
    2629                string="%s\n%s"%(string,fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: streamline upwinding'))
    2730                string="%s\n%s"%(string,fielddisplay(self,'coeff','proportionality coefficient in Levermann model'))
     
    3134                #}}}
    3235        def extrude(self,md): # {{{
     36                self.spclevelset=project3d(md,'vector',self.spclevelset,'type','node')
    3337                self.coeff=project3d(md,'vector',self.coeff,'type','node')
    3438                self.meltingrate=project3d(md,'vector',self.meltingrate,'type','node')
     
    4953                        return md
    5054
     55                md = checkfield(md,'fieldname','calving.spclevelset','timeseries',1)
    5156                md = checkfield(md,'fieldname','calving.stabilization','values',[0,1,2]);
    5257                md = checkfield(md,'fieldname','calving.coeff','size',[md.mesh.numberofvertices],'>',0)
     
    5863                WriteData(fid,'enum',CalvingLawEnum(),'data',CalvingLevermannEnum(),'format','Integer');
    5964                WriteData(fid,'enum',LevelsetStabilizationEnum(),'data',self.stabilization,'format','Integer');
     65                WriteData(fid,'enum',SpcLevelsetEnum(),'data',self.spclevelset,'format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
    6066                WriteData(fid,'enum',CalvinglevermannCoeffEnum(),'data',self.coeff,'format','DoubleMat','mattype',1)
    6167                WriteData(fid,'object',self,'fieldname','meltingrate','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'scale',1./yts)
  • issm/trunk-jpl/test/NightlyRun/test806.m

    r19049 r19167  
    2828md.calving.coeff=4.89e13*ones(md.mesh.numberofvertices,1);
    2929md.calving.meltingrate=zeros(md.mesh.numberofvertices,1);
     30md.calving.spclevelset=NaN(md.mesh.numberofvertices,1);
    3031
    3132md.transient.requested_outputs={'default','StrainRateparallel','StrainRateperpendicular','Calvingratex','Calvingratey','CalvingCalvingrate'};
  • issm/trunk-jpl/test/NightlyRun/test806.py

    r19049 r19167  
    2727md.timestepping.final_time=30
    2828
    29 
    30 
    3129#Transient
    3230md.transient.isstressbalance=True
     
    4139md.calving.coeff=4.89e13*numpy.ones((md.mesh.numberofvertices,1))
    4240md.calving.meltingrate=numpy.zeros((md.mesh.numberofvertices,1))
     41md.calving.spclevelset=numpy.float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
    4342
    4443md.transient.requested_outputs=['default','StrainRateparallel','StrainRateperpendicular','Calvingratex','Calvingratey','CalvingCalvingrate']
  • issm/trunk-jpl/test/NightlyRun/test807.py

    r19158 r19167  
    2626md.timestepping.time_step=10
    2727md.timestepping.final_time=30
    28 
    29 
    3028
    3129#Transient
Note: See TracChangeset for help on using the changeset viewer.