Changeset 13229


Ignore:
Timestamp:
09/04/12 09:25:24 (13 years ago)
Author:
Mathieu Morlighem
Message:

CHG: make sure we are using SeqVec so that we can disconnect PETSc from matlab and python modules

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/matrix/Vector.h

    r13216 r13229  
    2626        public:
    2727
     28                int  type;
    2829                #ifdef _HAVE_PETSC_
    2930                PetscVec* pvector;
    3031                #endif
    3132                SeqVec<doubletype>* svector;
    32                 int     type;
    33        
    3433
    3534                /*Vector constructors, destructors */
     
    8281                #else
    8382                Vector(doubletype* serial_vec,int M,int in_type=SeqVecType){
     83                        //} for vim
    8484                #endif
    8585
  • issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp

    r13220 r13229  
    1111#include "./ContourToMeshx.h"
    1212
    13 int ContourToMeshx( Vector<double>** pin_nod,Vector<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {
     13int ContourToMeshx(SeqVec<double>** pin_nod,SeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {
    1414
    1515        int noerr=1;
     
    3030
    3131        /*output: */
    32         Vector<double>* in_nod=NULL;
    33         Vector<double>* in_elem=NULL;
    34 
    35         in_nod=new Vector<double>(nods);
    36         in_elem=new Vector<double>(nel);
     32        SeqVec<double>* in_nod=NULL;
     33        SeqVec<double>* in_elem=NULL;
     34        in_nod  = new SeqVec<double>(nods);
     35        in_elem = new SeqVec<double>(nel);
    3736
    3837        /*initialize thread parameters: */
  • issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h

    r13220 r13229  
    1313typedef struct{
    1414
    15         DataSet* contours;
    16         int nods;
    17         int edgevalue;
    18         Vector<double>* in_nod;
    19         double* x;
    20         double* y;
     15        DataSet *contours;
     16        int    nods;
     17        int    edgevalue;
     18        SeqVec<double> *in_nod;
     19        double *x;
     20        double *y;
    2121
    2222} ContourToMeshxThreadStruct;
     
    2424
    2525/* local prototypes: */
    26 int ContourToMeshx( Vector<double>** pin_nods,Vector<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue);
     26int ContourToMeshx(SeqVec<double>** pin_nods,SeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue);
    2727
    2828void* ContourToMeshxt(void* vContourToMeshxThreadStruct);
    2929
    30 
    3130#endif /* _CONTOURTOMESHX_H */
    32 
  • issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp

    r13220 r13229  
    3333        double* x=NULL;
    3434        double* y=NULL;
    35         Vector<double>* in_nod=NULL;
    36 
     35        SeqVec<double>* in_nod=NULL;
    3736
    3837        /*recover handle and gate: */
     
    6059
    6160        return NULL;
    62 
    6361}
  • issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp

    r13220 r13229  
    44#include "./ContourToNodesx.h"
    55
    6 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue){
     6int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue){
    77
    88        int i;
     
    1717
    1818        /*output: */
    19         Vector<IssmPDouble>* flags=NULL;
    20 
    21         flags=new Vector<IssmPDouble>(nods);
     19        SeqVec<IssmPDouble>* flags=NULL;
     20        flags=new SeqVec<IssmPDouble>(nods);
    2221
    2322        /*Loop through all contours: */
     
    3938}
    4039
    41 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){
     40int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){
    4241
    4342        int i;
     
    5251
    5352        /*output: */
    54         Vector<IssmPDouble>* flags=NULL;
    55 
    56         flags=new Vector<IssmPDouble>(nods);
     53        SeqVec<IssmPDouble>* flags=NULL;
     54        flags=new SeqVec<IssmPDouble>(nods);
    5755
    5856        /*Loop through all contours: */
     
    6967        /*Assign output pointers: */
    7068        *pflags=flags;
    71        
    7269        return 1;
    7370}
  • issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h

    r13220 r13229  
    22        ContourToNodesx.h
    33*/
    4 
    54
    65#ifndef _CONTOURTONODESX_H
     
    1110
    1211/* local prototypes: */
    13 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue);
    14 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue);
     12int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue);
     13int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue);
    1514
    1615#endif /* _CONTOURTONODESX_H */
    17 
  • issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp

    r13220 r13229  
    1717
    1818/*InterpFromGridToMeshx{{{*/
    19 int InterpFromGridToMeshx( Vector<IssmPDouble>** pdata_mesh,double* x_in, int x_rows, double* y_in, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods,double default_value, int interpenum){
     19int InterpFromGridToMeshx(SeqVec<IssmPDouble>** pdata_mesh,double* x_in, int x_rows, double* y_in, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods,double default_value, int interpenum){
    2020
    2121        /*output: */
    22         Vector<IssmPDouble>* data_mesh=NULL;
     22        SeqVec<IssmPDouble>* data_mesh=NULL;
    2323       
    2424        /*Intermediary*/
     
    4747
    4848        /*Allocate output vector: */
    49         data_mesh=new Vector<IssmPDouble>(nods);
     49        data_mesh=new SeqVec<IssmPDouble>(nods);
    5050
    5151        /*Find out what kind of coordinates (x_in,y_in) have been given is input*/
     
    120120
    121121        /*recover parameters :*/
    122         double *x_mesh        = gate->x_mesh;
    123         double *y_mesh        = gate->y_mesh;
    124         int     x_rows        = gate->x_rows;
    125         int     y_rows        = gate->y_rows;
    126         double *x             = gate->x;
    127         double *y             = gate->y;
    128         int     nods          = gate->nods;
    129         Vector<IssmPDouble>*data_mesh    = gate->data_mesh;
    130         double *data          = gate->data;
    131         double  default_value = gate->default_value;
    132         int     interpenum    = gate->interp;
    133         int     M             = gate->M;
    134         int     N             = gate->N;
     122        double *x_mesh                = gate->x_mesh;
     123        double *y_mesh                = gate->y_mesh;
     124        int     x_rows                = gate->x_rows;
     125        int     y_rows                = gate->y_rows;
     126        double *x                     = gate->x;
     127        double *y                     = gate->y;
     128        int     nods                  = gate->nods;
     129        SeqVec<IssmPDouble>*data_mesh = gate->data_mesh;
     130        double *data                  = gate->data;
     131        double  default_value         = gate->default_value;
     132        int     interpenum            = gate->interp;
     133        int     M                     = gate->M;
     134        int     N                     = gate->N;
    135135
    136136        bool debug = M*N>1? true:false;
  • issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.h

    r13220 r13229  
    1212/*threading: */
    1313typedef struct{
    14         double* x;
    15         int     x_rows;
    16         double* y;
    17         int     y_rows;
    18         double* data;
    19         double  default_value;
    20         int     interp;
    21         int     M;
    22         int     N;
    23         int     nods;
    24         double* x_mesh;
    25         double* y_mesh;
    26         Vector<IssmPDouble>*    data_mesh;
     14        double*             x;
     15        int                 x_rows;
     16        double*             y;
     17        int                 y_rows;
     18        double*             data;
     19        double              default_value;
     20        int                 interp;
     21        int                 M;
     22        int                 N;
     23        int                 nods;
     24        double*             x_mesh;
     25        double*             y_mesh;
     26        SeqVec<IssmPDouble>* data_mesh;
    2727} InterpFromGridToMeshxThreadStruct;
    2828
    29 int    InterpFromGridToMeshx( Vector<IssmPDouble>** pdata_mesh,double* x, int x_rows, double* y, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods, double default_value, int interpenum=BilinearInterpEnum);
     29int    InterpFromGridToMeshx(SeqVec<IssmPDouble>** pdata_mesh,double* x, int x_rows, double* y, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods, double default_value, int interpenum=BilinearInterpEnum);
    3030void*  InterpFromGridToMeshxt(void* vInterpFromGridToMeshxThreadStruct);
    3131bool   findindices(int* pn,int* pm,double* x,int x_rows, double* y,int y_rows, double xgrid,double ygrid);
  • issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp

    r13220 r13229  
    1010#include "../modules.h"
    1111
    12 int InterpFromMesh2dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime,
    13                 double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours){
     12int InterpFromMesh2dx(SeqVec<IssmPDouble>** pdata_prime,
     13                        double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length,
     14                        double* x_prime, double* y_prime, int nods_prime,
     15                        double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours){
    1416       
    1517        /*Output*/
    16         Vector<IssmPDouble>* data_prime=NULL;
     18        SeqVec<IssmPDouble>* data_prime=NULL;
    1719
    1820        /*Intermediary*/
    19         int i,j;
    20         int interpolation_type;
    21         bool debug;
     21        int    i,j;
     22        int    interpolation_type;
     23        bool   debug;
    2224        double area;
    2325        double area_1,area_2,area_3;
     
    2729
    2830        /*contours: */
    29         Vector<IssmPDouble>*    vec_incontour=NULL;
    30         double*    incontour=NULL;
     31        SeqVec<IssmPDouble> *vec_incontour = NULL;
     32        double              *incontour     = NULL;
    3133
    3234        /*threading: */
     
    7173
    7274        /*Initialize output*/
    73         data_prime=new Vector<IssmPDouble>(nods_prime,false,SeqVecType);
     75        data_prime=new SeqVec<IssmPDouble>(nods_prime);
    7476        if(num_default_values){
    7577                if(num_default_values==1)for (i=0;i<nods_prime;i++) data_prime->SetValue(i,default_values[0],INS_VAL);
  • issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.h

    r13220 r13229  
    99#include "../../toolkits/toolkits.h"
    1010
    11 
    1211/*threading: */
    1312typedef struct{
    1413
    15         int interpolation_type;
    16         bool debug;
    17         int  nels_data;
    18         double* index_data;
    19         double* x_data;
    20         double* y_data;
    21         double* data;
    22         double xmin,xmax;
    23         double ymin,ymax;
    24         int    nods_prime;
    25         Vector<IssmPDouble>*    data_prime;
    26         double* x_prime;
    27         double* y_prime;
    28         double* default_values;
    29         int     num_default_values;
    30         double*    incontour;
     14        int                 interpolation_type;
     15        bool                debug;
     16        int                 nels_data;
     17        double              *index_data;
     18        double              *x_data;
     19        double              *y_data;
     20        double              *data;
     21        double              xmin,xmax;
     22        double              ymin,ymax;
     23        int                 nods_prime;
     24        SeqVec<IssmPDouble> *data_prime;
     25        double              *x_prime;
     26        double              *y_prime;
     27        double              *default_values;
     28        int                 num_default_values;
     29        double              *incontour;
    3130
    3231
    3332} InterpFromMesh2dxThreadStruct;
    3433
    35 int InterpFromMesh2dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime,
     34int InterpFromMesh2dx(SeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime,
    3635                double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours);
    3736
     
    3938
    4039#endif /* _INTERPFROMMESH2DX_H */
    41 
  • issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp

    r13220 r13229  
    2020       
    2121        /*recover parameters :*/
    22         int     interpolation_type = gate->interpolation_type;
    23         bool    debug              = gate->debug;
    24         int     nels_data          = gate->nels_data;
    25         double *index_data         = gate->index_data;
    26         double *x_data             = gate->x_data;
    27         double *y_data             = gate->y_data;
    28         double *data               = gate->data;
    29         double  xmin               = gate->xmin;
    30         double  xmax               = gate->xmax;
    31         double  ymin               = gate->ymin;
    32         double  ymax               = gate->ymax;
    33         int     nods_prime         = gate->nods_prime;
    34         Vector<IssmPDouble>* data_prime        = gate->data_prime;
    35         double *x_prime            = gate->x_prime;
    36         double *y_prime            = gate->y_prime;
    37         double *default_values     = gate->default_values;
    38         int     num_default_values = gate->num_default_values;
    39         double *incontour          = gate->incontour;
     22        int     interpolation_type      = gate->interpolation_type;
     23        bool    debug                   = gate->debug;
     24        int     nels_data               = gate->nels_data;
     25        double *index_data              = gate->index_data;
     26        double *x_data                  = gate->x_data;
     27        double *y_data                  = gate->y_data;
     28        double *data                    = gate->data;
     29        double  xmin                    = gate->xmin;
     30        double  xmax                    = gate->xmax;
     31        double  ymin                    = gate->ymin;
     32        double  ymax                    = gate->ymax;
     33        int     nods_prime              = gate->nods_prime;
     34        SeqVec<IssmPDouble>* data_prime = gate->data_prime;
     35        double *x_prime                 = gate->x_prime;
     36        double *y_prime                 = gate->y_prime;
     37        double *default_values          = gate->default_values;
     38        int     num_default_values      = gate->num_default_values;
     39        double *incontour               = gate->incontour;
    4040
    4141        /*partition loop across threads: */
  • issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp

    r13220 r13229  
    77#include "../../include/include.h"
    88
    9 int InterpFromMeshToMesh3dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value) {
     9int InterpFromMeshToMesh3dx( SeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value) {
    1010
    1111        /*Output*/
    12         Vector<IssmPDouble>* data_prime=NULL;
     12        SeqVec<IssmPDouble>* data_prime=NULL;
    1313
    1414        /*Intermediary*/
     
    5454
    5555        /*Initialize output*/
    56         data_prime=new Vector<IssmPDouble>(nods_prime);
     56        data_prime=new SeqVec<IssmPDouble>(nods_prime);
    5757        for (i=0;i<nods_prime;i++) data_prime->SetValue(i,default_value,INS_VAL);
    5858
  • issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.h

    r13220 r13229  
    99#include "../../classes/objects/objects.h"
    1010
    11 int InterpFromMeshToMesh3dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value);
     11int InterpFromMeshToMesh3dx(SeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value);
    1212
    1313#endif /* _INTERPFROMMESHTOMESH3DX_H */
    14 
  • issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp

    r13220 r13229  
    44#include "./PointCloudFindNeighborsx.h"
    55
    6 int PointCloudFindNeighborsx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread){
     6int PointCloudFindNeighborsx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread){
    77
    88        /*output: */
    9         Vector<IssmPDouble>* flags=NULL;
    10         flags=new Vector<IssmPDouble>(nods);
     9        SeqVec<IssmPDouble>* flags=NULL;
     10        flags=new SeqVec<IssmPDouble>(nods);
    1111
    1212        /*threading: */
  • issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.h

    r13220 r13229  
    1111
    1212/* local prototypes: */
    13 int PointCloudFindNeighborsx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread);
     13int PointCloudFindNeighborsx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread);
    1414
    1515/*threading: */
     
    2020        int nods;
    2121        double mindistance;
    22         Vector<IssmPDouble>* flags;
    23 
     22        SeqVec<IssmPDouble>* flags;
    2423
    2524} PointCloudFindNeighborsThreadStruct;
  • issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp

    r13220 r13229  
    1717        int     nods;
    1818        double  mindistance;
    19         Vector<IssmPDouble>*     flags;
     19        SeqVec<IssmPDouble>*     flags;
    2020
    2121        /*recover handle and gate: */
  • issm/trunk-jpl/src/c/shared/Exp/exp.h

    r13220 r13229  
    33 */
    44
    5 
    65#ifndef _EXP_H_
    76#define _EXP_H_
     
    1514int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue);
    1615
    17 
    1816/*IsInPoly {{{*/
    1917template <class doubletype>
    20 int IsInPoly(Vector<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){
     18int IsInPoly(SeqVec<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){
    2119
    2220        int i;
     
    5755        }
    5856         return 1;
    59 }/*}}}*/
    60 /*IsOutsidePoly {{{*/
    61 template <class doubletype>
    62 int IsOutsidePoly(Vector<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){
    63 
    64         int i,j;
    65         double x0,y0;
    66         doubletype value;
    67         double xmin=xc[0];
    68         double xmax=xc[0];
    69         double ymin=yc[0];
    70         double ymax=yc[0];
    71 
    72         /*Get extrema*/
    73         for (i=1;i<numvertices;i++){
    74                 if(xc[i]<xmin) xmin=xc[i];
    75                 if(xc[i]>xmax) xmax=xc[i];
    76                 if(yc[i]<ymin) ymin=yc[i];
    77                 if(yc[i]>ymax) ymax=yc[i];
    78         }
    79 
    80         /*Go through all vertices of the mesh:*/
    81         for (i=i0;i<i1;i++){
    82 
    83                 //Get current value of value[i] -> do not change it if != 0
    84                 in->GetValue(&value,i);
    85                 if (reCast<bool,doubletype>(value)){
    86                         /*this vertex already is inside one of the contours, continue*/
    87                         continue;
    88                 }
    89 
    90                 /*pick up vertex (x[i],y[i]) and figure out if located inside contour (xc,yc)*/
    91                 x0=x[i]; y0=y[i];
    92                 if(x0<xmin || x0>xmax || y0<ymin || y0>ymax){
    93                         value=1;
    94                 }
    95                 else{
    96                         value=1-pnpoly(numvertices,xc,yc,x0,y0,edgevalue);
    97                 }
    98                 in->SetValue(i,value,INS_VAL);
    99         }
    100         return 1;
    10157}/*}}}*/
    10258/*DomainOutlineRead{{{*/
     
    244200} /*}}}*/
    245201
    246 
    247 
    248 
    249202#endif
  • issm/trunk-jpl/src/c/toolkits/issm/SeqVec.h

    r13216 r13229  
    4141                }
    4242                /*}}}*/
     43                /*FUNCTION SeqVec(int M){{{*/
     44                SeqVec(int pM){
     45
     46                        this->M=pM;
     47                        this->vector=NULL;
     48                        if(this->M) this->vector=xNewZeroInit<doubletype>(pM);
     49                }
     50                /*}}}*/
    4351                /*FUNCTION SeqVec(int M,bool fromlocalsize){{{*/
    4452                SeqVec(int pM,bool fromlocalsize){
  • issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp

    r13220 r13229  
    3737
    3838        /* output: */
    39         Vector<double> *in_nod  = NULL;
    40         Vector<double> *in_elem = NULL;
     39        SeqVec<double> *in_nod  = NULL;
     40        SeqVec<double> *in_elem = NULL;
    4141
    4242        /*Boot module: */
  • issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp

    r13220 r13229  
    2929
    3030        /* required input: */
    31         double* x=NULL;
    32         double* y=NULL;
    3331        int     edgevalue;
    34         char*   interptype=NULL;
     32        double *x          = NULL;
     33        double *y          = NULL;
     34        char   *interptype = NULL;
    3535
    3636        /* output: */
    37         Vector<double>*  flags=NULL;
     37        SeqVec<double> *flags = NULL;
    3838        int  nods;
    3939
    40         //contours
    41         mxArray*  matlabstructure=NULL;
     40        /*contours*/
    4241        int numcontours;
    43         Contour<double>** contours=NULL;
    44         Contour<double>*  contouri=NULL;
     42        mxArray         *matlabstructure = NULL;
     43        Contour<double> **contours       = NULL;
     44        Contour<double> *contouri        = NULL;
    4545
    4646        /*Boot module: */
     
    4949        /*checks on arguments on the matlab side: */
    5050        CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToNodesUsage);
    51 
    5251       
    5352        /*Fetch inputs: */
     
    5655        FetchData(&edgevalue,EDGEVALUEHANDLE);
    5756
    58         //Fetch contours
    59 
     57        /*Fetch contours*/
    6058        if(mxIsChar(FILENAME)){
    6159                /*Call expread on filename to build a contour array in the matlab workspace: */
    62                 mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
     60                mexCallMATLAB(1,&matlabstructure,1,(mxArray**)&FILENAME,"expread");
    6361        }
    6462        else{
     
    8078        }
    8179
    82         /* Debugging of contours :{{{1*/
    83         /*for(i=0;i<numcontours;i++){
    84                 _printLine_("\nContour echo: contour number  " << i+1 << " / " << numcontours);
    85                 contouri=*(contours+i);
    86                 _printLine_("   Number of nodes " << contouri->nods);
    87                 for (j=0;j<contouri->nods;j++){
    88                         _printLine_("   " << *(contouri->x+j) << "f " << *(contouri->y+j) << "f");
    89                 }
    90         }*/
    91         /*}}}*/
    92 
    9380        /*Run interpolation routine: */
    9481        ContourToNodesx(&flags,x,y,nods,contours,numcontours,edgevalue);
     
    9986        /*end module: */
    10087        MODULEEND();
    101 
    10288}
    10389
  • issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp

    r13216 r13229  
    2525
    2626        /*input: */
    27         double* x=NULL;
    28         double* y=NULL;
     27        double *x = NULL;
     28        double *y = NULL;
    2929        int     x_rows,y_rows;
    30         double* data=NULL;
     30        double *data  = NULL;
    3131        int     data_rows,data_cols;
    32         double* x_mesh=NULL;
    33         double* y_mesh=NULL;
     32        double *x_mesh = NULL;
     33        double *y_mesh = NULL;
    3434        int     x_mesh_rows,y_mesh_rows;
    3535        double  default_value;
     
    3737
    3838        /* output: */
    39         Vector<double>*  data_mesh=NULL;
     39        SeqVec<double>*  data_mesh=NULL;
    4040
    4141        /*Boot module: */
     
    4343
    4444        /*checks on arguments on the matlab side: */
    45         //CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromGridToMeshUsage);
    4645        if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){
    4746                InterpFromGridToMeshUsage();
  • issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp

    r13220 r13229  
    11/*!\file InterpFromMesh2d.c
    22 * \brief: data interpolation from a list of (x,y,values) into mesh vertices
    3  
    4         InterpFromMesh2d.c
    5 
    6         usage:
    7         data_mesh=InterpFromMesh2d(index,x,y,data,x_mesh,y_mesh);
    8        
    9         where:
    10 
    11                 input:
    12                 x,y: coordinates of matrix data
    13                 data - matrix holding the data to be interpolated onto the mesh.
    14                 x_mesh,y_mesh: coordinates of the mesh vertices onto which we interpolate.
    15                
    16                 output:
    17                 data_mesh:  vector of mesh interpolated data.
    18 
    193*/
    204       
     
    4832        int     num_default_values=0;
    4933
    50         //contours
    51         mxArray*  matlabstructure=NULL;
    52         Contour<double>** contours=NULL;
    53         int       numcontours;
    54         Contour<double>*  contouri=NULL;
    55         int       i;
     34        /*contours*/
     35        int i;
     36        mxArray *matlabstructure = NULL;
     37        Contour<double> **contours=NULL;
     38        int numcontours;
     39        Contour<double> *contouri=NULL;
    5640
    5741        /*Intermediary*/
     
    6145
    6246        /* output: */
    63         Vector<double>*  data_prime=NULL;
     47        SeqVec<double> *data_prime = NULL;
    6448
    6549        /*Boot module: */
  • issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp

    r13216 r13229  
    5555
    5656        /* output: */
    57         Vector<double>*  data_prime=NULL;
     57        SeqVec<double>*  data_prime=NULL;
    5858
    5959        /*Boot module: */
     
    9696}
    9797
    98 void InterpFromMeshToMesh3dUsage(void)
    99 {
     98void InterpFromMeshToMesh3dUsage(void){
    10099        _pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point");
    101100        _pprintLine_("");
  • issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp

    r13216 r13229  
    1010
    1111        /* required input: */
    12         double* x=NULL;
    13         double* y=NULL;
     12        double *x = NULL;
     13        double *y = NULL;
    1414        int     nods;
    1515        double  mindistance;
     
    1717
    1818        /* output: */
    19         Vector<double>*  flags=NULL;
     19        SeqVec<double> *flags = NULL;
    2020
    2121        /*Boot module: */
Note: See TracChangeset for help on using the changeset viewer.