Changeset 2989


Ignore:
Timestamp:
02/08/10 17:24:05 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added ifndef for each header file

Location:
issm/trunk/src/c/Bamgx
Files:
5 edited

Legend:

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

    r2985 r2989  
    66#include "../include/macros.h"
    77#include "../toolkits/toolkits.h"
    8 
    9 //From MeshIo
    10 #include <cstdio>
    11 #include <cstring>
    12 #include <cstdlib>
    13 #include <cctype>
    14 #include <stdlib.h>
    15 #include <math.h>
    168
    179#include "meshtype.h"
     
    817809        /*}}}1*/
    818810
     811        inline void Vertex::Set(const Vertex & rec,const Triangles & ,Triangles & ){
     812                *this  = rec;
     813          }
     814        inline void GeometricalVertex::Set(const GeometricalVertex & rec,const Geometry & ,const Geometry & ){
     815                *this  = rec;
     816          }
     817        inline void VertexOnVertex::Set(const Triangles & Th ,Int4 i,Triangles & ThNew) {
     818                *this = Th.VertexOnBThVertex[i]; 
     819                v = ThNew.vertices + Th.Number(v);
     820
     821          }
     822        Int4 inline  Vertex::Optim(int i,int koption){
     823                Int4 ret=0;
     824                if ( t && (vint >= 0 ) && (vint <3) )
     825                  {
     826                        ret = t->Optim(vint,koption);
     827                        if(!i)
     828                          {
     829                                t =0; // for no future optime
     830                                vint= 0; }
     831                  }
     832                return ret;
     833          }
     834
    819835        // to sort in descending order
    820836        template<class T>  inline void  HeapSort(T *c,long n){
     
    902918          }
    903919
    904         inline void Vertex::Set(const Vertex & rec,const Triangles & ,Triangles & )
    905           {
    906                 *this  = rec;
    907           }
    908         inline void GeometricalVertex::Set(const GeometricalVertex & rec,const Geometry & ,const Geometry & )
    909           {
    910                 *this  = rec;
    911           }
     920
    912921        inline void Edge::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
    913922          {
     
    950959                 link = ThNew.triangles + Th.Number(link);
    951960          }
    952         inline void VertexOnVertex::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
    953           {
    954                 *this = Th.VertexOnBThVertex[i]; 
    955                 v = ThNew.vertices + Th.Number(v);
    956 
    957           }
     961
    958962        inline void SubDomain::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
    959963          {
     
    11331137          }
    11341138
    1135         Int4 inline  Vertex::Optim(int i,int koption)
    1136           {
    1137                 Int4 ret=0;
    1138                 if ( t && (vint >= 0 ) && (vint <3) )
    1139                   {
    1140                         ret = t->Optim(vint,koption);
    1141                         if(!i)
    1142                           {
    1143                                 t =0; // for no future optime
    1144                                 vint= 0; }
    1145                   }
    1146                 return ret;
    1147           }
    1148 
    1149         Icoor2 inline det(const Vertex & a,const Vertex & b,const Vertex & c)
    1150           {
     1139
     1140        Icoor2 inline det(const Vertex & a,const Vertex & b,const Vertex & c){
    11511141                register  Icoor2 bax = b.i.x - a.i.x ,bay = b.i.y - a.i.y;
    11521142                register  Icoor2 cax = c.i.x - a.i.x ,cay = c.i.y - a.i.y;
    1153                 return  bax*cay - bay*cax;}
     1143                return  bax*cay - bay*cax;
     1144          }
    11541145
    11551146
     
    11581149                                        Vertex *s1,Vertex *s2,Icoor2 det1,Icoor2 det2);
    11591150
    1160 
    1161 
    11621151                int inline TriangleAdjacent::swap()
    11631152                  { return  t->swap(a);}
    1164 
    1165 
    11661153
    11671154                int SwapForForcingEdge(Vertex   *  & pva ,Vertex  * &   pvb ,
     
    11711158                int ForceEdge(Vertex &a, Vertex & b,TriangleAdjacent & taret) ;
    11721159
    1173                 // inline bofbof   FH
    1174                 inline  TriangleAdjacent FindTriangleAdjacent(Edge &E)
    1175                   {
     1160                inline  TriangleAdjacent FindTriangleAdjacent(Edge &E){
    11761161                        Vertex * a = E.v[0];
    11771162                        Vertex * b = E.v[1];
     
    12021187                  }
    12031188
    1204                 inline Vertex * TheVertex(Vertex * a) // give a unique vertex with smallest number
    1205                   { // in case on crack in mesh
     1189                inline Vertex* TheVertex(Vertex * a){
     1190                        // give a unique vertex with smallest number
     1191                   // in case on crack in mesh
    12061192                        Vertex * r(a), *rr;
    12071193                        Triangle * t = a->t;
  • issm/trunk/src/c/Bamgx/Metric.h

    r2984 r2989  
    1 #ifndef TYPEMETRIX
    2 #define TYPEMETRIX Metric
    3 #endif
     1#ifndef _METRIC_H
     2#define _METRIC_H
    43
    5 //#include "R2.h"
     4#include "R2.h"
     5
    66namespace bamg {
    77
     
    121121                return ( Abs(la - lb) <1.0e-6*Max3(la,lb,1.0e-20))  ? s : (exp(s*lab*(la-lb)/(la*lb))-1)*lb/(la-lb);
    122122        }
    123 
    124123}
     124#endif
  • issm/trunk/src/c/Bamgx/QuadTree.h

    r2984 r2989  
     1#ifndef _QUADTREE_H
     2#define _QUADTREE_H
     3
    14#include "../shared/shared.h"
    25#include "../include/macros.h"
     
    6366        };
    6467}
     68#endif
  • issm/trunk/src/c/Bamgx/R2.h

    r2984 r2989  
     1#ifndef _R2_H
     2#define _R2_H
     3
    14namespace bamg {
    25
     
    9699          }
    97100}
     101#endif
  • issm/trunk/src/c/Bamgx/SetOfE4.h

    r2984 r2989  
    3636        };
    3737}
    38 
    3938#endif
Note: See TracChangeset for help on using the changeset viewer.