Changeset 20838


Ignore:
Timestamp:
07/01/16 11:55:41 (9 years ago)
Author:
ayfeng
Message:

FIX: model overwriting global mesh2d, shadowing constructor in tests following any call to md.extrude
FIX: project3d handling edge case inputs incorrectly
FIX: translate model.transient (matlab) -> model.trans (js)
FIX: friction class extrude variable assignments

Location:
issm/trunk-jpl
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/javascript/karma/karma.conf.js

    r20832 r20838  
    4242      'lib/bin/project3d.js',
    4343      'lib/bin/model.js',
    44       //'scripts/specs/temp.spec.js'
    45       'scripts/specs/issm-ajax.spec.js'
     44      //'scripts/specs/issm.spec.js'
     45      'scripts/specs/temp.spec.js'
    4646      //'scripts/specs/3.spec.js'
    4747    ],
     
    9292    // Continuous Integration mode
    9393    // if true, Karma captures browsers, runs the tests and exits
    94     singleRun: true,
     94    singleRun: false,
    9595
    9696    // Concurrency level
  • issm/trunk-jpl/jenkins/javascript/karma/scripts/test102.js

    r20767 r20838  
    22var md = new model();
    33
    4 console.log(md.results);
    54triangle(md,square[0],180000.);
     5
    66setmask(md,'all','');
    77parameterize(md);
     
    99md.extrude(md,3,2.);
    1010setflowequation(md,'SSA','all');
    11 console.log(md.results);
    1211//md.cluster=generic('name',oshostname(),'np',3);
    1312md=solve(md,StressbalanceSolutionEnum());
  • issm/trunk-jpl/jenkins/javascript/karma/scripts/test109.js

    r20767 r20838  
    77setflowequation(md,'SSA','all');
    88//md.cluster=generic('name',oshostname(),'np',3);
    9 md.transient.isstressbalance=0;
    10 md.transient.ismasstransport=0;
    11 md.transient.issmb=1;
    12 md.transient.isthermal=1;
    13 md.transient.isgroundingline=0;
     9md.trans.isstressbalance=0;
     10md.trans.ismasstransport=0;
     11md.trans.issmb=1;
     12md.trans.isthermal=1;
     13md.trans.isgroundingline=0;
    1414md=solve(md,TransientSolutionEnum());
    1515
  • issm/trunk-jpl/src/m/classes/flowequation.js

    r20807 r20838  
    3838
    3939        }// }}}
    40     this.extrude = function(md) {
     40    this.extrude = function(md) {//{{{
    4141        this.element_equation=project3d(md,'vector',this.element_equation,'type','element');
    4242        this.vertex_equation=project3d(md,'vector',this.vertex_equation,'type','node');
     
    4545        this.borderFS=project3d(md,'vector',this.borderFS,'type','node');
    4646        return this;
    47     }
     47    }//}}}
    4848                this.checkconsistency = function(md,solution,analyses) {//{{{
    4949
  • issm/trunk-jpl/src/m/classes/friction.js

    r20806 r20838  
    1616        } // }}}
    1717    this.extrude = function(md) {//{{{
    18         self.coefficient = project3d(md, 'vector', self.coefficient, 'type', 'node', 'layer', 1);
    19         self.p = project3d(md, 'vector', self.p, 'type', 'element');
    20         self.q = project3d(md, 'vector', self.q, 'type', 'element');
     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');
    2121        return this;
    2222    }//}}}
  • issm/trunk-jpl/src/m/classes/masstransport.js

    r20812 r20838  
    4141                return "masstransport";
    4242        }// }}}
    43     this.extrude = function(md) {
     43    this.extrude = function(md) {//{{{
    4444        this.spcthickness=project3d(md,'vector',this.spcthickness,'type','node');
    4545        return this;
    46     }
     46    }//}}}
    4747                this.checkconsistency = function (md,solution,analyses){  // {{{
    4848
  • issm/trunk-jpl/src/m/classes/matice.js

    r20817 r20838  
    8484
    8585                } // }}}
    86         this.extrude = function(md) {
     86        this.extrude = function(md) {//{{{
    8787            this.rheology_B=project3d(md,'vector',this.rheology_B,'type','node');
    8888            this.rheology_n=project3d(md,'vector',this.rheology_n,'type','element');
    8989            return this;
    90         }
     90        }//}}}
    9191                this.classname = function() {// {{{
    9292                        return "matice";
  • issm/trunk-jpl/src/m/classes/model.js

    r20825 r20838  
    152152                }).sort();
    153153
    154                 console.log("extrusionlist is " + extrusionlist) //@REMOVE
    155 
    156154                numlayers=extrusionlist.length;
    157155            } else if (argc==3) { //one polynomial law
     
    210208
    211209            //Initialize with the 2d mesh
    212             mesh2d = md.mesh;
     210            var mesh2d = md.mesh;
    213211            md.mesh=new mesh3dprisms();
    214212
  • issm/trunk-jpl/src/m/classes/qmu.js

    r20824 r20838  
    9191        }// }}}
    9292    this.extrude = function(md) {//{{{
    93         console.log("ORIGINAL");
    94         console.log(this.partition);
    95         console.log("TRANSPOSE");
    96         console.log(math.transpose(this.partition));
    9793        this.partition=project3d(md,'vector',math.transpose(this.partition),'type','node');
    9894        return this;
  • issm/trunk-jpl/src/m/extrusion/project3d.js

    r20832 r20838  
    4848    paddingvalue = options.getfieldvalue('padding',0);  //0 by default
    4949
    50     if (isNaN(vector2d) || vector2d.length === 1) { // NaN treated as length 1 in MATLAB
     50    if (isNaN(vector2d) || vector2d === 0 || vector2d.length === 1) { // NaN treated as length 1 in MATLAB
    5151        projected_vector=vector2d;
    5252    } else if (type.toLowerCase() === 'node') {
    5353
    5454        //Initialize 3d vector
    55         console.log(vector2d.length + " " + md.mesh.numberofvertices2d);
    5655        if (vector2d.length===md.mesh.numberofvertices2d) {
    5756                projected_vector=ones(md.mesh.numberofvertices,  vector2d[0].length).map(function(arr) { return arr.fill(paddingvalue); });
Note: See TracChangeset for help on using the changeset viewer.