Ignore:
Timestamp:
11/12/15 15:21:59 (9 years ago)
Author:
Eric.Larour
Message:

CHG: implemented NodeConnectivity module in javascript.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/javascript/io/FetchJavascriptData.cpp

    r19702 r19711  
    1919}
    2020/*}}}*/
     21/*FUNCTION FetchData(double* pscalar,double scalar){{{*/
     22void FetchData(int* pinteger,int integer){
     23       
     24        *pinteger = integer;
     25}
     26/*}}}*/
     27/*FUNCTION FetchData(double **pvector, double* vectorin, int nods){{{*/
     28void FetchData(double** pvector, double* vectorin, int nods){
    2129
     30        double* vector=NULL;
     31       
     32        vector=xNew<IssmPDouble>(nods); xMemCpy<IssmPDouble>(vector,vectorin,nods);
     33       
     34        *pvector=vector;
     35}
     36/*}}}*/
     37/*FUNCTION FetchData(double **pmatrix, int* pM, int* pN, int* matrix, int M, int N){{{*/
     38void FetchData(double **pmatrix, int* pM, int* pN, int* matrixin, int M, int N){
     39
     40        double* matrix=NULL;
     41       
     42        if(pmatrix && matrixin){
     43
     44                matrix=xNew<IssmPDouble>(M*N);
     45                for(int i=0;i<M*N;i++)matrix[i]=(IssmPDouble)matrixin[i];
     46                if (pM)*pM=M;
     47                if (pN)*pN=N;
     48                *pmatrix=matrix;
     49        }
     50}
     51/*}}}*/
     52/*FUNCTION FetchData(int **pmatrix, int* pM, int* pN, int* matrix, int M, int N){{{*/
     53void FetchData(int **pmatrix, int* pM, int* pN, int* matrixin, int M, int N){
     54
     55        int* matrix=NULL;
     56       
     57        if(pmatrix && matrixin){
     58
     59                matrix=xNew<int>(M*N);xMemCpy<int>(matrix,matrixin,M*N);
     60                if (pM)*pM=M;
     61                if (pN)*pN=N;
     62                *pmatrix=matrix;
     63        }
     64}
     65/*}}}*/
    2266/*ISSM objects*/
    2367/*FUNCTION FetchData(Contours** pcontours,double* x, double* y, int nods){{{*/
Note: See TracChangeset for help on using the changeset viewer.