[cig-commits] r13175 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Oct 29 15:11:51 PDT 2008


Author: luis
Date: 2008-10-29 15:11:50 -0700 (Wed, 29 Oct 2008)
New Revision: 13175

Modified:
   cs/cigma/trunk/src/fe_hex8.cpp
   cs/cigma/trunk/src/fe_hex8.h
   cs/cigma/trunk/src/fe_quad4.cpp
   cs/cigma/trunk/src/fe_quad4.h
   cs/cigma/trunk/src/fe_tet4.cpp
   cs/cigma/trunk/src/fe_tet4.h
   cs/cigma/trunk/src/fe_tri3.cpp
   cs/cigma/trunk/src/fe_tri3.h
Log:
Moved reference vertices data into a static data member.

The only data overhead in the Cell subclasses should be the
globverts array.

Modified: cs/cigma/trunk/src/fe_hex8.cpp
===================================================================
--- cs/cigma/trunk/src/fe_hex8.cpp	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_hex8.cpp	2008-10-29 22:11:50 UTC (rev 13175)
@@ -57,7 +57,18 @@
     #undef S
 }
 
+double hex8::refverts[8*3] = {
+    -1.0, -1.0, -1.0,
+    +1.0, -1.0, -1.0,
+    +1.0, +1.0, -1.0,
+    -1.0, +1.0, -1.0,
+    -1.0, -1.0, +1.0,
+    +1.0, -1.0, +1.0,
+    +1.0, +1.0, +1.0,
+    -1.0, +1.0, +1.0
+};
 
+
 // ---------------------------------------------------------------------------
 
 hex8::hex8()

Modified: cs/cigma/trunk/src/fe_hex8.h
===================================================================
--- cs/cigma/trunk/src/fe_hex8.h	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_hex8.h	2008-10-29 22:11:50 UTC (rev 13175)
@@ -26,6 +26,8 @@
     bool interior(double u, double v, double w);
     double volume();
 
+public:
+    static double refverts[8*3];
 };
 
 

Modified: cs/cigma/trunk/src/fe_quad4.cpp
===================================================================
--- cs/cigma/trunk/src/fe_quad4.cpp	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_quad4.cpp	2008-10-29 22:11:50 UTC (rev 13175)
@@ -31,6 +31,13 @@
     #undef S
 }
 
+double quad4::refverts[4*2] = {
+    -1.0, -1.0,
+    +1.0, -1.0,
+    +1.0, +1.0,
+    -1.0, +1.0
+};
+
 // ---------------------------------------------------------------------------
 
 quad4::quad4()

Modified: cs/cigma/trunk/src/fe_quad4.h
===================================================================
--- cs/cigma/trunk/src/fe_quad4.h	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_quad4.h	2008-10-29 22:11:50 UTC (rev 13175)
@@ -25,6 +25,9 @@
     void grad_shape(int num, double *points, double *values);
     bool interior(double u, double v, double w);
     double volume();
+
+public:
+    static double refverts[4*2];
 };
 
 #endif

Modified: cs/cigma/trunk/src/fe_tet4.cpp
===================================================================
--- cs/cigma/trunk/src/fe_tet4.cpp	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_tet4.cpp	2008-10-29 22:11:50 UTC (rev 13175)
@@ -37,7 +37,14 @@
     #undef S
 }
 
+double tet4::refverts[4*3] = {
+    0.0, 0.0, 0.0,
+    1.0, 0.0, 0.0,
+    0.0, 1.0, 0.0,
+    0.0, 0.0, 1.0
+};
 
+
 // ---------------------------------------------------------------------------
 
 tet4::tet4()

Modified: cs/cigma/trunk/src/fe_tet4.h
===================================================================
--- cs/cigma/trunk/src/fe_tet4.h	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_tet4.h	2008-10-29 22:11:50 UTC (rev 13175)
@@ -26,6 +26,10 @@
     void xyz2uvw(double xyz[3], double uvw[3]);
     bool interior(double u, double v, double w);
     double volume();
+
+public:
+    static double refverts[4*3];
+
 };
 
 

Modified: cs/cigma/trunk/src/fe_tri3.cpp
===================================================================
--- cs/cigma/trunk/src/fe_tri3.cpp	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_tri3.cpp	2008-10-29 22:11:50 UTC (rev 13175)
@@ -27,6 +27,11 @@
     #undef S
 }
 
+double tri3::refverts[3*2] = {
+    0.0, 0.0,
+    1.0, 0.0,
+    0.0, 1.0
+};
 
 // ---------------------------------------------------------------------------
 

Modified: cs/cigma/trunk/src/fe_tri3.h
===================================================================
--- cs/cigma/trunk/src/fe_tri3.h	2008-10-29 22:11:47 UTC (rev 13174)
+++ cs/cigma/trunk/src/fe_tri3.h	2008-10-29 22:11:50 UTC (rev 13175)
@@ -26,6 +26,9 @@
     //void xyz2uvw(double xyz[3], double uvw[3]);
     bool interior(double u, double v, double w);
     double volume();
+
+public:
+    static double refverts[3*2];
 };
 
 #endif



More information about the CIG-COMMITS mailing list