Changeset 2861
- Timestamp:
- 01/15/10 14:41:25 (15 years ago)
- Location:
- issm/trunk/src/c/Bamgx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/Mesh2.h
r2859 r2861 170 170 int ref() const { return ReferenceNumber;} 171 171 172 friend std::ostream& operator <<(std::ostream& f, const Vertex & v)173 {f << "(" << v.i << "," << v.r << MatVVP2x2(v.m) << ")" ; return f;}174 172 inline void Set(const Vertex & rec,const Triangles &,Triangles &); 175 173 }; … … 181 179 ///////////////////////////////////////////////////////////////////////////////////// 182 180 class TriangleAdjacent { 183 friend std::ostream& operator <<(std::ostream& f, const TriangleAdjacent & ta)184 {f << "{" << ta.t << "," << ((int) ta.a) << "}" ;185 return f;}186 181 187 182 public: … … 275 270 276 271 inline void Set(const GeometricalVertex & rec,const Geometry & Gh ,const Geometry & GhNew); 277 inline friend std::ostream& operator <<(std::ostream& f, const GeometricalVertex & s)278 { f << s.r << "," << s.cas << ".";return f; }279 272 }; 280 273 … … 341 334 class Triangle { 342 335 friend class TriangleAdjacent; 343 friend std::ostream& operator <<(std::ostream& f, const Triangle & ta);344 336 345 337 … … 606 598 int IsRequiredVertex(){ return this? (( abscisse<0 ? (gv?gv->Required():0):0 )) : 0;} 607 599 void SetOn(){mv->on=this;mv->vint=IsVertexOnGeom;} 608 friend std::ostream& operator <<(std::ostream& f, const VertexOnGeom & vog){609 f << vog.abscisse << " " << vog.mv << " " << vog.gv << " ; ";610 if (vog.abscisse < 0) f << *vog.gv << " ;; " ;611 // else f << *vog.ge << " ;; " ;612 return f;}613 600 inline void Set(const Triangles &,Int4,Triangles &); 614 601 … … 643 630 class CrackedEdge { // a small class to store on crack an uncrack information 644 631 friend class Triangles; 645 friend std::ostream& operator <<(std::ostream& f, const Triangles & Th) ;646 632 class CrackedTriangle { 647 633 friend class Triangles; 648 634 friend class CrackedEdge; 649 friend std::ostream& operator <<(std::ostream& f, const Triangles & Th) ;650 635 Triangle * t; // edge of triangle t 651 636 int i; // edge number of in triangle … … 855 840 int UnCrack(); 856 841 857 friend std::ostream& operator <<(std::ostream& f, const Triangles & Th);858 842 void ConsGeometry(Real8 =-1.0,int *equiedges=0); // construct a geometry if no geo 859 843 void FillHoleInMesh() ; … … 926 910 GeometricalEdge * ProjectOnCurve(const Edge & ,Real8,Vertex &,VertexOnGeom &) const ; 927 911 GeometricalEdge * Contening(const R2 P, GeometricalEdge * start) const; 928 friend std::ostream& operator <<(std::ostream& f, const Geometry & Gh);929 912 void WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts); 930 913 }; // End Class Geometry -
issm/trunk/src/c/Bamgx/Metric.h
r2858 r2861 1 // -*- Mode : c++ -*-2 //3 // SUMMARY :4 // USAGE :5 // ORG :6 // AUTHOR : Frederic Hecht7 // E-MAIL : hecht@ann.jussieu.fr8 //9 10 /*11 12 This file is part of Freefem++13 14 Freefem++ is free software; you can redistribute it and/or modify15 it under the terms of the GNU Lesser General Public License as published by16 the Free Software Foundation; either version 2.1 of the License, or17 (at your option) any later version.18 19 Freefem++ is distributed in the hope that it will be useful,20 but WITHOUT ANY WARRANTY; without even the implied warranty of21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22 GNU Lesser General Public License for more details.23 24 You should have received a copy of the GNU Lesser General Public License25 along with Freefem++; if not, write to the Free Software26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA27 */28 29 1 #ifndef TYPEMETRIX 30 2 #define TYPEMETRIX MetricAnIso … … 73 45 operator D2xD2(){ return D2xD2(1/(h*h),0.,0.,1/(h*h));} 74 46 void Box(Real4 & hx,Real4 & hy) { hx=h,hy=h;} 75 friend std::ostream& operator <<(std::ostream& f, const MetricIso & M)76 {f << " h=" << M.h<< ";" ; return f;}77 78 47 }; 79 48 … … 103 72 Real8 operator()(R2 x,R2 y) const { return x.x*y.x*a11+(x.x*x.y+x.y*y.x)*a21+x.y*y.y*a22;}; 104 73 inline void Box(Real4 &hx,Real4 &hy) const ; 105 friend std::ostream& operator <<(std::ostream& f, const MetricAnIso & M)106 {f << " mtr a11=" << M.a11 << " a21=a12=" << M.a21 << " a22=" << M.a22 << ";" ; return f;}107 74 MetricAnIso(const MatVVP2x2); 108 75 }; … … 128 95 void Maxh(double h) {Min(1.0/(h*h));} 129 96 void Isotrope() {lambda1=lambda2=bamg::Max(lambda1,lambda2);} 130 friend std::ostream& operator <<(std::ostream& f, const MatVVP2x2 & c)131 { f << '{' << 1/sqrt(c.lambda1)<< ',' << 1/sqrt(c.lambda2) << ','<< c.v << '}' <<std::flush ; return f; }132 friend std::istream& operator >>(std::istream& f, MatVVP2x2 & c)133 { f >> c.lambda1 >>c.lambda2 >> c.v.x >> c.v.y ;c.v /= Norme2(c.v); return f; }134 97 MatVVP2x2(const MetricAnIso ); 135 98 MatVVP2x2(const MetricIso M) : lambda1(1/(M.h*M.h)),lambda2(1/(M.h*M.h)),v(1,0) {} -
issm/trunk/src/c/Bamgx/QuadTree.h
r2856 r2861 74 74 QuadTree(Triangles * t,long nbv=-1); 75 75 QuadTree(); 76 friend ostream& operator <<(ostream& f, const QuadTree & qt);77 78 79 76 80 77 }; -
issm/trunk/src/c/Bamgx/R2.h
r2840 r2861 1 #include <iostream> 1 2 2 3 namespace bamg {
Note:
See TracChangeset
for help on using the changeset viewer.