~ubuntu-branches/debian/squeeze/gmsh/squeeze

« back to all changes in this revision

Viewing changes to Mesh/meshGFaceDelaunayInsertion.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme
  • Date: 2009-09-27 17:36:40 UTC
  • mfrom: (1.2.9 upstream) (8.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090927173640-oxyhzt0eadjfrlwz
[Christophe Prud'homme]
* New upstream release
  + solver code refactoring
  + better IDE integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <map>
8
8
#include <algorithm>
9
9
#include "GmshMessage.h"
10
 
#include "GmshPredicates.h"
 
10
#include "robustPredicates.h"
11
11
#include "BackgroundMesh.h"
12
12
#include "meshGFaceDelaunayInsertion.h"
13
13
#include "meshGFaceOptimize.h"
89
89
  double p3P[2]; prosca(v2, vx, &p3P[0]); prosca(v2, vy, &p3P[1]);
90
90
  double resP[2];
91
91
 
92
 
  gmshMatrix<double> T(3,3);
 
92
  fullMatrix<double> T(3,3);
93
93
  for (int i = 0; i < 3; i++)T(0,i) = vx[i];
94
94
  for (int i = 0; i < 3; i++)T(1,i) = vy[i];
95
95
  for (int i = 0; i < 3; i++)T(2,i) = vz[i];
245
245
  double fourth[3];
246
246
  fourthPoint(pa, pb, pc, fourth);
247
247
 
248
 
  double result = gmsh::insphere(pa, pb, pc, fourth, (double*)p) * 
249
 
    gmsh::orient3d(pa, pb, pc,fourth);  
 
248
  double result = robustPredicates::insphere(pa, pb, pc, fourth, (double*)p) * 
 
249
    robustPredicates::orient3d(pa, pb, pc,fourth);  
250
250
  return (result > 0) ? 1 : 0;  
251
251
}
252
252
 
261
261
  double pc[2] = {Us[base->getVertex(2)->getIndex()],
262
262
                  Vs[base->getVertex(2)->getIndex()]};
263
263
 
264
 
  double result = 
265
 
    gmsh::incircle(pa, pb, pc, (double*)param) * gmsh::orient2d(pa, pb, pc);  
 
264
  double result = robustPredicates::incircle(pa, pb, pc, (double*)param) * 
 
265
    robustPredicates::orient2d(pa, pb, pc);  
266
266
  return (result > 0) ? 1 : 0;  
267
267
}
268
268
 
656
656
  }
657
657
}
658
658
 
659
 
void gmshBowyerWatson(GFace *gf)
 
659
void bowyerWatson(GFace *gf)
660
660
{
661
661
  std::set<MTri3*,compareTri3Ptr> AllTris;
662
662
  std::vector<double> vSizes, vSizesBGM, Us, Vs;
761
761
  t(1,0) = .2;
762
762
  t(1,1) = 2;
763
763
  t(2,2) = 3;
764
 
  gmshMatrix<double> m(3,3);
765
 
  gmshVector<double> v(3);
 
764
  fullMatrix<double> m(3,3);
 
765
  fullVector<double> v(3);
766
766
  t.eig(m,v);
767
767
  printf("%12.5E %12.5E %12.5E \n",v(0),v(1),v(2));
768
768
  printf("%12.5E %12.5E %12.5E \n",m(0,0),m(1,0),m(2,0));
770
770
  printf("%12.5E %12.5E %12.5E \n",m(0,2),m(1,2),m(2,2));
771
771
}
772
772
 
773
 
void gmshBowyerWatsonFrontal(GFace *gf)
 
773
void bowyerWatsonFrontal(GFace *gf)
774
774
{
775
775
  std::set<MTri3*,compareTri3Ptr> AllTris;
776
776
  std::set<MTri3*,compareTri3Ptr> ActiveTris;