Changeset 20843


Ignore:
Timestamp:
07/01/16 22:19:24 (9 years ago)
Author:
ayfeng
Message:

FIX: mesh3dprisms not having marshall defined within the class,
support folding for mesh3dprisms

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

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

    r20806 r20843  
    6565    }//}}}
    6666        //properties
     67    // {{{
    6768        this.mass_balance = NaN;
    6869        this.requested_outputs      = [];
    6970        this.setdefaultparameters();
     71    // }}}
    7072}
  • issm/trunk-jpl/src/m/classes/mesh3dprisms.js

    r20832 r20843  
    55
    66function mesh3dprisms() {
    7                 this.setdefaultparameters = function() { // [[[)
     7                this.setdefaultparameters = function() { //{{{
    88
    99                        //the connectivity is the averaged number of nodes linked to a
     
    1313                        //trunk/test/Miscellaneous/runme.m
    1414                        this.average_vertex_connectivity=25;
    15                 } // ]]]
     15                } // }}}
    1616
    17                 this.checkconsistency = function(md,solution,analyses) { // [[[)
     17                this.checkconsistency = function(md,solution,analyses) { // {{{
    1818
    1919                        checkfield(md,'fieldname','mesh.x','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices, 1]);
     
    3535                        checkfield(md,'fieldname','mesh.z','<=',md.geometry.surface+Math.pow(10, -10),'message','\'mesh.z\' higher than surface elevation');
    3636                        checkfield(md,'fieldname','mesh.average_vertex_connectivity','>=',24,'message','\'mesh.average_vertex_connectivity\' should be at least 24 in 3d');
    37                 } // ]]]
    38                 function disp() { // [[[
     37                } // }}}
     38                this.disp = function() { // {{{
    3939                        console.log(sprintf('   3D prism Mesh:'));
    4040
     
    7676                        fielddisplay(this,'long','vertices longitude [degrees]');
    7777                        fielddisplay(this,'epsg','EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)');
    78                 } // ]]]
    79                 function marshall(md,prefix,fid) { // [[[
     78                } // }}}
     79                this.marshall = function(md,prefix,fid) { // {{{
    8080                        WriteData(fid,prefix,'enum',DomainTypeEnum(),'data',StringToEnum(['Domain' + this.domaintype()]),'format','Integer');
    8181                        WriteData(fid,prefix,'enum',DomainDimensionEnum(),'data',this.dimension(),'format','Integer');
     
    9696                        WriteData(fid,prefix,'object',this,'class','mesh','fieldname','numberofvertices2d','format','Integer');
    9797                        WriteData(fid,prefix,'object',this,'class','mesh','fieldname','numberofelements2d','format','Integer');
    98                 } // ]]]
     98                } // }}}
    9999        this.fix=function() { //{{{
    100100            //Transform objects into Float64Arrays:
     
    111111            this.long=NaNFix(this.long,NaN);
    112112        }//}}}
    113                 this.domaintype = function() { // [[[)
     113                this.domaintype = function() { // {{{
    114114                        return '3D';
    115                 } // ]]]
    116                 this.dimension = function() { // [[[)
     115                } // }}}
     116                this.dimension = function() { // {{{
    117117                        return 3;
    118                 } // ]]]
    119                 this.elementtype = function() { // [[[)
     118                } // }}}
     119                this.elementtype = function() { // {{{
    120120                        return 'Penta';
    121                 } // ]]]
     121                } // }}}
    122122        this.classname = function () { //{{{
    123123            return "mesh3dprisms";
    124124        } //}}}
    125125
    126         //properties (SetAccess=public)
     126        //properties
     127        //{{{
    127128        this.x                           = NaN;
    128129        this.y                           = NaN;
     
    157158        this.extractedvertices           = NaN;
    158159        this.extractedelements           = NaN;
     160        //}}}
    159161}
Note: See TracChangeset for help on using the changeset viewer.