- Timestamp:
- 03/12/12 14:40:42 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage
-
issm/branches/trunk-jpl-damage/src/c/objects/Bamg/Triangle.cpp
r9371 r11684 50 50 AdjacentTriangle Triangle::Adj(int i) const { 51 51 return AdjacentTriangle(adj[i],AdjEdgeIndex[i]&3); 52 };/*}}}*/ 53 /*FUNCTION Triangle::Anisotropy{{{1*/ 54 double Triangle::Anisotropy() const{ 55 56 double lmin,lmax; 57 58 /*Get three vertices A,B and C*/ 59 R2 A=*this->vertices[0]; 60 R2 B=*this->vertices[1]; 61 R2 C=*this->vertices[2]; 62 63 /*Compute edges*/ 64 R2 e1=B-A; 65 R2 e2=C-A; 66 R2 e3=B-C; 67 68 /*Compute edge length*/ 69 double l1=Norme2(e1); 70 double l2=Norme2(e2); 71 double l3=Norme2(e3); 72 73 lmin=l1; 74 lmin=min(lmin,l2); 75 lmin=min(lmin,l3); 76 lmax=l1; 77 lmax=max(lmax,l2); 78 lmax=max(lmax,l3); 79 80 return lmax/lmin; 81 };/*}}}*/ 82 /*FUNCTION Triangle::Length{{{1*/ 83 double Triangle::Length() const{ 84 85 double l; 86 87 /*Get three vertices A,B and C*/ 88 R2 A=*this->vertices[0]; 89 R2 B=*this->vertices[1]; 90 R2 C=*this->vertices[2]; 91 92 /*Compute edges*/ 93 R2 e1=B-A; 94 R2 e2=C-A; 95 R2 e3=B-C; 96 97 /*Compute edge length*/ 98 l=Norme2(e1); 99 l=max(l,Norme2(e2)); 100 l=max(l,Norme2(e3)); 101 102 return l; 52 103 };/*}}}*/ 53 104 /*FUNCTION Triangle::Echo {{{1*/
Note:
See TracChangeset
for help on using the changeset viewer.