Changeset 3241


Ignore:
Timestamp:
03/10/10 08:36:55 (15 years ago)
Author:
Mathieu Morlighem
Message:

minor

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

Legend:

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

    r3238 r3241  
    22#define MESHTYPE_H
    33
    4 #include "objects/R2.h"
    54#include <cstdio>
    65#include <cstdlib>
     
    87#include <cmath>
    98#include <ctime>
     9
     10#include "objects/R2.h"
     11#include "../shared/shared.h"
     12#include "../include/macros.h"
     13#include "../toolkits/toolkits.h"
     14
    1015
    1116namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/R2.h

    r3232 r3241  
    11#ifndef _R2_H
    22#define _R2_H
     3
     4#include "../../shared/shared.h"
     5#include "../../include/macros.h"
     6#include "../../toolkits/toolkits.h"
    37
    48namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Triangles.cpp

    r3239 r3241  
    54045404        } // end swap
    54055405        /*}}}1*/
    5406         /*FUNCTION FindTriangle{{{1*/
    5407         Int4 FindTriangle(Triangles &Th, Real8 x, Real8 y, double* a,int & inside){
    5408                 I2 I = Th.toI2(R2(Min(Max(Th.pmin.x,x),Th.pmax.x),Min(Max(Th.pmin.y,y),Th.pmax.y)));
    5409                 Icoor2 dete[3];
    5410                 Triangle & tb = *Th.FindTriangleContaining(I,dete);
    5411 
    5412                 if  (tb.link)
    5413                   { // internal point in a true triangles
    5414                         a[0]= (Real8) dete[0]/ tb.det;
    5415                         a[1]= (Real8) dete[1] / tb.det;
    5416                         a[2] = (Real8) dete[2] / tb.det;
    5417                         inside = 1;     
    5418                         return Th.Number(tb);
    5419                   }
    5420                 else
    5421                   {
    5422                         inside = 0;
    5423                         double aa,bb;
    5424                         TriangleAdjacent  ta=CloseBoundaryEdgeV2(I,&tb,aa,bb);   
    5425                         int k = ta;
    5426                         Triangle * tc = ta;
    5427                         if (!tc->link)
    5428                           { ta = ta.Adj();
    5429                                 tc=ta;
    5430                                 k = ta;
    5431                                 Exchange(aa,bb);
    5432                                 if (!tc->link){
    5433                                         throw ErrorException(__FUNCT__,exprintf("!tc->link"));
    5434                                 }
    5435                           }
    5436                         a[VerticesOfTriangularEdge[k][0]] = aa;
    5437                         a[VerticesOfTriangularEdge[k][1]] = bb;
    5438                         a[OppositeVertex[k]] = 1- aa -bb;
    5439                         return Th.Number(tc);
    5440                   }
    5441         }
    5442         /*}}}1*/
    54435406        /*FUNCTION CloseBoundaryEdge{{{1*/
    54445407        TriangleAdjacent CloseBoundaryEdge(I2 A,Triangle *t, double &a,double &b) {
Note: See TracChangeset for help on using the changeset viewer.