[cig-commits] r21675 - short/3D/PyLith/trunk/unittests/libtests/topology

brad at geodynamics.org brad at geodynamics.org
Thu Mar 28 16:43:35 PDT 2013


Author: brad
Date: 2013-03-28 16:43:34 -0700 (Thu, 28 Mar 2013)
New Revision: 21675

Modified:
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsSubMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestJacobian.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestSolutionFields.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc
Log:
Added use of begin/end method macros.

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -56,8 +56,12 @@
 void
 pylith::topology::TestFieldMesh::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   Field<Mesh> field(mesh);
+
+  PYLITH_METHOD_END;
 } // testConstructor
 
 // ----------------------------------------------------------------------
@@ -65,11 +69,15 @@
 void
 pylith::topology::TestFieldMesh::testSection(void)
 { // testSection
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   Field<Mesh> field(mesh);
 
   PetscSection section = field.petscSection();
   CPPUNIT_ASSERT(!section);
+
+  PYLITH_METHOD_END;
 } // testSection
 
 // ----------------------------------------------------------------------
@@ -77,12 +85,16 @@
 void
 pylith::topology::TestFieldMesh::testMesh(void)
 { // testMesh
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _buildMesh(&mesh);
   Field<Mesh> field(mesh);
 
   const Mesh& mesh2 = field.mesh();
   CPPUNIT_ASSERT_EQUAL(_TestFieldMesh::cellDim, mesh2.dimension());  
+
+  PYLITH_METHOD_END;
 } // testMesh
 
 // ----------------------------------------------------------------------
@@ -90,6 +102,8 @@
 void
 pylith::topology::TestFieldMesh::testLabel(void)
 { // testLabel
+  PYLITH_METHOD_BEGIN;
+
   const std::string label = "velocity";
 
   Mesh mesh;
@@ -98,6 +112,8 @@
 
   field.label(label.c_str());
   CPPUNIT_ASSERT_EQUAL(label, std::string(field.label()));
+
+  PYLITH_METHOD_END;
 } // testLabel
 
 // ----------------------------------------------------------------------
@@ -105,6 +121,8 @@
 void
 pylith::topology::TestFieldMesh::testVectorFieldType(void)
 { // testVectorFieldType
+  PYLITH_METHOD_BEGIN;
+
   const std::string label = "default";
 
   Mesh mesh;
@@ -113,6 +131,8 @@
 
   field.vectorFieldType(FieldBase::SCALAR);
   CPPUNIT_ASSERT_EQUAL(FieldBase::SCALAR, field._metadata[label].vectorFieldType);
+
+  PYLITH_METHOD_END;
 } // testVectorFieldType
 
 // ----------------------------------------------------------------------
@@ -120,6 +140,8 @@
 void
 pylith::topology::TestFieldMesh::testScale(void)
 { // testScale
+  PYLITH_METHOD_BEGIN;
+
   const std::string label = "default";
 
   Mesh mesh;
@@ -130,6 +152,8 @@
   field.scale(scale);
   const PylithScalar tolerance = 1.0e-6;
   CPPUNIT_ASSERT_DOUBLES_EQUAL(scale, field._metadata[label].scale, tolerance);
+
+  PYLITH_METHOD_END;
 } // testScale
 
 // ----------------------------------------------------------------------
@@ -137,6 +161,8 @@
 void
 pylith::topology::TestFieldMesh::testAddDimensionOkay(void)
 { // testAddDimensionOkay
+  PYLITH_METHOD_BEGIN;
+
   const std::string label = "default";
 
   Mesh mesh;
@@ -146,6 +172,8 @@
   CPPUNIT_ASSERT_EQUAL(false, field._metadata[label].dimsOkay);
   field.addDimensionOkay(true);
   CPPUNIT_ASSERT_EQUAL(true, field._metadata[label].dimsOkay);
+
+  PYLITH_METHOD_END;
 } // testAddDimensionOkay
 
 // ----------------------------------------------------------------------
@@ -153,11 +181,15 @@
 void
 pylith::topology::TestFieldMesh::testSpaceDim(void)
 { // testSpaceDim
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _buildMesh(&mesh);
   Field<Mesh> field(mesh);
 
   CPPUNIT_ASSERT_EQUAL(_TestFieldMesh::cellDim, field.spaceDim());
+
+  PYLITH_METHOD_END;
 } // testSpaceDim
 
 // ----------------------------------------------------------------------
@@ -165,6 +197,8 @@
 void
 pylith::topology::TestFieldMesh::testNewSection(void)
 { // testNewSection
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _buildMesh(&mesh);
 
@@ -175,6 +209,8 @@
   field.newSection();
   PetscDM dmMesh = mesh.dmMesh();CPPUNIT_ASSERT(dmMesh);
   PetscSection section = field.petscSection();CPPUNIT_ASSERT(section);
+
+  PYLITH_METHOD_END;
 } // testNewSection
 
 // ----------------------------------------------------------------------
@@ -182,6 +218,8 @@
 void
 pylith::topology::TestFieldMesh::testNewSectionPoints(void)
 { // testNewSectionPoints
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 2;
   const std::string& label = "field A";
 
@@ -207,6 +245,8 @@
   PetscVec vec = field.localVector();CPPUNIT_ASSERT(vec);
   PetscErrorCode err = PetscObjectGetName((PetscObject) vec, &name);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(label, std::string(name));
+
+  PYLITH_METHOD_END;
 } // testNewSectionPoints
 
 // ----------------------------------------------------------------------
@@ -214,6 +254,8 @@
 void
 pylith::topology::TestFieldMesh::testNewSectionPointsArray(void)
 { // testNewSectionPointsArray
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 2;
 
   Mesh mesh;
@@ -267,6 +309,8 @@
   PetscVec vec = field.localVector();CPPUNIT_ASSERT(vec);
   err = PetscObjectGetName((PetscObject) vec, &name);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(label, std::string(name));
+
+  PYLITH_METHOD_END;
 } // testNewSectionPointsArray
 
 // ----------------------------------------------------------------------
