[cig-commits] r21730 - short/3D/PyLith/trunk/libsrc/pylith/feassemble
brad at geodynamics.org
brad at geodynamics.org
Fri Apr 5 10:34:18 PDT 2013
Author: brad
Date: 2013-04-05 10:34:17 -0700 (Fri, 05 Apr 2013)
New Revision: 21730
Modified:
short/3D/PyLith/trunk/libsrc/pylith/feassemble/GeometryHex3D.cc
Log:
Code cleanup.
Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/GeometryHex3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/GeometryHex3D.cc 2013-04-05 17:33:36 UTC (rev 21729)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/GeometryHex3D.cc 2013-04-05 17:34:17 UTC (rev 21730)
@@ -34,7 +34,9 @@
pylith::feassemble::GeometryHex3D::GeometryHex3D(void) :
CellGeometry(HEXAHEDRON, 3)
{ // constructor
- const PylithScalar vertices[] = {
+ const int nvertices = 8;
+ const int spaceDim = 3;
+ const PylithScalar vertices[nvertices*spaceDim] = {
-1.0, -1.0, -1.0,
+1.0, -1.0, -1.0,
+1.0, +1.0, -1.0,
@@ -44,7 +46,7 @@
+1.0, +1.0, +1.0,
-1.0, +1.0, +1.0,
};
- _setVertices(vertices, 8, 3);
+ _setVertices(vertices, nvertices, spaceDim);
} // constructor
// ----------------------------------------------------------------------
@@ -78,9 +80,9 @@
const int dim,
const int npts) const
{ // ptsRefToGlobal
- assert(0 != ptsGlobal);
- assert(0 != ptsRef);
- assert(0 != vertices);
+ assert(ptsGlobal);
+ assert(ptsRef);
+ assert(vertices);
assert(3 == dim);
assert(spaceDim() == dim);
@@ -170,8 +172,8 @@
const scalar_array& vertices,
const scalar_array& location) const
{ // jacobian
- assert(0 != jacobian);
- assert(0 != det);
+ assert(jacobian);
+ assert(det);
assert( (numCorners()*spaceDim() == vertices.size()) || // linear hex
((numCorners()+19)*spaceDim() == vertices.size()) ); // quadratic hex
@@ -266,10 +268,10 @@
const int dim,
const int npts) const
{ // jacobian
- assert(0 != jacobian);
- assert(0 != det);
- assert(0 != vertices);
- assert(0 != ptsRef);
+ assert(jacobian);
+ assert(det);
+ assert(vertices);
+ assert(ptsRef);
assert(3 == dim);
assert(spaceDim() == dim);
More information about the CIG-COMMITS
mailing list