Changeset 2983
- Timestamp:
- 02/08/10 12:29:07 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/Mesh2.h
r2981 r2983 26 26 const double Pi =3.141592653589793238462643383279502884197169399375105820974944592308; 27 27 const float fPi=3.141592653589793238462643383279502884197169399375105820974944592308; 28 28 const int IsVertexOnGeom = 8; 29 const int IsVertexOnVertex = 16; 30 const int IsVertexOnEdge = 32; 31 32 //some functions 29 33 inline int BinaryRand(){ 30 #ifdef RAND_MAX34 #ifdef RAND_MAX 31 35 const long HalfRandMax = RAND_MAX/2; 32 36 return rand() < HalfRandMax; 33 #else34 return rand() & 16384; // 35 #endif37 #else 38 return rand() & 16384; //2^14 (for sun because RAND_MAX is not def in stdlib.h) 39 #endif 36 40 } 37 41 … … 47 51 namespace bamg { 48 52 49 inline float OppositeAngle(float a){return a<0 ? fPi + a :a - fPi;}50 inline double OppositeAngle(double a){return a<0 ? Pi + a :a - Pi;}53 inline float OppositeAngle(float a){return a<0 ? fPi+a:a-fPi;} 54 inline double OppositeAngle(double a){return a<0 ? Pi+a:a- Pi;} 51 55 52 56 Icoor2 inline det(const I2 &a,const I2 & b,const I2 &c){ … … 55 59 return bax*cay - bay*cax; 56 60 } 61 62 //Intermediary 63 Int4 AGoodNumberPrimeWith(Int4 n); 57 64 58 65 //triangle numbering definitions … … 66 73 static const Int2 PreviousVertex[3] = {2,0,1}; 67 74 68 Int4 AGoodNumberPrimeWith(Int4 n); 69 75 //classes 70 76 class Geometry; 71 77 class Triangles; … … 75 81 class VertexOnGeom; 76 82 class VertexOnEdge; 77 /////////////////////////////////////////////////////////////////////////////////////78 const int IsVertexOnGeom = 8;79 const int IsVertexOnVertex = 16;80 const int IsVertexOnEdge = 32;81 /////////////////////////////////////////////////////////////////////////////////////82 83 83 84 /*CLASS: DoubleAndInt4 {{{1*/ … … 138 139 }; 139 140 /*}}}1*/ 140 inline Vertex 141 inline Vertex* TheVertex(Vertex * a); // for remove crak in mesh 141 142 double QuadQuality(const Vertex &,const Vertex &,const Vertex &,const Vertex &); 142 143 /*CLASS: TriangleAdjacent{{{1*/ … … 894 895 895 896 //From Metric.cpp 896 inline Real8 det3x3(Real8 A[3] ,Real8 B[3],Real8 C[3]) 897 { return A[0] *( B[1]*C[2]-B[2]*C[1])898 - A[1] *( B[0]*C[2]-B[2]*C[0])899 + A[2] *( B[0]*C[1]-B[1]*C[0]);900 897 inline Real8 det3x3(Real8 A[3] ,Real8 B[3],Real8 C[3]){ 898 return A[0]*( B[1]*C[2]-B[2]*C[1]) 899 - A[1]*( B[0]*C[2]-B[2]*C[0]) 900 + A[2]*( B[0]*C[1]-B[1]*C[0]); 901 } 901 902 902 903 inline Triangles::Triangles(Int4 i) :Gh(*new Geometry()),BTh(*this){PreInit(i);} -
issm/trunk/src/c/Makefile.am
r2892 r2983 325 325 ./Bamgx/meshtype.h \ 326 326 ./Bamgx/objects/MatVVP2x2.cpp \ 327 ./Bamgx/objects/Metric AnIso.cpp \327 ./Bamgx/objects/Metric.cpp \ 328 328 ./Bamgx/objects/GeometricalEdge.cpp \ 329 329 ./Bamgx/objects/ListofIntersectionTriangles.cpp \ … … 666 666 ./Bamgx/meshtype.h \ 667 667 ./Bamgx/objects/MatVVP2x2.cpp \ 668 ./Bamgx/objects/Metric AnIso.cpp \668 ./Bamgx/objects/Metric.cpp \ 669 669 ./Bamgx/objects/GeometricalEdge.cpp \ 670 670 ./Bamgx/objects/ListofIntersectionTriangles.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.