[cig-commits] r9133 - cs/benchmark/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Fri Jan 25 07:37:19 PST 2008


Author: luis
Date: 2008-01-25 07:37:19 -0800 (Fri, 25 Jan 2008)
New Revision: 9133

Modified:
   cs/benchmark/cigma/trunk/src/Cell.cpp
   cs/benchmark/cigma/trunk/src/Cell.h
   cs/benchmark/cigma/trunk/src/Hex.cpp
   cs/benchmark/cigma/trunk/src/Hex.h
   cs/benchmark/cigma/trunk/src/Quad.cpp
   cs/benchmark/cigma/trunk/src/Quad.h
   cs/benchmark/cigma/trunk/src/Tet.cpp
   cs/benchmark/cigma/trunk/src/Tri.cpp
Log:
Added global_interior(), and removed interior2(), from Cell classes.


Modified: cs/benchmark/cigma/trunk/src/Cell.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/Cell.cpp	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Cell.cpp	2008-01-25 15:37:19 UTC (rev 9133)
@@ -2,7 +2,11 @@
 #include <cstdlib>
 #include <cassert>
 #include "Cell.h"
+#include "Numeric.h"
 
+
+//----------------------------------------------------------------------------
+
 
 cigma::Cell::Cell()
 {
@@ -17,9 +21,9 @@
     //std::cout << "Calling cigma::Cell::~Cell()\n";
 }
 
+
 //----------------------------------------------------------------------------
 
-
 
 void cigma::Cell::set_reference_vertices(double *vertices, int num_vertices)
 {
@@ -414,12 +418,12 @@
 }
 
 
-bool cigma::Cell::interior2(double x, double y, double z)
+bool cigma::Cell::global_interior(double xyz[3])
 {
-    double uvw[3],xyz[3];
-    xyz[0] = x;
-    xyz[1] = y;
-    xyz[2] = z;
+    double uvw[3];
     xyz2uvw(xyz,uvw);
     return interior(uvw[0], uvw[1], uvw[2]);
 }
+
+
+//----------------------------------------------------------------------------

Modified: cs/benchmark/cigma/trunk/src/Cell.h
===================================================================
--- cs/benchmark/cigma/trunk/src/Cell.h	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Cell.h	2008-01-25 15:37:19 UTC (rev 9133)
@@ -1,7 +1,6 @@
 #ifndef __CELL_H__
 #define __CELL_H__
 
-#include "Numeric.h"
 
 namespace cigma
 {
@@ -47,7 +46,7 @@
     void bbox(double *min, double *max);
     void centroid(double c[3]);
     virtual bool interior(double u, double v, double w) = 0;
-    virtual bool interior2(double x, double y, double z);
+    virtual bool global_interior(double xyz[3]);
 
 
 public:

Modified: cs/benchmark/cigma/trunk/src/Hex.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/Hex.cpp	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Hex.cpp	2008-01-25 15:37:19 UTC (rev 9133)
@@ -133,10 +133,5 @@
 
 }
 
-bool cigma::Hex::interior2(double x, double y, double z)
-{
-    return false;
-}
-
 #undef ONE
 #undef ZERO

Modified: cs/benchmark/cigma/trunk/src/Hex.h
===================================================================
--- cs/benchmark/cigma/trunk/src/Hex.h	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Hex.h	2008-01-25 15:37:19 UTC (rev 9133)
@@ -23,7 +23,6 @@
     void shape(int num, double *points, double *values);
     void grad_shape(int num, double *points, double *values);
     bool interior(double u, double v, double w);
-    bool interior2(double x, double y, double z);
 };
 
 

Modified: cs/benchmark/cigma/trunk/src/Quad.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/Quad.cpp	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Quad.cpp	2008-01-25 15:37:19 UTC (rev 9133)
@@ -104,11 +104,6 @@
     return true;
 }
 
-bool cigma::Quad::interior2(double x, double y, double z)
-{
-    return false;
-}
-
 #undef ONE
 #undef ZERO
 

Modified: cs/benchmark/cigma/trunk/src/Quad.h
===================================================================
--- cs/benchmark/cigma/trunk/src/Quad.h	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Quad.h	2008-01-25 15:37:19 UTC (rev 9133)
@@ -23,7 +23,6 @@
     void shape(int num, double *points, double *values);
     void grad_shape(int num, double *points, double *values);
     bool interior(double u, double v, double w);
-    bool interior2(double x, double y, double z);
 };
 
 #endif

Modified: cs/benchmark/cigma/trunk/src/Tet.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/Tet.cpp	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Tet.cpp	2008-01-25 15:37:19 UTC (rev 9133)
@@ -1,6 +1,7 @@
 //#include <iostream>
 #include <cassert>
 #include "Tet.h"
+#include "Numeric.h"
 
 // ---------------------------------------------------------------------------
 

Modified: cs/benchmark/cigma/trunk/src/Tri.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/Tri.cpp	2008-01-25 15:37:17 UTC (rev 9132)
+++ cs/benchmark/cigma/trunk/src/Tri.cpp	2008-01-25 15:37:19 UTC (rev 9133)
@@ -75,19 +75,21 @@
 //void cigma::Tri::xyz2uvw(double xyz[3], double uvw[3]) {}
 
 
+#define ZERO    (-1.0e-6)
+#define ONE     (1 - ZERO)
+
 bool cigma::Tri::interior(double u, double v, double w)
 {
-    #define ZERO    (-1.0e-6)
-    #define ONE     (1 - ZERO)
 
     if ((u < ZERO) || (v < ZERO) || (u > (ONE - v)))
     {
         return false;
     }
     return true;
-
-    #undef ZERO
-    #undef ONE
 }
 
+#undef ZERO
+#undef ONE
+
+
 // ---------------------------------------------------------------------------



More information about the cig-commits mailing list