~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to nfem/basis/predicates_tst.h

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2012-04-06 09:12:21 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120406091221-m58me99p1nxqui49
Tags: 6.0-1
* New upstream release 6.0 (major changes):
  - massively distributed and parallel support
  - full FEM characteristic method (Lagrange-Gakerkin method) support
  - enhanced users documentation 
  - source code supports g++-4.7 (closes: #667356)
* debian/control: dependencies for MPI distributed solvers added
* debian/rules: build commands simplified
* debian/librheolef-dev.install: man1/* to man9/* added
* debian/changelog: package description rewritted (closes: #661689)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _SHEWCHUK_H
2
 
#define _SHEWCHUK_H
3
 
 
4
 
#include "predicates.h"
5
 
 
6
 
namespace rheolef { 
7
 
#define wrap2d(wrap_name,shewchuk_name)                 \
8
 
inline                                                  \
9
 
int wrap_name (double x1, double y1, double x2, double y2) \
10
 
{                                                       \
11
 
  double a[2], b[2], c[2];                              \
12
 
  a[0] = x1; a[1] = y1;                                 \
13
 
  b[0] = x2; b[1] = y2;                                 \
14
 
  c[0] = 0;  c[1] = 0;                                  \
15
 
  double r = shewchuk_name (a, b, c);                   \
16
 
  return (r > 0) ? 1 : ((r < 0) ? -1 : 0);              \
17
 
}
18
 
wrap2d (ABDPY_det2x2,           orient2d)
19
 
wrap2d (ABDPY_secure_det2x2,    orient2dexact)
20
 
wrap2d (ABDPY__not_lazy_det2x2, orient2dslow)
21
 
//wrap2d (double_det2x2,          orient2dfast)
22
 
//wrap2d (quadruple_det2x2,       orient2dfast)
23
 
#undef wrap2d
24
 
 
25
 
#define wrap3d(wrap_name,shewchuk_name)                 \
26
 
inline                                                  \
27
 
int wrap_name (double x1, double y1, double z1,         \
28
 
               double x2, double y2, double z2,         \
29
 
               double x3, double y3, double z3)         \
30
 
{                                                       \
31
 
  double a[3], b[3], c[3], d[3];                                \
32
 
  a[0] = x1; a[1] = y1; a[2] = z1;                      \
33
 
  b[0] = x2; b[1] = y2; b[2] = z2;                      \
34
 
  c[0] = x3; c[1] = y3; c[2] = z3;                      \
35
 
  d[0] = 0;  d[1] = 0;  d[2] = 0;                       \
36
 
  double r = shewchuk_name (a, b, c, d);                        \
37
 
  return (r > 0) ? 1 : ((r < 0) ? -1 : 0);              \
38
 
}
39
 
wrap3d (ABDPY_det3x3,           orient3d)
40
 
wrap3d (ABDPY_secure_det3x3,    orient3dexact)
41
 
wrap3d (ABDPY__not_lazy_det3x3, orient3dslow)
42
 
//wrap3d (double_det3x3,          orient3dfast)
43
 
#undef wrap3d
44
 
 
45
 
}// namespace rheolef
46
 
#endif // _SHEWCHUK_H