Changeset 21945
- Timestamp:
- 08/12/17 12:23:09 (8 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/Makefile.am
r21926 r21945 83 83 js_scripts = ${ISSM_DIR}/src/m/array/arrayoperations.js \ 84 84 ${ISSM_DIR}/src/m/boundaryconditions/SetIceShelfBC.js \ 85 ${ISSM_DIR}/src/m/classes/amr.js \ 85 86 ${ISSM_DIR}/src/m/classes/autodiff.js \ 86 87 ${ISSM_DIR}/src/m/classes/balancethickness.js \ -
issm/trunk-jpl/src/m/classes/friction.js
r21065 r21945 14 14 fielddisplay(this,'p','p exponent'); 15 15 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)'); 16 17 } // }}} 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 }//}}} 23 35 this.classname= function (){// {{{ 24 36 return "friction"; … … 33 45 md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements ,1]); 34 46 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 } 35 59 36 60 } // }}} … … 43 67 WriteData(fid,prefix,'object',this,'fieldname','p','format','DoubleMat','mattype',2); 44 68 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 } 45 81 46 82 … … 53 89 this.p = NaN; 54 90 this.q = NaN; 91 this.coupling = 0; 92 this.effective_pressure = NaN; 55 93 this.setdefaultparameters(); 56 94 //}}} -
issm/trunk-jpl/src/m/classes/model.js
r21674 r21945 38 38 console.log(sprintf("//19s: //-22s -- //s","calving" ,"[1x1 " + typeof(this.calving) + "]","parameters for calving")); 39 39 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")); 40 41 console.log(sprintf("//19s: //-22s -- //s","autodiff" ,"[1x1 " + typeof(this.autodiff) + "]","automatic differentiation parameters")); 41 42 console.log(sprintf("//19s: //-22s -- //s","inversion" ,"[1x1 " + typeof(this.inversion) + "]","parameters for inverse methods")); … … 77 78 this.steadystate = new steadystate(); 78 79 this.trans = new trans(); 79 this.levelset 80 this.levelset = new levelset(); 80 81 this.calving = new calving(); 81 82 this.gia = new giaivins(); 83 this.esa = new esa(); 82 84 this.autodiff = new autodiff(); 83 85 this.inversion = new inversion(); 84 86 this.qmu = new qmu(); 85 this.amr 87 this.amr = new amr(); 86 88 this.radaroverlay = new radaroverlay(); 87 89 this.results = {}; … … 610 612 this.calving = 0; 611 613 this.gia = 0; 614 this.esa = 0; 612 615 613 616 this.autodiff = 0; 614 617 this.inversion = 0; 615 618 this.qmu = 0; 616 this.amr 619 this.amr = 0; 617 620 618 621 this.results = 0; -
issm/trunk-jpl/src/m/classes/trans.js
r21802 r21945 15 15 this.isgroundingline = 0; 16 16 this.isgia = 0; 17 this.isesa = 0; 17 18 this.isdamageevolution = 0; 18 19 this.ismovingfront = 0; … … 36 37 fielddisplay(this,'isgroundingline','indicates whether a groundingline migration is used in the transient'); 37 38 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'); 38 40 fielddisplay(this,'isdamageevolution','indicates whether damage evolution is used in the transient'); 39 41 fielddisplay(this,'ismovingfront','indicates whether a moving front capability is used in the transient'); … … 60 62 checkfield(md,'fieldname','trans.isgroundingline','numel',[1],'values',[0, 1]); 61 63 checkfield(md,'fieldname','trans.isgia','numel',[1],'values',[0, 1]); 64 checkfield(md,'fieldname','trans.isesa','numel',[1],'values',[0, 1]); 62 65 checkfield(md,'fieldname','trans.isdamageevolution','numel',[1],'values',[0, 1]); 63 66 checkfield(md,'fieldname','trans.ismovingfront','numel',[1],'values',[0, 1]); … … 77 80 WriteData(fid,prefix,'object',this,'fieldname','isgroundingline','format','Boolean'); 78 81 WriteData(fid,prefix,'object',this,'fieldname','isgia','format','Boolean'); 82 WriteData(fid,prefix,'object',this,'fieldname','isesa','format','Boolean'); 79 83 WriteData(fid,prefix,'object',this,'fieldname','isdamageevolution','format','Boolean'); 80 84 WriteData(fid,prefix,'object',this,'fieldname','ishydrology','format','Boolean'); … … 110 114 this.isgroundingline = 0; 111 115 this.isgia = 0; 116 this.isesa = 0; 112 117 this.isdamageevolution = 0; 113 118 this.ismovingfront = 0;
Note:
See TracChangeset
for help on using the changeset viewer.