Changeset 3311
- Timestamp:
- 03/22/10 07:58:54 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/objects/Triangles.cpp
r3309 r3311 706 706 if(verbose>5) printf(" writing Segments\n"); 707 707 bamgmesh->NumSegments=NumSegments; 708 bamgmesh->Segments=(double*)xmalloc(3*NumSegments*sizeof(double)); 709 bamgmesh->SegmentsMarkers=(double*)xmalloc(1*NumSegments*sizeof(double)); 708 bamgmesh->Segments=(double*)xmalloc(4*NumSegments*sizeof(double)); 710 709 num=0; 711 710 for (i=0;i<nbe;i++){ … … 719 718 if (Number(triangles[(int)j/3][k])==i1){ 720 719 if (Number(triangles[(int)j/3][(int)((k+1)%3)])==i2){ 721 bamgmesh->Segments[num* 3+0]=Number(edges[i][0])+1; //back to M indexing722 bamgmesh->Segments[num* 3+1]=Number(edges[i][1])+1; //back to M indexing723 bamgmesh->Segments[num* 3+2]=(int)j/3+1; //back to M indexing724 bamgmesh->Segments Markers[num]=edges[i].ref;720 bamgmesh->Segments[num*4+0]=Number(edges[i][0])+1; //back to M indexing 721 bamgmesh->Segments[num*4+1]=Number(edges[i][1])+1; //back to M indexing 722 bamgmesh->Segments[num*4+2]=(int)j/3+1; //back to M indexing 723 bamgmesh->Segments[num*4+3]=edges[i].ref; 725 724 num+=1; 726 725 stop=true; … … 728 727 } 729 728 if (Number(triangles[(int)j/3][(int)((k+2)%3)])==i2){ 730 bamgmesh->Segments[num* 3+0]=Number(edges[i][1])+1; //back to M indexing731 bamgmesh->Segments[num* 3+1]=Number(edges[i][0])+1; //back to M indexing732 bamgmesh->Segments[num* 3+2]=(int)j/3+1; //back to M indexing733 bamgmesh->Segments Markers[num]=edges[i].ref;729 bamgmesh->Segments[num*4+0]=Number(edges[i][1])+1; //back to M indexing 730 bamgmesh->Segments[num*4+1]=Number(edges[i][0])+1; //back to M indexing 731 bamgmesh->Segments[num*4+2]=(int)j/3+1; //back to M indexing 732 bamgmesh->Segments[num*4+3]=edges[i].ref; 734 733 num+=1; 735 734 stop=true; -
issm/trunk/src/c/objects/BamgGeom.cpp
r3309 r3311 36 36 mxArray* pfield=NULL; 37 37 mxArray* pfield2=NULL; 38 int numfields= 14;38 int numfields=7; 39 39 const char* fnames[numfields]; 40 40 mwSize ndim=2; 41 41 mwSize dimensions[2]={1,1}; 42 42 43 fnames[0] = "NumVertices"; 44 fnames[1] = "Vertices"; 45 fnames[2] = "NumEdges"; 46 fnames[3] = "Edges"; 47 fnames[4] = "NumTangentAtEdges"; 48 fnames[5] = "TangentAtEdges"; 49 fnames[6] = "NumRequiredVertices"; 50 fnames[7] = "RequiredVertices"; 51 fnames[8] = "NumRequiredEdges"; 52 fnames[9] = "RequiredEdges"; 53 fnames[10]= "NumCrackedEdges"; 54 fnames[11]= "CrackedEdges"; 55 fnames[12]= "NumSubDomains"; 56 fnames[13]= "SubDomains"; 43 fnames[0] = "Vertices"; 44 fnames[1] = "Edges"; 45 fnames[2] = "TangentAtEdges"; 46 fnames[3] = "RequiredVertices"; 47 fnames[4] = "RequiredEdges"; 48 fnames[5] = "CrackedEdges"; 49 fnames[6] = "SubDomains"; 57 50 58 51 bamggeom_mat=mxCreateStructArray(ndim,dimensions,numfields,fnames); 59 60 mxSetField(bamggeom_mat,0,"NumVertices",mxCreateDoubleScalar(bamggeom->NumVertices));61 52 62 53 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 67 58 mxSetField(bamggeom_mat,0,"Vertices",pfield2); 68 59 69 mxSetField(bamggeom_mat,0,"NumEdges",mxCreateDoubleScalar(bamggeom->NumEdges));70 71 60 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 72 61 mxSetM(pfield,3); … … 75 64 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 76 65 mxSetField(bamggeom_mat,0,"Edges",pfield2); 77 78 mxSetField(bamggeom_mat,0,"NumTangentAtEdges",mxCreateDoubleScalar(bamggeom->NumTangentAtEdges));79 66 80 67 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 85 72 mxSetField(bamggeom_mat,0,"TangentAtEdges",pfield2); 86 73 87 mxSetField(bamggeom_mat,0,"NumRequiredVertices",mxCreateDoubleScalar(bamggeom->NumRequiredVertices));88 89 74 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 90 75 mxSetM(pfield,1); … … 93 78 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 94 79 mxSetField(bamggeom_mat,0,"RequiredVertices",pfield2); 95 96 mxSetField(bamggeom_mat,0,"NumRequiredEdges",mxCreateDoubleScalar(bamggeom->NumRequiredEdges));97 80 98 81 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 103 86 mxSetField(bamggeom_mat,0,"RequiredEdges",pfield2); 104 87 105 mxSetField(bamggeom_mat,0,"NumCrackedEdges",mxCreateDoubleScalar(bamggeom->NumCrackedEdges));106 107 88 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 108 89 mxSetM(pfield,2); … … 111 92 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 112 93 mxSetField(bamggeom_mat,0,"CrackedEdges",pfield2); 113 114 mxSetField(bamggeom_mat,0,"NumSubDomains",mxCreateDoubleScalar(bamggeom->NumSubDomains));115 94 116 95 pfield=mxCreateDoubleMatrix(0,0,mxREAL); -
issm/trunk/src/c/objects/BamgMesh.cpp
r3309 r3311 49 49 mxArray* pfield=NULL; 50 50 mxArray* pfield2=NULL; 51 int numfields= 31;51 int numfields=15; 52 52 const char* fnames[numfields]; 53 53 mwSize ndim=2; 54 54 mwSize dimensions[2]={1,1}; 55 55 56 fnames[0] = "NumTriangles"; 57 fnames[1] = "Triangles"; 58 fnames[2] = "NumVertices"; 59 fnames[3] = "Vertices"; 60 fnames[4] = "NumEdges"; 61 fnames[5] = "Edges"; 62 fnames[6] = "NumSegments"; 63 fnames[7] = "Segments"; 64 fnames[8] = "NumAllEdges"; 65 fnames[9] = "AllEdges"; 66 fnames[10] = "SegmentsMarkers"; 67 fnames[11] = "NumCrackedEdges"; 68 fnames[12] = "CrackedEdges"; 69 fnames[13] = "NumQuadrilaterals"; 70 fnames[14] = "Quadrilaterals"; 71 fnames[15] = "NumVerticesOnGeometricVertex"; 72 fnames[16] = "VerticesOnGeometricVertex"; 73 fnames[17] = "NumVerticesOnGeometricEdge"; 74 fnames[18] = "VerticesOnGeometricEdge"; 75 fnames[19] = "NumEdgesOnGeometricEdge"; 76 fnames[20] = "EdgesOnGeometricEdge"; 77 fnames[21] = "NumSubDomains"; 78 fnames[22] = "SubDomains"; 79 fnames[23] = "NumSubDomainsFromGeom"; 80 fnames[24] = "SubDomainsFromGeom"; 81 fnames[25] = "NumElementConnectivity"; 82 fnames[26] = "ElementConnectivity"; 83 fnames[27] = "NumNodalConnectivity"; 84 fnames[28] = "NodalConnectivity"; 85 fnames[29] = "NumNodalElementConnectivity"; 86 fnames[30] = "NodalElementConnectivity"; 56 fnames[0] = "Triangles"; 57 fnames[1] = "Vertices"; 58 fnames[2] = "Edges"; 59 fnames[3] = "Segments"; 60 fnames[4] = "AllEdges"; 61 fnames[5] = "CrackedEdges"; 62 fnames[6] = "Quadrilaterals"; 63 fnames[7] = "VerticesOnGeometricVertex"; 64 fnames[8] = "VerticesOnGeometricEdge"; 65 fnames[9] = "EdgesOnGeometricEdge"; 66 fnames[10]= "SubDomains"; 67 fnames[11]= "SubDomainsFromGeom"; 68 fnames[12]= "ElementConnectivity"; 69 fnames[13]= "NodalConnectivity"; 70 fnames[14]= "NodalElementConnectivity"; 87 71 88 72 bamgmesh_mat=mxCreateStructArray(ndim,dimensions,numfields,fnames); … … 97 81 mxSetField(bamgmesh_mat,0,"Triangles",pfield2); 98 82 99 mxSetField(bamgmesh_mat,0,"NumVertices",mxCreateDoubleScalar(bamgmesh->NumVertices));100 101 83 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 102 84 mxSetM(pfield,3); … … 105 87 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 106 88 mxSetField(bamgmesh_mat,0,"Vertices",pfield2); 107 108 mxSetField(bamgmesh_mat,0,"NumEdges",mxCreateDoubleScalar(bamgmesh->NumEdges));109 89 110 90 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 115 95 mxSetField(bamgmesh_mat,0,"Edges",pfield2); 116 96 117 mxSetField(bamgmesh_mat,0,"NumSegments",mxCreateDoubleScalar(bamgmesh->NumSegments));118 119 97 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 120 mxSetM(pfield, 3);98 mxSetM(pfield,4); 121 99 mxSetN(pfield,bamgmesh->NumSegments); 122 100 mxSetPr(pfield,bamgmesh->Segments); 123 101 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 124 102 mxSetField(bamgmesh_mat,0,"Segments",pfield2); 125 126 mxSetField(bamgmesh_mat,0,"NumAllEdges",mxCreateDoubleScalar(bamgmesh->NumAllEdges));127 103 128 104 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 134 110 135 111 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 136 mxSetM(pfield,1);137 mxSetN(pfield,bamgmesh->NumSegments);138 mxSetPr(pfield,bamgmesh->SegmentsMarkers);139 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose140 mxSetField(bamgmesh_mat,0,"SegmentsMarkers",pfield2);141 142 mxSetField(bamgmesh_mat,0,"NumCrackedEdges",mxCreateDoubleScalar(bamgmesh->NumCrackedEdges));143 144 pfield=mxCreateDoubleMatrix(0,0,mxREAL);145 112 mxSetM(pfield,2); 146 113 mxSetN(pfield,bamgmesh->NumCrackedEdges); … … 148 115 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 149 116 mxSetField(bamgmesh_mat,0,"CrackedEdges",pfield2); 150 151 mxSetField(bamgmesh_mat,0,"NumQuadrilaterals",mxCreateDoubleScalar(bamgmesh->NumQuadrilaterals));152 117 153 118 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 158 123 mxSetField(bamgmesh_mat,0,"Quadrilaterals",pfield2); 159 124 160 mxSetField(bamgmesh_mat,0,"NumVerticesOnGeometricVertex",mxCreateDoubleScalar(bamgmesh->NumVerticesOnGeometricVertex));161 162 125 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 163 126 mxSetM(pfield,2); … … 166 129 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 167 130 mxSetField(bamgmesh_mat,0,"VerticesOnGeometricVertex",pfield2); 168 169 mxSetField(bamgmesh_mat,0,"NumVerticesOnGeometricEdge",mxCreateDoubleScalar(bamgmesh->NumVerticesOnGeometricEdge));170 131 171 132 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 176 137 mxSetField(bamgmesh_mat,0,"VerticesOnGeometricEdge",pfield2); 177 138 178 mxSetField(bamgmesh_mat,0,"NumEdgesOnGeometricEdge",mxCreateDoubleScalar(bamgmesh->NumEdgesOnGeometricEdge));179 180 139 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 181 140 mxSetM(pfield,2); … … 184 143 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 185 144 mxSetField(bamgmesh_mat,0,"EdgesOnGeometricEdge",pfield2); 186 187 mxSetField(bamgmesh_mat,0,"NumSubDomains",mxCreateDoubleScalar(bamgmesh->NumSubDomains));188 145 189 146 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 194 151 mxSetField(bamgmesh_mat,0,"SubDomains",pfield2); 195 152 196 mxSetField(bamgmesh_mat,0,"NumSubDomainsFromGeom",mxCreateDoubleScalar(bamgmesh->NumSubDomainsFromGeom));197 198 153 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 199 154 mxSetM(pfield,4); … … 202 157 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 203 158 mxSetField(bamgmesh_mat,0,"SubDomainsFromGeom",pfield2); 204 205 mxSetField(bamgmesh_mat,0,"NumElementConnectivity",mxCreateDoubleScalar(bamgmesh->NumElementConnectivity));206 159 207 160 pfield=mxCreateDoubleMatrix(0,0,mxREAL); … … 212 165 mxSetField(bamgmesh_mat,0,"ElementConnectivity",pfield2); 213 166 214 mxSetField(bamgmesh_mat,0,"NumNodalConnectivity",mxCreateDoubleScalar(bamgmesh->NumNodalConnectivity));215 216 167 pfield=mxCreateDoubleMatrix(0,0,mxREAL); 217 168 mxSetM(pfield,2); … … 220 171 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose 221 172 mxSetField(bamgmesh_mat,0,"NodalConnectivity",pfield2); 222 223 mxSetField(bamgmesh_mat,0,"NumNodalElementConnectivity",mxCreateDoubleScalar(bamgmesh->NumNodalElementConnectivity));224 173 225 174 pfield=mxCreateDoubleMatrix(0,0,mxREAL); -
issm/trunk/src/m/classes/@bamggeom/bamggeom.m
r3277 r3311 8 8 case 0 9 9 % if no input arguments, create a default object 10 bg.NumVertices=0;11 10 bg.Vertices=[]; 12 13 bg.NumEdges=0; 14 bg.Edges=zeros(0,3); 15 16 bg.NumTangentAtEdges=0; 11 bg.Edges=[]; 17 12 bg.TangentAtEdges=[]; 18 19 bg.NumCorners=0;20 13 bg.Corners=[]; 21 22 bg.NumRequiredVertices=0;23 14 bg.RequiredVertices=[]; 24 25 bg.NumRequiredEdges=0;26 15 bg.RequiredEdges=[]; 27 28 bg.NumCrackedEdges=0; 29 bg.CrackedEdges=zeros(0,3); 30 16 bg.CrackedEdges=[]; 31 17 bg.hVertices=[]; 32 bg.MetricVertices= zeros(0,3);18 bg.MetricVertices=[]; 33 19 bg.h1h2VpVertices=[]; 34 35 bg.NumSubDomains=0; 36 bg.SubDomains=zeros(0,4); 20 bg.SubDomains=[]; 37 21 38 22 bg=class(bg,'bamggeom'); -
issm/trunk/src/m/classes/@bamgmesh/bamgmesh.m
r3309 r3311 8 8 case 0 9 9 % if no input arguments, create a default object 10 bm.NumVertices=0;11 10 bm.Vertices=[]; 12 13 bm.NumEdges=0; 14 bm.Edges=zeros(0,3); 15 16 bm.NumTriangles=0; 11 bm.Edges=[]; 17 12 bm.Triangles=[]; 18 19 bm.NumQuadrilaterals=0;20 13 bm.Quadrilaterals=[]; 21 22 bm.NumAllEdges=0; 23 bm.AllEdges=zeros(0,2); 24 25 bm.NumSegments=0; 26 bm.Segments=zeros(0,3); 27 bm.SegmentsMarkers=[]; 28 29 bm.NumVerticesOnGeometricVertex=0; 30 bm.VerticesOnGeometricVertex=zeros(0,2); 31 32 bm.NumVerticesOnGeometricEdge=0; 33 bm.VerticesOnGeometricEdge=zeros(0,2); 34 35 bm.NumEdgesOnGeometricEdge=0; 36 bm.EdgesOnGeometricEdge=zeros(0,2); 37 38 bm.NumCrackedEdges=0; 39 bm.CrackedEdges=zeros(0,2); 40 41 bm.NumSubDomains=0; 42 bm.SubDomains=zeros(0,4); 43 44 bm.NumSubDomainsFromGeom=0; 45 bm.SubDomainsFromGeom=zeros(0,4); 46 47 bm.NumElementConnectivity=0; 48 bm.ElementConnectivity=zeros(0,3); 49 50 bm.NumNodalConnectivity=0; 51 bm.NodalConnectivity=zeros(0,2); 52 53 bm.NumNodalElementConnectivity=0; 14 bm.AllEdges=[]; 15 bm.Segments=[]; 16 bm.VerticesOnGeometricVertex=[]; 17 bm.VerticesOnGeometricEdge=[]; 18 bm.EdgesOnGeometricEdge=[]; 19 bm.CrackedEdges=[]; 20 bm.SubDomains=[]; 21 bm.SubDomainsFromGeom=[]; 22 bm.ElementConnectivity=[]; 23 bm.NodalConnectivity=[]; 54 24 bm.NodalElementConnectivity=[]; 55 56 25 bm.hVertices=[]; 57 26 -
issm/trunk/src/m/classes/public/bamg.m
r3307 r3311 216 216 217 217 end 218 219 %update other fields of bamg_geometry220 bamg_geometry.NumVertices=size(bamg_geometry.Vertices,1);221 bamg_geometry.NumEdges=size(bamg_geometry.Edges,1);222 bamg_geometry.NumSubDomains=size(bamg_geometry.SubDomains,1);223 218 %}}} 224 219 … … 229 224 bamg_mesh=bamgmesh(md.bamg.mesh); 230 225 else 231 bamg_mesh.NumVertices=md.numberofgrids;232 226 bamg_mesh.Vertices=[md.x md.y ones(md.numberofgrids,1)]; 233 bamg_mesh.NumTriangles=md.numberofelements;234 227 bamg_mesh.Triangles=[md.elements ones(md.numberofelements,1)]; 235 228 end … … 286 279 md.y=bamgmesh_out.Vertices(:,2); 287 280 md.elements=bamgmesh_out.Triangles(:,1:3); 288 md.segments=bamgmesh_out.Segments ;289 md.segmentmarkers=bamgmesh_out.Segments Markers;281 md.segments=bamgmesh_out.Segments(:,1:3); 282 md.segmentmarkers=bamgmesh_out.Segments(:,4); 290 283 291 284 %Fill in rest of fields: -
issm/trunk/src/mex/Bamg/Bamg.cpp
r3309 r3311 26 26 /*create bamg geometry input*/ 27 27 BamgGeomInit(&bamggeom_in); 28 FetchData(&bamggeom_in.NumVertices,mxGetField(BAMGGEOMETRY,0,"NumVertices")); 29 FetchData(&bamggeom_in.Vertices,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"Vertices")); 30 FetchData(&bamggeom_in.NumEdges,mxGetField(BAMGGEOMETRY,0,"NumEdges")); 31 FetchData(&bamggeom_in.Edges,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"Edges")); 32 FetchData(&bamggeom_in.NumCorners,mxGetField(BAMGGEOMETRY,0,"NumCorners")); 33 FetchData(&bamggeom_in.Corners,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"Corners")); 34 FetchData(&bamggeom_in.NumRequiredVertices,mxGetField(BAMGGEOMETRY,0,"NumRequiredVertices")); 35 FetchData(&bamggeom_in.RequiredVertices,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"RequiredVertices")); 36 FetchData(&bamggeom_in.NumRequiredEdges,mxGetField(BAMGGEOMETRY,0,"NumRequiredEdges")); 37 FetchData(&bamggeom_in.RequiredEdges,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"RequiredEdges")); 28 FetchData(&bamggeom_in.Vertices,&bamggeom_in.NumVertices,NULL,mxGetField(BAMGGEOMETRY,0,"Vertices")); 29 FetchData(&bamggeom_in.Edges,&bamggeom_in.NumEdges,NULL,mxGetField(BAMGGEOMETRY,0,"Edges")); 30 FetchData(&bamggeom_in.Corners,&bamggeom_in.NumCorners,NULL,mxGetField(BAMGGEOMETRY,0,"Corners")); 31 FetchData(&bamggeom_in.RequiredVertices,&bamggeom_in.NumRequiredVertices,NULL,mxGetField(BAMGGEOMETRY,0,"RequiredVertices")); 32 FetchData(&bamggeom_in.RequiredEdges,&bamggeom_in.NumRequiredEdges,NULL,mxGetField(BAMGGEOMETRY,0,"RequiredEdges")); 38 33 FetchData(&bamggeom_in.hVertices,&lines,&cols,mxGetField(BAMGGEOMETRY,0,"hVertices")); 39 FetchData(&bamggeom_in.NumCrackedEdges,mxGetField(BAMGGEOMETRY,0,"NumCrackedEdges")); 40 FetchData(&bamggeom_in.CrackedEdges,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"CrackedEdges")); 41 FetchData(&bamggeom_in.NumSubDomains,mxGetField(BAMGGEOMETRY,0,"NumSubDomains")); 42 FetchData(&bamggeom_in.SubDomains,NULL,NULL,mxGetField(BAMGGEOMETRY,0,"SubDomains")); 34 FetchData(&bamggeom_in.CrackedEdges,&bamggeom_in.NumCrackedEdges,NULL,mxGetField(BAMGGEOMETRY,0,"CrackedEdges")); 35 FetchData(&bamggeom_in.SubDomains,&bamggeom_in.NumSubDomains,NULL,mxGetField(BAMGGEOMETRY,0,"SubDomains")); 43 36 if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamggeom_in.NumVertices,1));} 44 37 45 38 /*create bamg mesh input*/ 46 39 BamgMeshInit(&bamgmesh_in); 47 FetchData(&bamgmesh_in.NumVertices,mxGetField(BAMGMESH,0,"NumVertices")); 48 FetchData(&bamgmesh_in.Vertices,NULL,NULL,mxGetField(BAMGMESH,0,"Vertices")); 49 FetchData(&bamgmesh_in.NumTriangles,mxGetField(BAMGMESH,0,"NumTriangles")); 50 FetchData(&bamgmesh_in.Triangles,NULL,NULL,mxGetField(BAMGMESH,0,"Triangles")); 40 FetchData(&bamgmesh_in.Vertices,&bamgmesh_in.NumVertices,NULL,mxGetField(BAMGMESH,0,"Vertices")); 41 FetchData(&bamgmesh_in.Triangles,&bamgmesh_in.NumTriangles,NULL,mxGetField(BAMGMESH,0,"Triangles")); 51 42 FetchData(&bamgmesh_in.hVertices,&lines,&cols,mxGetField(BAMGMESH,0,"hVertices")); 52 FetchData(&bamgmesh_in.NumSegments,mxGetField(BAMGMESH,0,"NumSegments")); 53 FetchData(&bamgmesh_in.Segments,NULL,NULL,mxGetField(BAMGMESH,0,"Segments")); 54 FetchData(&bamgmesh_in.SegmentsMarkers,NULL,NULL,mxGetField(BAMGMESH,0,"SegmentsMarkers")); 55 FetchData(&bamgmesh_in.NumCrackedEdges,mxGetField(BAMGMESH,0,"NumCrackedEdges")); 56 FetchData(&bamgmesh_in.CrackedEdges,NULL,NULL,mxGetField(BAMGMESH,0,"CrackedEdges")); 57 FetchData(&bamgmesh_in.NumEdges,mxGetField(BAMGMESH,0,"NumEdges")); 58 FetchData(&bamgmesh_in.Edges,NULL,NULL,mxGetField(BAMGMESH,0,"Edges")); 59 FetchData(&bamgmesh_in.NumEdgesOnGeometricEdge,mxGetField(BAMGMESH,0,"NumEdgesOnGeometricEdge")); 60 FetchData(&bamgmesh_in.EdgesOnGeometricEdge,NULL,NULL,mxGetField(BAMGMESH,0,"EdgesOnGeometricEdge")); 61 FetchData(&bamgmesh_in.NumVerticesOnGeometricEdge,mxGetField(BAMGMESH,0,"NumVerticesOnGeometricEdge")); 62 FetchData(&bamgmesh_in.VerticesOnGeometricEdge,NULL,NULL,mxGetField(BAMGMESH,0,"VerticesOnGeometricEdge")); 63 FetchData(&bamgmesh_in.NumVerticesOnGeometricVertex,mxGetField(BAMGMESH,0,"NumVerticesOnGeometricVertex")); 64 FetchData(&bamgmesh_in.VerticesOnGeometricVertex,NULL,NULL,mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex")); 43 FetchData(&bamgmesh_in.Segments,&bamgmesh_in.NumSegments,NULL,mxGetField(BAMGMESH,0,"Segments")); 44 FetchData(&bamgmesh_in.CrackedEdges,&bamgmesh_in.NumCrackedEdges,NULL,mxGetField(BAMGMESH,0,"CrackedEdges")); 45 FetchData(&bamgmesh_in.Edges,&bamgmesh_in.NumEdges,NULL,mxGetField(BAMGMESH,0,"Edges")); 46 FetchData(&bamgmesh_in.EdgesOnGeometricEdge,&bamgmesh_in.NumEdgesOnGeometricEdge,NULL,mxGetField(BAMGMESH,0,"EdgesOnGeometricEdge")); 47 FetchData(&bamgmesh_in.VerticesOnGeometricEdge,&bamgmesh_in.NumVerticesOnGeometricEdge,NULL,mxGetField(BAMGMESH,0,"VerticesOnGeometricEdge")); 48 FetchData(&bamgmesh_in.VerticesOnGeometricVertex,&bamgmesh_in.NumVerticesOnGeometricVertex,NULL,mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex")); 65 49 if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamgmesh_in.NumVertices,1));} 66 50
Note:
See TracChangeset
for help on using the changeset viewer.