@@ -274,6 +318,8 @@
 void
 pylith::topology::TestFieldMesh::testNewSectionDomain(void)
 { // testNewSectionDomain
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 2;
 
   Mesh mesh;
@@ -299,6 +345,8 @@
   PetscVec vec = field.localVector();CPPUNIT_ASSERT(vec);
   PetscErrorCode err = PetscObjectGetName((PetscObject) vec, &name);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(label, std::string(name));
+
+  PYLITH_METHOD_END;
 } // testNewSectionDomain
 
 // ----------------------------------------------------------------------
@@ -306,6 +354,8 @@
 void
 pylith::topology::TestFieldMesh::testNewSectionField(void)
 { // testNewSectionField
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
     
   Mesh mesh;
@@ -337,6 +387,8 @@
   PetscVec vec = field.localVector();CPPUNIT_ASSERT(vec);
   PetscErrorCode err = PetscObjectGetName((PetscObject) vec, &name);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(label, std::string(name));
+
+  PYLITH_METHOD_END;
 } // testNewSectionField
 
 // ----------------------------------------------------------------------
@@ -344,6 +396,8 @@
 void
 pylith::topology::TestFieldMesh::testCloneSection(void)
 { // testCloneSection
+  PYLITH_METHOD_BEGIN;
+
   const PetscInt fiberDim = 3;
   const PetscInt nconstraints[] = { 0, 2, 1, 3 };
   const PetscInt constraints[] = {
@@ -403,6 +457,8 @@
   const char *name = NULL;
   err = PetscObjectGetName((PetscObject) vec, &name);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(label, std::string(name));
+
+  PYLITH_METHOD_END;
 } // testCloneSection
 
 // ----------------------------------------------------------------------
@@ -410,6 +466,8 @@
 void
 pylith::topology::TestFieldMesh::testClear(void)
 { // testClear
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh(_TestFieldMesh::cellDim);
   Field<Mesh> field(mesh);
 
@@ -422,6 +480,8 @@
   CPPUNIT_ASSERT_EQUAL(PylithScalar(1.0), field._metadata["default"].scale);
   CPPUNIT_ASSERT_EQUAL(Field<Mesh>::OTHER, field._metadata["default"].vectorFieldType);
   CPPUNIT_ASSERT_EQUAL(false, field._metadata["default"].dimsOkay);
+
+  PYLITH_METHOD_END;
 } // testClear
 
 // ----------------------------------------------------------------------
@@ -429,6 +489,8 @@
 void
 pylith::topology::TestFieldMesh::testAllocate(void)
 { // testAllocate
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -468,6 +530,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testAllocate
 
 // ----------------------------------------------------------------------
@@ -475,6 +539,8 @@
 void
 pylith::topology::TestFieldMesh::testZero(void)
 { // testZero
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -517,6 +583,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testZero
 
 // ----------------------------------------------------------------------
@@ -524,6 +592,8 @@
 void
 pylith::topology::TestFieldMesh::testZeroAll(void)
 { // testZeroAll
+  PYLITH_METHOD_BEGIN;
+
   const PetscInt fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -585,6 +655,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testZeroAll
 
 // ----------------------------------------------------------------------
@@ -592,6 +664,8 @@
 void
 pylith::topology::TestFieldMesh::testComplete(void)
 { // testComplete
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -635,6 +709,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testComplete
 
 // ----------------------------------------------------------------------
@@ -642,6 +718,8 @@
 void
 pylith::topology::TestFieldMesh::testCopy(void)
 { // testCopy
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -687,6 +765,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testCopy
 
 // ----------------------------------------------------------------------
@@ -694,6 +774,8 @@
 void
 pylith::topology::TestFieldMesh::testOperatorAdd(void)
 { // testOperateAdd
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesA[] = {
@@ -755,6 +837,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesA[i] + valuesB[i], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testOperateAdd
 
 // ----------------------------------------------------------------------
@@ -762,6 +846,8 @@
 void
 pylith::topology::TestFieldMesh::testDimensionalize(void)
 { // testDimensionalize
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -806,6 +892,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i]*scale, fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testDimensionalize
 
 // ----------------------------------------------------------------------
@@ -813,6 +901,8 @@
 void
 pylith::topology::TestFieldMesh::testView(void)
 { // testView
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -842,6 +932,8 @@
   } // for
 
   field.view("Testing view");
+
+  PYLITH_METHOD_END;
 } // testView
 
 // ----------------------------------------------------------------------
@@ -849,6 +941,8 @@
 void
 pylith::topology::TestFieldMesh::testCreateScatter(void)
 { // testCreateScatter
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   Mesh mesh;
@@ -907,6 +1001,8 @@
   CPPUNIT_ASSERT(sinfo2B.dm);
   CPPUNIT_ASSERT(sinfo2B.vector);
 
+
+  PYLITH_METHOD_END;
 } // testCreateScatter
 
 // ----------------------------------------------------------------------
@@ -914,6 +1010,8 @@
 void
 pylith::topology::TestFieldMesh::testCreateScatterWithBC(void)
 { // testCreateScatterWithBC
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   Mesh mesh;
@@ -971,6 +1069,8 @@
   CPPUNIT_ASSERT(sinfo2B.dm);
   CPPUNIT_ASSERT(sinfo2B.vector);
 
+
+  PYLITH_METHOD_END;
 } // testCreateScatterWithBC
 
 // ----------------------------------------------------------------------
@@ -978,6 +1078,8 @@
 void
 pylith::topology::TestFieldMesh::testVector(void)
 { // testVector
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   Mesh mesh;
@@ -1005,6 +1107,8 @@
   PetscErrorCode err = VecGetSize(vec, &size);CHECK_PETSC_ERROR(err);
   const int sizeE = (vEnd-vStart) * fiberDim;
   CPPUNIT_ASSERT_EQUAL(sizeE, size);
+
+  PYLITH_METHOD_END;
 } // testVector
 
 // ----------------------------------------------------------------------
@@ -1012,6 +1116,8 @@
 void
 pylith::topology::TestFieldMesh::testScatterSectionToVector(void)
 { // testScatterSectionToVector
+  PYLITH_METHOD_BEGIN;
+
   const char* context = "abc";
   const int fiberDim = 3;
   const PylithScalar valuesE[] = {
@@ -1057,6 +1163,8 @@
   for (int i=0; i < sizeE; ++i)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesE[i], valuesVec[i], tolerance);
   err = VecRestoreArray(vec, &valuesVec);CHECK_PETSC_ERROR(err);
+
+  PYLITH_METHOD_END;
 } // testScatterSectionToVector
 
 // ----------------------------------------------------------------------
@@ -1064,6 +1172,8 @@
 void
 pylith::topology::TestFieldMesh::testScatterVectorToSection(void)
 { // testScatterVectorToSection
+  PYLITH_METHOD_BEGIN;
+
   const char* context = "abcd";
   const int fiberDim = 3;
   const PylithScalar valuesE[] = {
@@ -1109,6 +1219,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesE[i++], fieldArray[off+iDim], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testScatterVectorToSection
 
 // ----------------------------------------------------------------------
@@ -1116,6 +1228,8 @@
 void
 pylith::topology::TestFieldMesh::testSplitDefault(void)
 { // testSplitDefault
+  PYLITH_METHOD_BEGIN;
+
   const PetscInt spaceDim = _TestFieldMesh::cellDim;
   const PetscInt numFields = spaceDim;
   const PetscInt nconstraints[4] = { 1, 2, 0, 1 };
@@ -1199,6 +1313,8 @@
       CPPUNIT_ASSERT_EQUAL(constraintDimE, fcdof);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testSplitDefault
 
 // ----------------------------------------------------------------------
@@ -1206,6 +1322,8 @@
 void
 pylith::topology::TestFieldMesh::testCloneSectionSplit(void)
 { // testCloneSectionSplit
+  PYLITH_METHOD_BEGIN;
+
   const PetscInt spaceDim = _TestFieldMesh::cellDim;
   const PetscInt numFields = spaceDim;
   const PetscInt nconstraints[4] = { 1, 2, 0, 1 };
@@ -1293,12 +1411,16 @@
       CPPUNIT_ASSERT_EQUAL(constraintDimE, fcdof);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testCloneSectionSplit
 
 // ----------------------------------------------------------------------
 void
 pylith::topology::TestFieldMesh::_buildMesh(Mesh* mesh)
 { // _buildMesh
+  PYLITH_METHOD_BEGIN;
+
   assert(mesh);
 
   const int cellDim = _TestFieldMesh::cellDim;
@@ -1360,6 +1482,8 @@
   cs.setSpaceDim(spaceDim);
   cs.initialize();
   mesh->coordsys(&cs);
+
+  PYLITH_METHOD_END;
 } // _buildMesh
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -67,10 +67,14 @@
 void
 pylith::topology::TestFieldSubMesh::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   SubMesh submesh;
   _buildMesh(&mesh, &submesh);
   Field<SubMesh> field(submesh);
+
+  PYLITH_METHOD_END;
 } // testConstructor
 
 // ----------------------------------------------------------------------
@@ -78,6 +82,8 @@
 void
 pylith::topology::TestFieldSubMesh::testSection(void)
 { // testSection
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   SubMesh submesh;
   _buildMesh(&mesh, &submesh);
@@ -85,6 +91,8 @@
 
   PetscSection section = field.petscSection();
   CPPUNIT_ASSERT(section);
+
+  PYLITH_METHOD_END;
 } // testSection
 
 // ----------------------------------------------------------------------
@@ -92,6 +100,8 @@
 void
 pylith::topology::TestFieldSubMesh::testMesh(void)
 { // testMesh
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   SubMesh submesh;
   _buildMesh(&mesh, &submesh);
@@ -99,6 +109,8 @@
 
   const SubMesh& mesh2 = field.mesh();
   CPPUNIT_ASSERT_EQUAL(_TestFieldSubMesh::cellDim-1, mesh2.dimension());  
+
+  PYLITH_METHOD_END;
 } // testMesh
 
 // ----------------------------------------------------------------------
@@ -106,12 +118,16 @@
 void
 pylith::topology::TestFieldSubMesh::testSpaceDim(void)
 { // testSpaceDim
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   SubMesh submesh;
   _buildMesh(&mesh, &submesh);
   Field<SubMesh> field(submesh);
 
   CPPUNIT_ASSERT_EQUAL(_TestFieldSubMesh::cellDim, field.spaceDim());
+
+  PYLITH_METHOD_END;
 } // testSpaceDim
 
 // ----------------------------------------------------------------------
@@ -119,6 +135,8 @@
 void
 pylith::topology::TestFieldSubMesh::testNewSection(void)
 { // testNewSection
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   SubMesh submesh;
   _buildMesh(&mesh, &submesh);
@@ -127,6 +145,8 @@
   field.newSection();
   PetscSection section = field.petscSection();
   CPPUNIT_ASSERT(section);
+
+  PYLITH_METHOD_END;
 } // testNewSection
 
 // ----------------------------------------------------------------------
@@ -134,6 +154,8 @@
 void
 pylith::topology::TestFieldSubMesh::testNewSectionPoints(void)
 { // testNewSectionPoints
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 2;
 
   Mesh mesh;
@@ -153,6 +175,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testNewSectionPoints
 
 // ----------------------------------------------------------------------
@@ -160,6 +184,8 @@
 void
 pylith::topology::TestFieldSubMesh::testNewSectionDomain(void)
 { // testNewSectionDomain
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 2;
 
   Mesh mesh;
@@ -179,6 +205,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testNewSectionDomain
 
 // ----------------------------------------------------------------------
@@ -186,6 +214,8 @@
 void
 pylith::topology::TestFieldSubMesh::testNewSectionField(void)
 { // testNewSectionField
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
     
   Mesh mesh;
@@ -211,6 +241,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim2, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testNewSectionChart
 
 // ----------------------------------------------------------------------
@@ -218,6 +250,8 @@
 void
 pylith::topology::TestFieldSubMesh::testCloneSection(void)
 { // testCloneSection
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const int nconstraints[] = { 0, 2, 1, 3 };
   const int constraints[] = {
@@ -268,6 +302,8 @@
     CPPUNIT_ASSERT_EQUAL(fiberDim, dof);
     CPPUNIT_ASSERT_EQUAL(nconstraints[iV++], cdof);
   } // for
+
+  PYLITH_METHOD_END;
 } // testCloneSection
 
 // ----------------------------------------------------------------------
@@ -275,6 +311,8 @@
 void
 pylith::topology::TestFieldSubMesh::testClear(void)
 { // testClear
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   SubMesh submesh;
   _buildMesh(&mesh, &submesh);
@@ -289,6 +327,8 @@
   CPPUNIT_ASSERT_EQUAL(PylithScalar(1.0), field._metadata["default"].scale);
   CPPUNIT_ASSERT_EQUAL(Field<SubMesh>::OTHER, field._metadata["default"].vectorFieldType);
   CPPUNIT_ASSERT_EQUAL(false, field._metadata["default"].dimsOkay);
+
+  PYLITH_METHOD_END;
 } // testClear
 
 // ----------------------------------------------------------------------
@@ -296,6 +336,8 @@
 void
 pylith::topology::TestFieldSubMesh::testAllocate(void)
 { // testAllocate
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -336,6 +378,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testAllocate
 
 // ----------------------------------------------------------------------
@@ -343,6 +387,8 @@
 void
 pylith::topology::TestFieldSubMesh::testZero(void)
 { // testZero
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -385,6 +431,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testZero
 
 // ----------------------------------------------------------------------
@@ -392,6 +440,8 @@
 void
 pylith::topology::TestFieldSubMesh::testComplete(void)
 { // testComplete
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -434,6 +484,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testComplete
 
 // ----------------------------------------------------------------------
@@ -441,6 +493,8 @@
 void
 pylith::topology::TestFieldSubMesh::testCopy(void)
 { // testCopy
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -486,6 +540,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testCopy
 
 // ----------------------------------------------------------------------
@@ -493,6 +549,8 @@
 void
 pylith::topology::TestFieldSubMesh::testOperatorAdd(void)
 { // testOperateAdd
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesA[] = {
@@ -554,6 +612,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesA[i] + valuesB[i], fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testOperateAdd
 
 // ----------------------------------------------------------------------
@@ -561,6 +621,8 @@
 void
 pylith::topology::TestFieldSubMesh::testDimensionalize(void)
 { // testDimensionalize
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -605,6 +667,8 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesNondim[i++]*scale, fieldArray[off+d], tolerance);
     } // for
   } // for
+
+  PYLITH_METHOD_END;
 } // testDimensionalize
 
 // ----------------------------------------------------------------------
@@ -612,6 +676,8 @@
 void
 pylith::topology::TestFieldSubMesh::testView(void)
 { // testView
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
   const PylithScalar scale = 2.0;
   const PylithScalar valuesNondim[] = {
@@ -641,6 +707,8 @@
   } // for
 
   field.view("Testing view");
+
+  PYLITH_METHOD_END;
 } // testView
 
 // ----------------------------------------------------------------------
@@ -648,6 +716,8 @@
 void
 pylith::topology::TestFieldSubMesh::testCreateScatter(void)
 { // testCreateScatter
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   Mesh mesh;
@@ -698,6 +768,8 @@
   const Field<SubMesh>::ScatterInfo& sinfo2B = field2._getScatter("B");
   CPPUNIT_ASSERT(sinfo2B.dm);
   CPPUNIT_ASSERT(sinfo2B.vector);
+
+  PYLITH_METHOD_END;
 } // testCreateScatter
 
 // ----------------------------------------------------------------------
@@ -705,6 +777,8 @@
 void
 pylith::topology::TestFieldSubMesh::testCreateScatterWithBC(void)
 { // testCreateScatterWithBC
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   Mesh mesh;
@@ -755,6 +829,8 @@
   const Field<SubMesh>::ScatterInfo& sinfo2B = field2._getScatter("B");
   CPPUNIT_ASSERT(sinfo2B.dm);
   CPPUNIT_ASSERT(sinfo2B.vector);
+
+  PYLITH_METHOD_END;
 } // testCreateScatterWithBC
 
 // ----------------------------------------------------------------------
@@ -762,6 +838,8 @@
 void
 pylith::topology::TestFieldSubMesh::testVector(void)
 { // testVector
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   Mesh mesh;
@@ -789,6 +867,8 @@
   PetscErrorCode err = VecGetSize(vec, &size);CHECK_PETSC_ERROR(err);
   const int sizeE = (vEnd-vStart) * fiberDim;
   CPPUNIT_ASSERT_EQUAL(sizeE, size);
+
+  PYLITH_METHOD_END;
 } // testVector
 
 // ----------------------------------------------------------------------
@@ -796,6 +876,8 @@
 void
 pylith::topology::TestFieldSubMesh::testScatterSectionToVector(void)
 { // testScatterSectionToVector
+  PYLITH_METHOD_BEGIN;
+
   const char* context = "abc";
   const int fiberDim = 3;
   const PylithScalar valuesE[] = {
@@ -843,6 +925,8 @@
   for (int i=0; i < sizeE; ++i)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesE[i], valuesVec[i], tolerance);
   err = VecRestoreArray(vec, &valuesVec);CHECK_PETSC_ERROR(err);
+
+  PYLITH_METHOD_END;
 } // testScatterSectionToVector
 
 // ----------------------------------------------------------------------
@@ -850,6 +934,8 @@
 void
 pylith::topology::TestFieldSubMesh::testScatterVectorToSection(void)
 { // testScatterVectorToSection
+  PYLITH_METHOD_BEGIN;
+
   const char* context = "abcd";
   const int fiberDim = 3;
   const PylithScalar valuesE[] = {
@@ -896,6 +982,8 @@
     } // for
   } // for
 
+
+  PYLITH_METHOD_END;
 } // testScatterVectorToSection
 
 // ----------------------------------------------------------------------
@@ -903,6 +991,8 @@
 pylith::topology::TestFieldSubMesh::_buildMesh(Mesh* mesh,
 					       SubMesh* submesh)
 { // _buildMesh
+  PYLITH_METHOD_BEGIN;
+
   assert(mesh);
   assert(submesh);
 
@@ -971,6 +1061,8 @@
   mesh->coordsys(&cs);
 
   submesh->createSubMesh(*mesh, _TestFieldSubMesh::label);
+
+  PYLITH_METHOD_END;
 } // _buildMesh
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsMesh.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsMesh.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -38,17 +38,25 @@
 void
 pylith::topology::TestFieldsMesh::setUp(void)
 { // setUp
+  PYLITH_METHOD_BEGIN;
+
   _mesh = new Mesh;
   meshio::MeshIOAscii importer;
   importer.filename("data/tri3.mesh");
   importer.read(_mesh);
+
+  PYLITH_METHOD_END;
 } // setUp
 
 // ----------------------------------------------------------------------
 void
 pylith::topology::TestFieldsMesh::tearDown(void)
 { // tearDown
+  PYLITH_METHOD_BEGIN;
+
   delete _mesh; _mesh = 0;
+
+  PYLITH_METHOD_END;
 } // tearDown
 
 // ----------------------------------------------------------------------
@@ -56,8 +64,12 @@
 void
 pylith::topology::TestFieldsMesh::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_mesh);
   FieldsMesh fields(*_mesh);
+
+  PYLITH_METHOD_END;
 } // testConstructor
  
 // ----------------------------------------------------------------------
@@ -65,6 +77,8 @@
 void
 pylith::topology::TestFieldsMesh::testAdd(void)
 { // testAdd
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_mesh);
   FieldsMesh fields(*_mesh);
   
@@ -72,6 +86,8 @@
   fields.add(label, "displacement");
   const size_t size = 1;
   CPPUNIT_ASSERT_EQUAL(size, fields._fields.size());
+
+  PYLITH_METHOD_END;
 } // testAdd
 
 // ----------------------------------------------------------------------
@@ -79,6 +95,8 @@
 void
 pylith::topology::TestFieldsMesh::testAddDomain(void)
 { // testAddDomain
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   CPPUNIT_ASSERT(_mesh);
@@ -101,6 +119,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testAddDomain
 
 // ----------------------------------------------------------------------
@@ -108,6 +128,8 @@
 void
 pylith::topology::TestFieldsMesh::testDelete(void)
 { // testDelete
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_mesh);
   FieldsMesh fields(*_mesh);
 
@@ -124,6 +146,8 @@
   CPPUNIT_ASSERT_EQUAL(size, fields._fields.size());
   const Field<Mesh>& field = fields.get(labelB);
   CPPUNIT_ASSERT_EQUAL(std::string("velocity"), std::string(field.label()));
+
+  PYLITH_METHOD_END;
 } // testDelete
 
 // ----------------------------------------------------------------------
@@ -131,12 +155,16 @@
 void
 pylith::topology::TestFieldsMesh::testGet(void)
 { // testGet
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_mesh);
   FieldsMesh fields(*_mesh);
 
   const char* label = "field";
   fields.add(label, "velocity");
   const Field<Mesh>& field = fields.get(label);
+
+  PYLITH_METHOD_END;
 } // testGet
 
 // ----------------------------------------------------------------------
@@ -144,6 +172,8 @@
 void
 pylith::topology::TestFieldsMesh::testGetConst(void)
 { // testGetConst
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_mesh);
   FieldsMesh fields(*_mesh);
 
@@ -153,6 +183,8 @@
   const FieldsMesh* fieldsPtr = &fields;
   CPPUNIT_ASSERT(fieldsPtr);
   const Field<Mesh>& field = fieldsPtr->get(label);
+
+  PYLITH_METHOD_END;
 } // testGetConst
 
 // ----------------------------------------------------------------------
@@ -160,6 +192,8 @@
 void
 pylith::topology::TestFieldsMesh::testHasField(void)
 { // testHasField
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_mesh);
   FieldsMesh fields(*_mesh);
 
@@ -175,6 +209,8 @@
   CPPUNIT_ASSERT_EQUAL(true, fields.hasField("field B"));
   CPPUNIT_ASSERT_EQUAL(false, fields.hasField("field C"));
 
+
+  PYLITH_METHOD_END;
 } // testHasField
 
 // ----------------------------------------------------------------------
@@ -182,6 +218,8 @@
 void
 pylith::topology::TestFieldsMesh::testCopyLayout(void)
 { // testCopyLayout
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   CPPUNIT_ASSERT(_mesh);
@@ -210,6 +248,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testCopyLayout
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsSubMesh.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldsSubMesh.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -38,20 +38,28 @@
 void
 pylith::topology::TestFieldsSubMesh::setUp(void)
 { // setUp
+  PYLITH_METHOD_BEGIN;
+
   _mesh = new Mesh;
   meshio::MeshIOAscii importer;
   importer.filename("data/tri3.mesh");
   importer.read(_mesh);
 
   _submesh = new SubMesh(*_mesh, "bc");
+
+  PYLITH_METHOD_END;
 } // setUp
 
 // ----------------------------------------------------------------------
 void
 pylith::topology::TestFieldsSubMesh::tearDown(void)
 { // tearDown
+  PYLITH_METHOD_BEGIN;
+
   delete _mesh; _mesh = 0;
   delete _submesh; _submesh = 0;
+
+  PYLITH_METHOD_END;
 } // tearDown
 
 // ----------------------------------------------------------------------
@@ -59,8 +67,12 @@
 void
 pylith::topology::TestFieldsSubMesh::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_submesh);
   FieldsSubMesh fields(*_submesh);
+
+  PYLITH_METHOD_END;
 } // testConstructor
  
 // ----------------------------------------------------------------------
@@ -68,6 +80,8 @@
 void
 pylith::topology::TestFieldsSubMesh::testAdd(void)
 { // testAdd
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_submesh);
   FieldsSubMesh fields(*_submesh);
   
@@ -75,6 +89,8 @@
   fields.add(label, "displacement");
   const size_t size = 1;
   CPPUNIT_ASSERT_EQUAL(size, fields._fields.size());
+
+  PYLITH_METHOD_END;
 } // testAdd
 
 // ----------------------------------------------------------------------
@@ -82,6 +98,8 @@
 void
 pylith::topology::TestFieldsSubMesh::testAddDomain(void)
 { // testAddDomain
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   CPPUNIT_ASSERT(_submesh);
@@ -104,6 +122,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testAddDomain
 
 // ----------------------------------------------------------------------
@@ -111,6 +131,8 @@
 void
 pylith::topology::TestFieldsSubMesh::testDelete(void)
 { // testDelete
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_submesh);
   FieldsSubMesh fields(*_submesh);
 
@@ -126,6 +148,8 @@
   size = 1;
   CPPUNIT_ASSERT_EQUAL(size, fields._fields.size());
   const Field<SubMesh>& field = fields.get(labelB);
+
+  PYLITH_METHOD_END;
 } // testDelete
 
 // ----------------------------------------------------------------------
@@ -133,12 +157,16 @@
 void
 pylith::topology::TestFieldsSubMesh::testGet(void)
 { // testGet
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_submesh);
   FieldsSubMesh fields(*_submesh);
 
   const char* label = "field";
   fields.add(label, "displacement");
   const Field<SubMesh>& field = fields.get(label);
+
+  PYLITH_METHOD_END;
 } // testGet
 
 // ----------------------------------------------------------------------
@@ -146,6 +174,8 @@
 void
 pylith::topology::TestFieldsSubMesh::testGetConst(void)
 { // testGetConst
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_submesh);
   FieldsSubMesh fields(*_submesh);
 
@@ -155,6 +185,8 @@
   const FieldsSubMesh* fieldsPtr = &fields;
   CPPUNIT_ASSERT(fieldsPtr);
   const Field<SubMesh>& field = fieldsPtr->get(label);
+
+  PYLITH_METHOD_END;
 } // testGetConst
 
 // ----------------------------------------------------------------------
@@ -162,6 +194,8 @@
 void
 pylith::topology::TestFieldsSubMesh::testHasField(void)
 { // testHasField
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(_submesh);
   FieldsSubMesh fields(*_submesh);
 
@@ -177,6 +211,7 @@
   CPPUNIT_ASSERT_EQUAL(true, fields.hasField("field B"));
   CPPUNIT_ASSERT_EQUAL(false, fields.hasField("field C"));
 
+  PYLITH_METHOD_END;
 } // testHasField
 
 // ----------------------------------------------------------------------
@@ -184,6 +219,8 @@
 void
 pylith::topology::TestFieldsSubMesh::testCopyLayout(void)
 { // testCopyLayout
+  PYLITH_METHOD_BEGIN;
+
   const int fiberDim = 3;
 
   CPPUNIT_ASSERT(_submesh);
@@ -212,6 +249,8 @@
   for(PetscInt v = vStart; v < vEnd; ++v) {
     CPPUNIT_ASSERT_EQUAL(fiberDim, fieldVisitor.sectionDof(v));
   } // for
+
+  PYLITH_METHOD_END;
 } // testCopyLayout
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestJacobian.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestJacobian.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestJacobian.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -37,6 +37,8 @@
 void
 pylith::topology::TestJacobian::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -47,6 +49,8 @@
   Jacobian jacobianC(field, "baij", true);
   Jacobian jacobianD(field, "sbaij");
   Jacobian jacobianE(field, "sbaij", true);
+
+  PYLITH_METHOD_END;
 } // testConstructor
 
 // ----------------------------------------------------------------------
@@ -54,6 +58,8 @@
 void
 pylith::topology::TestJacobian::testConstructorSubDomain(void)
 { // testConstructorSubDomain
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -66,6 +72,8 @@
   subfield.zero();
 
   Jacobian jacobian(subfield);
+
+  PYLITH_METHOD_END;
 } // testConstructorSubDomain
 
 // ----------------------------------------------------------------------
@@ -73,6 +81,8 @@
 void
 pylith::topology::TestJacobian::testMatrix(void)
 { // testMatrix
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -80,7 +90,9 @@
   Jacobian jacobian(field);
 
   const PetscMat matrix = jacobian.matrix();
-  CPPUNIT_ASSERT(0 != matrix);
+  CPPUNIT_ASSERT(matrix);
+
+  PYLITH_METHOD_END;
 } // testMatrix
 
 // ----------------------------------------------------------------------
@@ -88,6 +100,8 @@
 void
 pylith::topology::TestJacobian::testAssemble(void)
 { // testAssemble
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -96,6 +110,8 @@
 
   jacobian.assemble("flush_assembly");
   jacobian.assemble("final_assembly");
+
+  PYLITH_METHOD_END;
 } // testAssemble
 
 // ----------------------------------------------------------------------
@@ -103,6 +119,8 @@
 void
 pylith::topology::TestJacobian::testZero(void)
 { // testZero
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -110,6 +128,8 @@
   Jacobian jacobian(field);
 
   jacobian.zero();
+
+  PYLITH_METHOD_END;
 } // testZero
 
 // ----------------------------------------------------------------------
@@ -117,6 +137,8 @@
 void
 pylith::topology::TestJacobian::testView(void)
 { // testView
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -126,6 +148,8 @@
   jacobian.assemble("final_assembly");
 
   jacobian.view();
+
+  PYLITH_METHOD_END;
 } // testView
 
 // ----------------------------------------------------------------------
@@ -133,6 +157,8 @@
 void
 pylith::topology::TestJacobian::testWrite(void)
 { // testWrite
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initializeMesh(&mesh);
   Field<Mesh> field(mesh);
@@ -142,29 +168,40 @@
   jacobian.assemble("final_assembly");
 
   jacobian.write("jacobian.mat", mesh.comm());
+
+  PYLITH_METHOD_END;
 } // testWrite
 
 // ----------------------------------------------------------------------
 void
 pylith::topology::TestJacobian::_initializeMesh(Mesh* mesh) const
-{ // _initialize
-  CPPUNIT_ASSERT(0 != mesh);
+{ // _initializeMesh
+  PYLITH_METHOD_BEGIN;
 
+  CPPUNIT_ASSERT(mesh);
+
   meshio::MeshIOAscii iohandler;
   iohandler.filename("data/tri3.mesh");
   iohandler.read(mesh);
+
+  PYLITH_METHOD_END;
 } // _initializeMesh
 
+// ----------------------------------------------------------------------
 void
 pylith::topology::TestJacobian::_initializeField(Mesh* mesh,
                                                  Field<Mesh>* field) const
-{ // _initialize
-  CPPUNIT_ASSERT(0 != mesh);
-  CPPUNIT_ASSERT(0 != field);
+{ // _initializeField
+  PYLITH_METHOD_BEGIN;
 
+  CPPUNIT_ASSERT(mesh);
+  CPPUNIT_ASSERT(field);
+
   field->newSection(FieldBase::VERTICES_FIELD, mesh->dimension());
   field->allocate();
   field->zero();
+
+  PYLITH_METHOD_END;
 } // _initializeField
 
 // End of file 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -36,6 +36,8 @@
 void
 pylith::topology::TestMesh::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   int result = 0;
 
   Mesh mesh;
@@ -56,6 +58,8 @@
   CPPUNIT_ASSERT_EQUAL(1, mesh3.dimension());
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh3.comm(), &result);
   CPPUNIT_ASSERT_EQUAL(int(MPI_CONGRUENT), result);
+
+  PYLITH_METHOD_END;
 } // testConstructor
 
 // ----------------------------------------------------------------------
@@ -63,6 +67,8 @@
 void
 pylith::topology::TestMesh::testCreateDMMesh(void)
 { // testCreateDMMesh
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   CPPUNIT_ASSERT(mesh._mesh.isNull());
 
@@ -75,6 +81,8 @@
   mesh.createDMMesh(dim);
   CPPUNIT_ASSERT(mesh._newMesh);
   CPPUNIT_ASSERT_EQUAL(dim, mesh.dimension());
+
+  PYLITH_METHOD_END;
 } // testCreateDMMesh
 
 // ----------------------------------------------------------------------
@@ -82,6 +90,8 @@
 void
 pylith::topology::TestMesh::testDMMesh(void)
 { // testDMMesh
+  PYLITH_METHOD_BEGIN;
+
   const int dim = 2;
   PetscInt dmDim;
   Mesh mesh(dim);
@@ -90,6 +100,8 @@
   CPPUNIT_ASSERT(dmMesh);
   PetscErrorCode err = DMPlexGetDimension(dmMesh, &dmDim);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(dim, dmDim);
+
+  PYLITH_METHOD_END;
 } // testDMMesh
 
 // ----------------------------------------------------------------------
@@ -97,6 +109,8 @@
 void
 pylith::topology::TestMesh::testCoordsys(void)
 { // testCoordsys
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
 
   spatialdata::geocoords::CSCart cs;
@@ -105,6 +119,8 @@
   mesh.coordsys(&cs);
 
   CPPUNIT_ASSERT_EQUAL(cs.spaceDim(), mesh.coordsys()->spaceDim());
+
+  PYLITH_METHOD_END;
 } // testCoordsys
 
 // ----------------------------------------------------------------------
@@ -112,11 +128,15 @@
 void
 pylith::topology::TestMesh::testDebug(void)
 { // testDebug
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   CPPUNIT_ASSERT_EQUAL(false, mesh.debug());
 
   mesh.debug(true);
   CPPUNIT_ASSERT_EQUAL(true, mesh.debug());
+
+  PYLITH_METHOD_END;
 } // testDebug
 
 // ----------------------------------------------------------------------
@@ -124,12 +144,16 @@
 void
 pylith::topology::TestMesh::testDimension(void)
 { // testDimension
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   CPPUNIT_ASSERT_EQUAL(0, mesh.dimension());
 
   const int dim = 2;
   Mesh mesh2(dim);
   CPPUNIT_ASSERT_EQUAL(dim, mesh2.dimension());
+
+  PYLITH_METHOD_END;
 } // testDimension
 
 // ----------------------------------------------------------------------
@@ -137,11 +161,15 @@
 void
 pylith::topology::TestMesh::testComm(void)
 { // testComm
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   CPPUNIT_ASSERT_EQUAL(PETSC_COMM_WORLD, mesh.comm());
 
   mesh.comm(PETSC_COMM_SELF);
   CPPUNIT_ASSERT_EQUAL(PETSC_COMM_SELF, mesh.comm());
+
+  PYLITH_METHOD_END;
 } // testComm
 
 // ----------------------------------------------------------------------
@@ -149,6 +177,8 @@
 void
 pylith::topology::TestMesh::testNondimensionalize(void)
 { // testNondimensionalizer
+  PYLITH_METHOD_BEGIN;
+
   const PylithScalar lengthScale = 2.0;
   const int spaceDim = 2;
   const int numVertices = 4;
@@ -195,6 +225,7 @@
     } // for
   } // for
   
+  PYLITH_METHOD_END;
 } // testNondimensionalize
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -34,6 +34,8 @@
 void
 pylith::topology::TestMeshOps::testCheckMaterialIds(void)
 { // testCheckMaterialIds
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
 
   meshio::MeshIOAscii iohandler;
@@ -51,6 +53,8 @@
     
   CPPUNIT_ASSERT_THROW(MeshOps::checkMaterialIds(mesh, materialIds, numMaterials),
 		       std::runtime_error);
+
+  PYLITH_METHOD_END;
 } // testCheckMaterialIds
  
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestSolutionFields.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestSolutionFields.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestSolutionFields.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -32,9 +32,13 @@
 void
 pylith::topology::TestSolutionFields::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initialize(&mesh);
   SolutionFields manager(mesh);
+
+  PYLITH_METHOD_END;
 } // testConstructor
  
 // ----------------------------------------------------------------------
@@ -42,6 +46,8 @@
 void
 pylith::topology::TestSolutionFields::testSolutionName(void)
 { // testSolutionName
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initialize(&mesh);
   SolutionFields manager(mesh);
@@ -50,6 +56,8 @@
   manager.add(name.c_str(), "displacement");
   manager.solutionName(name.c_str());
   CPPUNIT_ASSERT_EQUAL(name, manager._solutionName);
+
+  PYLITH_METHOD_END;
 } // testSolutionName
 
 // ----------------------------------------------------------------------
@@ -57,6 +65,8 @@
 void
 pylith::topology::TestSolutionFields::testSolution(void)
 { // testSolution
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh;
   _initialize(&mesh);
   SolutionFields manager(mesh);
@@ -91,17 +101,23 @@
   PetscInt dof;
   err = PetscSectionGetDof(section, vStart, &dof);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(fiberDimB, dof);
+
+  PYLITH_METHOD_END;
 } // testSolution
 
 // ----------------------------------------------------------------------
 void
 pylith::topology::TestSolutionFields::_initialize(Mesh* mesh) const
 { // _initialize
+  PYLITH_METHOD_BEGIN;
+
   CPPUNIT_ASSERT(0 != mesh);
 
   meshio::MeshIOAscii iohandler;
   iohandler.filename("data/tri3.mesh");
   iohandler.read(mesh);
+
+  PYLITH_METHOD_END;
 } // _initialize
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc	2013-03-28 20:22:31 UTC (rev 21674)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc	2013-03-28 23:43:34 UTC (rev 21675)
@@ -69,9 +69,13 @@
 void
 pylith::topology::TestSubMesh::testConstructor(void)
 { // testConstructor
+  PYLITH_METHOD_BEGIN;
+
   SubMesh mesh;
   CPPUNIT_ASSERT_EQUAL(0, mesh.dimension());
   CPPUNIT_ASSERT_EQUAL(false, mesh.debug());
+
+  PYLITH_METHOD_END;
 } // testConstructor
 
 // ----------------------------------------------------------------------
@@ -79,7 +83,9 @@
 void
 pylith::topology::TestSubMesh::testConstructorMesh(void)
 { // testConstructorMesh
-  Mesh mesh2D;
+  PYLITH_METHOD_BEGIN;
+
+ Mesh mesh2D;
   _buildMesh(&mesh2D);
   
   SubMesh mesh(mesh2D, _TestSubMesh::label);
@@ -111,6 +117,8 @@
   for (PetscInt c = cStart, iC=0; c < cEnd; ++c, ++iC) {
     CPPUNIT_ASSERT_EQUAL(_TestSubMesh::submeshCells[iC], c);
   } // for
+
+  PYLITH_METHOD_END;
 } // testConstructorMesh
 
 // ----------------------------------------------------------------------
@@ -118,6 +126,8 @@
 void
 pylith::topology::TestSubMesh::testCreateSubMesh(void)
 { // testCreateSubMesh
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh2D;
   _buildMesh(&mesh2D);
   
@@ -151,6 +161,8 @@
   for (PetscInt c = cStart, iC=0; c < cEnd; ++c, ++iC) {
     CPPUNIT_ASSERT_EQUAL(_TestSubMesh::submeshCells[iC], c);
   } // for
+
+  PYLITH_METHOD_END;
 } // testCreateSubMesh
 
 // ----------------------------------------------------------------------
@@ -158,12 +170,16 @@
 void
 pylith::topology::TestSubMesh::testCoordsys(void)
 { // testCoordsys
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh2D;
   _buildMesh(&mesh2D);
 
   SubMesh mesh(mesh2D, _TestSubMesh::label);
 
   CPPUNIT_ASSERT_EQUAL(_TestSubMesh::cellDim, mesh.coordsys()->spaceDim());
+
+  PYLITH_METHOD_END;
 } // testCoordsys
 
 // ----------------------------------------------------------------------
@@ -171,11 +187,15 @@
 void
 pylith::topology::TestSubMesh::testDebug(void)
 { // testDebug
+  PYLITH_METHOD_BEGIN;
+
   SubMesh mesh;
   CPPUNIT_ASSERT_EQUAL(false, mesh.debug());
 
   mesh.debug(true);
   CPPUNIT_ASSERT_EQUAL(true, mesh.debug());
+
+  PYLITH_METHOD_END;
 } // testDebug
 
 // ----------------------------------------------------------------------
@@ -183,6 +203,8 @@
 void
 pylith::topology::TestSubMesh::testDimension(void)
 { // testDimension
+  PYLITH_METHOD_BEGIN;
+
   SubMesh mesh;
   CPPUNIT_ASSERT_EQUAL(0, mesh.dimension());
 
@@ -190,6 +212,8 @@
   _buildMesh(&mesh2D);
   SubMesh mesh2(mesh2D, _TestSubMesh::label);
   CPPUNIT_ASSERT_EQUAL(_TestSubMesh::cellDim-1, mesh2.dimension());
+
+  PYLITH_METHOD_END;
 } // testDimension
 
 // ----------------------------------------------------------------------
@@ -197,6 +221,8 @@
 void
 pylith::topology::TestSubMesh::testComm(void)
 { // testComm
+  PYLITH_METHOD_BEGIN;
+
   SubMesh mesh;
 
   Mesh mesh2D;
@@ -206,6 +232,8 @@
   int result = 0;
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh.comm(), &result);
   CPPUNIT_ASSERT_EQUAL(int(MPI_CONGRUENT), result);
+
+  PYLITH_METHOD_END;
 } // testComm
 
 // ----------------------------------------------------------------------
@@ -213,17 +241,23 @@
 void
 pylith::topology::TestSubMesh::testInitialize(void)
 { // testInitialize
+  PYLITH_METHOD_BEGIN;
+
   Mesh mesh2D;
   _buildMesh(&mesh2D);
   SubMesh mesh(mesh2D, _TestSubMesh::label);
 
   mesh.initialize();
+
+  PYLITH_METHOD_END;
 } // testInitialize
 
 // ----------------------------------------------------------------------
 void
 pylith::topology::TestSubMesh::_buildMesh(Mesh* mesh)
 { // _buildMesh
+  PYLITH_METHOD_BEGIN;
+
   assert(mesh);
 
   const int cellDim = _TestSubMesh::cellDim;
@@ -290,6 +324,8 @@
   for(PetscInt i = 0; i < numPoints; ++i) {
     err = DMPlexSetLabelValue(dmMesh, _TestSubMesh::label, ncells+_TestSubMesh::groupVertices[i], 1);CHECK_PETSC_ERROR(err);
   } // for
+
+  PYLITH_METHOD_END;
 } // _buildMesh
 
 



More information about the CIG-COMMITS mailing list