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

brad at geodynamics.org brad at geodynamics.org
Thu Mar 19 16:55:21 PDT 2009


Author: brad
Date: 2009-03-19 16:55:21 -0700 (Thu, 19 Mar 2009)
New Revision: 14397

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 22:51:50 UTC (rev 14396)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldMesh.cc	2009-03-19 23:55:21 UTC (rev 14397)
@@ -231,6 +231,15 @@
 	 ++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();
+    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 22:51:50 UTC (rev 14396)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/topology/TestFieldSubMesh.cc	2009-03-19 23:55:21 UTC (rev 14397)
@@ -829,6 +829,7 @@
   _buildMesh(&mesh, &submesh);
   Field<SubMesh> field(submesh);
   const ALE::Obj<SubMesh::SieveMesh>& sieveMesh = submesh.sieveMesh();
+  CPPUNIT_ASSERT(!sieveMesh.isNull());
   field.newSection(FieldBase::VERTICES_FIELD, fiberDim);
   field.allocate();
   const ALE::Obj<SubMesh::RealSection>& section = field.section();



More information about the CIG-COMMITS mailing list