Changeset 2966
- Timestamp:
- 02/05/10 11:58:49 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/objects/Geometry.cpp
r2965 r2966 726 726 } 727 727 728 // close the list earound the vertex728 // close the list around the vertex 729 729 Int4 no=-1, ne = head_v[i]; 730 730 while (ne >=0) ne = next_p[no=ne]; -
issm/trunk/src/m/classes/public/bamg.m
r2961 r2966 34 34 35 35 for i=1:length(domain), 36 nods=domain(i).nods-1; %the domain are closed 1=end; 37 bamg_geometry.Vertices=[bamg_geometry.Vertices; [domain(i).x(1:nods) domain(i).y(1:nods) ones(nods,1)]]; 38 bamg_geometry.Edges=[bamg_geometry.Edges; [transp(count+1:count+nods) transp([count+2:count+nods count+1]) ones(nods,1)]]; 39 if i>1, 40 %if closed : hole 41 if (domain(i).x(1)==domain(i).x(end) & domain(i).y(1)==domain(i).y(end)), 36 37 %if current profile is closed 38 if (domain(i).x(1)==domain(i).x(end) & domain(i).y(1)==domain(i).y(end)), 39 nods=domain(i).nods-1; %the domain are closed 1=end; 40 bamg_geometry.Vertices=[bamg_geometry.Vertices; [domain(i).x(1:nods) domain(i).y(1:nods) ones(nods,1)]]; 41 bamg_geometry.Edges=[bamg_geometry.Edges; [transp(count+1:count+nods) transp([count+2:count+nods count+1]) ones(nods,1)]]; 42 if i>1, 43 %if closed : hole 42 44 clockwise=-1; 43 45 bamg_geometry.SubDomains=[2 count+1 clockwise 1]; 44 else 45 %rift 46 46 47 end 48 49 elseif i>1 50 %rift 51 nods=domain(i).nods-1; 52 bamg_geometry.Vertices=[bamg_geometry.Vertices; [domain(i).x(:) domain(i).y(:) ones(nods+1,1)]]; 53 bamg_geometry.Edges=[bamg_geometry.Edges; [transp(count+1:count+nods) transp([count+2:count+nods+1]) ones(nods,1)]]; 54 55 else 56 error('bamg error message: the first domain should be closed'); 47 57 end 48 58 count=count+nods; … … 55 65 end 56 66 bamg_geometry.NumVertices=size(bamg_geometry.Vertices,1); 57 bamg_geometry.NumEdges=size(bamg_geometry.Edges,1); 67 bamg_geometry.NumEdges=size(bamg_geometry.Edges,1) 68 bamg_geometry.Edges 58 69 bamg_geometry.NumSubDomains=size(bamg_geometry.SubDomains,1); 59 70 end
Note:
See TracChangeset
for help on using the changeset viewer.