Changeset 13220 for issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
- Timestamp:
- 09/02/12 01:29:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
r13216 r13220 20 20 /*}}}*/ 21 21 22 void TriMeshx(Matrix<Issm Double>** pindex,Vector<IssmDouble>** px,Vector<IssmDouble>** py,Matrix<IssmDouble>** psegments,Vector<IssmDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){22 void TriMeshx(Matrix<IssmPDouble>** pindex,Vector<IssmPDouble>** px,Vector<IssmPDouble>** py,Matrix<IssmPDouble>** psegments,Vector<IssmPDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){ 23 23 24 24 /*indexing: */ … … 26 26 27 27 /*output: */ 28 double* index=NULL;29 Matrix<Issm Double>* index_matrix=NULL;28 IssmPDouble* index=NULL; 29 Matrix<IssmPDouble>* index_matrix=NULL; 30 30 double* x=NULL; 31 31 double* y=NULL; 32 32 double* segments=NULL; 33 Matrix<Issm Double>* segments_matrix=NULL;33 Matrix<IssmPDouble>* segments_matrix=NULL; 34 34 double* segmentmarkerlist=NULL; 35 35 36 36 /*intermediary: */ 37 37 int counter,counter2,backcounter; 38 Contour * contour=NULL;38 Contour<IssmPDouble>* contour=NULL; 39 39 40 40 /* Triangle structures needed to call Triangle library routines: */ … … 45 45 in.numberofpoints=0; 46 46 for (i=0;i<domain->Size();i++){ 47 contour=(Contour *)domain->GetObjectByOffset(i);47 contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i); 48 48 in.numberofpoints+=contour->nods-1; 49 49 } 50 50 for (i=0;i<rifts->Size();i++){ 51 contour=(Contour *)rifts->GetObjectByOffset(i);51 contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i); 52 52 in.numberofpoints+=contour->nods; 53 53 } … … 61 61 counter=0; 62 62 for (i=0;i<domain->Size();i++){ 63 contour=(Contour *)domain->GetObjectByOffset(i);63 contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i); 64 64 for (j=0;j<contour->nods-1;j++){ 65 65 in.pointlist[2*counter+0]=contour->x[j]; … … 69 69 } 70 70 for (i=0;i<rifts->Size();i++){ 71 contour=(Contour *)rifts->GetObjectByOffset(i);71 contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i); 72 72 for (j=0;j<contour->nods;j++){ 73 73 in.pointlist[2*counter+0]=contour->x[j]; … … 88 88 in.numberofsegments=0; 89 89 for (i=0;i<domain->Size();i++){ 90 contour=(Contour *)domain->GetObjectByOffset(i);90 contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i); 91 91 in.numberofsegments+=contour->nods-1; 92 92 } 93 93 for(i=0;i<rifts->Size();i++){ 94 contour=(Contour *)rifts->GetObjectByOffset(i);94 contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i); 95 95 /*for rifts, we have one less segment as we have vertices*/ 96 96 in.numberofsegments+=contour->nods-1; … … 102 102 backcounter=0; 103 103 for (i=0;i<domain->Size();i++){ 104 contour=(Contour *)domain->GetObjectByOffset(i);104 contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i); 105 105 for (j=0;j<contour->nods-2;j++){ 106 106 in.segmentlist[2*counter+0]=counter; … … 118 118 counter2=counter; 119 119 for (i=0;i<rifts->Size();i++){ 120 contour=(Contour *)rifts->GetObjectByOffset(i);120 contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i); 121 121 for (j=0;j<(contour->nods-1);j++){ 122 122 in.segmentlist[2*counter2+0]=counter; … … 137 137 in.holelist = xNew<REAL>(in.numberofholes*2); 138 138 for (i=0;i<domain->Size()-1;i++){ 139 contour=(Contour *)domain->GetObjectByOffset(i+1);139 contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i+1); 140 140 GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],contour->nods-1,contour->x,contour->y); 141 141 } … … 192 192 193 193 /*Output : */ 194 index_matrix=new Matrix<Issm Double>(index,out.numberoftriangles,3,1,SeqMatType);194 index_matrix=new Matrix<IssmPDouble>(index,out.numberoftriangles,3,1.0,SeqMatType); 195 195 *pindex=index_matrix; 196 196 197 segments_matrix=new Matrix<Issm Double>(segments,out.numberofsegments,3,1,SeqMatType);197 segments_matrix=new Matrix<IssmPDouble>(segments,out.numberofsegments,3,1.0,SeqMatType); 198 198 *psegments=segments_matrix; 199 199 200 *px=new Vector<Issm Double>(x,out.numberofpoints,SeqMatType);201 *py=new Vector<Issm Double>(y,out.numberofpoints,SeqMatType);202 *psegmentmarkerlist=new Vector<Issm Double>(segmentmarkerlist,out.numberofsegments,SeqMatType);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); 203 203 }
Note:
See TracChangeset
for help on using the changeset viewer.