Changeset 4981


Ignore:
Timestamp:
08/04/10 12:15:15 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp

    r3332 r4981  
    88        /*input: */
    99        double* index=NULL;
     10        int     index_cols;
    1011
    1112        double* x_data=NULL;
     
    4445        /*Input datasets: */
    4546        if (verbose) printf("Fetching inputs\n");
    46         FetchData(&index,&nels_data,NULL,INDEXHANDLE);
     47        FetchData(&index,&nels_data,&index_cols,INDEXHANDLE);
    4748        FetchData(&x_data,&x_data_rows,NULL,XHANDLE);
    4849        FetchData(&y_data,&y_data_rows,NULL,YHANDLE);
     
    5960        if (x_interp_rows!=y_interp_rows){
    6061                ISSMERROR("vectors x_interp and y_interp should have the same length!");
     62        }
     63        if (index_cols!=3){
     64                ISSMERROR("index should have 3 columns (input provided has %i columns)",index_cols);
    6165        }
    6266
Note: See TracChangeset for help on using the changeset viewer.