Changeset 13227


Ignore:
Timestamp:
09/04/12 08:48:47 (13 years ago)
Author:
Mathieu Morlighem
Message:

CHG: make sure we are writing SeqMat and SeqVec for matlab in order to disconnect petsc from modules

Location:
issm/trunk-jpl/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp

    r13216 r13227  
    216216}
    217217/*}}}*/
    218 /*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{*/
    219 void WriteData(mxArray** pdataref,Matrix<double>* matrix){
     218/*FUNCTION WriteData(mxArray** pdataref,SeqMat<double>* matrix){{{*/
     219void WriteData(mxArray** pdataref,SeqMat<double>* matrix){
    220220               
    221221        int      i,j;
     
    246246                /*Free ressources:*/
    247247                xDelete<double>(matrix_ptr);
    248 
    249         }
    250         else{
    251                 dataref = mxCreateDoubleMatrix(0,0,mxREAL);
    252         }
    253 
    254         *pdataref=dataref;
    255 }
    256 /*}}}*/
    257 /*FUNCTION WriteData(mxArray** pdataref,Vector<double>* vector){{{*/
    258 void WriteData(mxArray** pdataref,Vector<double>* vector){
     248        }
     249        else{
     250                dataref = mxCreateDoubleMatrix(0,0,mxREAL);
     251        }
     252
     253        *pdataref=dataref;
     254}
     255/*}}}*/
     256/*FUNCTION WriteData(mxArray** pdataref,SeqVec<double>* vector){{{*/
     257void WriteData(mxArray** pdataref,SeqVec<double>* vector){
    259258       
    260259        mxArray* dataref=NULL;
  • issm/trunk-jpl/src/c/matlab/io/matlabio.h

    r13216 r13227  
    1818#include <mex.h>
    1919
    20 void WriteData(mxArray** pdataref,Matrix<double>* matrix);
     20void WriteData(mxArray** pdataref,SeqMat<double>* matrix);
    2121void WriteData(mxArray** pdataref,double* matrix, int M,int N);
    2222void WriteData(mxArray** pdataref,int*    matrix, int M,int N);
    23 void WriteData(mxArray** pdataref,Vector<double>* vector);
     23void WriteData(mxArray** pdataref,SeqVec<double>* vector);
    2424void WriteData(mxArray** pdataref,double* vector, int M);
    2525void WriteData(mxArray** pdataref,int integer);
     
    8585#endif
    8686
    87 
    8887#endif  /* _IO_H_ */
  • issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp

    r13220 r13227  
    2020/*}}}*/
    2121
    22 void TriMeshx(Matrix<IssmPDouble>** pindex,Vector<IssmPDouble>** px,Vector<IssmPDouble>** py,Matrix<IssmPDouble>** psegments,Vector<IssmPDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
     22void TriMeshx(SeqMat<IssmPDouble>** pindex,SeqVec<IssmPDouble>** px,SeqVec<IssmPDouble>** py,SeqMat<IssmPDouble>** psegments,SeqVec<IssmPDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
    2323
    2424        /*indexing: */
     
    2626
    2727        /*output: */
    28         IssmPDouble* index=NULL;
    29         Matrix<IssmPDouble>* index_matrix=NULL;
    30         double* x=NULL;
    31         double* y=NULL;
    32         double* segments=NULL;
    33         Matrix<IssmPDouble>* segments_matrix=NULL;
    34         double* segmentmarkerlist=NULL;
     28        IssmPDouble         *index             = NULL;
     29        SeqMat<IssmPDouble> *index_matrix      = NULL;
     30        double              *x                 = NULL;
     31        double              *y                 = NULL;
     32        double              *segments          = NULL;
     33        SeqMat<IssmPDouble> *segments_matrix   = NULL;
     34        double              *segmentmarkerlist = NULL;
    3535
    3636        /*intermediary: */
    37         int      counter,counter2,backcounter;
    38         Contour<IssmPDouble>* contour=NULL;
     37        int counter,counter2,backcounter;
     38        Contour<IssmPDouble> *contour = NULL;
    3939
    4040        /* Triangle structures needed to call Triangle library routines: */
     
    192192
    193193        /*Output : */
    194         index_matrix=new Matrix<IssmPDouble>(index,out.numberoftriangles,3,1.0,SeqMatType);
     194        index_matrix=new SeqMat<IssmPDouble>(index,out.numberoftriangles,3,1.0);
    195195        *pindex=index_matrix;
    196196       
    197         segments_matrix=new Matrix<IssmPDouble>(segments,out.numberofsegments,3,1.0,SeqMatType);
     197        segments_matrix=new SeqMat<IssmPDouble>(segments,out.numberofsegments,3,1.0);
    198198        *psegments=segments_matrix;
    199199
    200         *px=new Vector<IssmPDouble>(x,out.numberofpoints,SeqMatType);
    201         *py=new Vector<IssmPDouble>(y,out.numberofpoints,SeqMatType);
    202         *psegmentmarkerlist=new Vector<IssmPDouble>(segmentmarkerlist,out.numberofsegments,SeqMatType);
     200        *px=new SeqVec<IssmPDouble>(x,out.numberofpoints);
     201        *py=new SeqVec<IssmPDouble>(y,out.numberofpoints);
     202        *psegmentmarkerlist=new SeqVec<IssmPDouble>(segmentmarkerlist,out.numberofsegments);
    203203}
  • issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h

    r13220 r13227  
    1111
    1212/* local prototypes: */
    13 void TriMeshx(Matrix<IssmPDouble>** pindex,Vector<IssmPDouble>** px,Vector<IssmPDouble>** py,Matrix<IssmPDouble>** psegments,Vector<IssmPDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area);
     13void TriMeshx(SeqMat<IssmPDouble>** pindex,SeqVec<IssmPDouble>** px,SeqVec<IssmPDouble>** py,SeqMat<IssmPDouble>** psegments,SeqVec<IssmPDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area);
    1414
    1515#endif  /* _TRIMESHX_H */
Note: See TracChangeset for help on using the changeset viewer.