Changeset 22678


Ignore:
Timestamp:
04/06/18 09:52:38 (7 years ago)
Author:
jdquinn
Message:

CHG: Modified JS module and header file for InterpFromGridToMesh to correctly retrieve data and mesh input lengths.

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/InterpFromGridToMesh/InterpFromGridToMesh.h

    r22676 r22678  
    5555#define XHANDLE       xIn,nodsIn,1
    5656#define YHANDLE       yIn,nodsIn,1
    57 #define DATAHANDLE    dataIn,nodsIn,1
    58 #define XMESHHANDLE   xMeshIn,nodsIn,1
    59 #define YMESHHANDLE   yMeshIn,nodsIn,1
     57#define DATAHANDLE    dataIn,dataNumRowsIn,dataNumColsIn
     58#define XMESHHANDLE   xMeshIn,meshNumRowsIn,1
     59#define YMESHHANDLE   yMeshIn,meshNumRowsIn,1
    6060#define DEFAULTHANDLE defaultValue
    6161#define INTERPENUM    interpType
    6262/* serial output macros: */
    6363#define DATAMESH pdataMesh
    64 #define WRAPPER(modulename) extern "C" { int InterpFromGridToMeshModule(double** pdataMesh, double* xIn, double* yIn, double* dataIn, double* xMeshIn, double* yMeshIn, double defaultValue, int nodsIn, char* interpType)
     64#define WRAPPER(modulename) extern "C" { int InterpFromGridToMeshModule(double** pdataMesh, double* xIn, double* yIn, double* dataIn, double* xMeshIn, double* yMeshIn, double defaultValue, int nodsIn, int dataNumRowsIn, int dataNumColsIn, int meshNumRowsIn, char* interpType)
    6565#define nrhs 6
    6666#endif
  • issm/trunk-jpl/src/wrappers/InterpFromGridToMesh/InterpFromGridToMesh.js

    r22673 r22678  
    2222        var dataMesh            = {};
    2323        var dataMeshPtr         = {};
     24        var     dataNumCols             = 0;
     25        var     dataNumRows             = 0;
    2426        var ddata                       = {};
    2527        var ddataHeap           = {};
     
    3840        var dyPtr                       = {};
    3941        var interpType          = '';
     42        var meshNumRows         = 0;
    4043        var ndata                       = {};
    4144        var nods                        = 0;
     
    97100       
    98101        nods            = xIn.length;
     102        dataNumRows     = dataIn.length;
     103        dataNumCols     = dataIn[0].length;
     104        meshNumRows     = xMeshIn.length;
    99105       
    100106       
     
    135141                        'number', // input      : defaultValue
    136142                        'number', // input      : nods
     143                        'number', // input      : dataNumRows
     144                        'number', // input      : dataNumCols
     145                        'number', // input      : meshNumRows
    137146                        'string', // input      : interpType
    138147                ]
     
    154163                defaultValue,
    155164                nods,
     165                dataNumRows,
     166                dataNumCols,
     167                meshNumRows,
    156168                interpType
    157169        );
Note: See TracChangeset for help on using the changeset viewer.