Ignore:
Timestamp:
02/04/13 07:33:56 (12 years ago)
Author:
Eric.Larour
Message:

CHG: updated to new wrapper interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.cpp

    r13250 r14304  
    1414        bool*   elementonwater=NULL;
    1515        int*    elements=NULL;
    16         int*    connectivity=NULL;
    1716        int*    elementconnectivity=NULL;
    1817        int*    front=NULL;
     
    2019        bool    found;
    2120        int     numberofelements,numberofsegments;
    22         int     N,M;
    2321        int     i,j,ii,jj,id;
     22        int     dummy;
    2423
    2524        /*Boot module: */
    2625        MODULEBOOT();
    2726
    28         /*checks on arguments on the matlab side: */
    29         CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InternalFrontUsage);
     27        /*checks on arguments: */
     28        CHECKARGUMENTS(NLHS,NRHS,&InternalFrontUsage);
    3029
    31         /*Fetch required fields*/
    32         FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
    33         if(numberofelements<=0) _error_("No elements found in the model");
    34         FetchData(&elements,&M,&N,mxGetAssignedField(MODEL,0,"elements"));
    35         if(M!=numberofelements || N!=3) _error_("Field 'elements' should be of size [md.numberofelements 3]");
    36         FetchData(&elementonwater,&M,&N,mxGetAssignedField(MODEL,0,"elementonwater"));
    37         if(M!=numberofelements || N!=1) _error_("Field 'elementonwater' should be of size [md.numberofelements 1]");
    38         FetchData(&elementconnectivity,&M,&N,mxGetAssignedField(MODEL,0,"elementconnectivity"));
    39         if(M!=numberofelements || N!=3) _error_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
     30        /*Fetch inputs: */
     31        FetchData(&elements,&numberofelements,&dummy,ELEMENTS);
     32        FetchData(&elementonwater,&dummy,&dummy,ELEMENTONWATER);
     33        FetchData(&elementconnectivity,&dummy,&dummy,ELEMENTCONNECTIVITY);
    4034
    4135        /*Allocate and initialize all variables*/
Note: See TracChangeset for help on using the changeset viewer.