Changeset 19293
- Timestamp:
- 04/21/15 11:44:35 (10 years ago)
- Location:
- issm/trunk-jpl/src/c/bamg
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/bamg/BamgVertex.h
r18455 r19293 48 48 void Echo(); 49 49 int GetReferenceNumber() const; 50 I2 GetIntegerCoordinates() const{return this->i;};// avoid operator I2() 50 51 long Optim(int =1,int =0); 51 52 -
issm/trunk-jpl/src/c/bamg/Mesh.cpp
r18822 r19293 1099 1099 } 1100 1100 /*}}}*/ 1101 void Mesh::AddVertex( BamgVertex &s,Triangle* t, Icoor2* det3) 1101 void Mesh::AddVertex( BamgVertex &s,Triangle* t, Icoor2* det3){/*{{{*/ 1102 1102 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Add)*/ 1103 1103 // ------------------------------- … … 1124 1124 1125 1125 /*three vertices of t*/ 1126 BamgVertex &s0=(*t)[0];1127 BamgVertex &s1=(*t)[1];1128 BamgVertex &s2=(*t)[2];1126 BamgVertex* s0=t->GetVertex(0); 1127 BamgVertex* s1=t->GetVertex(1); 1128 BamgVertex* s2=t->GetVertex(2); 1129 1129 1130 1130 //determinant of t … … 1134 1134 if no infinite vertex (NULL) infvertexindex=-1 1135 1135 else if v_i is infinite, infvertexindex=i*/ 1136 int infvertexindex = &s0 ? (( &s1 ? ( &s2 ? -1 : 2) : 1 )) :0;1136 int infvertexindex = s0 ? ((s1? (s2?-1:2):1)):0; 1137 1137 1138 1138 //some checks … … 1147 1147 //if no infinite vertex 1148 1148 if (infvertexindex<0 ) { 1149 det3[0]=bamg::det(s ,s1,s2);1150 det3[1]=bamg::det(s0 ,s ,s2);1151 det3[2]=bamg::det(s0 ,s1,s);}1149 det3[0]=bamg::det(s .GetIntegerCoordinates(),s1->GetIntegerCoordinates(),s2->GetIntegerCoordinates()); 1150 det3[1]=bamg::det(s0->GetIntegerCoordinates(),s .GetIntegerCoordinates(),s2->GetIntegerCoordinates()); 1151 det3[2]=bamg::det(s0->GetIntegerCoordinates(),s1->GetIntegerCoordinates(),s.GetIntegerCoordinates());} 1152 1152 else { 1153 1153 // one of &s1 &s2 &s0 is NULL 1154 det3[0]= &s0 ? -1 : bamg::det(s ,s1,s2) ;1155 det3[1]= &s1 ? -1 : bamg::det(s0,s ,s2) ;1156 det3[2]= &s2 ? -1 : bamg::det(s0,s1,s) ;1154 det3[0]= s0 ? -1 : bamg::det(s.GetIntegerCoordinates(),s1->GetIntegerCoordinates(),s2->GetIntegerCoordinates()) ; 1155 det3[1]= s1 ? -1 : bamg::det(s0->GetIntegerCoordinates(),s.GetIntegerCoordinates(),s2->GetIntegerCoordinates()) ; 1156 det3[2]= s2 ? -1 : bamg::det(s0->GetIntegerCoordinates(),s1->GetIntegerCoordinates(),s.GetIntegerCoordinates()) ; 1157 1157 } 1158 1158 } … … 3800 3800 int number_of_errors=0; 3801 3801 for (i=0;i<nbt;i++) { 3802 BamgVertex & v0 = triangles[i][0];3803 BamgVertex & v1 = triangles[i][1];3804 BamgVertex & v2 = triangles[i][2];3802 BamgVertex* v0 = triangles[i](0); 3803 BamgVertex* v1 = triangles[i](1); 3804 BamgVertex* v2 = triangles[i](2); 3805 3805 3806 3806 //If this is not a boundary triangle 3807 if ( &v0 && &v1 && &v2){3807 if (v0 && v1 && v2){ 3808 3808 3809 3809 /*Compute determinant*/ 3810 triangles[i].det= det(v0 ,v1,v2);3810 triangles[i].det= det(v0->GetIntegerCoordinates(),v1->GetIntegerCoordinates(),v2->GetIntegerCoordinates()); 3811 3811 3812 3812 /*Check that determinant is positive*/ -
issm/trunk-jpl/src/c/bamg/Triangle.h
r16237 r19293 65 65 void Set(const Triangle &,const Mesh &,Mesh &); 66 66 int In(BamgVertex *v) const { return vertices[0]==v || vertices[1]==v || vertices[2]==v ;} 67 BamgVertex* GetVertex(int i){return vertices[i];}; // FIXME: this is used to avoid BamgVertex * operator() 67 68 68 69 };
Note:
See TracChangeset
for help on using the changeset viewer.