source: issm/trunk/src/c/matlab/io/MatlabVectorToVector.cpp@ 13395

Last change on this file since 13395 was 13395, checked in by Mathieu Morlighem, 12 years ago

merged trunk-jpl and trunk for revision 13393

File size: 782 bytes
Line 
1/*!\file MatlabVectorToVector.cpp
2 */
3
4/*Headers:*/
5/*{{{*/
6#ifdef HAVE_CONFIG_H
7 #include <config.h>
8#else
9#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
10#endif
11
12#include <mex.h>
13#include <stdio.h>
14#include <string.h>
15#include "./matlabio.h"
16#include "../../classes/classes.h"
17#include "../../shared/shared.h"
18#include "../../Container/Container.h"
19#include "../../include/include.h"
20#include "../../toolkits/toolkits.h"
21
22/*}}}*/
23
24Vector<double>* MatlabVectorToVector(const mxArray* mxvector){
25
26 int dummy;
27 Vector<double>* vector=NULL;
28
29 /*allocate vector object: */
30 vector=new Vector<double>();
31
32 #ifdef _HAVE_PETSC_
33 vector->pvector=MatlabVectorToPetscVec(mxvector);
34 #else
35 vector->svector=MatlabVectorToSeqVec(mxvector);
36 #endif
37
38 return vector;
39}
Note: See TracBrowser for help on using the repository browser.