Changeset 11935
- Timestamp:
- 04/05/12 14:50:15 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/shared
- Files:
-
- 4 added
- 3 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
r9320 r11935 9 9 #include "../Alloc/alloc.h" 10 10 #include "../../include/include.h" 11 #include "../../objects/objects.h" 11 12 #include "../Exceptions/exceptions.h" 13 #include "../../Container/DataSet.h" 12 14 13 15 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole=true){ 14 16 15 17 16 /*Error management: */ 17 int noerr=1; 18 /*indexing: */ 18 19 int i,counter; 19 20 … … 39 40 if ((fid=fopen(domainname,"r"))==NULL){ 40 41 _error_("%s%s","could not find domain file ",domainname); 41 noerr=0; goto cleanupandreturn;42 42 } 43 43 … … 95 95 /*Read vertices: */ 96 96 for (i=0;i<n;i++){ 97 fscanf(fid,"%20lf %20lf\n", x+i,y+i);97 fscanf(fid,"%20lf %20lf\n",&x[i],&y[i]); 98 98 } 99 99 … … 117 117 fclose(fid); 118 118 119 cleanupandreturn:120 /*Free ressources: */121 if(!noerr){122 xfree((void**)&x);123 xfree((void**)&y);124 n=-1;125 }126 127 119 /*Assign output pointers: */ 128 120 *pnprof=nprof; … … 132 124 if(pclosed)*pclosed=closed; 133 125 else xfree((void**)&closed); 134 return noerr;135 126 } 136 127 128 DataSet* DomainOutlineRead(char* domainname,bool whole=true){ 129 130 /*indexing: */ 131 int i; 132 133 /*intermediary: */ 134 int nprof; 135 int* profnvertices=NULL; 136 double** pprofx=NULL; 137 double** pprofy=NULL; 138 139 Contour* contour=NULL; 140 141 /*output: */ 142 DataSet* domain=NULL; 143 144 /*get domain outline from intermediary function:*/ 145 DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname,whole); 146 147 /*now create dataset of contours: */ 148 domain=new DataSet(0); 149 150 for(i=0;i<nprof;i++){ 151 domain->AddObject(new Contour(i,profnvertices[i],pprofx[i],pprofy[i],1)); 152 } 153 154 return domain; 155 } -
issm/trunk-jpl/src/c/shared/Exp/exp.h
r11843 r11935 13 13 int IsOutsidePoly(Vector* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue); 14 14 int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue); 15 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole);16 15 int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname,bool whole); 17 16 int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue); 18 17 18 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole); 19 DataSet* DomainOutlineRead(char* domainname,bool whole); 20 21 19 22 #endif -
issm/trunk-jpl/src/c/shared/Matlab/CheckNumMatlabArguments.cpp
r11853 r11935 3 3 */ 4 4 5 #ifdef _SERIAL_ 5 #ifdef HAVE_CONFIG_H 6 #include <config.h> 7 #else 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 9 #endif 10 11 12 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 6 13 7 14 #include "../Exceptions/exceptions.h" -
issm/trunk-jpl/src/c/shared/Matlab/matlabshared.h
r11861 r11935 8 8 #include "../../objects/objects.h" 9 9 10 11 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)12 int ModuleBoot(void);13 int ModuleEnd(void);14 #endif15 16 10 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 17 11 #include "mex.h" -
issm/trunk-jpl/src/c/shared/shared.h
r9761 r11935 19 19 #include "Bamg/shared.h" 20 20 #include "Matlab/matlabshared.h" 21 #include "Wrapper/wrappershared.h" 21 22 22 23 #endif
Note:
See TracChangeset
for help on using the changeset viewer.