Changeset 19760


Ignore:
Timestamp:
11/18/15 22:33:11 (9 years ago)
Author:
dlcheng
Message:

CHG: Adding plot_mesh capability for test101.html

Location:
issm/trunk-jpl/src/m/plot
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plot_manager.js

    r19741 r19760  
    8686                                break;
    8787                        case 'mesh':
    88                                 plot_mesh(md,options,nlines,ncols,i);
     88                                //plot_mesh(md,options,nlines,ncols,i);
     89                                plot_mesh(md.mesh.x,md.mesh.y,[0.0],md.mesh.elements,2,options,canvas,gl);
    8990                                break;
    9091                        case 'none':
     
    207208        }
    208209
    209         //process data and model
    210     var meshresults = processmesh(md,data,options);
    211         var x = meshresults[0];
    212         var y = meshresults[1];
    213         var z = meshresults[2];
    214         var elements = meshresults[3];
    215         var is2d = meshresults[4];
    216         var isplanet = meshresults[5];
    217 
    218         var dataresults = processdata(md,data,options);
    219         var data2 = dataresults[0];
    220         var datatype = dataresults[1];
    221 
    222         //plot unit
    223         plot_unit(x,y,z,elements,data2,is2d,isplanet,datatype,options,canvas,gl);
     210        if (typeof data !== 'string'){
     211                //process data and model
     212                var meshresults = processmesh(md,data,options);
     213                var x = meshresults[0];
     214                var y = meshresults[1];
     215                var z = meshresults[2];
     216                var elements = meshresults[3];
     217                var is2d = meshresults[4];
     218                var isplanet = meshresults[5];
     219               
     220                var dataresults = processdata(md,data,options);
     221                var data2 = dataresults[0];
     222                var datatype = dataresults[1];
     223
     224                //plot unit
     225                plot_unit(x,y,z,elements,data2,is2d,isplanet,datatype,options,canvas,gl);
     226        }
    224227
    225228        //apply all options
  • issm/trunk-jpl/src/m/plot/plot_unit.js

    r19745 r19760  
    4545        switch(datatype){
    4646
    47                 //element plot
     47                //element plot {{{
    4848                case 1:
    4949
     
    7272                        }
    7373                        break;
    74 
    75                         //node plot
     74                //}}}
     75                //node plot {{{
    7676                case 2:
    7777
     
    115115                        }
    116116                        break;
    117 
    118                         //quiver plot
     117                //}}}
     118                //quiver plot {{{
    119119                case 3:
    120120
     
    126126                        }
    127127
     128                //}}}
    128129                default:
    129                                 throw Error(sprintf("%s%i%s\n",'case ',datatype,' not supported'));
     130                        throw Error(sprintf("%s%i%s\n",'case ',datatype,' not supported'));
    130131        }
    131132       
Note: See TracChangeset for help on using the changeset viewer.