Changeset 2800
- Timestamp:
- 01/12/10 13:47:11 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/MeshQuad.cpp
r2740 r2800 347 347 } 348 348 delete [] qq; 349 #ifdef DRAWING2350 Draw();351 inquire();352 #endif353 349 354 350 } … … 375 371 376 372 ReNumberingTheTriangleBySubDomain(); 377 #ifdef DRAWING2378 Draw();379 inquire();380 #endif381 373 //int nswap =0; 382 374 const Int4 nfortria( choice ? 4 : 6); … … 431 423 triangles[i].check(); 432 424 #endif 433 #ifdef DRAWING2434 reffecran();435 #endif436 425 Int4 k=nbv; 437 426 Int4 kk=0; … … 682 671 newNbOfQuad = 4*NbOfQuad; 683 672 nbv = k; 684 #ifdef DRAWING2685 inquire();686 #endif687 673 // cout << " Nbv = " << nbv << endl; 688 674 kkk = nbt; … … 874 860 for (i=0;i<BTh.nbv;i++) 875 861 BTh.vertices[i].m = BTh.vertices[i].m*2.; 876 #ifdef DRAWING2877 Draw();878 inquire();879 #endif880 862 881 863 -
issm/trunk/src/c/Bamgx/MeshRead.cpp
r2797 r2800 31 31 #endif 32 32 33 #ifdef DRAWING134 extern bool withrgraphique ;35 #endif36 33 37 34 namespace bamg { -
issm/trunk/src/c/Bamgx/Metric.cpp
r2797 r2800 863 863 864 864 const Real8 maxsubdiv2 = maxsubdiv*maxsubdiv; 865 #ifdef DRAWING2866 inquire();867 #endif868 865 if(verbosity>1) 869 866 cout << " -- Limit the subdivision of a edges in the new mesh by " << maxsubdiv << endl ; … … 893 890 D2xD2 D(maxsubdiv2,0,0,lc); 894 891 D2xD2 MM = Rt1*D*Rt1.t(); 895 #ifdef DRAWING1896 v0.m.Draw(v0);897 #endif898 892 v0.m = M = MetricAnIso(MM.x.x,MM.y.x,MM.y.y); 899 #ifdef DRAWING1900 v0.m.Draw(v0);901 #endif902 // cout << " M(AB,AB) = " << M(AB,AB) << " == " << maxsubdiv903 // << " M(AC,AC) = " << M(AC,AC) << " == " << lc << endl;904 893 nbchange++; 905 894 } … … 914 903 D2xD2 D(maxsubdiv2,0,0,lc); 915 904 D2xD2 MM = Rt1*D*Rt1.t(); 916 #ifdef DRAWING1917 v1.m.Draw(v1);918 #endif919 905 v1.m = M = MetricAnIso(MM.x.x,MM.y.x,MM.y.y); 920 #ifdef DRAWING1921 v1.m.Draw(v1);922 inquire();923 #endif924 // cout << " M(AB,AB) = " << M(AB,AB) << " == " << maxsubdiv925 // << " M(AC,AC) = " << M(AC,AC) << " == " << lc << endl;926 906 nbchange++; 927 907 } … … 934 914 cout << " Nb of metric change = " << nbchange 935 915 << " Max of the subdivision of a edges before change = " << sqrt(lmax) << endl; 936 #ifdef DRAWING2937 inquire();938 #endif939 916 940 917 } … … 1123 1100 1124 1101 } 1125 1126 1127 #ifdef DRAWING1128 1129 void MetricAnIso::Draw(R2 c) const1130 {1131 float x= c.x,y= c.y;1132 if (InPtScreen(x,y)) {1133 R2 X(cos(0.0),sin(0.0));1134 X = X / operator()(X);1135 rmoveto(x+X.x,y+X.y);1136 1137 for (int i=1;i<=100;i++)1138 { double t= 2*Pi*i/100.0;1139 R2 X(cos(t),sin(t));1140 X = X / Max(operator()(X),1.0e-5);1141 rlineto(x+X.x,y+X.y); }1142 }1143 }1144 1145 void MetricIso::Draw(R2 c) const1146 {1147 float x= c.x,y= c.y;1148 if (InPtScreen(x,y)) {1149 rmoveto(x+h,y);1150 for (int i=1;i<=40;i++)1151 { double t= Pi*i/20.0;1152 rlineto(x+h*cos(t),y+h*sin(t)); }1153 }1154 }1155 1156 1157 #endif1158 1102 } // end of namespace bamg -
issm/trunk/src/c/Bamgx/Metric.h
r2740 r2800 76 76 {f << " h=" << M.h<< ";" ; return f;} 77 77 78 #ifdef DRAWING79 void Draw(R2 ) const;80 #endif81 78 }; 82 79 … … 108 105 friend std::ostream& operator <<(std::ostream& f, const MetricAnIso & M) 109 106 {f << " mtr a11=" << M.a11 << " a21=a12=" << M.a21 << " a22=" << M.a22 << ";" ; return f;} 110 #ifdef DRAWING111 void Draw(R2 ) const;112 #endif113 107 MetricAnIso(const MatVVP2x2); 114 108 }; -
issm/trunk/src/c/Bamgx/QuadTree.cpp
r2740 r2800 48 48 49 49 50 #ifdef DRAWING51 52 void QuadTree::Draw()53 {54 QuadTreeBox * pb[ MaxDeep ];55 int pi[ MaxDeep ];56 Icoor1 ii[ MaxDeep ], jj [ MaxDeep];57 register int l=0; // level58 register QuadTreeBox * b;59 IntQuad hb = MaxISize;60 if(!root) return;61 // Int4 kkk =0;62 pb[0]= root;63 pi[0]= root->n>0 ?(int) root->n : 4 ;64 ii[0]=jj[0]=0;65 do{66 b= pb[l];67 68 while (pi[l]--)69 {70 if (b->n>0) // Vertex QuadTreeBox none empty71 { //72 for (int k=0;k<b->n;k++)73 {74 I2 i2 = b->v[k]->i;75 IMoveTo(i2.x,i2.y+50);76 ILineTo(i2.x,i2.y-50);77 IMoveTo(i2.x+50,i2.y);78 ILineTo(i2.x-50,i2.y);79 80 assert(ii[l] <= i2.x);81 assert(jj[l] <= i2.y);82 assert(ii[l] +hb > i2.x);83 assert(jj[l] +hb > i2.y);84 85 }86 break;87 }88 else // Pointer QuadTreeBox89 {90 register int lll = pi[l];91 register QuadTreeBox *b0=b;92 93 if ((b=b->b[lll]))94 {95 hb >>=1 ; // div by 296 register Icoor1 iii = ii[l]+I_IJ(lll,hb);97 register Icoor1 jjj = jj[l]+J_IJ(lll,hb);98 99 pb[++l]= b;100 pi[l]= 4;101 ii[l]= iii;102 jj[l]= jjj;103 104 IMoveTo(ii[l],jj[l]);105 ILineTo(ii[l]+hb,jj[l]);106 ILineTo(ii[l]+hb,jj[l]+hb);107 ILineTo(ii[l] ,jj[l]+hb);108 ILineTo(ii[l] ,jj[l]);109 110 111 }112 else113 {114 register Icoor1 iii = ii[l]+I_IJ(lll,hb/2);115 register Icoor1 jjj = jj[l]+J_IJ(lll,hb/2);116 b=b0;117 118 IMoveTo(iii, jjj);119 ILineTo(iii+hb/2,jjj+hb/2);120 IMoveTo(iii+hb/2,jjj);121 ILineTo(iii ,jjj+hb/2);122 123 }124 }125 }126 hb <<= 1; // mul by 2127 } while (l--);128 129 }130 131 #endif132 50 133 51 Vertex * QuadTree::NearestVertex(Icoor1 i,Icoor1 j) … … 382 300 for (Int4 i=0;i<nbv;i++) 383 301 Add(t->vertices[i]); 384 #ifdef DRAWING1385 Draw();386 #endif387 302 } 388 303 -
issm/trunk/src/c/Bamgx/QuadTree.h
r2740 r2800 83 83 long SizeOf() const {return sizeof(QuadTree)+sb->SizeOf();} 84 84 85 #ifdef DRAWING86 void Draw();87 #endif88 85 89 86 void Add( Vertex & w); -
issm/trunk/src/c/Makefile.am
r2799 r2800 322 322 ./Bamgx/Mesh2.cpp \ 323 323 ./Bamgx/Mesh2.h \ 324 ./Bamgx/MeshDraw.cpp \325 324 ./Bamgx/MeshGeom.cpp \ 326 325 ./Bamgx/Meshio.cpp \ … … 665 664 ./Bamgx/Mesh2.cpp \ 666 665 ./Bamgx/Mesh2.h \ 667 ./Bamgx/MeshDraw.cpp \668 666 ./Bamgx/MeshGeom.cpp \ 669 667 ./Bamgx/Meshio.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.