Changeset 5573


Ignore:
Timestamp:
08/25/10 13:18:56 (15 years ago)
Author:
Mathieu Morlighem
Message:

As usual renaming

Location:
issm/trunk/src/c/objects/Bamg
Files:
15 edited
6 moved

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Bamg/BamgMesh.cpp

    r5187 r5573  
    1717        this->CrackedEdgesSize[0]=0,              this->CrackedEdgesSize[1]=0;             this->CrackedEdges=NULL;
    1818
    19         this->VerticesOnGeometricVertexSize[0]=0, this->VerticesOnGeometricVertexSize[1]=0;this->VerticesOnGeometricVertex=NULL;
    20         this->VerticesOnGeometricEdgeSize[0]=0,   this->VerticesOnGeometricEdgeSize[1]=0;  this->VerticesOnGeometricEdge=NULL;
    21         this->EdgesOnGeometricEdgeSize[0]=0,      this->EdgesOnGeometricEdgeSize[1]=0;     this->EdgesOnGeometricEdge=NULL;
     19        this->VerticesOnGeomVertexSize[0]=0, this->VerticesOnGeomVertexSize[1]=0;this->VerticesOnGeomVertex=NULL;
     20        this->VerticesOnGeomEdgeSize[0]=0,   this->VerticesOnGeomEdgeSize[1]=0;  this->VerticesOnGeomEdge=NULL;
     21        this->EdgesOnGeomEdgeSize[0]=0,      this->EdgesOnGeomEdgeSize[1]=0;     this->EdgesOnGeomEdge=NULL;
    2222
    2323        this->IssmEdgesSize[0]=0,                 this->IssmEdgesSize[1]=0;                this->IssmEdges=NULL;
     
    4747        FetchData(&this->CrackedEdges,            &this->CrackedEdgesSize[0],              &this->CrackedEdgesSize[1],             mxGetField(matlab_struct,0,"CrackedEdges"));
    4848
    49         FetchData(&this->VerticesOnGeometricEdge,  &this->VerticesOnGeometricEdgeSize[0],  &this->VerticesOnGeometricEdgeSize[1],  mxGetField(matlab_struct,0,"VerticesOnGeometricEdge"));
    50         FetchData(&this->VerticesOnGeometricVertex,&this->VerticesOnGeometricVertexSize[0],&this->VerticesOnGeometricVertexSize[1],mxGetField(matlab_struct,0,"VerticesOnGeometricVertex"));
    51         FetchData(&this->EdgesOnGeometricEdge,     &this->EdgesOnGeometricEdgeSize[0],     &this->EdgesOnGeometricEdgeSize[1],     mxGetField(matlab_struct,0,"EdgesOnGeometricEdge"));
     49        FetchData(&this->VerticesOnGeomEdge,  &this->VerticesOnGeomEdgeSize[0],  &this->VerticesOnGeomEdgeSize[1],  mxGetField(matlab_struct,0,"VerticesOnGeomEdge"));
     50        FetchData(&this->VerticesOnGeomVertex,&this->VerticesOnGeomVertexSize[0],&this->VerticesOnGeomVertexSize[1],mxGetField(matlab_struct,0,"VerticesOnGeomVertex"));
     51        FetchData(&this->EdgesOnGeomEdge,     &this->EdgesOnGeomEdgeSize[0],     &this->EdgesOnGeomEdgeSize[1],     mxGetField(matlab_struct,0,"EdgesOnGeomEdge"));
    5252
    5353        this->IssmEdgesSize[0]=0,                 this->IssmEdgesSize[1]=0;                this->IssmEdges=NULL;
     
    7474        xfree((void**)&this->CrackedEdges);
    7575
    76         xfree((void**)&this->VerticesOnGeometricVertex);
    77         xfree((void**)&this->VerticesOnGeometricEdge);
    78         xfree((void**)&this->EdgesOnGeometricEdge);
     76        xfree((void**)&this->VerticesOnGeomVertex);
     77        xfree((void**)&this->VerticesOnGeomEdge);
     78        xfree((void**)&this->EdgesOnGeomEdge);
    7979
    8080        xfree((void**)&this->IssmEdges);
     
    110110        fnames[i++] = "IssmEdges";
    111111        fnames[i++] = "Quadrilaterals";
    112         fnames[i++] = "VerticesOnGeometricVertex";
    113         fnames[i++] = "VerticesOnGeometricEdge";
    114         fnames[i++] = "EdgesOnGeometricEdge";
     112        fnames[i++] = "VerticesOnGeomVertex";
     113        fnames[i++] = "VerticesOnGeomEdge";
     114        fnames[i++] = "EdgesOnGeomEdge";
    115115        fnames[i++] = "SubDomains";
    116116        fnames[i++] = "SubDomainsFromGeom";
     
    133133        i++; SetMatlabStructureField(output,"IssmEdges",                this->IssmEdgesSize[0],                this->IssmEdgesSize[1],                 this->IssmEdges);
    134134        i++; SetMatlabStructureField(output,"Quadrilaterals",           this->QuadrilateralsSize[0],           this->QuadrilateralsSize[1],            this->Quadrilaterals);
    135         i++; SetMatlabStructureField(output,"VerticesOnGeometricVertex",this->VerticesOnGeometricVertexSize[0],this->VerticesOnGeometricVertexSize[1], this->VerticesOnGeometricVertex);
    136         i++; SetMatlabStructureField(output,"VerticesOnGeometricEdge",  this->VerticesOnGeometricEdgeSize[0],  this->VerticesOnGeometricEdgeSize[1],   this->VerticesOnGeometricEdge);
    137         i++; SetMatlabStructureField(output,"EdgesOnGeometricEdge",     this->EdgesOnGeometricEdgeSize[0],     this->EdgesOnGeometricEdgeSize[1],      this->EdgesOnGeometricEdge);
     135        i++; SetMatlabStructureField(output,"VerticesOnGeomVertex",this->VerticesOnGeomVertexSize[0],this->VerticesOnGeomVertexSize[1], this->VerticesOnGeomVertex);
     136        i++; SetMatlabStructureField(output,"VerticesOnGeomEdge",  this->VerticesOnGeomEdgeSize[0],  this->VerticesOnGeomEdgeSize[1],   this->VerticesOnGeomEdge);
     137        i++; SetMatlabStructureField(output,"EdgesOnGeomEdge",     this->EdgesOnGeomEdgeSize[0],     this->EdgesOnGeomEdgeSize[1],      this->EdgesOnGeomEdge);
    138138        i++; SetMatlabStructureField(output,"SubDomains",               this->SubDomainsSize[0],               this->SubDomainsSize[1],                this->SubDomains);
    139139        i++; SetMatlabStructureField(output,"SubDomainsFromGeom",       this->SubDomainsFromGeomSize[0],       this->SubDomainsFromGeomSize[1],        this->SubDomainsFromGeom);
  • issm/trunk/src/c/objects/Bamg/BamgMesh.h

    r5187 r5573  
    2222                double* Quadrilaterals;
    2323
    24                 int     VerticesOnGeometricVertexSize[2];
    25                 double* VerticesOnGeometricVertex;
    26                 int     VerticesOnGeometricEdgeSize[2];
    27                 double* VerticesOnGeometricEdge;
    28                 int     EdgesOnGeometricEdgeSize[2];
    29                 double* EdgesOnGeometricEdge;
     24                int     VerticesOnGeomVertexSize[2];
     25                double* VerticesOnGeomVertex;
     26                int     VerticesOnGeomEdgeSize[2];
     27                double* VerticesOnGeomEdge;
     28                int     EdgesOnGeomEdgeSize[2];
     29                double* EdgesOnGeomEdge;
    3030
    3131                int     SubDomainsSize[2];
  • issm/trunk/src/c/objects/Bamg/BamgVertex.h

    r5460 r5573  
    3131                                long          color;
    3232                                BamgVertex   *MeshVertexHook;         // used in geometry BamgVertex to know the Mesh Vertex associated
    33                                 VertexOnGeom *GeometricalEdgeHook;    // if IndexInTriangle == 8; // set with Mesh::SetVertexFieldOn()
     33                                VertexOnGeom *GeomEdgeHook;    // if IndexInTriangle == 8; // set with Mesh::SetVertexFieldOn()
    3434                                BamgVertex   *BackgroundVertexHook;   // if IndexInTriangle == 16 on Background vertex Mesh::SetVertexFieldOnBTh()
    3535                                VertexOnEdge *BackgroundEdgeHook;     // if IndexInTriangle == 32 on Background edge
  • issm/trunk/src/c/objects/Bamg/CrackedEdge.h

    r3913 r5573  
    88        //classes
    99        class Triangle;
    10         class GeometricalEdge;
     10        class GeomEdge;
    1111        class Edge;
    1212
     
    1616                        Triangle* a;
    1717                        Triangle* b;
    18                         GeometricalEdge* E;
     18                        GeomEdge* E;
    1919                        Edge* e1;
    2020                        Edge* e2;
  • issm/trunk/src/c/objects/Bamg/Curve.h

    r5401 r5573  
    77
    88        //classes
    9         class GeometricalEdge;
     9        class GeomEdge;
    1010        class Curve;
    1111        class Geometry;
     
    1313        class Curve {
    1414                public:
    15                         GeometricalEdge *FirstEdge; //First edge of the curve
    16                         GeometricalEdge *LastEdge;  //Last edge of the curve
     15                        GeomEdge *FirstEdge; //First edge of the curve
     16                        GeomEdge *LastEdge;  //Last edge of the curve
    1717                        int FirstVertexIndex;       //Last vertex index in the last edge
    1818                        int LastVertexIndex;        //First Vertex index in the first edge
  • issm/trunk/src/c/objects/Bamg/Edge.cpp

    r5149 r5573  
    1818                v[0] = ThNew.vertices + Th.GetId(v[0]);   
    1919                v[1] = ThNew.vertices + Th.GetId(v[1]);
    20                 if (GeometricalEdgeHook)
    21                  GeometricalEdgeHook =  ThNew.Gh.edges+Th.Gh.GetId(GeometricalEdgeHook);
     20                if (GeomEdgeHook)
     21                 GeomEdgeHook =  ThNew.Gh.edges+Th.Gh.GetId(GeomEdgeHook);
    2222                if (adj[0]) adj[0] =   ThNew.edges +   Th.GetId(adj[0]);
    2323                if (adj[1]) adj[1] =   ThNew.edges +   Th.GetId(adj[1]);
     
    2929                printf("   pointers towards two vertices: %p %p\n",v[0],v[1]);
    3030                printf("   ReferenceNumber = %i\n",ReferenceNumber);
    31                 printf("   GeometricalEdgeHook = %p\n",GeometricalEdgeHook);
     31                printf("   GeomEdgeHook = %p\n",GeomEdgeHook);
    3232                printf("   two adjacent edges on the same curve: %p %p\n",adj[0],adj[1]);
    3333        }
  • issm/trunk/src/c/objects/Bamg/Edge.h

    r5148 r5573  
    66#include "../../include/include.h"
    77#include "../../shared/Exceptions/exceptions.h"
    8 #include "./GeometricalEdge.h"
     8#include "./GeomEdge.h"
    99
    1010namespace bamg {
     
    1818                        BamgVertex      *v[2];
    1919                        long             ReferenceNumber;
    20                         GeometricalEdge *GeometricalEdgeHook;
     20                        GeomEdge *GeomEdgeHook;
    2121                        Edge            *adj[2];       // the 2 adj edges if on the same curve
    2222
  • issm/trunk/src/c/objects/Bamg/GeomEdge.cpp

    r5571 r5573  
    66#include "../../shared/Exceptions/exceptions.h"
    77
    8 #include "GeometricalEdge.h"
     8#include "GeomEdge.h"
    99#include "Geometry.h"
    1010
     
    1616
    1717        /*Methods*/
    18         /*FUNCTION GeometricalEdge::Cracked{{{1*/
    19         int    GeometricalEdge::Cracked() const  {
     18        /*FUNCTION GeomEdge::Cracked{{{1*/
     19        int    GeomEdge::Cracked() const  {
    2020                return type &1; 
    2121        }/*}}}*/
    22         /*FUNCTION GeometricalEdge::F{{{1*/
    23         R2 GeometricalEdge::F(double theta) const{
     22        /*FUNCTION GeomEdge::F{{{1*/
     23        R2 GeomEdge::F(double theta) const{
    2424                /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/F)*/
    2525                // parametrization of the curve edge
     
    6363          }
    6464        /*}}}1*/
    65         /*FUNCTION GeometricalEdge::Mark{{{1*/
    66         int    GeometricalEdge::Mark()    const  {
     65        /*FUNCTION GeomEdge::Mark{{{1*/
     66        int    GeomEdge::Mark()    const  {
    6767                return type &16;
    6868        }/*}}}*/
    69         /*FUNCTION GeometricalEdge::R1tg{{{1*/
    70         double GeometricalEdge::R1tg(double theta,R2 & t) const{
     69        /*FUNCTION GeomEdge::R1tg{{{1*/
     70        double GeomEdge::R1tg(double theta,R2 & t) const{
    7171                /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/R1tg)*/
    7272                // 1/R of radius of cuvature
     
    139139        }
    140140        /*}}}1*/
    141         /*FUNCTION GeometricalEdge::Required{{{1*/
    142         int    GeometricalEdge::Required()       {
     141        /*FUNCTION GeomEdge::Required{{{1*/
     142        int    GeomEdge::Required()       {
    143143                return type &64;
    144144        }/*}}}*/
    145         /*FUNCTION GeometricalEdge::Set {{{1*/
    146         void GeometricalEdge::Set(const GeometricalEdge & rec,const Geometry & Gh ,Geometry & GhNew){
     145        /*FUNCTION GeomEdge::Set {{{1*/
     146        void GeomEdge::Set(const GeomEdge & rec,const Geometry & Gh ,Geometry & GhNew){
    147147                *this = rec;
    148148                v[0] = GhNew.vertices + Gh.GetId(v[0]);   
     
    152152        }
    153153        /*}}}*/
    154         /*FUNCTION GeometricalEdge::SetCracked{{{1*/
    155         void   GeometricalEdge::SetCracked()     {
     154        /*FUNCTION GeomEdge::SetCracked{{{1*/
     155        void   GeomEdge::SetCracked()     {
    156156                type |= 1;/*=>1st digit to 1*/
    157157        }/*}}}*/
    158         /*FUNCTION GeometricalEdge::SetTgA{{{1*/
    159         void   GeometricalEdge::SetTgA()         {
     158        /*FUNCTION GeomEdge::SetTgA{{{1*/
     159        void   GeomEdge::SetTgA()         {
    160160                type |=4; /*=>2d digit to 1*/
    161161        }/*}}}*/
    162         /*FUNCTION GeometricalEdge::SetTgB{{{1*/
    163         void   GeometricalEdge::SetTgB()         {
     162        /*FUNCTION GeomEdge::SetTgB{{{1*/
     163        void   GeomEdge::SetTgB()         {
    164164                type |=8; /*=> 3d digit to 1*/
    165165        }/*}}}*/
    166         /*FUNCTION GeometricalEdge::SetMark{{{1*/
    167         void   GeometricalEdge::SetMark()        {
     166        /*FUNCTION GeomEdge::SetMark{{{1*/
     167        void   GeomEdge::SetMark()        {
    168168                type |=16;/*=> 4th digiy to 1*/
    169169        }/*}}}*/
    170         /*FUNCTION GeometricalEdge::SetUnMark{{{1*/
    171         void   GeometricalEdge::SetUnMark()      {
     170        /*FUNCTION GeomEdge::SetUnMark{{{1*/
     171        void   GeomEdge::SetUnMark()      {
    172172                type &= 1007 /* 1023-16 = 000111110111 => 4th digit to 0*/;
    173173        }/*}}}*/
    174         /*FUNCTION GeometricalEdge::SetRequired{{{1*/
    175         void   GeometricalEdge::SetRequired()    {
     174        /*FUNCTION GeomEdge::SetRequired{{{1*/
     175        void   GeomEdge::SetRequired()    {
    176176                type |= 64;/*=>6th digit to 1*/
    177177        }/*}}}*/
    178           /*FUNCTION GeometricalEdge::Tg{{{1*/
    179         int    GeometricalEdge::Tg(int i) const  {
     178          /*FUNCTION GeomEdge::Tg{{{1*/
     179        int    GeomEdge::Tg(int i) const  {
    180180                return i==0 ? TgA() : TgB();
    181181        }/*}}}*/
    182         /*FUNCTION GeometricalEdge::TgA{{{1*/
    183         int    GeometricalEdge::TgA()     const  {
     182        /*FUNCTION GeomEdge::TgA{{{1*/
     183        int    GeomEdge::TgA()     const  {
    184184                return type &4; 
    185185        }/*}}}*/
    186         /*FUNCTION GeometricalEdge::TgB{{{1*/
    187         int    GeometricalEdge::TgB()     const  {
     186        /*FUNCTION GeomEdge::TgB{{{1*/
     187        int    GeomEdge::TgB()     const  {
    188188                return type &8; 
    189189        }/*}}}*/
  • issm/trunk/src/c/objects/Bamg/GeomEdge.h

    r5571 r5573  
    77
    88        //classes
    9         class GeometricalVertex;
     9        class GeomVertex;
    1010        class Geometry;
    1111
    12         class GeometricalEdge {
     12        class GeomEdge {
    1313
    1414                public:
    15                         GeometricalVertex *v[2];
     15                        GeomVertex *v[2];
    1616                        long               ReferenceNumber;
    1717                        long               CurveNumber;
    1818                        R2                 tg[2];              // the 2 tangentes (tg[0] =0 => no continuity)
    19                         GeometricalEdge   *Adj[2];
     19                        GeomEdge   *Adj[2];
    2020                        int                AdjVertexIndex[2]; // for a given vertex, this gives the index of the vertex in the adjacent edge (0 or 1)
    2121                        int                type;
    2222
    2323                        //Operators
    24                         GeometricalVertex       & operator[](int i){return *v[i];};
    25                         const GeometricalVertex & operator[](int i) const { return *v[i];};
    26                         GeometricalVertex       * operator()(int i){return v[i];}; 
     24                        GeomVertex       & operator[](int i){return *v[i];};
     25                        const GeomVertex & operator[](int i) const { return *v[i];};
     26                        GeomVertex       * operator()(int i){return v[i];}; 
    2727
    2828                        //Methods
     
    4141                        void   SetUnMark();
    4242                        void   SetRequired();
    43                         void   Set(const GeometricalEdge & rec,const Geometry & Th ,Geometry & ThNew);
     43                        void   Set(const GeomEdge & rec,const Geometry & Th ,Geometry & ThNew);
    4444        };
    4545
  • issm/trunk/src/c/objects/Bamg/GeomSubDomain.cpp

    r5571 r5573  
    44#include <ctime>
    55
    6 #include "GeometricalSubDomain.h"
     6#include "GeomSubDomain.h"
    77#include "Geometry.h"
    88
     
    1212
    1313        /*Methods*/
    14         /*FUNCTION GeometricalSubDomain::Set {{{1*/
    15         void GeometricalSubDomain::Set(const GeometricalSubDomain & rec,const Geometry & Gh ,const Geometry & GhNew){
     14        /*FUNCTION GeomSubDomain::Set {{{1*/
     15        void GeomSubDomain::Set(const GeomSubDomain & rec,const Geometry & Gh ,const Geometry & GhNew){
    1616                *this = rec;
    1717                edge = Gh.GetId(edge) + GhNew.edges;
  • issm/trunk/src/c/objects/Bamg/GeomSubDomain.h

    r5571 r5573  
    77
    88        //classes
    9         class GeometricalEdge;
     9        class GeomEdge;
    1010        class Geometry;
    1111
    12         class GeometricalSubDomain {
     12        class GeomSubDomain {
    1313                public:
    14                         GeometricalEdge *edge;
     14                        GeomEdge *edge;
    1515                        int              direction;   // -1 or 1
    1616                        long             ReferenceNumber;
    1717
    1818                        //Methods
    19                         void Set(const GeometricalSubDomain &,const Geometry & ,const Geometry &);
     19                        void Set(const GeomSubDomain &,const Geometry & ,const Geometry &);
    2020        };
    2121
  • issm/trunk/src/c/objects/Bamg/GeomVertex.cpp

    r5571 r5573  
    44#include <ctime>
    55
    6 #include "GeometricalVertex.h"
     6#include "GeomVertex.h"
    77#include "../../include/include.h"
    88#include "../../shared/Exceptions/exceptions.h"
     
    1414
    1515        /*Methods*/
    16         /*FUNCTION GeometricalVertex::Corner {{{1*/
    17         int  GeometricalVertex::Corner() const {
     16        /*FUNCTION GeomVertex::Corner {{{1*/
     17        int  GeomVertex::Corner() const {
    1818                return type & 4;
    1919        }
    2020        /*}}}*/
    21         /*FUNCTION GeometricalVertex::Required {{{1*/
    22         int  GeometricalVertex::Required()const {
     21        /*FUNCTION GeomVertex::Required {{{1*/
     22        int  GeomVertex::Required()const {
    2323                // a corner is required
    2424                return type & 6;
    2525        }
    2626        /*}}}*/
    27         /*FUNCTION GeometricalVertex::SetCorner {{{1*/
    28         void GeometricalVertex::SetCorner(){
     27        /*FUNCTION GeomVertex::SetCorner {{{1*/
     28        void GeomVertex::SetCorner(){
    2929                type |= 4;
    3030        }
    3131        /*}}}*/
    32         /*FUNCTION GeometricalVertex::SetRequired {{{1*/
    33         void GeometricalVertex::SetRequired(){
     32        /*FUNCTION GeomVertex::SetRequired {{{1*/
     33        void GeomVertex::SetRequired(){
    3434                type |= 2;
    3535        }
  • issm/trunk/src/c/objects/Bamg/GeomVertex.h

    r5571 r5573  
    99        class Geometry;
    1010
    11         class GeometricalVertex : public BamgVertex {
     11        class GeomVertex : public BamgVertex {
    1212
    1313                public:
     
    1717
    1818                        //Constructors
    19                         GeometricalVertex():type(0){};
     19                        GeomVertex():type(0){};
    2020
    2121                        //Methods
  • issm/trunk/src/c/objects/Bamg/Geometry.cpp

    r5401 r5573  
    3333                NbRef =0;
    3434                quadtree=0;
    35                 vertices = nbv ? new GeometricalVertex[nbv] : NULL;
    36                 edges = nbe ? new GeometricalEdge[nbe]:NULL;
     35                vertices = nbv ? new GeomVertex[nbv] : NULL;
     36                edges = nbe ? new GeomEdge[nbe]:NULL;
    3737                curves= nbcurves ? new Curve[nbcurves]:NULL;
    38                 subdomains = nbsubdomains ? new GeometricalSubDomain[nbsubdomains]:NULL;
     38                subdomains = nbsubdomains ? new GeomSubDomain[nbsubdomains]:NULL;
    3939                for (i=0;i<nbe;i++)
    4040                 edges[i].Set(Gh.edges[i],Gh,*this);
     
    8383                        if(verbose>5) printf("      processing Vertices\n");
    8484                        if (bamggeom->VerticesSize[1]!=3) ISSMERROR("Vertices should have 3 columns");
    85                         vertices = new GeometricalVertex[nbv];
     85                        vertices = new GeomVertex[nbv];
    8686                        for (i=0;i<nbv;i++) {
    8787                                vertices[i].r.x=(double)bamggeom->Vertices[i*3+0];
     
    128128                        if(verbose>5) printf("      processing Edges\n");
    129129                        if (bamggeom->EdgesSize[1]!=3) ISSMERROR("Edges should have 3 columns");
    130                         edges = new GeometricalEdge[nbe];
     130                        edges = new GeomEdge[nbe];
    131131
    132132                        //initialize verticeslength (sum of the lengths of the edges holding vertex)
     
    265265                        if (bamggeom->SubDomainsSize[1]!=4) ISSMERROR("SubDomains should have 4 columns");
    266266                        nbsubdomains=bamggeom->SubDomainsSize[0];
    267                         subdomains = new GeometricalSubDomain[nbsubdomains];
     267                        subdomains = new GeomSubDomain[nbsubdomains];
    268268                        for (i=0;i<nbsubdomains;i++){
    269269                                i0=(int)bamggeom->SubDomains[i*4+0];
     
    449449                return Max(pmax.x-pmin.x,pmax.y-pmin.y);
    450450        }/*}}}*/
    451         /*FUNCTION Geometry::GetId(const GeometricalVertex &t){{{1*/
    452         long Geometry::GetId(const GeometricalVertex & t) const  {
     451        /*FUNCTION Geometry::GetId(const GeomVertex &t){{{1*/
     452        long Geometry::GetId(const GeomVertex & t) const  {
    453453                return &t - vertices;
    454454        }/*}}}*/
    455         /*FUNCTION Geometry::GetId(const GeometricalVertex * t){{{1*/
    456         long Geometry::GetId(const GeometricalVertex * t) const  {
     455        /*FUNCTION Geometry::GetId(const GeomVertex * t){{{1*/
     456        long Geometry::GetId(const GeomVertex * t) const  {
    457457                return t - vertices;
    458458        }/*}}}*/
    459         /*FUNCTION Geometry::GetId(const GeometricalEdge & t){{{1*/
    460         long Geometry::GetId(const GeometricalEdge & t) const  {
     459        /*FUNCTION Geometry::GetId(const GeomEdge & t){{{1*/
     460        long Geometry::GetId(const GeomEdge & t) const  {
    461461                return &t - edges;
    462462        }/*}}}*/
    463         /*FUNCTION Geometry::GetId(const GeometricalEdge * t){{{1*/
    464         long Geometry::GetId(const GeometricalEdge * t) const  {
     463        /*FUNCTION Geometry::GetId(const GeomEdge * t){{{1*/
     464        long Geometry::GetId(const GeomEdge * t) const  {
    465465                return t - edges;
    466466        }/*}}}*/
     
    470470        }/*}}}*/
    471471        /*FUNCTION Geometry::Containing{{{1*/
    472         GeometricalEdge* Geometry::Containing(const R2 P,  GeometricalEdge * start) const {
     472        GeomEdge* Geometry::Containing(const R2 P,  GeomEdge * start) const {
    473473                /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/Contening)*/
    474474
    475                 GeometricalEdge* on =start,* pon=0;
     475                GeomEdge* on =start,* pon=0;
    476476                // walk with the cos on geometry
    477477                int counter=0;
     
    507507                QuadTree           quadtree; // build quadtree to find duplicates
    508508                BamgVertex        *v0       = vertices;
    509                 GeometricalVertex *v0g      = (GeometricalVertex*) (void*)v0;
     509                GeomVertex *v0g      = (GeomVertex*) (void*)v0;
    510510
    511511                k=0;
     
    755755                                for (i=0;i<nbe;i++){
    756756
    757                                         GeometricalEdge & ei=edges[i];   
     757                                        GeomEdge & ei=edges[i];   
    758758                                        for(j=0;j<2;j++){
    759759                                                /*If current edge ei is unmarked and (level=1 or vertex i is required (corner)):
     
    761761                                                if (!ei.Mark() && (level || ei[j].Required())) {
    762762                                                        int k0=j,k1;
    763                                                         GeometricalEdge   *e=&ei;
    764                                                         GeometricalVertex *a=(*e)(k0); // begin
     763                                                        GeomEdge   *e=&ei;
     764                                                        GeomVertex *a=(*e)(k0); // begin
    765765                                                        if(curves){
    766766                                                                curves[nbcurves].FirstEdge=e;
     
    774774                                                                nb_marked_edges++;
    775775                                                                e->CurveNumber=nbcurves;
    776                                                                 GeometricalVertex *b=(*e)(k1);
     776                                                                GeomVertex *b=(*e)(k1);
    777777
    778778                                                                //break if we have reached the other end of the curve
     
    809809        /*}}}1*/
    810810        /*FUNCTION Geometry::ProjectOnCurve {{{1*/
    811         GeometricalEdge* Geometry::ProjectOnCurve(const Edge &e,double s,BamgVertex &V,VertexOnGeom &GV) const {
     811        GeomEdge* Geometry::ProjectOnCurve(const Edge &e,double s,BamgVertex &V,VertexOnGeom &GV) const {
    812812                /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/ProjectOnCurve)*/
    813813                /*Add a vertex on an existing geometrical edge according to the metrics of the two vertices constituting the edge*/
     
    819819
    820820                s=save_s;
    821                 GeometricalEdge* on=e.GeometricalEdgeHook;
     821                GeomEdge* on=e.GeomEdgeHook;
    822822                if (!on){
    823823                        ISSMERROR("ProjectOnCurve error message: edge provided should be on geometry");
    824824                }
    825                 if (!e[0].GeometricalEdgeHook ||  !e[1].GeometricalEdgeHook){
     825                if (!e[0].GeomEdgeHook ||  !e[1].GeomEdgeHook){
    826826                        ISSMERROR("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
    827827                }
     
    835835
    836836                //Get geometrical vertices corresponding to v0 and v1
    837                 VertexOnGeom  vg0=*v0.GeometricalEdgeHook,  vg1=*v1.GeometricalEdgeHook;
     837                VertexOnGeom  vg0=*v0.GeomEdgeHook,  vg1=*v1.GeomEdgeHook;
    838838
    839839                //build two pointers towrad current geometrical edge
    840                 GeometricalEdge *eg0=on, *eg1=on;
     840                GeomEdge *eg0=on, *eg1=on;
    841841
    842842                //Get edge direction and swap v0 and v1 if necessary
     
    850850
    851851                const int mxe=100;
    852                 GeometricalEdge* ge[mxe+1];
     852                GeomEdge* ge[mxe+1];
    853853                int     directionge[mxe+1];
    854854                double  lge[mxe+1];
    855855                int bge=mxe/2,tge=bge;
    856                 ge[bge] = e.GeometricalEdgeHook;
     856                ge[bge] = e.GeomEdgeHook;
    857857                directionge[bge]=1;
    858858
    859                 while (eg0!=(GeometricalEdge*)vg0 && (*eg0)(direction0)!=(GeometricalVertex*)vg0){
     859                while (eg0!=(GeomEdge*)vg0 && (*eg0)(direction0)!=(GeomVertex*)vg0){
    860860                        if (bge<=0) {
    861861                                if(NbTry) {
     
    870870                                goto retry;
    871871                        }
    872                         GeometricalEdge* tmpge = eg0;
     872                        GeomEdge* tmpge = eg0;
    873873                        ge[--bge] =eg0 = eg0->Adj[direction0];
    874874                        ISSMASSERT(bge>=0 && bge<=mxe);
    875875                        direction0 = 1-( directionge[bge] = tmpge->AdjVertexIndex[direction0]);
    876876                }
    877                 while (eg1 != (GeometricalEdge*) vg1  &&  (*eg1)(direction1) != (GeometricalVertex*) vg1) {
     877                while (eg1 != (GeomEdge*) vg1  &&  (*eg1)(direction1) != (GeomVertex*) vg1) {
    878878                        if(tge>=mxe ) {
    879879                                printf("WARNING: on the class Mesh before call Geometry::ProjectOnCurve is having issues (isn't it Eric?)\n");
     
    887887                                ISSMERROR("see above");
    888888                        }
    889                         GeometricalEdge* tmpge = eg1;
     889                        GeomEdge* tmpge = eg1;
    890890                        ge[++tge] =eg1 = eg1->Adj[direction1];
    891891                        directionge[tge]= direction1 = 1-tmpge->AdjVertexIndex[direction1];
     
    894894
    895895
    896                 if ((*eg0)(direction0)==(GeometricalVertex*)vg0)
     896                if ((*eg0)(direction0)==(GeomVertex*)vg0)
    897897                 vg0=VertexOnGeom(*(BamgVertex*) vg0,*eg0,direction0); //vg0 = absisce
    898898
    899                 if ((*eg1)(direction1)==(GeometricalVertex*)vg1)
     899                if ((*eg1)(direction1)==(GeomVertex*)vg1)
    900900                 vg1=VertexOnGeom(*(BamgVertex*) vg1,*eg1,direction1);
    901901
  • issm/trunk/src/c/objects/Bamg/Geometry.h

    r5397 r5573  
    55#include "./BamgGeom.h"
    66#include "./BamgOpts.h"
    7 #include "./GeometricalVertex.h"
    8 #include "./GeometricalEdge.h"
     7#include "./GeomVertex.h"
     8#include "./GeomEdge.h"
    99#include "./Curve.h"
    1010
     
    1313        class Triangle;
    1414        class QuadTree;
    15         class GeometricalSubDomain;
     15        class GeomSubDomain;
    1616        class Edge;
    1717
     
    2525                        long                  nbsubdomains;
    2626                        long                  nbcurves;
    27                         GeometricalVertex    *vertices;
    28                         GeometricalEdge      *edges;
     27                        GeomVertex    *vertices;
     28                        GeomEdge      *edges;
    2929                        QuadTree             *quadtree;
    30                         GeometricalSubDomain *subdomains;
     30                        GeomSubDomain *subdomains;
    3131                        Curve                *curves;
    3232                        R2                    pmin,pmax;                     // domain extrema coordinates
     
    4141
    4242                        //Operators
    43                         const GeometricalVertex &operator[](long i) const { return vertices[i]; };
    44                         GeometricalVertex       &operator[](long i) { return vertices[i];       };
    45                         const GeometricalEdge   &operator()(long i) const { return edges[i];    };
    46                         GeometricalEdge         &operator()(long  i) { return edges[i];                };
     43                        const GeomVertex &operator[](long i) const { return vertices[i]; };
     44                        GeomVertex       &operator[](long i) { return vertices[i];       };
     45                        const GeomEdge   &operator()(long i) const { return edges[i];    };
     46                        GeomEdge         &operator()(long  i) { return edges[i];                };
    4747
    4848                        //Methods
     
    5454                        void             Init(void);
    5555                        void             PostRead();
    56                         long             GetId(const GeometricalVertex &t) const;
    57                         long             GetId(const GeometricalVertex *t) const;
    58                         long             GetId(const GeometricalEdge &t) const;
    59                         long             GetId(const GeometricalEdge *t) const;
     56                        long             GetId(const GeomVertex &t) const;
     57                        long             GetId(const GeomVertex *t) const;
     58                        long             GetId(const GeomEdge &t) const;
     59                        long             GetId(const GeomEdge *t) const;
    6060                        long             GetId(const Curve *c) const;
    6161                        void             UnMarkEdges();
    62                         GeometricalEdge *ProjectOnCurve(const Edge &,double,BamgVertex &,VertexOnGeom &) const;
    63                         GeometricalEdge *Containing(const R2 P, GeometricalEdge *start) const;
     62                        GeomEdge *ProjectOnCurve(const Edge &,double,BamgVertex &,VertexOnGeom &) const;
     63                        GeomEdge *Containing(const R2 P, GeomEdge *start) const;
    6464                        void             WriteGeometry(BamgGeom *bamggeom, BamgOpts*bamgopts);
    6565        };
  • issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.cpp

    r5180 r5573  
    180180        /*}}}1*/
    181181        /*FUNCTION ListofIntersectionTriangles::NewSubSeg{{{1*/
    182         void  ListofIntersectionTriangles::NewSubSeg(GeometricalEdge *e,double s0,double s1){
     182        void  ListofIntersectionTriangles::NewSubSeg(GeomEdge *e,double s0,double s1){
    183183                long int verbosity=0;
    184184                if (NbSeg>=MaxNbSeg) {
  • issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.h

    r5130 r5573  
    2525
    2626                        public:
    27                                 GeometricalEdge *e;
     27                                GeomEdge *e;
    2828                                double           sBegin  ,sEnd; // abscisse of the seg on edge parameter
    2929                                double           lBegin  ,lEnd; // length abscisse set in ListofIntersectionTriangles::Length
     
    6666                        double Length();
    6767                        long   NewPoints(BamgVertex *,long &nbv,long maxnbv);
    68                         void   NewSubSeg(GeometricalEdge *e,double s0,double s1);
     68                        void   NewSubSeg(GeomEdge *e,double s0,double s1);
    6969                        void   ReShape();
    7070        };
  • issm/trunk/src/c/objects/Bamg/Mesh.cpp

    r5531 r5573  
    380380                }
    381381
    382                 //VerticesOnGeometricEdge
    383                 if(bamgmesh->VerticesOnGeometricEdge){
    384                         if(verbose>5) printf("      processing VerticesOnGeometricEdge\n");
    385                         NbVerticesOnGeomEdge=bamgmesh->VerticesOnGeometricEdgeSize[0];
     382                //VerticesOnGeomEdge
     383                if(bamgmesh->VerticesOnGeomEdge){
     384                        if(verbose>5) printf("      processing VerticesOnGeomEdge\n");
     385                        NbVerticesOnGeomEdge=bamgmesh->VerticesOnGeomEdgeSize[0];
    386386                        VerticesOnGeomEdge= new  VertexOnGeom[NbVerticesOnGeomEdge] ;
    387387                        for (i=0;i<NbVerticesOnGeomEdge;i++){
    388388                                long  i1,i2;
    389389                                double s;
    390                                 i1=(long)  bamgmesh->VerticesOnGeometricEdge[i*3+0]-1; //for C indexing
    391                                 i2=(long)  bamgmesh->VerticesOnGeometricEdge[i*3+1]-1; //for C indexing
    392                                 s =(double)bamgmesh->VerticesOnGeometricEdge[i*3+2];
     390                                i1=(long)  bamgmesh->VerticesOnGeomEdge[i*3+0]-1; //for C indexing
     391                                i2=(long)  bamgmesh->VerticesOnGeomEdge[i*3+1]-1; //for C indexing
     392                                s =(double)bamgmesh->VerticesOnGeomEdge[i*3+2];
    393393                                VerticesOnGeomEdge[i]=VertexOnGeom(vertices[i1],Gh.edges[i2],s);
    394394                        }
    395395                }
    396396
    397                 //VerticesOnGeometricVertex
    398                 if(bamgmesh->VerticesOnGeometricVertexSize[0]){
    399                         if(verbose>5) printf("      processing VerticesOnGeometricVertex\n");
    400                         NbVerticesOnGeomVertex=bamgmesh->VerticesOnGeometricVertexSize[0];
     397                //VerticesOnGeomVertex
     398                if(bamgmesh->VerticesOnGeomVertexSize[0]){
     399                        if(verbose>5) printf("      processing VerticesOnGeomVertex\n");
     400                        NbVerticesOnGeomVertex=bamgmesh->VerticesOnGeomVertexSize[0];
    401401                        VerticesOnGeomVertex  = new  VertexOnGeom[NbVerticesOnGeomVertex] ;
    402402                        for (i=0;i<NbVerticesOnGeomVertex;i++){
    403403                                long  i1,i2;
    404                                 i1=(long)bamgmesh->VerticesOnGeometricVertex[i*2+0]-1; //for C indexing
    405                                 i2=(long)bamgmesh->VerticesOnGeometricVertex[i*2+1]-1; //for C indexing
     404                                i1=(long)bamgmesh->VerticesOnGeomVertex[i*2+0]-1; //for C indexing
     405                                i2=(long)bamgmesh->VerticesOnGeomVertex[i*2+1]-1; //for C indexing
    406406                                VerticesOnGeomVertex[i]=VertexOnGeom(vertices[i1],Gh.vertices[i2]);
    407407                        }
     
    471471                }
    472472
    473                 //EdgeOnGeometricEdge
    474                 if(bamgmesh->EdgesOnGeometricEdge){
    475                         if(verbose>5) printf("      processing EdgesOnGeometricEdge\n");
     473                //EdgeOnGeomEdge
     474                if(bamgmesh->EdgesOnGeomEdge){
     475                        if(verbose>5) printf("      processing EdgesOnGeomEdge\n");
    476476                        int i1,i2,i,j;
    477                         i2=bamgmesh->EdgesOnGeometricEdgeSize[0];
     477                        i2=bamgmesh->EdgesOnGeomEdgeSize[0];
    478478                        for (i1=0;i1<i2;i1++) {
    479                                 i=(int)bamgmesh->EdgesOnGeometricEdge[i1*2+0]-1; //C indexing
    480                                 j=(int)bamgmesh->EdgesOnGeometricEdge[i1*2+1]-1; //C indexing
     479                                i=(int)bamgmesh->EdgesOnGeomEdge[i1*2+0]-1; //C indexing
     480                                j=(int)bamgmesh->EdgesOnGeomEdge[i1*2+1]-1; //C indexing
    481481                                //Check value
    482482                                if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) {
    483                                         ISSMERROR("ReadMesh error: EdgesOnGeometricEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe);
    484                                 }
    485                                 edges[i].GeometricalEdgeHook=Gh.edges+j;
     483                                        ISSMERROR("ReadMesh error: EdgesOnGeomEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe);
     484                                }
     485                                edges[i].GeomEdgeHook=Gh.edges+j;
    486486                        }
    487487                }
     
    582582                                bamgmesh->Edges[i*3+1]=GetId(edges[i][1])+1; //back to M indexing
    583583                                bamgmesh->Edges[i*3+2]=edges[i].ReferenceNumber;
    584                                 if(edges[i].GeometricalEdgeHook){
     584                                if(edges[i].GeomEdgeHook){
    585585                                        NumIssmSegments++;
    586586                                }
     
    651651                num=0;
    652652                for (i=0;i<nbe;i++){
    653                         if(edges[i].GeometricalEdgeHook){
     653                        if(edges[i].GeomEdgeHook){
    654654                                //build segment
    655655                                int i1=GetId(edges[i][0]);
     
    758758
    759759                /*VerticesOnGeomVertex*/
    760                 if(verbose>5) printf("      writing VerticesOnGeometricVertex\n");
    761                 bamgmesh->VerticesOnGeometricVertexSize[0]=NbVerticesOnGeomVertex;
    762                 bamgmesh->VerticesOnGeometricVertexSize[1]=2;
     760                if(verbose>5) printf("      writing VerticesOnGeomVertex\n");
     761                bamgmesh->VerticesOnGeomVertexSize[0]=NbVerticesOnGeomVertex;
     762                bamgmesh->VerticesOnGeomVertexSize[1]=2;
    763763                if (NbVerticesOnGeomVertex){
    764                         bamgmesh->VerticesOnGeometricVertex=(double*)xmalloc(2*NbVerticesOnGeomVertex*sizeof(double));
     764                        bamgmesh->VerticesOnGeomVertex=(double*)xmalloc(2*NbVerticesOnGeomVertex*sizeof(double));
    765765                        for (i=0;i<NbVerticesOnGeomVertex;i++){
    766766                                VertexOnGeom &v=VerticesOnGeomVertex[i];
    767767                                ISSMASSERT(v.OnGeomVertex());
    768                                 bamgmesh->VerticesOnGeometricVertex[i*2+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
    769                                 bamgmesh->VerticesOnGeometricVertex[i*2+1]=Gh.GetId((GeometricalVertex*)v)+1; //back to Matlab indexing
    770                         }
    771                 }
    772 
    773                 /*VertexOnGeometricEdge*/
    774                 if(verbose>5) printf("      writing VerticesOnGeometricEdge\n");
    775                 bamgmesh->VerticesOnGeometricEdgeSize[0]=NbVerticesOnGeomEdge;
    776                 bamgmesh->VerticesOnGeometricEdgeSize[1]=3;
     768                                bamgmesh->VerticesOnGeomVertex[i*2+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
     769                                bamgmesh->VerticesOnGeomVertex[i*2+1]=Gh.GetId((GeomVertex*)v)+1; //back to Matlab indexing
     770                        }
     771                }
     772
     773                /*VertexOnGeomEdge*/
     774                if(verbose>5) printf("      writing VerticesOnGeomEdge\n");
     775                bamgmesh->VerticesOnGeomEdgeSize[0]=NbVerticesOnGeomEdge;
     776                bamgmesh->VerticesOnGeomEdgeSize[1]=3;
    777777                if (NbVerticesOnGeomEdge){
    778                         bamgmesh->VerticesOnGeometricEdge=(double*)xmalloc(3*NbVerticesOnGeomEdge*sizeof(double));
     778                        bamgmesh->VerticesOnGeomEdge=(double*)xmalloc(3*NbVerticesOnGeomEdge*sizeof(double));
    779779                        for (i=0;i<NbVerticesOnGeomEdge;i++){
    780780                                const VertexOnGeom &v=VerticesOnGeomEdge[i];
    781781                                if (!v.OnGeomEdge()){
    782                                         ISSMERROR("A vertices supposed to be OnGeometricEdge is actually not");
    783                                 }
    784                                 bamgmesh->VerticesOnGeometricEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
    785                                 bamgmesh->VerticesOnGeometricEdge[i*3+1]=Gh.GetId((const GeometricalEdge*)v)+1; //back to Matlab indexing
    786                                 bamgmesh->VerticesOnGeometricEdge[i*3+2]=(double)v; //absisce
    787                         }
    788                 }
    789 
    790                 /*EdgesOnGeometricEdge*/
    791                 if(verbose>5) printf("      writing EdgesOnGeometricEdge\n");
     782                                        ISSMERROR("A vertices supposed to be OnGeomEdge is actually not");
     783                                }
     784                                bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
     785                                bamgmesh->VerticesOnGeomEdge[i*3+1]=Gh.GetId((const GeomEdge*)v)+1; //back to Matlab indexing
     786                                bamgmesh->VerticesOnGeomEdge[i*3+2]=(double)v; //absisce
     787                        }
     788                }
     789
     790                /*EdgesOnGeomEdge*/
     791                if(verbose>5) printf("      writing EdgesOnGeomEdge\n");
    792792                k=0;
    793793                for (i=0;i<nbe;i++){
    794                         if (edges[i].GeometricalEdgeHook) k=k+1;
    795                 }
    796                 bamgmesh->EdgesOnGeometricEdgeSize[0]=k;
    797                 bamgmesh->EdgesOnGeometricEdgeSize[1]=2;
     794                        if (edges[i].GeomEdgeHook) k=k+1;
     795                }
     796                bamgmesh->EdgesOnGeomEdgeSize[0]=k;
     797                bamgmesh->EdgesOnGeomEdgeSize[1]=2;
    798798                if (k){
    799                         bamgmesh->EdgesOnGeometricEdge=(double*)xmalloc(2*(int)k*sizeof(double));
     799                        bamgmesh->EdgesOnGeomEdge=(double*)xmalloc(2*(int)k*sizeof(double));
    800800                        int count=0;
    801801                        for (i=0;i<nbe;i++){
    802                                 if (edges[i].GeometricalEdgeHook){
    803                                         bamgmesh->EdgesOnGeometricEdge[count*2+0]=(double)i+1; //back to Matlab indexing
    804                                         bamgmesh->EdgesOnGeometricEdge[count*2+1]=(double)Gh.GetId(edges[i].GeometricalEdgeHook)+1; //back to Matlab indexing
     802                                if (edges[i].GeomEdgeHook){
     803                                        bamgmesh->EdgesOnGeomEdge[count*2+0]=(double)i+1; //back to Matlab indexing
     804                                        bamgmesh->EdgesOnGeomEdge[count*2+1]=(double)Gh.GetId(edges[i].GeomEdgeHook)+1; //back to Matlab indexing
    805805                                        count=count+1;
    806806                                }
     
    10151015                                Gh.ProjectOnCurve(edges[i],ss[j],V,GV);
    10161016
    1017                                 GeometricalEdge* eg = GV;
     1017                                GeomEdge* eg = GV;
    10181018                                double s = GV;
    10191019                                R2 tg;
     
    13861386                                        edges[add].v[0] = &triangles[it][VerticesOfTriangularEdge[j][0]];
    13871387                                        edges[add].v[1] = &triangles[it][VerticesOfTriangularEdge[j][1]];
    1388                                         edges[add].GeometricalEdgeHook=NULL;
     1388                                        edges[add].GeomEdgeHook=NULL;
    13891389                                        //if already existed
    13901390                                        if (i<nbeold){
    13911391                                                edges[add].ReferenceNumber=edgessave[i].ReferenceNumber;                     
    1392                                                 edges[add].GeometricalEdgeHook=edgessave[i].GeometricalEdgeHook; //  HACK to get required edges
     1392                                                edges[add].GeomEdgeHook=edgessave[i].GeomEdgeHook; //  HACK to get required edges
    13931393                                                printf("oh no...\n");
    13941394                                        }
     
    15531553                Gh.nbv=k;
    15541554                Gh.nbe = nbe;
    1555                 Gh.vertices = new GeometricalVertex[k];
    1556                 Gh.edges = new GeometricalEdge[nbe];
     1555                Gh.vertices = new GeomVertex[k];
     1556                Gh.edges = new GeomEdge[nbe];
    15571557                Gh.nbsubdomains = nbsubdomains;
    1558                 Gh.subdomains = new GeometricalSubDomain[nbsubdomains];
     1558                Gh.subdomains = new GeomSubDomain[nbsubdomains];
    15591559                if (verbose>3) printf("   number of vertices = %i\n   number of edges = %i\n",Gh.nbv,Gh.nbe);
    15601560                NbVerticesOnGeomVertex = Gh.nbv;
     
    16181618                        Gh.edges[i].tg[1]=R2();
    16191619
    1620                         bool required= edges[i].GeometricalEdgeHook;
     1620                        bool required= edges[i].GeomEdgeHook;
    16211621                        if(required) kreq++;
    1622                         edges[i].GeometricalEdgeHook =  Gh.edges + i;
     1622                        edges[i].GeomEdgeHook =  Gh.edges + i;
    16231623                        if(required){
    16241624                                Gh.edges[i].v[0]->SetRequired();
     
    21952195                //  computed the number of cracked edge
    21962196                for (k=i=0;i<nbe;i++){
    2197                         if(edges[i].GeometricalEdgeHook->Cracked()) k++;
     2197                        if(edges[i].GeomEdgeHook->Cracked()) k++;
    21982198                }
    21992199
     
    22142214
    22152215                for (i=0;i<nbe;i++){
    2216                         if(edges[i].GeometricalEdgeHook->Cracked()){
     2216                        if(edges[i].GeomEdgeHook->Cracked()){
    22172217
    22182218                                //Fill edges fields of CrackedEdges
    2219                                 CrackedEdges[k  ].E =edges[i].GeometricalEdgeHook;
     2219                                CrackedEdges[k  ].E =edges[i].GeomEdgeHook;
    22202220                                CrackedEdges[k++].e1=&edges[i];
    22212221
     
    25632563                                CreateSingleVertexToTriangleConnectivity();
    25642564                                long * mark = new long[nbt];
    2565                                 Edge **GeometricalEdgetoEdge = MakeGeometricalEdgeToEdge();
     2565                                Edge **GeomEdgetoEdge = MakeGeomEdgeToEdge();
    25662566
    25672567                                for (it=0;it<nbt;it++)
     
    25692569                                long inew =0;
    25702570                                for (int i=0;i<nbsubdomains;i++) {
    2571                                         GeometricalEdge &eg = *Gh.subdomains[i].edge;
     2571                                        GeomEdge &eg = *Gh.subdomains[i].edge;
    25722572                                        subdomains[i].ReferenceNumber = Gh.subdomains[i].ReferenceNumber;
    25732573                                        int ssdlab = subdomains[i].ReferenceNumber;
    2574                                         // by carefull is not easy to find a edge create from a GeometricalEdge
    2575                                         // see routine MakeGeometricalEdgeToEdge
    2576                                         Edge &e = *GeometricalEdgetoEdge[Gh.GetId(eg)];
     2574                                        // by carefull is not easy to find a edge create from a GeomEdge
     2575                                        // see routine MakeGeomEdgeToEdge
     2576                                        Edge &e = *GeomEdgetoEdge[Gh.GetId(eg)];
    25772577                                        ISSMASSERT(&e);
    25782578                                        BamgVertex * v0 =  e(0),*v1 = e(1);
     
    26322632                                         if ( mark[it] ==-1 )
    26332633                                          nbtout++,triangles[it].link =0;
    2634                                         delete [] GeometricalEdgetoEdge;
     2634                                        delete [] GeomEdgetoEdge;
    26352635                                        delete [] mark;
    26362636
     
    29542954        }
    29552955        /*}}}1*/
    2956         /*FUNCTION Mesh::MakeGeometricalEdgeToEdge{{{1*/
    2957         Edge** Mesh::MakeGeometricalEdgeToEdge() {
    2958                 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeGeometricalEdgeToEdge)*/
     2956        /*FUNCTION Mesh::MakeGeomEdgeToEdge{{{1*/
     2957        Edge** Mesh::MakeGeomEdgeToEdge() {
     2958                /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeGeomEdgeToEdge)*/
    29592959
    29602960                if (!Gh.nbe){
     
    29692969                  {
    29702970                        Edge * ei = edges+i;
    2971                         GeometricalEdge *GeometricalEdgeHook = ei->GeometricalEdgeHook;
    2972                         e[Gh.GetId(GeometricalEdgeHook)] = ei;   
     2971                        GeomEdge *GeomEdgeHook = ei->GeomEdgeHook;
     2972                        e[Gh.GetId(GeomEdgeHook)] = ei;   
    29732973                  }
    29742974                for ( i=0;i<nbe ; i++)
    29752975                 for (int ii=0;ii<2;ii++) {
    29762976                         Edge * ei = edges+i;
    2977                          GeometricalEdge *GeometricalEdgeHook = ei->GeometricalEdgeHook;
     2977                         GeomEdge *GeomEdgeHook = ei->GeomEdgeHook;
    29782978                         int j= ii;
    2979                          while (!(*GeometricalEdgeHook)[j].Required()) {
    2980                                  Adj(GeometricalEdgeHook,j); // next geom edge
     2979                         while (!(*GeomEdgeHook)[j].Required()) {
     2980                                 Adj(GeomEdgeHook,j); // next geom edge
    29812981                                 j=1-j;
    2982                                  if (e[Gh.GetId(GeometricalEdgeHook)])  break; // optimisation
    2983                                  e[Gh.GetId(GeometricalEdgeHook)] = ei;
     2982                                 if (e[Gh.GetId(GeomEdgeHook)])  break; // optimisation
     2983                                 e[Gh.GetId(GeomEdgeHook)] = ei;
    29842984                         }
    29852985                 }
     
    31613161                        for (i=0;i<Bh.nbv;i++){
    31623162                                BamgVertex &bv=Bh[i];
    3163                                 if (!bv.GeometricalEdgeHook){
     3163                                if (!bv.GeomEdgeHook){
    31643164                                        vertices[nbv].r   = bv.r;
    31653165                                        vertices[nbv++].m = bv.m;
     
    32663266        /*}}}1*/
    32673267        /*FUNCTION Mesh::ProjectOnCurve{{{1*/
    3268         GeometricalEdge*   Mesh::ProjectOnCurve( Edge & BhAB, BamgVertex &  vA, BamgVertex & vB,
     3268        GeomEdge*   Mesh::ProjectOnCurve( Edge & BhAB, BamgVertex &  vA, BamgVertex & vB,
    32693269                                double theta,BamgVertex & R,VertexOnEdge &  BR,VertexOnGeom & GR) {
    32703270                /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/ProjectOnCurve)*/
     
    36763676        for (i=0;i<nbe;i++){
    36773677        /*If the current mesh edge is on Geometry*/
    3678                 if(edges[i].GeometricalEdgeHook){
     3678                if(edges[i].GeomEdgeHook){
    36793679                        for(int j=0;j<2;j++){
    36803680                                /*Go through the edges adjacent to current edge (if on the same curve)*/
     
    36823682                                        /*The edge is on Geometry and does not have 2 adjacent edges... (not on a closed curve)*/
    36833683                                        /*Check that the 2 vertices are on geometry AND required*/
    3684                                         if(!edges[i][j].GeometricalEdgeHook->IsRequiredVertex()){
     3684                                        if(!edges[i][j].GeomEdgeHook->IsRequiredVertex()){
    36853685                                                printf("ReconstructExistingMesh error message: problem with the edge number %i: [%i %i]\n",i+1,GetId(edges[i][0])+1,GetId(edges[i][1])+1);
    3686                                                 printf("This edge is on geometrical edge number %i\n",Gh.GetId(edges[i].GeometricalEdgeHook)+1);
    3687                                                 if (edges[i][j].GeometricalEdgeHook->OnGeomVertex())
    3688                                                  printf("the vertex number %i of this edge is a geometric BamgVertex number %i\n",GetId(edges[i][j])+1,Gh.GetId(edges[i][j].GeometricalEdgeHook->gv)+1);
    3689                                                 else if (edges[i][j].GeometricalEdgeHook->OnGeomEdge())
    3690                                                  printf("the vertex number %i of this edge is a geometric Edge number %i\n",GetId(edges[i][j])+1,Gh.GetId(edges[i][j].GeometricalEdgeHook->ge)+1);
     3686                                                printf("This edge is on geometrical edge number %i\n",Gh.GetId(edges[i].GeomEdgeHook)+1);
     3687                                                if (edges[i][j].GeomEdgeHook->OnGeomVertex())
     3688                                                 printf("the vertex number %i of this edge is a geometric BamgVertex number %i\n",GetId(edges[i][j])+1,Gh.GetId(edges[i][j].GeomEdgeHook->gv)+1);
     3689                                                else if (edges[i][j].GeomEdgeHook->OnGeomEdge())
     3690                                                 printf("the vertex number %i of this edge is a geometric Edge number %i\n",GetId(edges[i][j])+1,Gh.GetId(edges[i][j].GeomEdgeHook->ge)+1);
    36913691                                                else
    3692                                                  printf("Its pointer is %p\n",edges[i][j].GeometricalEdgeHook);
     3692                                                 printf("Its pointer is %p\n",edges[i][j].GeomEdgeHook);
    36933693
    36943694                                                printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n");
     
    41744174                Triangle * lastT = triangles + nbt;
    41754175                for (i=0;i<nbe;i++)
    4176                  if(edges[i].GeometricalEdgeHook) NbEdgeOnGeom++;
     4176                 if(edges[i].GeomEdgeHook) NbEdgeOnGeom++;
    41774177                long newnbe=nbe+nbe;
    41784178                //  long newNbVerticesOnGeomVertex=NbVerticesOnGeomVertex;
     
    41984198                Edge ** edgesGtoB=0;
    41994199                if (withBackground)
    4200                  edgesGtoB= BTh.MakeGeometricalEdgeToEdge();
     4200                 edgesGtoB= BTh.MakeGeomEdgeToEdge();
    42014201                long ferr=0;
    42024202                for (i=0;i<nbe;i++)
    4203                  newedges[ie].GeometricalEdgeHook=0;
     4203                 newedges[ie].GeomEdgeHook=0;
    42044204
    42054205                for (i=0;i<nbe;i++)
    42064206                  {
    4207                         GeometricalEdge *ong =  edges[i].GeometricalEdgeHook;
     4207                        GeomEdge *ong =  edges[i].GeomEdgeHook;
    42084208
    42094209                        newedges[ie]=edges[i];
     
    42244224                                                ISSMERROR("!edgesGtoB");
    42254225                                        }
    4226                                         ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeometricalEdgeHook)],
     4226                                        ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)],
    42274227                                                                edges[i][0],edges[i][1],0.5,vertices[k],
    42284228                                                                newVertexOnBThEdge[kvb],
     
    42534253                                vertices[k].r = ((R2) edges[i][0] + (R2)  edges[i][1] )*0.5;
    42544254                                vertices[k].m =  Metric(0.5,edges[i][0],0.5,edges[i][1]);
    4255                                 vertices[k].GeometricalEdgeHook = 0;
     4255                                vertices[k].GeomEdgeHook = 0;
    42564256                          }
    42574257                        //vertices[k].i = R2ToI2( vertices[k].r);
     
    42624262                        vertices[k].DirOfSearch = NoDirOfSearch;
    42634263
    4264                         newedges[ie].GeometricalEdgeHook = Gh.Containing(AA,ong);
     4264                        newedges[ie].GeomEdgeHook = Gh.Containing(AA,ong);
    42654265                        newedges[ie++].v[1]=vertices+k;
    42664266
     
    42684268                        newedges[ie].adj[0]=newedges + ie -1;
    42694269                        newedges[ie].adj[1]=newedges+(edges[i].adj[1]-edges) ;
    4270                         newedges[ie].GeometricalEdgeHook =  Gh.Containing(BB,ong);
     4270                        newedges[ie].GeomEdgeHook =  Gh.Containing(BB,ong);
    42714271                        newedges[ie++].v[0]=vertices+k;
    42724272                        k++;
     
    46644664                                  BamgVertex &v0 = t[VerticesOfTriangularEdge[j][0]];
    46654665                                  BamgVertex &v1 = t[VerticesOfTriangularEdge[j][1]];
    4666                                   if (v0.GeometricalEdgeHook && v1.GeometricalEdgeHook){
     4666                                  if (v0.GeomEdgeHook && v1.GeomEdgeHook){
    46674667                                          R2 P= ((R2) v0 + (R2) v1)*0.5;
    46684668                                          if ( nbv<maxnbv) {
     
    48844884
    48854885                R2                 AB;
    4886                 GeometricalVertex *a, *b;
     4886                GeomVertex *a, *b;
    48874887                BamgVertex        *va, *vb;
    4888                 GeometricalEdge   *e;
     4888                GeomEdge   *e;
    48894889
    48904890                // add a ref to GH to make sure that it is not destroyed by mistake
     
    49514951
    49524952                                //ei = current Geometrical edge
    4953                                 GeometricalEdge &ei=Gh.edges[i];   
     4953                                GeomEdge &ei=Gh.edges[i];   
    49544954
    49554955                                //loop over the two vertices of the edge ei
     
    49784978                                                                        edges[nbe].v[1]=b->MeshVertexHook;;
    49794979                                                                        edges[nbe].ReferenceNumber = e->ReferenceNumber;
    4980                                                                         edges[nbe].GeometricalEdgeHook = e;
     4980                                                                        edges[nbe].GeomEdgeHook = e;
    49814981                                                                        edges[nbe].adj[0] = 0;
    49824982                                                                        edges[nbe].adj[1] = 0;
     
    50875087                                                                                edges[nbe].v[1]=vb;
    50885088                                                                                edges[nbe].ReferenceNumber =e->ReferenceNumber;
    5089                                                                                 edges[nbe].GeometricalEdgeHook = e;
     5089                                                                                edges[nbe].GeomEdgeHook = e;
    50905090                                                                                edges[nbe].adj[0] = PreviousNewEdge;
    50915091                                                                                if(PreviousNewEdge) PreviousNewEdge->adj[1]=&edges[nbe];
     
    51245124                                                                edges[nbe].v[1]=vb;
    51255125                                                                edges[nbe].ReferenceNumber = e->ReferenceNumber;
    5126                                                                 edges[nbe].GeometricalEdgeHook = e;
     5126                                                                edges[nbe].GeomEdgeHook = e;
    51275127                                                                edges[nbe].adj[0] = PreviousNewEdge;
    51285128                                                                edges[nbe].adj[1] = 0;
     
    51915191                 * We need the abcisse of the background mesh vertices on geometry
    51925192                 * so a vertex is
    5193                  * 0 on GeometricalVertex ;
    5194                  * 1 on GeometricalEdge + abcisse
     5193                 * 0 on GeomVertex ;
     5194                 * 1 on GeomEdge + abcisse
    51955195                 * 2 internal
    51965196                 *************************************************************************/
     
    52385238                        VertexOnGeom &vog=BTh.VerticesOnGeomVertex[i];
    52395239                        if (vog.IsRequiredVertex()){
    5240                                 GeometricalVertex* gv=vog;
     5240                                GeomVertex* gv=vog;
    52415241                                BamgVertex *bv = vog;
    52425242                                ISSMASSERT(gv->MeshVertexHook); // use of Geom -> Th
     
    52625262
    52635263                                /* If one of the vertex is required we are in a new curve*/
    5264                                 if (ei[je].GeometricalEdgeHook->IsRequiredVertex()){
     5264                                if (ei[je].GeomEdgeHook->IsRequiredVertex()){
    52655265
    52665266                                        /*Get curve number*/
    5267                                         int nc=ei.GeometricalEdgeHook->CurveNumber;
     5267                                        int nc=ei.GeomEdgeHook->CurveNumber;
    52685268                                       
    52695269                                        //printf("Dealing with curve number %i\n",nc);
    5270                                         //printf("edge on geometry is same as GhCurve? %s\n",(ei.GeometricalEdgeHook==Gh.curves[nc].FirstEdge || ei.GeometricalEdgeHook==Gh.curves[nc].LastEdge)?"yes":"no");
    5271                                         //if(ei.GeometricalEdgeHook==Gh.curves[nc].FirstEdge || ei.GeometricalEdgeHook==Gh.curves[nc].LastEdge){
    5272                                         //      printf("Do we have the right extremity? curve first vertex -> %s\n",((GeometricalVertex *)*ei[je].GeometricalEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex])?"yes":"no");
    5273                                         //      printf("Do we have the right extremity? curve last  vertex -> %s\n",((GeometricalVertex *)*ei[je].GeometricalEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex])?"yes":"no");
     5270                                        //printf("edge on geometry is same as GhCurve? %s\n",(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge)?"yes":"no");
     5271                                        //if(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge){
     5272                                        //      printf("Do we have the right extremity? curve first vertex -> %s\n",((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex])?"yes":"no");
     5273                                        //      printf("Do we have the right extremity? curve last  vertex -> %s\n",((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex])?"yes":"no");
    52745274                                        //}
    52755275                                        //BUG FIX from original bamg
    52765276                                        /*Check that we are on the same edge and right vertex (0 or 1) */
    5277                                         if(ei.GeometricalEdgeHook==Gh.curves[nc].FirstEdge  && (GeometricalVertex *)*ei[je].GeometricalEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex]){
     5277                                        if(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge  && (GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex]){
    52785278                                                bcurve[nc]=iedge*2+je;
    52795279                                                bfind++;       
    52805280                                        }
    5281                                         else if ((ei.GeometricalEdgeHook==Gh.curves[nc].LastEdge  && (GeometricalVertex *)*ei[je].GeometricalEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex]) && bcurve[nc]==-1){
     5281                                        else if ((ei.GeomEdgeHook==Gh.curves[nc].LastEdge  && (GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex]) && bcurve[nc]==-1){
    52825282                                                bcurve[nc]=iedge*2+je;
    52835283                                                bfind++;       
     
    53355335                                        int k0equi=jedgeequi,k1equi;             
    53365336                                        Edge * peequi= BTh.edges+iedgeequi;
    5337                                         GeometricalEdge *ongequi = peequi->GeometricalEdgeHook;
     5337                                        GeomEdge *ongequi = peequi->GeomEdgeHook;
    53385338
    53395339                                        double sNew=Lstep;// abscisse of the new points (phase==1)
    53405340                                        L=0;// length of the curve
    53415341                                        long i=0;// index of new points on the curve
    5342                                         register GeometricalVertex * GA0 = *(*peequi)[k0equi].GeometricalEdgeHook;
     5342                                        register GeomVertex * GA0 = *(*peequi)[k0equi].GeomEdgeHook;
    53435343                                        BamgVertex *A0;
    53445344                                        A0 = GA0->MeshVertexHook;  // the vertex in new mesh
     
    53505350                                        ISSMASSERT(A0-vertices>=0 && A0-vertices<nbv);
    53515351                                        if(ongequi->Required()){
    5352                                                 GeometricalVertex *GA1 = *(*peequi)[1-k0equi].GeometricalEdgeHook;
     5352                                                GeomVertex *GA1 = *(*peequi)[1-k0equi].GeomEdgeHook;
    53535353                                                A1 = GA1->MeshVertexHook;  //
    53545354                                        }       
     
    53595359                                                        k1 = 1-k0; // next vertex of the edge
    53605360                                                        k1equi= 1 - k0equi;
    5361                                                         ISSMASSERT(pe && ee.GeometricalEdgeHook);
    5362                                                         ee.GeometricalEdgeHook->SetMark();
     5361                                                        ISSMASSERT(pe && ee.GeomEdgeHook);
     5362                                                        ee.GeomEdgeHook->SetMark();
    53635363                                                        BamgVertex & v0=ee[0], & v1=ee[1];
    53645364                                                        R2 AB=(R2)v1-(R2)v0;
     
    53965396                                                                        A1->ReferenceNumber = eeequi.ReferenceNumber;
    53975397                                                                        A1->DirOfSearch =NoDirOfSearch;
    5398                                                                         e->GeometricalEdgeHook = ongequi;
     5398                                                                        e->GeomEdgeHook = ongequi;
    53995399                                                                        e->v[0]=A0;
    54005400                                                                        e->v[1]=A1;
     
    54115411
    54125412                                                        //some checks
    5413                                                         ISSMASSERT(ee.GeometricalEdgeHook->CurveNumber==ei.GeometricalEdgeHook->CurveNumber);
    5414                                                         if (ee[k1].GeometricalEdgeHook->IsRequiredVertex()) {
    5415                                                                 ISSMASSERT(eeequi[k1equi].GeometricalEdgeHook->IsRequiredVertex());
    5416                                                                 register GeometricalVertex * GA1 = *eeequi[k1equi].GeometricalEdgeHook;
     5413                                                        ISSMASSERT(ee.GeomEdgeHook->CurveNumber==ei.GeomEdgeHook->CurveNumber);
     5414                                                        if (ee[k1].GeomEdgeHook->IsRequiredVertex()) {
     5415                                                                ISSMASSERT(eeequi[k1equi].GeomEdgeHook->IsRequiredVertex());
     5416                                                                register GeomVertex * GA1 = *eeequi[k1equi].GeomEdgeHook;
    54175417                                                                A1=GA1->MeshVertexHook;// the vertex in new mesh
    54185418                                                                ISSMASSERT(A1-vertices>=0 && A1-vertices<nbv);
     
    54325432                                        if (phase){ // construction of the last edge
    54335433                                                Edge* e=edges + nbe++;
    5434                                                 e->GeometricalEdgeHook  = ongequi;
     5434                                                e->GeomEdgeHook  = ongequi;
    54355435                                                e->v[0]=A0;
    54365436                                                e->v[1]=A1;
  • issm/trunk/src/c/objects/Bamg/Mesh.h

    r5460 r5573  
    8989                        void BoundAnisotropy(double anisomax,double hminaniso= 1e-100) ;
    9090                        void MaxSubDivision(double maxsubdiv);
    91                         Edge** MakeGeometricalEdgeToEdge();
     91                        Edge** MakeGeomEdgeToEdge();
    9292                        long SplitInternalEdgeWithBorderVertices();
    9393                        void MakeQuadrangles(double costheta);
     
    100100                        void SmoothingVertex(int =3,double=0.3);
    101101                        Metric MetricAt (const R2 &) const;
    102                         GeometricalEdge* ProjectOnCurve( Edge & AB, BamgVertex &  A, BamgVertex & B,double theta, BamgVertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
     102                        GeomEdge* ProjectOnCurve( Edge & AB, BamgVertex &  A, BamgVertex & B,double theta, BamgVertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
    103103                        long GetId(const Triangle & t) const;
    104104                        long GetId(const Triangle * t) const;
     
    134134                          }
    135135                        inline  void  SetVertexFieldOn(){
    136                                 for (int i=0;i<nbv;i++)                    vertices[i].GeometricalEdgeHook=NULL;
     136                                for (int i=0;i<nbv;i++)                    vertices[i].GeomEdgeHook=NULL;
    137137                                for (int j=0;j<NbVerticesOnGeomVertex;j++) VerticesOnGeomVertex[j].SetOn();
    138138                                for (int k=0;k<NbVerticesOnGeomEdge;k++ )  VerticesOnGeomEdge[k].SetOn();
    139139                        }             
    140140                        inline  void   SetVertexFieldOnBTh(){
    141                                 for (int i=0;i<nbv;i++)                 vertices[i].GeometricalEdgeHook=NULL;
     141                                for (int i=0;i<nbv;i++)                 vertices[i].GeomEdgeHook=NULL;
    142142                                for (int j=0;j<NbVertexOnBThVertex;j++) VertexOnBThVertex[j].SetOnBTh();
    143143                                for (int k=0;k<NbVertexOnBThEdge;k++ )  VertexOnBThEdge[k].SetOnBTh();
     
    169169                return  a.Adj();
    170170        }
    171         inline void Adj(GeometricalEdge * & on,int &i){
     171        inline void Adj(GeomEdge * & on,int &i){
    172172                int j=i;i=on->AdjVertexIndex[i];on=on->Adj[j];
    173173        }
  • issm/trunk/src/c/objects/Bamg/VertexOnGeom.cpp

    r5461 r5573  
    1818        }
    1919        /*}}}*/
    20         /*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeometricalVertex &g){{{1*/
    21         VertexOnGeom::VertexOnGeom(BamgVertex & m,GeometricalVertex &g){
     20        /*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){{{1*/
     21        VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){
    2222                meshvertex=&m;
    2323                curvilincoord=-1;
     
    2525        }
    2626        /*}}}*/
    27         /*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeometricalEdge &g,double s){{{1*/
    28         VertexOnGeom::VertexOnGeom(BamgVertex & m,GeometricalEdge &g,double s){
     27        /*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){{{1*/
     28        VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){
    2929                meshvertex=&m;
    3030                curvilincoord=s;
     
    6363        /*FUNCTION VertexOnGeom::SetOn{{{1*/
    6464        void VertexOnGeom::SetOn(){
    65                 meshvertex->GeometricalEdgeHook=this;
     65                meshvertex->GeomEdgeHook=this;
    6666                meshvertex->IndexInTriangle=IsVertexOnGeom;
    6767        }
  • issm/trunk/src/c/objects/Bamg/VertexOnGeom.h

    r5461 r5573  
    33
    44#include "./include.h"
    5 #include "./GeometricalVertex.h"
     5#include "./GeomVertex.h"
    66
    77namespace bamg {
     
    1010        class Mesh;
    1111        class BamgVertex;
    12         class GeometricalEdge;
     12        class GeomEdge;
    1313
    1414        class VertexOnGeom{
     
    1919                        double curvilincoord; 
    2020                        union{
    21                                 GeometricalVertex* gv; // if curvilincoord <0;
    22                                 GeometricalEdge*   ge; // if curvilincoord in [0..1]
     21                                GeomVertex* gv; // if curvilincoord <0;
     22                                GeomEdge*   ge; // if curvilincoord in [0..1]
    2323                        };
    2424
    2525                        //Constructors/Destructors
    2626                        VertexOnGeom();
    27                         VertexOnGeom(BamgVertex & m,GeometricalVertex &g);
    28                         VertexOnGeom(BamgVertex & m,GeometricalEdge &g,double s);
     27                        VertexOnGeom(BamgVertex & m,GeomVertex &g);
     28                        VertexOnGeom(BamgVertex & m,GeomEdge &g,double s);
    2929
    3030                        //Operators
    3131                        operator BamgVertex*() const  {return meshvertex;}
    32                         operator GeometricalVertex * () const  {return gv;}
    33                         operator GeometricalEdge * () const  {return ge;}
     32                        operator GeomVertex * () const  {return gv;}
     33                        operator GeomEdge * () const  {return ge;}
    3434                        operator const double & () const {return curvilincoord;}
    3535
Note: See TracChangeset for help on using the changeset viewer.