Changeset 2983


Ignore:
Timestamp:
02/08/10 12:29:07 (15 years ago)
Author:
Mathieu Morlighem
Message:

Minor

Location:
issm/trunk/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Bamgx/Mesh2.h

    r2981 r2983  
    2626        const double Pi =3.141592653589793238462643383279502884197169399375105820974944592308;
    2727        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
    2933        inline int BinaryRand(){
    30 #ifdef RAND_MAX
     34        #ifdef RAND_MAX
    3135                const long HalfRandMax = RAND_MAX/2;
    3236                return rand() < HalfRandMax;
    33 #else
    34                 return rand() & 16384; // 2^14 (for sun because RAND_MAX is not def in stdlib.h)
    35 #endif
     37        #else
     38                return rand() & 16384; //2^14 (for sun because RAND_MAX is not def in stdlib.h)
     39        #endif
    3640        }
    3741
     
    4751namespace bamg {
    4852
    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;}
    5155
    5256        Icoor2 inline det(const I2 &a,const I2 & b,const I2 &c){
     
    5559                return  bax*cay - bay*cax;
    5660        }
     61
     62        //Intermediary
     63        Int4 AGoodNumberPrimeWith(Int4 n);
    5764
    5865        //triangle numbering definitions
     
    6673        static const Int2 PreviousVertex[3] = {2,0,1};
    6774
    68         Int4 AGoodNumberPrimeWith(Int4 n);
    69 
     75        //classes
    7076        class Geometry;
    7177        class Triangles;
     
    7581        class VertexOnGeom;
    7682        class VertexOnEdge;
    77         /////////////////////////////////////////////////////////////////////////////////////
    78         const int IsVertexOnGeom = 8;
    79         const int IsVertexOnVertex = 16;
    80         const int IsVertexOnEdge = 32;
    81         /////////////////////////////////////////////////////////////////////////////////////
    8283
    8384        /*CLASS: DoubleAndInt4 {{{1*/
     
    138139        };
    139140        /*}}}1*/
    140         inline Vertex * TheVertex(Vertex * a); // for remove crak in mesh
     141        inline Vertex* TheVertex(Vertex * a); // for remove crak in mesh
    141142        double QuadQuality(const Vertex &,const Vertex &,const Vertex &,const Vertex &);
    142143        /*CLASS: TriangleAdjacent{{{1*/
     
    894895
    895896        //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        }
    901902
    902903        inline Triangles::Triangles(Int4 i) :Gh(*new Geometry()),BTh(*this){PreInit(i);}
  • issm/trunk/src/c/Makefile.am

    r2892 r2983  
    325325                                        ./Bamgx/meshtype.h \
    326326                                        ./Bamgx/objects/MatVVP2x2.cpp \
    327                                         ./Bamgx/objects/MetricAnIso.cpp \
     327                                        ./Bamgx/objects/Metric.cpp \
    328328                                        ./Bamgx/objects/GeometricalEdge.cpp \
    329329                                        ./Bamgx/objects/ListofIntersectionTriangles.cpp \
     
    666666                                        ./Bamgx/meshtype.h \
    667667                                        ./Bamgx/objects/MatVVP2x2.cpp \
    668                                         ./Bamgx/objects/MetricAnIso.cpp \
     668                                        ./Bamgx/objects/Metric.cpp \
    669669                                        ./Bamgx/objects/GeometricalEdge.cpp \
    670670                                        ./Bamgx/objects/ListofIntersectionTriangles.cpp \
Note: See TracChangeset for help on using the changeset viewer.