Changeset 5208
- Timestamp:
- 08/12/10 15:32:14 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp
r5177 r5208 21 21 /*Options*/ 22 22 BamgOpts* bamgopts=NULL; 23 bamgopts=new BamgOpts(); 23 24 24 25 // read mesh -
issm/trunk/src/c/objects/Bamg/Geometry.cpp
r5187 r5208 48 48 Geometry::~Geometry() { 49 49 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/~Geometry)*/ 50 ISSMASSERT(NbRef<=0);51 if(vertices) delete [] vertices;vertices=0;52 if(edges) delete [] edges;edges=0;53 if(quadtree) delete quadtree;quadtree=0;54 if(curves) delete []curves;curves=0;nbcurves=0;50 if(NbRef>0) ISSMERROR("Trying to delete geometry and NbRef>0"); 51 if(vertices) delete [] vertices; vertices=0; 52 if(edges) delete [] edges; edges=0; 53 if(quadtree) delete quadtree; quadtree=0; 54 if(curves) delete [] curves; curves=0;nbcurves=0; 55 55 if(subdomains) delete [] subdomains;subdomains=0; 56 56 Init(); -
issm/trunk/src/c/objects/Bamg/Mesh.cpp
r5187 r5208 2324 2324 //Reset BamgVertex to On 2325 2325 SetVertexFieldOn(); 2326 2327 } 2328 /*}}}1*/ 2329 /*FUNCTION Mesh::Echo{{{1*/ 2330 void Mesh::Echo(void) { 2331 2332 int i; 2333 2334 printf("Mesh Echo:\n"); 2335 printf(" nbv = %i\n",nbv); 2336 printf(" nbt = %i\n",nbt); 2337 printf(" nbe = %i\n",nbe); 2338 printf(" nbq = %i\n",nbq); 2339 printf(" index:\n"); 2340 for (i=0;i<nbt;i++){ 2341 printf(" %4i: [%4i %4i %4i]\n",i+1, 2342 ((BamgVertex *)triangles[i](0))?GetId(triangles[i][0])+1:0, 2343 ((BamgVertex *)triangles[i](1))?GetId(triangles[i][1])+1:0, 2344 ((BamgVertex *)triangles[i](2))?GetId(triangles[i][2])+1:0); 2345 } 2346 printf(" coordinates:\n"); 2347 for (i=0;i<nbv;i++){ 2348 printf(" %4i: [%g %g]\n",i+1,vertices[i].r.x,vertices[i].r.y); 2349 } 2326 2350 2327 2351 } … … 2550 2574 // see routine MakeGeometricalEdgeToEdge 2551 2575 Edge &e = *GeometricalEdgetoEdge[Gh.GetId(eg)]; 2552 if (&e==NULL){ 2553 ISSMERROR("&e==NULL"); 2554 } 2576 ISSMASSERT(&e); 2555 2577 BamgVertex * v0 = e(0),*v1 = e(1); 2556 2578 Triangle *t = v0->t; … … 2560 2582 subdomains[i].direction = direction; 2561 2583 subdomains[i].edge = &e; 2562 if (!t || !direction){ 2563 ISSMERROR("!t || !direction"); 2564 } 2584 ISSMASSERT(t && direction); 2565 2585 2566 2586 AdjacentTriangle ta(t,EdgesVertexTriangle[v0->vint][0]);// previous edges 2567 2587 2568 2588 while (1) { 2569 if ( v0 != ta.EdgeVertex(1) ){ 2570 ISSMERROR("v0 != ta.EdgeVertex(1)"); 2571 } 2589 ISSMASSERT(v0==ta.EdgeVertex(1)); 2572 2590 if (ta.EdgeVertex(0) == v1) { // ok we find the edge 2573 2591 if (direction>0) … … 4841 4859 4842 4860 //check that num is in [0 nbt[ 4843 if (num<0 || num>=nbt){ ISSMERROR("num<0 || num>=nbt");}4861 ISSMASSERT(num>=0 && num<nbt); 4844 4862 4845 4863 //reft of this triangle is the subdomain number -
issm/trunk/src/c/objects/Bamg/Mesh.h
r5180 r5208 78 78 void AddVertex(BamgVertex & s,Triangle * t,Icoor2 * =0) ; 79 79 void Insert(); 80 void Echo(void); 80 81 void ForceBoundary(); 81 82 void FindSubDomain(int OutSide=0); -
issm/trunk/src/m/classes/public/bamg.m
r5187 r5208 86 86 bamg_geometry.Vertices=[bamg_geometry.Vertices; [domain(i).x(1:nods) domain(i).y(1:nods) ones(nods,1)]]; 87 87 bamg_geometry.Edges =[bamg_geometry.Edges; [transpose(count+1:count+nods) transpose([count+2:count+nods count+1]) 1*ones(nods,1)]]; 88 if i>1, bamg_geometry.SubDomains=[2 count+1 1 1]; 88 89 89 90 %update counter -
issm/trunk/src/m/utils/Model/loadmodel.m
r2630 r5208 19 19 [stat,mess]=fileattrib(path); 20 20 if( stat==0 | mess.UserRead~=1), 21 error(['loadmodel error message: file ' path ' is not readable (permission dinied).']);21 %error(['loadmodel error message: file ' path ' is not readable (permission denied).']); 22 22 end 23 23 %check number of variables
Note:
See TracChangeset
for help on using the changeset viewer.