[cig-commits] r21702 - in short/3D/PyLith/trunk: libsrc/pylith/faults libsrc/pylith/meshio unittests/libtests/bc unittests/libtests/friction
brad at geodynamics.org
brad at geodynamics.org
Tue Apr 2 20:51:04 PDT 2013
Author: brad
Date: 2013-04-02 20:51:04 -0700 (Tue, 02 Apr 2013)
New Revision: 21702
Modified:
short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc
short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc
short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc
short/3D/PyLith/trunk/unittests/libtests/friction/TestFrictionModel.cc
Log:
Fixed a memory leak. Added more debugging crumbs.
Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc 2013-04-03 01:01:02 UTC (rev 21701)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc 2013-04-03 03:51:04 UTC (rev 21702)
@@ -50,6 +50,8 @@
DMLabel groupField,
const bool flipFault)
{ // createFault
+ PYLITH_METHOD_BEGIN;
+
assert(0 != faultMesh);
assert(groupField);
@@ -196,6 +198,8 @@
err = ISDestroy(&pointIS);CHECK_PETSC_ERROR(err);
logger.stagePop();
+
+ PYLITH_METHOD_END;
} // createFault
// ----------------------------------------------------------------------
@@ -210,6 +214,8 @@
int& firstFaultCell,
const bool constraintCell)
{ // create
+ PYLITH_METHOD_BEGIN;
+
assert(0 != mesh);
assert(!faultBoundary.isNull());
assert(groupField);
@@ -967,6 +973,8 @@
logger.stagePop();
mesh->setDMMesh(newMesh);
+
+ PYLITH_METHOD_END;
} // create
void
@@ -1049,8 +1057,10 @@
const int materialId,
const bool constraintCell)
{ // createFaultParallel
- assert(0 != faultMesh);
+ PYLITH_METHOD_BEGIN;
+ assert(faultMesh);
+
// Memory logging
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
logger.stagePush("FaultCreation");
@@ -1337,6 +1347,7 @@
}
err = PetscFree(renum);CHECK_PETSC_ERROR(err);
err = DMPlexSetSubpointMap(dmFaultMesh, subpointMap);CHECK_PETSC_ERROR(err);
+ err = DMLabelDestroy(&subpointMap);CHECK_PETSC_ERROR(err);
#endif
// Update dimensioned coordinates if they exist.
@@ -1430,6 +1441,8 @@
#endif
logger.stagePop();
+
+ PYLITH_METHOD_END;
} // createFaultParallel
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc 2013-04-03 01:01:02 UTC (rev 21701)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc 2013-04-03 03:51:04 UTC (rev 21702)
@@ -49,6 +49,8 @@
const bool interpolate,
const bool isParallel)
{ // buildMesh
+ PYLITH_METHOD_BEGIN;
+
assert(mesh);
assert(coordinates);
MPI_Comm comm = mesh->comm();
@@ -182,6 +184,8 @@
err = DMPlexCreateFromCellList(comm, dim, numCells, numVertices, numCorners, pInterpolate, &cells[0], spaceDim, &(*coordinates)[0], &dmMesh);CHECK_PETSC_ERROR(err);
mesh->setDMMesh(dmMesh);
+
+ PYLITH_METHOD_END;
} // buildMesh
// End of file
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc 2013-04-03 01:01:02 UTC (rev 21701)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc 2013-04-03 03:51:04 UTC (rev 21702)
@@ -72,19 +72,17 @@
void
pylith::meshio::MeshIO::read(topology::Mesh* mesh)
{ // read
- assert(0 == _mesh);
+ PYLITH_METHOD_BEGIN;
- ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- //logger.setDebug(1);
- logger.stagePush("Mesh");
+ assert(!_mesh);
_mesh = mesh;
_mesh->debug(_debug);
_read();
- logger.stagePop();
-
_mesh = 0;
+
+ PYLITH_METHOD_END;
} // read
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc 2013-04-03 01:01:02 UTC (rev 21701)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc 2013-04-03 03:51:04 UTC (rev 21702)
@@ -101,9 +101,13 @@
void
pylith::bc::TestNeumann::setUp(void)
{ // setUp
+ PYLITH_METHOD_BEGIN;
+
_data = 0;
_quadrature = new feassemble::Quadrature<topology::SubMesh>();
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
+
+ PYLITH_METHOD_END;
} // setUp
// ----------------------------------------------------------------------
@@ -111,8 +115,12 @@
void
pylith::bc::TestNeumann::tearDown(void)
{ // tearDown
+ PYLITH_METHOD_BEGIN;
+
delete _data; _data = 0;
delete _quadrature; _quadrature = 0;
+
+ PYLITH_METHOD_END;
} // tearDown
// ----------------------------------------------------------------------
@@ -120,7 +128,11 @@
void
pylith::bc::TestNeumann::testConstructor(void)
{ // testConstructor
+ PYLITH_METHOD_BEGIN;
+
Neumann bc;
+
+ PYLITH_METHOD_END;
} // testConstructor
// ----------------------------------------------------------------------
@@ -128,11 +140,15 @@
void
pylith::bc::TestNeumann::test_getLabel(void)
{ // test_getLabel
+ PYLITH_METHOD_BEGIN;
+
Neumann bc;
const std::string& label = "traction bc";
bc.label(label.c_str());
CPPUNIT_ASSERT_EQUAL(label, std::string(bc._getLabel()));
+
+ PYLITH_METHOD_END;
} // test_getLabel
// ----------------------------------------------------------------------
@@ -140,6 +156,8 @@
void
pylith::bc::TestNeumann::testInitialize(void)
{ // testInitialize
+ PYLITH_METHOD_BEGIN;
+
topology::Mesh mesh;
Neumann bc;
topology::SolutionFields fields(mesh);
@@ -188,7 +206,7 @@
const int fiberDim = numQuadPts * spaceDim;
scalar_array tractionsCell(fiberDim);
PetscInt index = 0;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
PetscSection initialSection = bc._parameters->get("initial").petscSection();
PetscVec initialVec = bc._parameters->get("initial").localVector();
PetscScalar *initialArray;
@@ -211,6 +229,8 @@
} // for
} // for
err = VecRestoreArray(initialVec, &initialArray);CHECK_PETSC_ERROR(err);
+
+ PYLITH_METHOD_END;
} // testInitialize
// ----------------------------------------------------------------------
@@ -218,8 +238,10 @@
void
pylith::bc::TestNeumann::testIntegrateResidual(void)
{ // testIntegrateResidual
- CPPUNIT_ASSERT(0 != _data);
+ PYLITH_METHOD_BEGIN;
+ CPPUNIT_ASSERT(_data);
+
topology::Mesh mesh;
Neumann bc;
topology::SolutionFields fields(mesh);
@@ -259,6 +281,8 @@
CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i]*residualScale, tolerance);
} // if/else
err = VecRestoreArray(residualVec, &vals);CHECK_PETSC_ERROR(err);
+
+ PYLITH_METHOD_END;
} // testIntegrateResidual
// ----------------------------------------------------------------------
@@ -266,9 +290,11 @@
void
pylith::bc::TestNeumann::test_queryDatabases(void)
{ // test_queryDatabases
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
_quadrature->refGeometry(&geometry);
topology::Mesh mesh;
@@ -308,7 +334,7 @@
const PylithScalar tolerance = 1.0e-06;
const int spaceDim = _TestNeumann::spaceDim;
const int numQuadPts = _TestNeumann::numQuadPts;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
// bc._parameters->view("PARAMETERS"); // DEBUGGING
@@ -332,6 +358,8 @@
const topology::Field<topology::SubMesh>& changeTime = bc._parameters->get("change time");
_TestNeumann::_checkValues(_TestNeumann::changeTime, numQuadPts, changeTime);
th.close();
+
+ PYLITH_METHOD_END;
} // test_queryDatabases
// ----------------------------------------------------------------------
@@ -339,6 +367,8 @@
void
pylith::bc::TestNeumann::test_paramsLocalToGlobal(void)
{ // test_paramsLocalToGlobal
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
CPPUNIT_ASSERT(_quadrature);
@@ -379,7 +409,7 @@
const PylithScalar tolerance = 1.0e-06;
const int spaceDim = _TestNeumann::spaceDim;
const int numQuadPts = _TestNeumann::numQuadPts;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
// Orientation for quad4 is +x, -y for shear and normal tractions.
CPPUNIT_ASSERT_EQUAL(2, spaceDim);
@@ -409,6 +439,8 @@
} // for
const topology::Field<topology::SubMesh>& change = bc._parameters->get("change");
_TestNeumann::_checkValues(&valuesE[0], numQuadPts*spaceDim, change);
+
+ PYLITH_METHOD_END;
} // test_paramsLocalToGlobal
// ----------------------------------------------------------------------
@@ -416,9 +448,11 @@
void
pylith::bc::TestNeumann::test_calculateValueInitial(void)
{ // test_calculateValueInitial
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
_quadrature->refGeometry(&geometry);
topology::Mesh mesh;
@@ -445,6 +479,8 @@
// Check values.
const topology::Field<topology::SubMesh>& value = bc._parameters->get("value");
_TestNeumann::_checkValues(_TestNeumann::initial, numQuadPts*spaceDim, value);
+
+ PYLITH_METHOD_END;
} // test_calculateValueInitial
// ----------------------------------------------------------------------
@@ -452,9 +488,11 @@
void
pylith::bc::TestNeumann::test_calculateValueRate(void)
{ // test_calculateValueRate
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
_quadrature->refGeometry(&geometry);
topology::Mesh mesh;
@@ -476,11 +514,13 @@
const PylithScalar tolerance = 1.0e-06;
const int spaceDim = _TestNeumann::spaceDim;
const int numQuadPts = _TestNeumann::numQuadPts;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
// Check values.
const topology::Field<topology::SubMesh>& value = bc._parameters->get("value");
_TestNeumann::_checkValues(_TestNeumann::valuesRate, numQuadPts*spaceDim, value);
+
+ PYLITH_METHOD_END;
} // test_calculateValueRate
// ----------------------------------------------------------------------
@@ -488,9 +528,11 @@
void
pylith::bc::TestNeumann::test_calculateValueChange(void)
{ // test_calculateValueChange
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
_quadrature->refGeometry(&geometry);
topology::Mesh mesh;
@@ -512,11 +554,13 @@
const PylithScalar tolerance = 1.0e-06;
const int spaceDim = _TestNeumann::spaceDim;
const int numQuadPts = _TestNeumann::numQuadPts;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
// Check values.
const topology::Field<topology::SubMesh>& value = bc._parameters->get("value");
_TestNeumann::_checkValues(_TestNeumann::valuesChange, numQuadPts*spaceDim, value);
+
+ PYLITH_METHOD_END;
} // test_calculateValueChange
// ----------------------------------------------------------------------
@@ -524,9 +568,11 @@
void
pylith::bc::TestNeumann::test_calculateValueChangeTH(void)
{ // test_calculateValueChangeTH
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
_quadrature->refGeometry(&geometry);
topology::Mesh mesh;
@@ -552,11 +598,13 @@
const PylithScalar tolerance = 1.0e-06;
const int spaceDim = _TestNeumann::spaceDim;
const int numQuadPts = _TestNeumann::numQuadPts;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
// Check values.
const topology::Field<topology::SubMesh>& value = bc._parameters->get("value");
_TestNeumann::_checkValues(_TestNeumann::valuesChangeTH, numQuadPts*spaceDim, value);
+
+ PYLITH_METHOD_END;
} // test_calculateValueChangeTH
// ----------------------------------------------------------------------
@@ -564,9 +612,11 @@
void
pylith::bc::TestNeumann::test_calculateValueAll(void)
{ // test_calculateValueAll
+ PYLITH_METHOD_BEGIN;
+
_data = new NeumannDataQuad4();
feassemble::GeometryLine2D geometry;
- CPPUNIT_ASSERT(0 != _quadrature);
+ CPPUNIT_ASSERT(_quadrature);
_quadrature->refGeometry(&geometry);
topology::Mesh mesh;
@@ -606,7 +656,7 @@
const PylithScalar tolerance = 1.0e-06;
const int spaceDim = _TestNeumann::spaceDim;
const int numQuadPts = _TestNeumann::numQuadPts;
- CPPUNIT_ASSERT(0 != bc._parameters);
+ CPPUNIT_ASSERT(bc._parameters);
// Check values.
const int ncells = _TestNeumann::ncells;
@@ -619,6 +669,8 @@
const topology::Field<topology::SubMesh>& value = bc._parameters->get("value");
_TestNeumann::_checkValues(&valuesE[0], numQuadPts*spaceDim, value);
+
+ PYLITH_METHOD_END;
} // test_calculateValueAll
// ----------------------------------------------------------------------
@@ -626,6 +678,8 @@
pylith::bc::TestNeumann::_preinitialize(topology::Mesh* mesh,
Neumann* const bc) const
{ // _initialize
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_data);
CPPUNIT_ASSERT(_quadrature);
CPPUNIT_ASSERT(mesh);
@@ -661,6 +715,8 @@
bc->label(_data->label);
bc->normalizer(normalizer);
bc->createSubMesh(*mesh);
+
+ PYLITH_METHOD_END;
} // _preinitialize
// ----------------------------------------------------------------------
@@ -669,6 +725,8 @@
Neumann* const bc,
topology::SolutionFields* fields) const
{ // _initialize
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_data);
CPPUNIT_ASSERT(mesh);
CPPUNIT_ASSERT(bc);
@@ -690,7 +748,7 @@
bc->initialize(*mesh, upDir);
// Set up fields
- CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(fields);
fields->add("residual", "residual");
fields->add("disp(t), bc(t+dt)", "displacement");
fields->solutionName("disp(t), bc(t+dt)");
@@ -702,6 +760,8 @@
residual.zero();
fields->copyLayout("residual");
+
+ PYLITH_METHOD_END;
} // _initialize
// ----------------------------------------------------------------------
@@ -711,6 +771,8 @@
const int fiberDimE,
const topology::Field<topology::SubMesh>& field)
{ // _checkValues
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(valuesE);
const topology::SubMesh& boundaryMesh = field.mesh();
@@ -746,6 +808,8 @@
} // for
} // for
err = VecRestoreArray(fieldVec, &fieldArray);CHECK_PETSC_ERROR(err);
+
+ PYLITH_METHOD_END;
} // _checkValues
Modified: short/3D/PyLith/trunk/unittests/libtests/friction/TestFrictionModel.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/friction/TestFrictionModel.cc 2013-04-03 01:01:02 UTC (rev 21701)
+++ short/3D/PyLith/trunk/unittests/libtests/friction/TestFrictionModel.cc 2013-04-03 03:51:04 UTC (rev 21702)
@@ -54,11 +54,15 @@
void
pylith::friction::TestFrictionModel::testLabel(void)
{ // testLabel
+ PYLITH_METHOD_BEGIN;
+
const std::string& label = "the database";
StaticFriction friction;
friction.label(label.c_str());
CPPUNIT_ASSERT_EQUAL(label, std::string(friction.label()));
+
+ PYLITH_METHOD_END;
} // testLabel
// ----------------------------------------------------------------------
@@ -66,11 +70,15 @@
void
pylith::friction::TestFrictionModel::testTimeStep(void)
{ // testTimeStep
+ PYLITH_METHOD_BEGIN;
+
const PylithScalar dt = 2.0;
StaticFriction friction;
friction.timeStep(dt);
CPPUNIT_ASSERT_EQUAL(dt, friction.timeStep());
+
+ PYLITH_METHOD_END;
} // testTimeStep
// ----------------------------------------------------------------------
@@ -78,6 +86,8 @@
void
pylith::friction::TestFrictionModel::testDBProperties(void)
{ // testDBProperties
+ PYLITH_METHOD_BEGIN;
+
const std::string& label = "my_database";
spatialdata::spatialdb::SimpleDB db;
db.label(label.c_str());
@@ -87,6 +97,8 @@
CPPUNIT_ASSERT(friction._dbProperties);
CPPUNIT_ASSERT_EQUAL(label, std::string(friction._dbProperties->label()));
+
+ PYLITH_METHOD_END;
} // testDBProperties
// ----------------------------------------------------------------------
@@ -94,6 +106,8 @@
void
pylith::friction::TestFrictionModel::testDBStateVars(void)
{ // testDBStateVars
+ PYLITH_METHOD_BEGIN;
+
const std::string& label = "my_database";
spatialdata::spatialdb::SimpleDB db;
db.label(label.c_str());
@@ -103,6 +117,8 @@
CPPUNIT_ASSERT(friction._dbInitialState);
CPPUNIT_ASSERT_EQUAL(label, std::string(friction._dbInitialState->label()));
+
+ PYLITH_METHOD_END;
} // testDBStateVars
// ----------------------------------------------------------------------
@@ -110,6 +126,8 @@
void
pylith::friction::TestFrictionModel::testNormalizer(void)
{ // testNormalizer
+ PYLITH_METHOD_BEGIN;
+
spatialdata::units::Nondimensional normalizer;
const double lengthScale = 2.0;
normalizer.lengthScale(lengthScale);
@@ -119,6 +137,8 @@
CPPUNIT_ASSERT(friction._normalizer);
CPPUNIT_ASSERT_EQUAL(lengthScale, friction._normalizer->lengthScale());
+
+ PYLITH_METHOD_END;
} // testNormalizer
// ----------------------------------------------------------------------
@@ -126,6 +146,8 @@
void
pylith::friction::TestFrictionModel::testInitialize(void)
{ // testInitialize
+ PYLITH_METHOD_BEGIN;
+
topology::Mesh mesh;
faults::FaultCohesiveDyn fault;
StaticFriction friction;
@@ -169,6 +191,8 @@
// Test vertex array sizes.
size_t size = data.numPropsVertex + data.numVarsVertex;
CPPUNIT_ASSERT_EQUAL(size, friction._propsStateVarsVertex.size());
+
+ PYLITH_METHOD_END;
} // testInitialize
// ----------------------------------------------------------------------
@@ -176,6 +200,8 @@
void
pylith::friction::TestFrictionModel::testGetField(void)
{ // testGetField
+ PYLITH_METHOD_BEGIN;
+
const PylithScalar fieldE[] = { 0.6, 0.4 };
const int fiberDim = 1;
@@ -206,6 +232,8 @@
else
CPPUNIT_ASSERT_DOUBLES_EQUAL(fieldE[index], frictionArray[off+i], tolerance);
} // for
+
+ PYLITH_METHOD_END;
} // testGetField
// ----------------------------------------------------------------------
@@ -213,6 +241,8 @@
void
pylith::friction::TestFrictionModel::testRetrievePropsStateVars(void)
{ // testRetrievePropsStateVars
+ PYLITH_METHOD_BEGIN;
+
topology::Mesh mesh;
faults::FaultCohesiveDyn fault;
StaticFriction friction;
@@ -255,6 +285,8 @@
else
CPPUNIT_ASSERT_DOUBLES_EQUAL(stateVarsE[i], fieldsVertex[index++],
tolerance);
+
+ PYLITH_METHOD_END;
} // testRetrievePropsStateVars
// ----------------------------------------------------------------------
@@ -262,6 +294,8 @@
void
pylith::friction::TestFrictionModel::testCalcFriction(void)
{ // testCalcFriction
+ PYLITH_METHOD_BEGIN;
+
topology::Mesh mesh;
faults::FaultCohesiveDyn fault;
StaticFriction friction;
@@ -287,6 +321,8 @@
} else {
CPPUNIT_ASSERT_DOUBLES_EQUAL(frictionE, frictionV, tolerance);
} // if/else
+
+ PYLITH_METHOD_END;
} // testCalcFriction
// ----------------------------------------------------------------------
@@ -294,6 +330,8 @@
void
pylith::friction::TestFrictionModel::testUpdateStateVars(void)
{ // testUpdateStateVars
+ PYLITH_METHOD_BEGIN;
+
{ // Test with friction model without state variables
topology::Mesh mesh;
faults::FaultCohesiveDyn fault;
@@ -374,6 +412,7 @@
}
} // Test with friction model with state variables (slip weakening)
+ PYLITH_METHOD_END;
} // testUpdateStateVars
// ----------------------------------------------------------------------
@@ -381,8 +420,12 @@
void
pylith::friction::TestFrictionModel::setUp(void)
{ // setUp
+ PYLITH_METHOD_BEGIN;
+
_friction = 0;
_data = 0;
+
+ PYLITH_METHOD_END;
} // setUp
// ----------------------------------------------------------------------
@@ -390,8 +433,12 @@
void
pylith::friction::TestFrictionModel::tearDown(void)
{ // tearDown
+ PYLITH_METHOD_BEGIN;
+
delete _friction; _friction = 0;
delete _data; _data = 0;
+
+ PYLITH_METHOD_END;
} // tearDown
// ----------------------------------------------------------------------
@@ -399,6 +446,8 @@
void
pylith::friction::TestFrictionModel::testDBToProperties(void)
{ // testDBToProperties
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -437,6 +486,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // testDBToProperties
// ----------------------------------------------------------------------
@@ -444,6 +495,8 @@
void
pylith::friction::TestFrictionModel::testNonDimProperties(void)
{ // testNonDimProperties
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -472,6 +525,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // testNonDimProperties
// ----------------------------------------------------------------------
@@ -479,6 +534,8 @@
void
pylith::friction::TestFrictionModel::testDimProperties(void)
{ // testDimProperties
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -505,6 +562,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // testDimProperties
// ----------------------------------------------------------------------
@@ -512,6 +571,8 @@
void
pylith::friction::TestFrictionModel::testDBToStateVars(void)
{ // testDBToStateVars
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -553,6 +614,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // testDBToStateVars
// ----------------------------------------------------------------------
@@ -560,6 +623,8 @@
void
pylith::friction::TestFrictionModel::testNonDimStateVars(void)
{ // testNonDimStateVars
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -588,6 +653,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // testNonDimStateVars
// ----------------------------------------------------------------------
@@ -595,6 +662,8 @@
void
pylith::friction::TestFrictionModel::testDimStateVars(void)
{ // testDimStateVars
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -623,6 +692,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // testDimStateVars
// ----------------------------------------------------------------------
@@ -630,6 +701,8 @@
void
pylith::friction::TestFrictionModel::test_calcFriction(void)
{ // _testCalcFriction
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -665,6 +738,8 @@
else
CPPUNIT_ASSERT_DOUBLES_EQUAL(frictionE, friction, tolerance);
} // for
+
+ PYLITH_METHOD_END;
} // _testCalcFriction
// ----------------------------------------------------------------------
@@ -672,6 +747,8 @@
void
pylith::friction::TestFrictionModel::test_updateStateVars(void)
{ // test_updateStateVars
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(_friction);
CPPUNIT_ASSERT(_data);
@@ -719,6 +796,8 @@
tolerance);
} // for
} // for
+
+ PYLITH_METHOD_END;
} // test_updateStateVars
// ----------------------------------------------------------------------
@@ -726,12 +805,16 @@
void
pylith::friction::TestFrictionModel::setupNormalizer(void)
{ // setupNormalizer
+ PYLITH_METHOD_BEGIN;
+
spatialdata::units::Nondimensional normalizer;
normalizer.lengthScale(_data->lengthScale);
normalizer.pressureScale(_data->pressureScale);
normalizer.timeScale(_data->timeScale);
normalizer.densityScale(_data->densityScale);
_friction->normalizer(normalizer);
+
+ PYLITH_METHOD_END;
} // setupNormalizer
// ----------------------------------------------------------------------
@@ -742,6 +825,8 @@
StaticFriction* friction,
const StaticFrictionData* data)
{ // _initialize
+ PYLITH_METHOD_BEGIN;
+
CPPUNIT_ASSERT(mesh);
CPPUNIT_ASSERT(fault);
CPPUNIT_ASSERT(friction);
@@ -812,6 +897,8 @@
const PylithScalar upDir[3] = { 0.0, 0.0, 1.0 };
fault->initialize(*mesh, upDir);
fault->verifyConfiguration(*mesh);
+
+ PYLITH_METHOD_END;
} // _initialize
More information about the CIG-COMMITS
mailing list