Skip to content
Snippets Groups Projects
Commit 6b9ac4c3 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent 4e0f3c94
No related branches found
No related tags found
No related merge requests found
// $Id: GModelIO.cpp,v 1.51 2006-09-10 03:25:11 geuzaine Exp $
// $Id: GModelIO.cpp,v 1.52 2006-09-11 20:18:23 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -330,7 +330,7 @@ int GModel::readMSH(const std::string &name)
if(fread(&num, sizeof(int), 1, fp) != 1) return 0;
if(swap) swapBytes((char*)&num, sizeof(int), 1);
if(fread(xyz, sizeof(double), 3, fp) != 3) return 0;
if(swap) swapBytes((char*)&xyz, sizeof(double), 3);
if(swap) swapBytes((char*)xyz, sizeof(double), 3);
}
minVertex = std::min(minVertex, num);
maxVertex = std::max(maxVertex, num);
......@@ -409,7 +409,7 @@ int GModel::readMSH(const std::string &name)
while(numElementsPartial < numElements){
int header[3];
if(fread(header, sizeof(int), 3, fp) != 3) return 0;
if(swap) swapBytes((char*)&header, sizeof(int), 3);
if(swap) swapBytes((char*)header, sizeof(int), 3);
int type = header[0];
int numElms = header[1];
int numTags = header[2];
......@@ -418,7 +418,7 @@ int GModel::readMSH(const std::string &name)
int *data = new int[n];
for(int i = 0; i < numElms; i++) {
if(fread(data, sizeof(int), n, fp) != n) return 0;
if(swap) swapBytes((char*)&data, sizeof(int), n);
if(swap) swapBytes((char*)data, sizeof(int), n);
int num = data[0];
int physical = (numTags > 0) ? data[4 - numTags] : 0;
int elementary = (numTags > 1) ? data[4 - numTags + 1] : 0;
......
// $Id: 2D_DivAndConq.cpp,v 1.23 2006-09-11 17:58:19 geuzaine Exp $
// $Id: 2D_DivAndConq.cpp,v 1.24 2006-09-11 20:18:23 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -394,6 +394,8 @@ int CircumCircle(double x1, double y1, double x2, double y2, double x3,
return (1);
}
// we should use robust predicates here, let's give it at try...
int Is_right_of(PointNumero x, PointNumero y, PointNumero check)
{
......@@ -402,6 +404,15 @@ int Is_right_of(PointNumero x, PointNumero y, PointNumero check)
int Is_left_of(PointNumero x, PointNumero y, PointNumero check)
{
// double pa[2] = {(double)pPointArray[x].where.h, (double)pPointArray[x].where.v};
// double pb[2] = {(double)pPointArray[y].where.h, (double)pPointArray[y].where.v};
// double pc[2] = {(double)pPointArray[check].where.h, (double)pPointArray[check].where.v};
// double result gmsh::orient2d(pa, pb, pc);
// return result > 0;
static double xx, yy, alpha, beta;
yy = (double)(pPointArray[y].where.v - pPointArray[x].where.v);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment