[cig-commits] r14398 - short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology

brad at geodynamics.org brad at geodynamics.org
Thu Mar 19 17:23:44 PDT 2009


Author: brad
Date: 2009-03-19 17:23:44 -0700 (Thu, 19 Mar 2009)
New Revision: 14398

Modified:
   short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldMesh.cc
   short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldSubMesh.cc
Log:
Added setting of constraints in testing field.

Modified: short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldMesh.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldMesh.cc	2009-03-19 23:55:21 UTC (rev 14397)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldMesh.cc	2009-03-20 00:23:44 UTC (rev 14398)
@@ -239,7 +239,7 @@
 	 ++v_iter, index += nconstraints[i++])
       section->setConstraintDof(*v_iter, &constraints[index]);
     fieldSrc.zero();
-    fieldSrc.view("ZERO FIELD"); // TEMPORARY
+    //fieldSrc.view("ZERO FIELD"); // TEMPORARY
     fieldSrc.createScatter();
   } // Setup source field
 

Modified: short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldSubMesh.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldSubMesh.cc	2009-03-19 23:55:21 UTC (rev 14397)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldSubMesh.cc	2009-03-20 00:23:44 UTC (rev 14398)
@@ -256,6 +256,14 @@
 	 ++v_iter)
       section->addConstraintDimension(*v_iter, nconstraints[iV++]);
     fieldSrc.allocate();
+
+    int index = 0;
+    int i = 0;
+    for (Mesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
+	 v_iter != vertices->end();
+	 ++v_iter, index += nconstraints[i++])
+      section->setConstraintDof(*v_iter, &constraints[index]);
+    fieldSrc.zero();
   } // Setup source field
 
 



More information about the CIG-COMMITS mailing list