Changeset 5150 for issm/trunk
- Timestamp:
- 08/11/10 11:47:52 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Bamg
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Bamg/BamgVertex.cpp
r5143 r5150 9 9 10 10 /*Methods*/ 11 /*FUNCTION BamgVertex::Echo {{{1*/ 12 13 void BamgVertex::Echo(void){ 14 15 printf("Vertex:\n"); 16 printf(" integer coordinates i.x: %i, i.y: %i\n",i.x,i.y); 17 printf(" Euclidean coordinates r.x: %g, r.y: %g\n",r.x,r.y); 18 printf(" ReferenceNumber = %i\n",ReferenceNumber); 19 m.Echo(); 20 21 return; 22 } 23 /*}}}*/ 24 /*FUNCTION BamgVertex::GetReferenceNumber{{{1*/ 25 int BamgVertex::GetReferenceNumber() const { 26 return ReferenceNumber; 27 } 28 /*}}}*/ 29 /*FUNCTION BamgVertex::MetricFromHessian{{{1*/ 30 void BamgVertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){ 31 /*Compute Metric from Hessian*/ 32 33 /*get options*/ 34 double power=(bamgopts->power); 35 double anisomax=(bamgopts->anisomax); 36 double CutOff=bamgopts->cutoff; 37 double hmin=(bamgopts->hmin); 38 double hmax=(bamgopts->hmax); 39 double coef=bamgopts->coeff; 40 int Metrictype=(bamgopts->Metrictype); 41 42 /*Intermediary*/ 43 double ci; 44 45 /*compute multiplicative coefficient depending on Metric Type (2/9 because it is 2d)*/ 46 47 //Absolute Error 48 /* 49 * 2 1 50 *Metric M = --- ------------ Abs(Hessian) 51 * 9 err * coeff^2 52 */ 53 if (Metrictype==0){ 54 ci= 2.0/9.0 * 1/(err*coef*coef); 55 } 56 57 //Relative Error 58 /* 59 * 2 1 Abs(Hessian) 60 *Metric M = --- ------------ ---------------------- 61 * 9 err * coeff^2 max( |s| , cutoff*max(|s|) ) 62 * 63 */ 64 else if (Metrictype==1){ 65 ci= 2.0/9.0 * 1/(err*coef*coef) * 1/Max( Abs(s), CutOff*(Max(Abs(smin),Abs(smax)))); 66 } 67 68 //Rescaled absolute error 69 /* 70 * 2 1 Abs(Hessian) 71 *Metric M = --- ------------ ---------------------- 72 * 9 err * coeff^2 (smax-smin) 73 */ 74 else if (Metrictype==2){ 75 ci= 2.0/9.0 * 1/(err*coef*coef) * 1/(smax-smin); 76 } 77 else{ 78 ISSMERROR("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype); 79 } 80 81 //initialize metric Miv with ci*H 82 Metric Miv(Hxx*ci,Hyx*ci,Hyy*ci); 83 84 //Get eigen values and vectors of Miv 85 MatVVP2x2 Vp(Miv); 86 87 //move eigen valuse to their absolute values 88 Vp.Abs(); 89 90 //Apply a power if requested by user 91 if(power!=1.0) Vp.pow(power); 92 93 //modify eigen values according to hmin and hmax 94 Vp.Maxh(hmax); 95 Vp.Minh(hmin); 96 97 //Bound anisotropy by 1/(anisomax)^2 98 Vp.BoundAniso2(1/(anisomax*anisomax)); 99 100 //rebuild Metric from Vp 101 Metric MVp(Vp); 102 103 //Apply Metric to vertex 104 m.IntersectWith(MVp); 105 106 } 107 /*}}}1*/ 108 /*FUNCTION BamgVertex::Optim {{{1*/ 109 long BamgVertex::Optim(int i,int koption){ 110 long ret=0; 111 if ( t && (vint >= 0 ) && (vint <3) ){ 112 ret = t->Optim(vint,koption); 113 if(!i){ 114 t =0; // for no future optime 115 vint= 0; 116 } 117 } 118 return ret; 119 } 120 /*}}}*/ 11 121 /*FUNCTION BamgVertex::Smoothing{{{1*/ 12 122 double BamgVertex::Smoothing(Mesh &Th,const Mesh &BTh,Triangle* &tstart ,double omega){ … … 113 223 } 114 224 /*}}}1*/ 115 /*FUNCTION BamgVertex::MetricFromHessian{{{1*/116 void BamgVertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){117 /*Compute Metric from Hessian*/118 119 /*get options*/120 double power=(bamgopts->power);121 double anisomax=(bamgopts->anisomax);122 double CutOff=bamgopts->cutoff;123 double hmin=(bamgopts->hmin);124 double hmax=(bamgopts->hmax);125 double coef=bamgopts->coeff;126 int Metrictype=(bamgopts->Metrictype);127 128 /*Intermediary*/129 double ci;130 131 /*compute multiplicative coefficient depending on Metric Type (2/9 because it is 2d)*/132 133 //Absolute Error134 /*135 * 2 1136 *Metric M = --- ------------ Abs(Hessian)137 * 9 err * coeff^2138 */139 if (Metrictype==0){140 ci= 2.0/9.0 * 1/(err*coef*coef);141 }142 143 //Relative Error144 /*145 * 2 1 Abs(Hessian)146 *Metric M = --- ------------ ----------------------147 * 9 err * coeff^2 max( |s| , cutoff*max(|s|) )148 *149 */150 else if (Metrictype==1){151 ci= 2.0/9.0 * 1/(err*coef*coef) * 1/Max( Abs(s), CutOff*(Max(Abs(smin),Abs(smax))));152 }153 154 //Rescaled absolute error155 /*156 * 2 1 Abs(Hessian)157 *Metric M = --- ------------ ----------------------158 * 9 err * coeff^2 (smax-smin)159 */160 else if (Metrictype==2){161 ci= 2.0/9.0 * 1/(err*coef*coef) * 1/(smax-smin);162 }163 else{164 ISSMERROR("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype);165 }166 167 //initialize metric Miv with ci*H168 Metric Miv(Hxx*ci,Hyx*ci,Hyy*ci);169 170 //Get eigen values and vectors of Miv171 MatVVP2x2 Vp(Miv);172 173 //move eigen valuse to their absolute values174 Vp.Abs();175 176 //Apply a power if requested by user177 if(power!=1.0) Vp.pow(power);178 179 //modify eigen values according to hmin and hmax180 Vp.Maxh(hmax);181 Vp.Minh(hmin);182 183 //Bound anisotropy by 1/(anisomax)^2184 Vp.BoundAniso2(1/(anisomax*anisomax));185 186 //rebuild Metric from Vp187 Metric MVp(Vp);188 189 //Apply Metric to vertex190 m.IntersectWith(MVp);191 192 }193 /*}}}1*/194 /*FUNCTION BamgVertex::Echo {{{1*/195 196 void BamgVertex::Echo(void){197 198 printf("Vertex:\n");199 printf(" integer coordinates i.x: %i, i.y: %i\n",i.x,i.y);200 printf(" Euclidean coordinates r.x: %g, r.y: %g\n",r.x,r.y);201 printf(" ReferenceNumber = %i\n",ReferenceNumber);202 m.Echo();203 204 return;205 }206 /*}}}*/207 /*FUNCTION BamgVertex::Optim {{{1*/208 long BamgVertex::Optim(int i,int koption){209 long ret=0;210 if ( t && (vint >= 0 ) && (vint <3) ){211 ret = t->Optim(vint,koption);212 if(!i){213 t =0; // for no future optime214 vint= 0;215 }216 }217 return ret;218 }219 /*}}}*/220 225 221 226 /*Intermediary*/ -
issm/trunk/src/c/objects/Bamg/BamgVertex.h
r5148 r5150 46 46 void MetricFromHessian(const double Hxx,const double Hyx, const double Hyy, const double smin,const double smax,const double s,const double err,BamgOpts* bamgopts); 47 47 void Echo(); 48 int GetReferenceNumber() const { return ReferenceNumber;}48 int GetReferenceNumber() const; 49 49 long Optim(int =1,int =0); 50 50 -
issm/trunk/src/c/objects/Bamg/Mesh.cpp
r5149 r5150 2630 2630 } 2631 2631 /*}}}1*/ 2632 /*FUNCTION Mesh::GetId(const Triangle & t) const{{{1*/ 2633 long Mesh::GetId(const Triangle & t) const { 2634 return &t - triangles; 2635 } 2636 /*}}}1*/ 2637 /*FUNCTION Mesh::GetId(const Triangle * t) const{{{1*/ 2638 long Mesh::GetId(const Triangle * t) const { 2639 return t - triangles; 2640 } 2641 /*}}}1*/ 2642 /*FUNCTION Mesh::GetId(const BamgVertex & t) const{{{1*/ 2643 long Mesh::GetId(const BamgVertex & t) const { 2644 return &t - vertices; 2645 } 2646 /*}}}1*/ 2647 /*FUNCTION Mesh::GetId(const BamgVertex * t) const{{{1*/ 2648 long Mesh::GetId(const BamgVertex * t) const { 2649 return t - vertices; 2650 } 2651 /*}}}1*/ 2652 /*FUNCTION Mesh::GetId(const Edge & t) const{{{1*/ 2653 long Mesh::GetId(const Edge & t) const { 2654 return &t - edges; 2655 } 2656 /*}}}1*/ 2657 /*FUNCTION Mesh::GetId(const Edge * t) const{{{1*/ 2658 long Mesh::GetId(const Edge * t) const { 2659 return t - edges; 2660 } 2661 /*}}}1*/ 2632 2662 /*FUNCTION Mesh::Init{{{1*/ 2633 2663 void Mesh::Init(long maxnbv_in) { … … 2909 2939 } 2910 2940 /*}}}1*/ 2941 /*FUNCTION Mesh::isCracked{{{1*/ 2942 int Mesh::isCracked() const { 2943 return NbCrackedVertices != 0; 2944 } 2945 /*}}}1*/ 2911 2946 /*FUNCTION Mesh::MakeGeometricalEdgeToEdge{{{1*/ 2912 2947 Edge** Mesh::MakeGeometricalEdgeToEdge() { … … 3002 3037 if ( !quadtree ) quadtree = new QuadTree(this); 3003 3038 3039 } 3040 /*}}}1*/ 3041 /*FUNCTION Mesh::MaxinalHmax{{{1*/ 3042 double Mesh::MaximalHmax() { 3043 return Max(pmax.x-pmin.x,pmax.y-pmin.y); 3004 3044 } 3005 3045 /*}}}1*/ … … 3079 3119 } 3080 3120 /*}}}1*/ 3121 /*FUNCTION Mesh::MininalHmin{{{1*/ 3122 double Mesh::MinimalHmin() { 3123 return 2.0/coefIcoor; 3124 } 3125 /*}}}1*/ 3081 3126 /*FUNCTION Mesh::NearestVertex{{{1*/ 3082 3127 BamgVertex* Mesh::NearestVertex(Icoor1 i,Icoor1 j) { … … 3203 3248 NbSwapf += vertices[i].Optim(0); 3204 3249 NbTSwap += NbSwapf ; 3250 } 3251 /*}}}1*/ 3252 /*FUNCTION Mesh::Number2{{{1*/ 3253 long Mesh::Number2(const Triangle * t) const{ 3254 return t - triangles; 3205 3255 } 3206 3256 /*}}}1*/ … … 4656 4706 } 4657 4707 /*}}}1*/ 4708 /*FUNCTION Mesh::ToI2{{{1*/ 4709 I2 Mesh::toI2(const R2 & P) const { 4710 return I2( (Icoor1) (coefIcoor*(P.x-pmin.x)),(Icoor1) (coefIcoor*(P.y-pmin.y)) ); 4711 } 4712 /*}}}1*/ 4713 /*FUNCTION Mesh::ToR2{{{1*/ 4714 R2 Mesh::toR2(const I2 & P) const { 4715 return R2( (double) P.x/coefIcoor+pmin.x, (double) P.y/coefIcoor+pmin.y); 4716 } 4717 /*}}}1*/ 4658 4718 /*FUNCTION Mesh::TriangleFindFromCoord{{{1*/ 4659 4719 Triangle * Mesh::TriangleFindFromCoord(const I2 & B,Icoor2 dete[3], Triangle *tstart) const { -
issm/trunk/src/c/objects/Bamg/Mesh.h
r5149 r5150 1 #ifndef _ TRIANGLES_H_2 #define _ TRIANGLES_H_1 #ifndef _MESH_H_ 2 #define _MESH_H_ 3 3 4 4 #include "./include.h" … … 73 73 //Methods 74 74 void SetIntCoor(const char * from =0); 75 double MinimalHmin() {return 2.0/coefIcoor;} 76 double MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);} 77 I2 toI2(const R2 & P) const { 78 return I2( (Icoor1) (coefIcoor*(P.x-pmin.x)) 79 ,(Icoor1) (coefIcoor*(P.y-pmin.y)) );} 80 R2 toR2(const I2 & P) const { 81 return R2( (double) P.x/coefIcoor+pmin.x, (double) P.y/coefIcoor+pmin.y); 82 } 75 double MinimalHmin(); 76 double MaximalHmax(); 77 I2 toI2(const R2 & P) const; 78 R2 toR2(const I2 & P) const; 83 79 void AddVertex(BamgVertex & s,Triangle * t,Icoor2 * =0) ; 84 80 void Insert(); … … 105 101 Metric MetricAt (const R2 &) const; 106 102 GeometricalEdge* ProjectOnCurve( Edge & AB, BamgVertex & A, BamgVertex & B,double theta, BamgVertex & R,VertexOnEdge & BR,VertexOnGeom & GR); 107 long GetId(const Triangle & t) const { return &t - triangles;}108 long GetId(const Triangle * t) const { return t - triangles;}109 long GetId(const BamgVertex & t) const { return &t - vertices;}110 long GetId(const BamgVertex * t) const { return t - vertices;}111 long GetId(const Edge & t) const { return &t - edges;}112 long GetId(const Edge * t) const { return t - edges;}113 long Number2(const Triangle * t) const { return t - triangles; }103 long GetId(const Triangle & t) const; 104 long GetId(const Triangle * t) const; 105 long GetId(const BamgVertex & t) const; 106 long GetId(const BamgVertex * t) const; 107 long GetId(const Edge & t) const; 108 long GetId(const Edge * t) const; 109 long Number2(const Triangle * t) const; 114 110 BamgVertex* NearestVertex(Icoor1 i,Icoor1 j) ; 115 111 Triangle* TriangleFindFromCoord(const I2 & ,Icoor2 [3],Triangle *tstart=0) const; … … 123 119 void BuildMetric1(BamgOpts* bamgopts); 124 120 void AddGeometryMetric(BamgOpts* bamgopts); 125 int isCracked() const {return NbCrackedVertices != 0;}121 int isCracked() const; 126 122 void BuildGeometryFromMesh(BamgOpts* bamgopts=NULL); 127 123 void ReconstructExistingMesh(); -
issm/trunk/src/c/objects/Bamg/QuadTree.cpp
r5148 r5150 455 455 } 456 456 /*}}}1*/ 457 /*FUNCTION QuadTree::SizeOf{{{1*/ 458 long QuadTree::SizeOf() const { 459 return sizeof(QuadTree)+sb->SizeOf(); 460 } 461 /*}}}1*/ 457 462 /*FUNCTION QuadTree::StorageQuadTreeBox::StorageQuadTreeBox{{{1*/ 458 463 QuadTree::StorageQuadTreeBox::StorageQuadTreeBox(long ll,StorageQuadTreeBox *nn) { … … 472 477 /*}}}1*/ 473 478 /*FUNCTION QuadTree::ToClose {{{1*/ 474 BamgVertex 479 BamgVertex* QuadTree::ToClose(BamgVertex & v,double seuil,Icoor1 hx,Icoor1 hy){ 475 480 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/ToClose)*/ 476 481 -
issm/trunk/src/c/objects/Bamg/QuadTree.h
r5120 r5150 14 14 15 15 class QuadTree{ 16 16 17 private: 17 class QuadTreeBox { 18 19 class QuadTreeBox{ 18 20 public: 19 21 long n; … … 25 27 }; 26 28 }; 27 class StorageQuadTreeBox 29 class StorageQuadTreeBox{ 28 30 public: 29 31 QuadTreeBox *b,*bc,*be; … … 41 43 42 44 public: 45 43 46 //fields 44 47 QuadTreeBox* root; 45 48 Mesh* th; 49 46 50 //functions 47 51 ~QuadTree(); … … 53 57 BamgVertex* NearestVertexWithNormal(Icoor1 i,Icoor1 j); 54 58 BamgVertex* ToClose(BamgVertex & ,double ,Icoor1,Icoor1); 55 long SizeOf() const {return sizeof(QuadTree)+sb->SizeOf();}59 long SizeOf() const; 56 60 void Add( BamgVertex & w); 57 QuadTreeBox* NewQuadTreeBox(){ 61 62 /*The following function cannot be in the cpp file because QuadTreeBox is 63 * a private class and is declared before QuadTree::*/ 64 QuadTreeBox* NewQuadTreeBox(void){ 58 65 if(! (sb->bc<sb->be)) sb=new StorageQuadTreeBox(lenStorageQuadTreeBox,sb); 59 66 if (!sb || (sb->bc->n != 0)){ISSMERROR("!sb || (sb->bc->n != 0)");} -
issm/trunk/src/c/objects/Bamg/SetOfE4.cpp
r3913 r5150 26 26 27 27 /*Methods*/ 28 /*FUNCTION SetOfEdges4::find {{{1*/29 long SetOfEdges4::find(long ii,long jj) {30 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/find)*/31 32 /*Intermediary*/33 int n;34 35 //check that head is not empty36 ISSMASSERT(head);37 38 //get n from h (usually h=ii)39 n=head[Abs(ii)%nx];40 41 //go through the existing edges that holds h (=ii) and return position in Edge42 while (n >= 0){43 44 //if the edge ii jj is already in Edges, return n45 if (ii == Edges[n].i && jj == Edges[n].j) return n;46 47 //else go to next edge that holds ii48 else n = Edges[n].next;49 }50 51 //if we reach this point, the edge does not exist return -152 return -1;53 }54 /*}}}1*/55 28 /*FUNCTION SetOfEdges4::add{{{1*/ 56 29 long SetOfEdges4::add(long ii,long jj) { … … 88 61 } 89 62 /*}}}1*/ 63 /*FUNCTION SetOfEdges4::find {{{1*/ 64 long SetOfEdges4::find(long ii,long jj) { 65 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/find)*/ 66 67 /*Intermediary*/ 68 int n; 69 70 //check that head is not empty 71 ISSMASSERT(head); 72 73 //get n from h (usually h=ii) 74 n=head[Abs(ii)%nx]; 75 76 //go through the existing edges that holds h (=ii) and return position in Edge 77 while (n >= 0){ 78 79 //if the edge ii jj is already in Edges, return n 80 if (ii == Edges[n].i && jj == Edges[n].j) return n; 81 82 //else go to next edge that holds ii 83 else n = Edges[n].next; 84 } 85 86 //if we reach this point, the edge does not exist return -1 87 return -1; 88 } 89 /*}}}1*/ 90 /*FUNCTION SetOfEdges4::i{{{1*/ 91 long SetOfEdges4::i(long k){ 92 return Edges[k].i; 93 } 94 /*}}}1*/ 95 /*FUNCTION SetOfEdges4::j{{{1*/ 96 long SetOfEdges4::j(long k){ 97 return Edges[k].j; 98 } 99 /*}}}1*/ 100 /*FUNCTION SetOfEdges4::nb{{{1*/ 101 long SetOfEdges4::nb(){ 102 return NbOfEdges; 103 } 104 /*}}}1*/ 105 /*FUNCTION SetOfEdges4::newarete{{{1*/ 106 long SetOfEdges4::newarete(long k){ 107 return NbOfEdges == k+1; 108 } 109 /*}}}1*/ 110 /*FUNCTION SetOfEdges4::SortAndAdd{{{1*/ 111 long SetOfEdges4::SortAndAdd (long ii,long jj) { 112 return ii <=jj ? add (ii,jj) : add (jj,ii) ; 113 } 114 /*}}}1*/ 115 /*FUNCTION SetOfEdges4::SortAndFind{{{1*/ 116 long SetOfEdges4::SortAndFind (long ii,long jj) { 117 return ii <=jj ? find (ii,jj) : find (jj,ii) ; 118 } 119 /*}}}1*/ 90 120 } -
issm/trunk/src/c/objects/Bamg/SetOfE4.h
r3913 r5150 31 31 //Methods 32 32 long add (long ii,long jj); 33 long SortAndAdd (long ii,long jj) {return ii <=jj ? add (ii,jj) : add (jj,ii) ;}34 long nb() {return NbOfEdges;}33 long SortAndAdd (long ii,long jj); 34 long nb(); 35 35 long find (long ii,long jj); 36 long SortAndFind (long ii,long jj) {return ii <=jj ? find (ii,jj) : find (jj,ii) ;}37 long i(long k) {return Edges[k].i;}38 long j(long k) {return Edges[k].j;}39 long newarete(long k) {return NbOfEdges == k+1;}36 long SortAndFind (long ii,long jj); 37 long i(long k); 38 long j(long k); 39 long newarete(long k); 40 40 }; 41 41 } -
issm/trunk/src/c/objects/Bamg/VertexOnEdge.cpp
r5149 r5150 18 18 } 19 19 /*}}}*/ 20 /*FUNCTION VertexOnEdge::SetOnBTh{{{1*/ 21 void VertexOnEdge::SetOnBTh(){ 22 v->BackgroundEdgeHook=this; 23 v->vint=IsVertexOnEdge; 24 } 25 /*}}}*/ 20 26 21 27 } -
issm/trunk/src/c/objects/Bamg/VertexOnEdge.h
r5148 r5150 29 29 30 30 //Methods 31 void SetOnBTh() {v->BackgroundEdgeHook=this;v->vint=IsVertexOnEdge;}31 void SetOnBTh(); 32 32 void Set(const Mesh &,long,Mesh &); 33 33 }; -
issm/trunk/src/c/objects/Bamg/VertexOnGeom.cpp
r5149 r5150 11 11 12 12 /*Constructors/Destructors*/ 13 /*FUNCTION VertexOnGeom::constructor{{{1*/ 14 VertexOnGeom::VertexOnGeom(): mv(0),abscisse(0){ 15 gv=0; 16 } 17 /*}}}*/ 18 /*FUNCTION VertexOnGeom::constructor{{{1*/ 19 VertexOnGeom::VertexOnGeom(BamgVertex & m,GeometricalVertex &g) : mv(&m),abscisse(-1){ 20 gv=&g; 21 } 22 /*}}}*/ 23 /*FUNCTION VertexOnGeom::constructor{{{1*/ 24 VertexOnGeom::VertexOnGeom(BamgVertex & m,GeometricalEdge &g,double s) : mv(&m),abscisse(s){ 25 ge=&g; 26 } 27 /*}}}*/ 13 28 14 29 /*Methods*/ … … 25 40 } 26 41 /*}}}*/ 42 /*FUNCTION VertexOnGeom::OnGeomVertex{{{1*/ 43 int VertexOnGeom::OnGeomVertex()const{ 44 return this? abscisse <0 :0; 45 } 46 /*}}}*/ 47 /*FUNCTION VertexOnGeom::OnGeomEdge{{{1*/ 48 int VertexOnGeom::OnGeomEdge() const{ 49 return this? abscisse >=0 :0; 50 } 51 /*}}}*/ 52 /*FUNCTION VertexOnGeom::IsRequiredVertex{{{1*/ 53 int VertexOnGeom::IsRequiredVertex() { 54 return this? ((abscisse<0 ? (gv?gv->Required():0):0 )) : 0; 55 } 56 /*}}}*/ 57 /*FUNCTION VertexOnGeom::SetOn{{{1*/ 58 void VertexOnGeom::SetOn(){ 59 mv->GeometricalEdgeHook=this; 60 mv->vint=IsVertexOnGeom; 61 } 62 /*}}}*/ 27 63 28 64 } -
issm/trunk/src/c/objects/Bamg/VertexOnGeom.h
r5148 r5150 24 24 25 25 //Constructors/Destructors 26 VertexOnGeom() : mv(0),abscisse(0){gv=0;}27 VertexOnGeom(BamgVertex & m,GeometricalVertex &g) : mv(&m),abscisse(-1){gv=&g;}28 VertexOnGeom(BamgVertex & m,GeometricalEdge &g,double s) : mv(&m),abscisse(s){ge=&g;}26 VertexOnGeom(); 27 VertexOnGeom(BamgVertex & m,GeometricalVertex &g); 28 VertexOnGeom(BamgVertex & m,GeometricalEdge &g,double s); 29 29 30 30 //Operators … … 35 35 36 36 //Methods 37 int OnGeomVertex()const {return this? abscisse <0 :0;}38 int OnGeomEdge() const {return this? abscisse >=0 :0;}39 int IsRequiredVertex() {return this? ((abscisse<0 ? (gv?gv->Required():0):0 )) : 0;}40 void SetOn() {mv->GeometricalEdgeHook=this;mv->vint=IsVertexOnGeom;}37 int OnGeomVertex()const; 38 int OnGeomEdge() const; 39 int IsRequiredVertex(); 40 void SetOn(); 41 41 42 42 //Inline methods
Note:
See TracChangeset
for help on using the changeset viewer.