Changeset 21945


Ignore:
Timestamp:
08/12/17 12:23:09 (8 years ago)
Author:
dlcheng
Message:

CHG: Updating model.js with esa and amr fields. Updating friction.js with coupling and effective_pressure handling.

Location:
issm/trunk-jpl/src/m
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/Makefile.am

    r21926 r21945  
    8383js_scripts =  ${ISSM_DIR}/src/m/array/arrayoperations.js \
    8484                                ${ISSM_DIR}/src/m/boundaryconditions/SetIceShelfBC.js \
     85                                ${ISSM_DIR}/src/m/classes/amr.js \
    8586                                ${ISSM_DIR}/src/m/classes/autodiff.js \
    8687                                ${ISSM_DIR}/src/m/classes/balancethickness.js \
  • issm/trunk-jpl/src/m/classes/friction.js

    r21065 r21945  
    1414                fielddisplay(this,'p','p exponent');
    1515                fielddisplay(this,'q','q exponent');
     16                fielddisplay(this,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure)  and 2 for coupled(not implemented yet)');
    1617        } // }}}
    17     this.extrude = function(md) {//{{{
    18         this.coefficient = project3d(md, 'vector', this.coefficient, 'type', 'node', 'layer', 1);
    19         this.p = project3d(md, 'vector', this.p, 'type', 'element');
    20         this.q = project3d(md, 'vector', this.q, 'type', 'element');
    21         return this;
    22     }//}}}
     18        this.extrude = function(md) {//{{{
     19                this.coefficient = project3d(md, 'vector', this.coefficient, 'type', 'node', 'layer', 1);
     20                this.p = project3d(md, 'vector', this.p, 'type', 'element');
     21                this.q = project3d(md, 'vector', this.q, 'type', 'element');
     22                switch (this.coupling) {
     23                        case 0:
     24                        case 1:
     25                                this.effective_pressure=project3d(md, 'vector', this.effective_pressure, 'type', 'node', 'layer', 1);
     26                                break;
     27                        case 2:
     28                                console.error('not implemented yet');
     29                                break;
     30                        default:       
     31                                console.error('not supported yet');
     32                }
     33                return this;
     34        }//}}}
    2335        this.classname= function (){// {{{
    2436                return "friction";
     
    3345                        md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements ,1]);
    3446                        md = checkfield(md,'fieldname','friction.p','NaN',1,'Inf',1,'size',[md.mesh.numberofelements ,1]);
     47                        md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0, 1, 2]);
     48                        switch (this.coupling) {
     49                                case 0:
     50                                case 1:
     51                                        md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
     52                                        break;
     53                                case 2:
     54                                        console.error('not implemented yet');
     55                                        break;
     56                                default:       
     57                                        console.error('not supported yet');
     58                        }
    3559
    3660                } // }}}
     
    4367                        WriteData(fid,prefix,'object',this,'fieldname','p','format','DoubleMat','mattype',2);
    4468                        WriteData(fid,prefix,'object',this,'fieldname','q','format','DoubleMat','mattype',2);
     69                        WriteData(fid,prefix,'class','friction','object',this,'fieldname','coupling','format','Integer');
     70                        switch (this.coupling) {
     71                                case 0:
     72                                case 1:
     73                                        WriteData(fid,prefix,'class','friction','object',this,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
     74                                        break;
     75                                case 2:
     76                                        console.error('not implemented yet');
     77                                        break;
     78                                default:
     79                                        console.error('not supported yet');             
     80                        }
    4581                       
    4682
     
    5389        this.p           = NaN;
    5490        this.q           = NaN;
     91        this.coupling    = 0;
     92        this.effective_pressure = NaN;
    5593        this.setdefaultparameters();
    5694        //}}}
  • issm/trunk-jpl/src/m/classes/model.js

    r21674 r21945  
    3838                        console.log(sprintf("//19s: //-22s -- //s","calving"         ,"[1x1 " + typeof(this.calving) + "]","parameters for calving"));
    3939                        console.log(sprintf("//19s: //-22s -- //s","gia"             ,"[1x1 " + typeof(this.gia) + "]","parameters for gia solution"));
     40                        console.log(sprintf("//19s: //-22s -- //s","esa"             ,"[1x1 " + typeof(this.esa) + "]","parameters for elastic adjustment solution"));
    4041                        console.log(sprintf("//19s: //-22s -- //s","autodiff"        ,"[1x1 " + typeof(this.autodiff) + "]","automatic differentiation parameters"));
    4142                        console.log(sprintf("//19s: //-22s -- //s","inversion"       ,"[1x1 " + typeof(this.inversion) + "]","parameters for inverse methods"));
     
    7778                        this.steadystate      = new steadystate();
    7879                        this.trans            = new trans();
    79                         this.levelset             = new levelset();
     80                        this.levelset         = new levelset();
    8081                        this.calving          = new calving();
    8182                        this.gia              = new giaivins();
     83                        this.esa              = new esa();
    8284                        this.autodiff         = new autodiff();
    8385                        this.inversion        = new inversion();
    8486                        this.qmu              = new qmu();
    85                         this.amr                                        = new amr();
     87                        this.amr              = new amr();
    8688                        this.radaroverlay     = new radaroverlay();
    8789                        this.results          = {};
     
    610612                this.calving          = 0;
    611613                this.gia              = 0;
     614                this.esa              = 0;
    612615
    613616                this.autodiff         = 0;
    614617                this.inversion        = 0;
    615618                this.qmu              = 0;
    616                 this.amr                                        = 0;
     619                this.amr              = 0;
    617620
    618621                this.results          = 0;
  • issm/trunk-jpl/src/m/classes/trans.js

    r21802 r21945  
    1515                this.isgroundingline   = 0;
    1616                this.isgia             = 0;
     17                this.isesa             = 0;
    1718                this.isdamageevolution = 0;
    1819                this.ismovingfront     = 0;
     
    3637                fielddisplay(this,'isgroundingline','indicates whether a groundingline migration is used in the transient');
    3738                fielddisplay(this,'isgia','indicates whether a postglacial rebound model is used in the transient');
     39                fielddisplay(this,'isesa','indicates whether an elastic adjustment model is used in the transient');
    3840                fielddisplay(this,'isdamageevolution','indicates whether damage evolution is used in the transient');
    3941                fielddisplay(this,'ismovingfront','indicates whether a moving front capability is used in the transient');
     
    6062                        checkfield(md,'fieldname','trans.isgroundingline','numel',[1],'values',[0, 1]);
    6163                        checkfield(md,'fieldname','trans.isgia','numel',[1],'values',[0, 1]);
     64                        checkfield(md,'fieldname','trans.isesa','numel',[1],'values',[0, 1]);
    6265                        checkfield(md,'fieldname','trans.isdamageevolution','numel',[1],'values',[0, 1]);
    6366                        checkfield(md,'fieldname','trans.ismovingfront','numel',[1],'values',[0, 1]);
     
    7780                        WriteData(fid,prefix,'object',this,'fieldname','isgroundingline','format','Boolean');
    7881                        WriteData(fid,prefix,'object',this,'fieldname','isgia','format','Boolean');
     82                        WriteData(fid,prefix,'object',this,'fieldname','isesa','format','Boolean');
    7983                        WriteData(fid,prefix,'object',this,'fieldname','isdamageevolution','format','Boolean');
    8084                        WriteData(fid,prefix,'object',this,'fieldname','ishydrology','format','Boolean');
     
    110114        this.isgroundingline   = 0;
    111115        this.isgia             = 0;
     116        this.isesa             = 0;
    112117        this.isdamageevolution = 0;
    113118        this.ismovingfront     = 0;
Note: See TracChangeset for help on using the changeset viewer.