Changeset 20847


Ignore:
Timestamp:
07/03/16 13:18:10 (9 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixing ContourToMesh

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/modules/ContourToMesh.m

    r20845 r20847  
    2727%Call mex module
    2828[in_nod,in_elem] = ContourToMesh_matlab(index,x,y,contourname,interptype,edgevalue);
     29
     30switch(interptype)
     31        case 'element'
     32                varargout{1} = in_elem;
     33        case 'node'
     34                varargout{1} = in_nod;
     35        case 'node and element'
     36                varargout{1} = in_nod;
     37                varargout{2} = in_elem;
     38        otherwise
     39                error(['interpolation type ''' interptype ''' not supported yet']);
     40end
  • issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp

    r20491 r20847  
    7070
    7171        /* output: */
    72         if (strcmp(interptype,"node")==0){
    73                 WriteData(PLHS0,in_nod,nods);
    74                 WriteData(PLHS1);
    75         }
    76         else if (strcmp(interptype,"element")==0){
    77                 WriteData(PLHS0,in_elem,nel);
    78                 WriteData(PLHS1);
    79         }
    80         else if (strcmp(interptype,"element and node")==0){
    81                 WriteData(PLHS0,in_nod,nods);
    82                 WriteData(PLHS1,in_elem,nel);
    83         }
    84         else _error_("wrong interpolation type");
     72        WriteData(PLHS0,in_nod,nods);
     73        WriteData(PLHS1,in_elem,nel);
    8574
    8675        /*Clean up*/
Note: See TracChangeset for help on using the changeset viewer.