Changeset 3245


Ignore:
Timestamp:
03/10/10 10:01:20 (15 years ago)
Author:
Mathieu Morlighem
Message:

removed lots of typedefs

Location:
issm/trunk/src/c
Files:
1 added
1 deleted
8 edited

Legend:

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

    r3243 r3245  
    1010
    1111#include "objects/Metric.h"
    12 #include "objects/DoubleAndInt4.h"
     12#include "objects/DoubleAndInt.h"
    1313#include "objects/Direction.h"
    1414#include "objects/Vertex.h"
     
    104104
    105105        inline  void   Triangles::SetVertexFieldOn(){
    106                 for (long i=0;i<nbv;i++)
     106                for (int i=0;i<nbv;i++)
    107107                 vertices[i].onGeometry=0;
    108                 for (long j=0;j<NbVerticesOnGeomVertex;j++ )
     108                for (int j=0;j<NbVerticesOnGeomVertex;j++ )
    109109                 VerticesOnGeomVertex[j].SetOn();
    110                 for (long k=0;k<NbVerticesOnGeomEdge;k++ )
     110                for (int k=0;k<NbVerticesOnGeomEdge;k++ )
    111111                 VerticesOnGeomEdge[k].SetOn();
    112112        }             
    113113        inline  void   Triangles::SetVertexFieldOnBTh(){
    114                 for (long i=0;i<nbv;i++)
     114                for (int i=0;i<nbv;i++)
    115115                 vertices[i].onGeometry=0;
    116                 for (long j=0;j<NbVertexOnBThVertex;j++ )
     116                for (int j=0;j<NbVertexOnBThVertex;j++ )
    117117                 VertexOnBThVertex[j].SetOnBTh();
    118                 for (long k=0;k<NbVertexOnBThEdge;k++ )
     118                for (int k=0;k<NbVertexOnBThEdge;k++ )
    119119                 VertexOnBThEdge[k].SetOnBTh();
    120120
  • issm/trunk/src/c/Bamgx/objects/Geometry.h

    r3243 r3245  
    6969                        long Number(const GeometricalEdge * t) const  { return t - edges;}
    7070                        long Number(const Curve * c) const  { return c - curves;}
    71                         void UnMarkEdges() {for (long i=0;i<nbe;i++) edges[i].SetUnMark();}
     71                        void UnMarkEdges() {for (int i=0;i<nbe;i++) edges[i].SetUnMark();}
    7272                        GeometricalEdge *  ProjectOnCurve(const Edge & ,double,Vertex &,VertexOnGeom &) const ;
    7373                        GeometricalEdge *  Contening(const R2 P,  GeometricalEdge * start) const;
  • issm/trunk/src/c/Bamgx/objects/QuadTree.cpp

    r3243 r3245  
    9494                 throw ErrorException(__FUNCT__,exprintf("MaxISize <= MaxICoor"));
    9595         }
    96          for (long i=0;i<nbv;i++)
     96         for (int i=0;i<nbv;i++)
    9797          Add(t->vertices[i]);
    9898        }
  • issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp

    r3243 r3245  
    2020                NbOfEdges=0;
    2121                head = new long [nx];
    22                 Edges= new Int4Edge[nbax];
     22                Edges= new IntEdge[nbax];
    2323
    2424                //initialize head (-1 everywhere)
  • issm/trunk/src/c/Bamgx/objects/SetOfE4.h

    r3243 r3245  
    66        class SetOfEdges4;
    77
    8         class Int4Edge{
     8        class IntEdge{
    99                friend class SetOfEdges4;
    1010                public:
     
    1818                        long nx,nbax,NbOfEdges;
    1919                        long* head;
    20                         Int4Edge* Edges;
     20                        IntEdge* Edges;
    2121
    2222                public:
     
    3333
    3434                        //operators
    35                         Int4Edge & operator[](long k){return  Edges[k];}
     35                        IntEdge & operator[](long k){return  Edges[k];}
    3636        };
    3737}
  • issm/trunk/src/c/Bamgx/objects/Triangles.cpp

    r3243 r3245  
    884884
    885885                //loop over all the vertices on edges
    886                 for (long  i=0;i<nbe;i++){
     886                for (int  i=0;i<nbe;i++){
    887887                        for (int j=0;j<2;j++){
    888888
     
    10851085
    10861086                //loop over all vertices
    1087                 for (long i=0;i<nbv;i++){
     1087                for (int i=0;i<nbv;i++){
    10881088                        MatVVP2x2 Vp(vertices[i]);
    10891089                        double lmax=Vp.lmax();
     
    16551655
    16561656                //for all Solutions
    1657                 for (long nusol=0;nusol<nbsol;nusol++) {
     1657                for (int nusol=0;nusol<nbsol;nusol++) {
    16581658                        double smin=ss[nusol],smax=ss[nusol];
    16591659
     
    18611861
    18621862                //for all Solution 
    1863                 for (long nusol=0;nusol<nbsol;nusol++) {
     1863                for (int nusol=0;nusol<nbsol;nusol++) {
    18641864
    18651865                        double smin=ss[nusol],smax=ss[nusol];
     
    22082208
    22092209                        //check that there is no triangle with 0 determinant
    2210                         for (long t = 0; t < nbt; t++){
     2210                        for (int t = 0; t < nbt; t++){
    22112211                                if (!triangles[t].det) k++;
    22122212                        }
     
    22172217                        //Force Edges
    22182218                        TriangleAdjacent ta(0,0);
    2219                         for (long i = 0; i < nbe; i++){
     2219                        for (int i = 0; i < nbe; i++){
    22202220
    22212221                                //Force edge i
     
    22262226                                if (nbswp) nbfe++;
    22272227                                if ( nbswp < 0 && k < 5){
    2228                                         for (long j = 0; j < nbe; j++){
     2228                                        for (int j = 0; j < nbe; j++){
    22292229                                                printf("Edge %i: %i %i\n",j,Number(edges[j][0]),Number(edges[j][1]));
    22302230                                        }
     
    22382238                                throw ErrorException(__FUNCT__,exprintf("There are %i lost edges, the boundary might be crossing",k));
    22392239                        }
    2240                         for (long j=0;j<nbv;j++){
     2240                        for (int j=0;j<nbv;j++){
    22412241                                Nbswap +=  vertices[j].Optim(1,0);
    22422242                        }
     
    22572257                long k,it;
    22582258
    2259                 for (long itt=0;itt<nbt;itt++)
     2259                for (int itt=0;itt<nbt;itt++)
    22602260                 triangles[itt].link=0; // par defaut pas de couleur
    22612261
     
    24152415                                 mark[it]=triangles[it].link ? -1 : -2;
    24162416                                long inew =0;
    2417                                 for (long i=0;i<NbSubDomains;i++) {
     2417                                for (int i=0;i<NbSubDomains;i++) {
    24182418                                        GeometricalEdge &eg = *Gh.subdomains[i].edge;
    24192419                                        subdomains[i].ref = Gh.subdomains[i].ref;
     
    27452745                // We add the vertices one by one
    27462746                long NbSwap=0;
    2747                 for (long icount=2; icount<nbvb; icount++) {
     2747                for (int icount=2; icount<nbvb; icount++) {
    27482748                        Vertex *vi  = ordre[icount];
    27492749                        Icoor2 dete[3];
     
    36333633                if (verbosity>3) printf("   Begining of insertion process...\n");
    36343634
    3635                 for (long icount=2; icount<nbv; icount++) {
     3635                for (int icount=2; icount<nbv; icount++) {
    36363636
    36373637                        //Get new vertex
     
    37023702                long k3 = rand()%nbvnew;
    37033703                //loop over the new points
    3704                 for (long is3=0; is3<nbvnew; is3++){
     3704                for (int is3=0; is3<nbvnew; is3++){
    37053705                        register long j=nbvold +(k3 = (k3+PrimeNumber)%nbvnew);
    37063706                        register long i=nbvold+is3;
     
    38083808
    38093809                        long nbqq = (nbt*3)/2;
    3810                         DoubleAndInt4 *qq = new DoubleAndInt4[nbqq];
     3810                        DoubleAndInt *qq = new DoubleAndInt[nbqq];
    38113811
    38123812                        long i,ij;
     
    52765276                long NbSwap = 0;
    52775277                Icoor2 dete[3]; 
    5278                 for (long i=nbvold;i<nbv;i++) {// for all the new point
     5278                for (int i=nbvold;i<nbv;i++) {// for all the new point
    52795279                        Vertex & vi = vertices[i];
    52805280                        vi.i = toI2(vi.r);
     
    53175317
    53185318        //initialize all triangles as -1 (outside)
    5319         for (long it=0;it<nbt;it++) reft[it]=-1;
     5319        for (int it=0;it<nbt;it++) reft[it]=-1;
    53205320
    53215321        //loop over all subdomains
    5322         for (long i=0;i<NbSubDomains;i++){
     5322        for (int i=0;i<NbSubDomains;i++){
    53235323
    53245324                //first triangle of the subdomain i
  • issm/trunk/src/c/Bamgx/objects/Triangles.h

    r3243 r3245  
    1010#include "Metric.h"
    1111#include "SetOfE4.h"
    12 #include "DoubleAndInt4.h"
     12#include "DoubleAndInt.h"
    1313#include "Direction.h"
    1414#include "Vertex.h"
  • issm/trunk/src/c/Makefile.am

    r3240 r3245  
    336336                                        ./Bamgx/objects/Curve.h\
    337337                                        ./Bamgx/objects/Direction.h\
    338                                         ./Bamgx/objects/DoubleAndInt4.h\
     338                                        ./Bamgx/objects/DoubleAndInt.h\
    339339                                        ./Bamgx/objects/Edge.h\
    340340                                        ./Bamgx/objects/GeometricalEdge.cpp\
     
    702702                                        ./Bamgx/objects/Curve.h\
    703703                                        ./Bamgx/objects/Direction.h\
    704                                         ./Bamgx/objects/DoubleAndInt4.h\
     704                                        ./Bamgx/objects/DoubleAndInt.h\
    705705                                        ./Bamgx/objects/Edge.h\
    706706                                        ./Bamgx/objects/GeometricalEdge.cpp\
Note: See TracChangeset for help on using the changeset viewer.