[cig-commits] r15137 - in short/3D/PyLith/trunk: libsrc/bc unittests/libtests/bc unittests/libtests/bc/data
brad at geodynamics.org
brad at geodynamics.org
Sun Jun 7 21:40:32 PDT 2009
Author: brad
Date: 2009-06-07 21:40:31 -0700 (Sun, 07 Jun 2009)
New Revision: 15137
Added:
short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.timedb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_change.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_rate.spatialdb
Modified:
short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc
short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh
short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc
short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb
Log:
More time dependent boundary condition unit tests.
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc 2009-06-08 04:40:31 UTC (rev 15137)
@@ -26,9 +26,7 @@
pylith::bc::TimeDependent::TimeDependent(void) :
_dbInitial(0),
_dbRate(0),
- _dbRateTime(0),
_dbChange(0),
- _dbChangeTime(0),
_dbTimeHistory(0)
{ // constructor
} // constructor
@@ -37,14 +35,14 @@
// Destructor.
pylith::bc::TimeDependent::~TimeDependent(void)
{ // destructor
+#if 0
if (0 != _dbTimeHistory)
_dbTimeHistory->close();
+#endif
_dbInitial = 0; // TODO: Use shared pointers
_dbRate = 0; // TODO: Use shared pointers
- _dbRateTime = 0; // TODO: Use shared pointers
_dbChange = 0; // TODO: Use shared pointers
- _dbChangeTime = 0; // TODO: Use shared pointers
_dbTimeHistory = 0; // TODO: Use shared pointers
} // destructor
@@ -67,35 +65,6 @@
void
pylith::bc::TimeDependent::verifyConfiguration(const topology::Mesh& mesh) const
{ // verifyConfiguration
- if (0 != _dbRate && 0 == _dbRateTime) {
- std::ostringstream msg;
- msg << "Time dependent boundary condition '" << _getLabel() << "',\n has a rate "
- << "of change spatial database but no rate of change start time "
- << "spatial database.";
- throw std::runtime_error(msg.str());
- } // if
- if (0 == _dbRate && 0 != _dbRateTime) {
- std::ostringstream msg;
- msg << "Time dependent boundary condition '" << _getLabel() << "',\n has a rate "
- << "of change start time spatial database but no rate of change "
- << "spatial database.";
- throw std::runtime_error(msg.str());
- } // if
-
- if (0 != _dbChange && 0 == _dbChangeTime) {
- std::ostringstream msg;
- msg << "Time dependent boundary condition '" << _getLabel() << "',\n has a "
- << "change in value spatial database but change in value start time "
- << "spatial database.";
- throw std::runtime_error(msg.str());
- } // if
- if (0 == _dbChange && 0 != _dbChangeTime) {
- std::ostringstream msg;
- msg << "Time dependent boundary condition '" << _getLabel() << "',\n has a "
- << "change in value start time spatial database but change in value "
- << "spatial database.";
- throw std::runtime_error(msg.str());
- } // if
if (0 == _dbChange && 0 != _dbTimeHistory) {
std::ostringstream msg;
msg << "Time dependent boundary condition '" << _getLabel() << "',\n has a "
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh 2009-06-08 04:40:31 UTC (rev 15137)
@@ -65,24 +65,12 @@
*/
void dbRate(spatialdata::spatialdb::SpatialDB* const db);
- /** Set database for start time of rate change.
- *
- * @param db Spatial database
- */
- void dbRateTime(spatialdata::spatialdb::SpatialDB* const db);
-
/** Set database for change in values.
*
* @param db Spatial database
*/
void dbChange(spatialdata::spatialdb::SpatialDB* const db);
- /** Set database for start time of change in values.
- *
- * @param db Spatial database
- */
- void dbChangeTime(spatialdata::spatialdb::SpatialDB* const db);
-
/** Set database for temporal evolution of change in value.
*
* @param db Time history database.
@@ -122,15 +110,9 @@
/// Spatial database for rate of change of values.
spatialdata::spatialdb::SpatialDB* _dbRate;
- /// Spatial database for start time of rate change.
- spatialdata::spatialdb::SpatialDB* _dbRateTime;
-
/// Spatial database for change in value.
spatialdata::spatialdb::SpatialDB* _dbChange;
- /// Spatial database for start time of change in value.
- spatialdata::spatialdb::SpatialDB* _dbChangeTime;
-
/// Temporal evolution of amplitude for change in value;
spatialdata::spatialdb::TimeHistory* _dbTimeHistory;
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc 2009-06-08 04:40:31 UTC (rev 15137)
@@ -28,13 +28,6 @@
_dbRate = db;
}
-// Set database for start time of rate change.
-inline
-void
-pylith::bc::TimeDependent::dbRateTime(spatialdata::spatialdb::SpatialDB* const db) {
- _dbRateTime = db;
-}
-
// Set database for change in values.
inline
void
@@ -42,13 +35,6 @@
_dbChange = db;
}
-// Set database for start time of change in values.
-inline
-void
-pylith::bc::TimeDependent::dbChangeTime(spatialdata::spatialdb::SpatialDB* const db) {
- _dbChangeTime = db;
-}
-
// Set database for temporal evolution of change in value.
inline
void
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-08 04:40:31 UTC (rev 15137)
@@ -110,7 +110,7 @@
_parameters->get("rate");
rate.newSection(_points, numBCDOF);
rate.allocate();
- rate.scale(valueScale);
+ rate.scale(rateScale);
rate.vectorFieldType(topology::FieldBase::OTHER);
const ALE::Obj<RealSection>& rateSection = rate.section();
assert(!rateSection.isNull());
@@ -118,7 +118,6 @@
_dbRate->open();
_dbRate->queryVals(rateNames, numBCDOF);
_queryDB(&rate, _dbRate, numBCDOF, rateScale);
- _dbRate->close();
std::string timeLabel =
std::string("rate_time_") + std::string(fieldName);
@@ -131,10 +130,9 @@
rateTime.vectorFieldType(topology::FieldBase::SCALAR);
const char* timeNames[1] = { "rate-start-time" };
- _dbRateTime->open();
- _dbRateTime->queryVals(timeNames, 1);
- _queryDB(&rateTime, _dbRateTime, 1, timeScale);
- _dbRateTime->close();
+ _dbRate->queryVals(timeNames, 1);
+ _queryDB(&rateTime, _dbRate, 1, timeScale);
+ _dbRate->close();
} // if
if (0 != _dbChange) { // Setup change of values, if provided.
@@ -152,7 +150,6 @@
_dbChange->open();
_dbChange->queryVals(valueNames, numBCDOF);
_queryDB(&change, _dbChange, numBCDOF, valueScale);
- _dbChange->close();
std::string timeLabel =
std::string("change_time_") + std::string(fieldName);
@@ -165,10 +162,9 @@
changeTime.vectorFieldType(topology::FieldBase::SCALAR);
const char* timeNames[1] = { "change-start-time" };
- _dbChangeTime->open();
- _dbChangeTime->queryVals(timeNames, 1);
- _queryDB(&changeTime, _dbChangeTime, 1, timeScale);
- _dbChangeTime->close();
+ _dbChange->queryVals(timeNames, 1);
+ _queryDB(&changeTime, _dbChange, 1, timeScale);
+ _dbChange->close();
if (0 != _dbTimeHistory)
_dbTimeHistory->open();
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2009-06-08 04:40:31 UTC (rev 15137)
@@ -24,6 +24,7 @@
TestBoundaryCondition.cc \
TestBoundaryConditionPoints.cc \
TestTimeDependent.cc \
+ TestTimeDependentPoints.cc \
TestBoundaryMesh.cc \
TestBoundaryMeshTri3.cc \
TestBoundaryMeshQuad4.cc \
@@ -69,6 +70,7 @@
TestBoundaryCondition.hh \
TestBoundaryConditionPoints.hh \
TestTimeDependent.hh \
+ TestTimeDependentPoints.hh \
TestBoundaryMesh.hh \
TestBoundaryMeshTri3.hh \
TestBoundaryMeshQuad4.hh \
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc 2009-06-08 04:40:31 UTC (rev 15137)
@@ -60,7 +60,7 @@
} // testConstructor
// ----------------------------------------------------------------------
-// Test constructor.
+// Test normalizer.
void
pylith::bc::TestPointForce::testNormalizer(void)
{ // testNormalizer
@@ -215,28 +215,25 @@
spatialdata::spatialdb::UniformDB dbRate("TestPointForce rate");
{ // rate db
- const int numValues = 3;
- const char* names[numValues] = { "force-rate-x", "force-rate-y", "force-rate-z" };
+ const int numValues = 4;
+ const char* names[numValues] = {
+ "force-rate-x",
+ "force-rate-y",
+ "force-rate-z",
+ "rate-start-time",
+ };
const double values[numValues] = { _data->forceRate,
_data->forceRate,
- _data->forceRate };
+ _data->forceRate,
+ _data->tRef};
dbRate.setData(names, values, numValues);
} // rate db
- spatialdata::spatialdb::UniformDB dbRateTime("TestPointForce rate time");
- { // rate time db
- const int numValues = 1;
- const char* names[numValues] = { "rate-start-time" };
- const double values[numValues] = { _data->tRef };
- dbRateTime.setData(names, values, numValues);
- } // rate time db
-
const double upDir[] = { 0.0, 0.0, 1.0 };
bc->label(_data->label);
bc->dbInitial(&dbInitial);
bc->dbRate(&dbRate);
- bc->dbRateTime(&dbRateTime);
bc->bcDOF(_data->forceDOF, _data->numForceDOF);
bc->initialize(*mesh, upDir);
} // _initialize
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc 2009-06-08 04:40:31 UTC (rev 15137)
@@ -51,9 +51,7 @@
CPPUNIT_ASSERT(0 != bc._dbInitial);
CPPUNIT_ASSERT(0 == bc._dbRate);
- CPPUNIT_ASSERT(0 == bc._dbRateTime);
CPPUNIT_ASSERT(0 == bc._dbChange);
- CPPUNIT_ASSERT(0 == bc._dbChangeTime);
CPPUNIT_ASSERT(0 == bc._dbTimeHistory);
} // testDBInitial
@@ -69,31 +67,11 @@
CPPUNIT_ASSERT(0 == bc._dbInitial);
CPPUNIT_ASSERT(0 != bc._dbRate);
- CPPUNIT_ASSERT(0 == bc._dbRateTime);
CPPUNIT_ASSERT(0 == bc._dbChange);
- CPPUNIT_ASSERT(0 == bc._dbChangeTime);
CPPUNIT_ASSERT(0 == bc._dbTimeHistory);
} // testDBRate
// ----------------------------------------------------------------------
-// Test dbRateTime().
-void
-pylith::bc::TestTimeDependent::testDBRateTime(void)
-{ // testDBRateTime
- PointForce bc;
-
- spatialdata::spatialdb::UniformDB db;
- bc.dbRateTime(&db);
-
- CPPUNIT_ASSERT(0 == bc._dbInitial);
- CPPUNIT_ASSERT(0 == bc._dbRate);
- CPPUNIT_ASSERT(0 != bc._dbRateTime);
- CPPUNIT_ASSERT(0 == bc._dbChange);
- CPPUNIT_ASSERT(0 == bc._dbChangeTime);
- CPPUNIT_ASSERT(0 == bc._dbTimeHistory);
-} // testDBRateTime
-
-// ----------------------------------------------------------------------
// Test dbChange().
void
pylith::bc::TestTimeDependent::testDBChange(void)
@@ -105,31 +83,11 @@
CPPUNIT_ASSERT(0 == bc._dbInitial);
CPPUNIT_ASSERT(0 == bc._dbRate);
- CPPUNIT_ASSERT(0 == bc._dbRateTime);
CPPUNIT_ASSERT(0 != bc._dbChange);
- CPPUNIT_ASSERT(0 == bc._dbChangeTime);
CPPUNIT_ASSERT(0 == bc._dbTimeHistory);
} // testDBChange
// ----------------------------------------------------------------------
-// Test dbChangeTime().
-void
-pylith::bc::TestTimeDependent::testDBChangeTime(void)
-{ // testDBChangeTime
- PointForce bc;
-
- spatialdata::spatialdb::UniformDB db;
- bc.dbChangeTime(&db);
-
- CPPUNIT_ASSERT(0 == bc._dbInitial);
- CPPUNIT_ASSERT(0 == bc._dbRate);
- CPPUNIT_ASSERT(0 == bc._dbRateTime);
- CPPUNIT_ASSERT(0 == bc._dbChange);
- CPPUNIT_ASSERT(0 != bc._dbChangeTime);
- CPPUNIT_ASSERT(0 == bc._dbTimeHistory);
-} // testDBChangeTime
-
-// ----------------------------------------------------------------------
// Test dbTimeHistory().
void
pylith::bc::TestTimeDependent::testDBTimeHistory(void)
@@ -141,9 +99,7 @@
CPPUNIT_ASSERT(0 == bc._dbInitial);
CPPUNIT_ASSERT(0 == bc._dbRate);
- CPPUNIT_ASSERT(0 == bc._dbRateTime);
CPPUNIT_ASSERT(0 == bc._dbChange);
- CPPUNIT_ASSERT(0 == bc._dbChangeTime);
CPPUNIT_ASSERT(0 != bc._dbTimeHistory);
} // testDBTimeHistory
@@ -165,94 +121,19 @@
{ // rate
PointForce bc;
bc.dbRate(&db);
- bc.dbRateTime(&db);
bc.TimeDependent::verifyConfiguration(mesh);
} // rate
{ // change
PointForce bc;
bc.dbChange(&db);
- bc.dbChangeTime(&db);
bc.dbTimeHistory(&th);
bc.TimeDependent::verifyConfiguration(mesh);
} // change
- { // change
- PointForce bc;
- bc.dbChange(&db);
- bc.dbChangeTime(&db);
- bc.TimeDependent::verifyConfiguration(mesh);
- } // change
-
- { // rate (missing start time)
- PointForce bc;
- bc.dbRate(&db);
-
- bool caught = false;
- try {
- bc.TimeDependent::verifyConfiguration(mesh);
- } catch ( const std::exception& err) {
- caught = true;
- } // catch
- CPPUNIT_ASSERT(caught);
- } // rate (missing start time)
-
- { // rate (missing rate)
- PointForce bc;
- bc.dbRateTime(&db);
-
- bool caught = false;
- try {
- bc.TimeDependent::verifyConfiguration(mesh);
- } catch ( const std::exception& err) {
- caught = true;
- } // catch
- CPPUNIT_ASSERT(caught);
- } // rate (missing rate)
-
- { // change (missing start time)
- PointForce bc;
- bc.dbChange(&db);
-
- bool caught = false;
- try {
- bc.TimeDependent::verifyConfiguration(mesh);
- } catch ( const std::exception& err) {
- caught = true;
- } // catch
- CPPUNIT_ASSERT(caught);
- } // change (missing start time)
-
{ // change (missing change)
PointForce bc;
- bc.dbChangeTime(&db);
-
- bool caught = false;
- try {
- bc.TimeDependent::verifyConfiguration(mesh);
- } catch ( const std::exception& err) {
- caught = true;
- } // catch
- CPPUNIT_ASSERT(caught);
- } // change (missing change)
-
- { // change (missing start time)
- PointForce bc;
- bc.dbChange(&db);
-
- bool caught = false;
- try {
- bc.TimeDependent::verifyConfiguration(mesh);
- } catch ( const std::exception& err) {
- caught = true;
- } // catch
- CPPUNIT_ASSERT(caught);
- } // change (missing start time)
-
- { // change (missing change)
- PointForce bc;
bc.dbTimeHistory(&th);
- bc.dbChangeTime(&db);
bool caught = false;
try {
@@ -263,20 +144,6 @@
CPPUNIT_ASSERT(caught);
} // change (missing change)
- { // change (missing start time)
- PointForce bc;
- bc.dbTimeHistory(&th);
- bc.dbChange(&db);
-
- bool caught = false;
- try {
- bc.TimeDependent::verifyConfiguration(mesh);
- } catch ( const std::exception& err) {
- caught = true;
- } // catch
- CPPUNIT_ASSERT(caught);
- } // change (missing start time)
-
} // testVerifyConfiguration
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh 2009-06-08 04:40:31 UTC (rev 15137)
@@ -40,9 +40,7 @@
CPPUNIT_TEST( testBCDOF );
CPPUNIT_TEST( testDBInitial );
CPPUNIT_TEST( testDBRate );
- CPPUNIT_TEST( testDBRateTime );
CPPUNIT_TEST( testDBChange );
- CPPUNIT_TEST( testDBChangeTime );
CPPUNIT_TEST( testDBTimeHistory );
CPPUNIT_TEST( testVerifyConfiguration );
@@ -60,15 +58,9 @@
/// Test dbRate().
void testDBRate(void);
- /// Test dbRateTime().
- void testDBRateTime(void);
-
/// Test dbChange().
void testDBChange(void);
- /// Test dbChangeTime().
- void testDBChangeTime(void);
-
/// Test dbTimeHistory().
void testDBTimeHistory(void);
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.cc 2009-06-08 04:40:31 UTC (rev 15137)
@@ -0,0 +1,504 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestTimeDependentPoints.hh" // Implementation of class methods
+
+#include "pylith/bc/PointForce.hh" // USES PointForce
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
+#include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestTimeDependentPoints );
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+
+// ----------------------------------------------------------------------
+namespace pylith {
+ namespace bc {
+ namespace _TestTimeDependentPoints {
+ const double pressureScale = 4.0;
+ const double lengthScale = 1.5;
+ const double timeScale = 0.5;
+ const int npointsIn = 2;
+ const int pointsIn[npointsIn] = { 3, 5, };
+ const int npointsOut = 2;
+ const int pointsOut[npointsOut] = { 2, 4, };
+
+ const int numBCDOF = 2;
+ const int bcDOF[numBCDOF] = { 1, 0 };
+ const double initial[npointsIn*numBCDOF] = {
+ 0.3, 0.4,
+ 0.7, 0.6,
+ };
+ const double rate[npointsIn*numBCDOF] = {
+ -0.2, -0.1,
+ 0.4, 0.3,
+ };
+ const double rateTime[npointsIn] = {
+ 0.5,
+ 0.8,
+ };
+ const double change[npointsIn*numBCDOF] = {
+ 1.3, 1.4,
+ 1.7, 1.6,
+ };
+ const double changeTime[npointsIn] = {
+ 2.0,
+ 2.4,
+ };
+
+ const double tValue = 2.2;
+ const double valuesRate[npointsIn*numBCDOF] = {
+ -0.34, -0.17,
+ 0.56, 0.42,
+ };
+ const double valuesChange[npointsIn*numBCDOF] = {
+ 1.3, 1.4,
+ 0.0, 0.0,
+ };
+ const double valuesChangeTH[npointsIn*numBCDOF] = {
+ 1.3*0.98, 1.4*0.98,
+ 0.0, 0.0,
+ };
+
+ // Check values in section against expected values.
+ static
+ void _checkValues(const double* valuesE,
+ const int fiberDimE,
+ const ALE::Obj<RealSection>& section,
+ const double scale);
+ } // _TestTimeDependentPoints
+ } // bc
+} // pylith
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestTimeDependentPoints::setUp(void)
+{ // setUp
+ const char* filename = "data/tri3.mesh";
+
+ _mesh = new topology::Mesh();
+ meshio::MeshIOAscii iohandler;
+ iohandler.filename(filename);
+ iohandler.read(_mesh);
+
+ spatialdata::geocoords::CSCart cs;
+ cs.setSpaceDim(_mesh->dimension());
+ cs.initialize();
+ _mesh->coordsys(&cs);
+
+ spatialdata::units::Nondimensional normalizer;
+ normalizer.pressureScale(_TestTimeDependentPoints::pressureScale);
+ normalizer.lengthScale(_TestTimeDependentPoints::lengthScale);
+ normalizer.timeScale(_TestTimeDependentPoints::timeScale);
+ _mesh->nondimensionalize(normalizer);
+
+ _bc = new PointForce();
+ _bc->label("bc");
+ _bc->normalizer(normalizer);
+ _bc->bcDOF(_TestTimeDependentPoints::bcDOF, _TestTimeDependentPoints::numBCDOF);
+ _bc->_getPoints(*_mesh);
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestTimeDependentPoints::tearDown(void)
+{ // tearDown
+ delete _mesh; _mesh = 0;
+ delete _bc; _bc = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test _getLabel().
+void
+pylith::bc::TestTimeDependentPoints::testGetLabel(void)
+{ // testGetLabel
+ PointForce bc;
+
+ const std::string& label = "point force";
+ bc.label(label.c_str());
+ CPPUNIT_ASSERT_EQUAL(label, std::string(bc._getLabel()));
+} // testGetLabel
+
+// ----------------------------------------------------------------------
+// Test _queryDB().
+void
+pylith::bc::TestTimeDependentPoints::testQueryDB(void)
+{ // testQueryDB
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbInitial("TestTimeDependentPoints _queryDB");
+ spatialdata::spatialdb::SimpleIOAscii dbInitialIO;
+ dbInitialIO.filename("data/tri3_force.spatialdb");
+ dbInitial.ioHandler(&dbInitialIO);
+ dbInitial.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ const double scale = 2.0;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ const char* queryVals[numBCDOF] = { "force-y", "force-x" };
+
+ topology::Field<topology::Mesh> initial(*_mesh);
+ initial.newSection(_bc->_points, numBCDOF);
+ initial.allocate();
+ initial.zero();
+
+ dbInitial.open();
+ dbInitial.queryVals(queryVals, numBCDOF);
+ _bc->_queryDB(&initial, &dbInitial, numBCDOF, scale);
+ dbInitial.close();
+
+ const ALE::Obj<RealSection>& initialSection = initial.section();
+ CPPUNIT_ASSERT(!initialSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::initial,
+ numBCDOF, initialSection, scale);
+} // testQueryDB
+
+// ----------------------------------------------------------------------
+// Test _queryDatabases().
+void
+pylith::bc::TestTimeDependentPoints::testQueryDatabases(void)
+{ // testQueryDatabases
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbInitial("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbInitialIO;
+ dbInitialIO.filename("data/tri3_force.spatialdb");
+ dbInitial.ioHandler(&dbInitialIO);
+ dbInitial.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::SimpleDB dbRate("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbRateIO;
+ dbRateIO.filename("data/tri3_force_rate.spatialdb");
+ dbRate.ioHandler(&dbRateIO);
+ dbRate.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::SimpleDB dbChange("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbChangeIO;
+ dbChangeIO.filename("data/tri3_force_change.spatialdb");
+ dbChange.ioHandler(&dbChangeIO);
+ dbChange.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::TimeHistory th("TestTimeDependentPoints _queryDatabases");
+ th.filename("data/tri3_force.timedb");
+
+ _bc->dbInitial(&dbInitial);
+ _bc->dbRate(&dbRate);
+ _bc->dbChange(&dbChange);
+ _bc->dbTimeHistory(&th);
+
+ const double pressureScale = _TestTimeDependentPoints::pressureScale;
+ const double lengthScale = _TestTimeDependentPoints::lengthScale;
+ const double timeScale = _TestTimeDependentPoints::timeScale;
+ const double forceScale = pressureScale * lengthScale * lengthScale;
+ const char* fieldName = "force";
+ _bc->_queryDatabases(*_mesh, forceScale, fieldName);
+
+ const double tolerance = 1.0e-06;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ CPPUNIT_ASSERT(0 != _bc->_parameters);
+
+ // Check initial values.
+ const ALE::Obj<RealSection>& initialSection =
+ _bc->_parameters->get("initial").section();
+ CPPUNIT_ASSERT(!initialSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::initial,
+ numBCDOF, initialSection, forceScale);
+
+ // Check rate values.
+ const ALE::Obj<RealSection>& rateSection =
+ _bc->_parameters->get("rate").section();
+ CPPUNIT_ASSERT(!rateSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::rate,
+ numBCDOF, rateSection, forceScale/timeScale);
+
+ // Check rate start time.
+ const ALE::Obj<RealSection>& rateTimeSection =
+ _bc->_parameters->get("rate time").section();
+ CPPUNIT_ASSERT(!rateTimeSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::rateTime,
+ 1, rateTimeSection, timeScale);
+
+ // Check change values.
+ const ALE::Obj<RealSection>& changeSection =
+ _bc->_parameters->get("change").section();
+ CPPUNIT_ASSERT(!changeSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::change,
+ numBCDOF, changeSection, forceScale);
+
+ // Check change start time.
+ const ALE::Obj<RealSection>& changeTimeSection =
+ _bc->_parameters->get("change time").section();
+ CPPUNIT_ASSERT(!changeTimeSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::changeTime,
+ 1, changeTimeSection, timeScale);
+} // testQueryDatabases
+
+// ----------------------------------------------------------------------
+// Test _calculateValue() with initial value.
+void
+pylith::bc::TestTimeDependentPoints::testCalculateValueInitial(void)
+{ // testCalculateValueInitial
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbInitial("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbInitialIO;
+ dbInitialIO.filename("data/tri3_force.spatialdb");
+ dbInitial.ioHandler(&dbInitialIO);
+ dbInitial.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ _bc->dbInitial(&dbInitial);
+
+ const double pressureScale = _TestTimeDependentPoints::pressureScale;
+ const double lengthScale = _TestTimeDependentPoints::lengthScale;
+ const double timeScale = _TestTimeDependentPoints::timeScale;
+ const double forceScale = pressureScale * lengthScale * lengthScale;
+ const char* fieldName = "force";
+ _bc->_queryDatabases(*_mesh, forceScale, fieldName);
+ _bc->_calculateValue(_TestTimeDependentPoints::tValue/timeScale);
+
+ const double tolerance = 1.0e-06;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ CPPUNIT_ASSERT(0 != _bc->_parameters);
+
+ // Check values.
+ const ALE::Obj<RealSection>& valueSection =
+ _bc->_parameters->get("value").section();
+ CPPUNIT_ASSERT(!valueSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::initial,
+ numBCDOF, valueSection, forceScale);
+} // testCalculateValueInitial
+
+// ----------------------------------------------------------------------
+// Test _calculateValue() with rate.
+void
+pylith::bc::TestTimeDependentPoints::testCalculateValueRate(void)
+{ // testCalculateValueRate
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbRate("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbRateIO;
+ dbRateIO.filename("data/tri3_force_rate.spatialdb");
+ dbRate.ioHandler(&dbRateIO);
+ dbRate.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ _bc->dbRate(&dbRate);
+
+ const double pressureScale = _TestTimeDependentPoints::pressureScale;
+ const double lengthScale = _TestTimeDependentPoints::lengthScale;
+ const double timeScale = _TestTimeDependentPoints::timeScale;
+ const double forceScale = pressureScale * lengthScale * lengthScale;
+ const char* fieldName = "force";
+ _bc->_queryDatabases(*_mesh, forceScale, fieldName);
+ _bc->_calculateValue(_TestTimeDependentPoints::tValue/timeScale);
+
+ const double tolerance = 1.0e-06;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ CPPUNIT_ASSERT(0 != _bc->_parameters);
+
+ // Check values.
+ const ALE::Obj<RealSection>& valueSection =
+ _bc->_parameters->get("value").section();
+ CPPUNIT_ASSERT(!valueSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::valuesRate,
+ numBCDOF, valueSection, forceScale);
+} // testCalculateValueRate
+
+// ----------------------------------------------------------------------
+// Test _calculateValue() with temporal change.
+void
+pylith::bc::TestTimeDependentPoints::testCalculateValueChange(void)
+{ // testCalculateValueChange
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbChange("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbChangeIO;
+ dbChangeIO.filename("data/tri3_force_change.spatialdb");
+ dbChange.ioHandler(&dbChangeIO);
+ dbChange.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ _bc->dbChange(&dbChange);
+
+ const double pressureScale = _TestTimeDependentPoints::pressureScale;
+ const double lengthScale = _TestTimeDependentPoints::lengthScale;
+ const double timeScale = _TestTimeDependentPoints::timeScale;
+ const double forceScale = pressureScale * lengthScale * lengthScale;
+ const char* fieldName = "force";
+ _bc->_queryDatabases(*_mesh, forceScale, fieldName);
+ _bc->_calculateValue(_TestTimeDependentPoints::tValue/timeScale);
+
+ const double tolerance = 1.0e-06;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ CPPUNIT_ASSERT(0 != _bc->_parameters);
+
+ // Check values.
+ const ALE::Obj<RealSection>& valueSection =
+ _bc->_parameters->get("value").section();
+ CPPUNIT_ASSERT(!valueSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::valuesChange,
+ numBCDOF, valueSection, forceScale);
+} // testCalculateValueChange
+
+// ----------------------------------------------------------------------
+// Test _calculateValue() with temporal change w/time history.
+void
+pylith::bc::TestTimeDependentPoints::testCalculateValueChangeTH(void)
+{ // testCalculateValueChangeTH
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbChange("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbChangeIO;
+ dbChangeIO.filename("data/tri3_force_change.spatialdb");
+ dbChange.ioHandler(&dbChangeIO);
+ dbChange.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::TimeHistory th("TestTimeDependentPoints _queryDatabases");
+ th.filename("data/tri3_force.timedb");
+
+ _bc->dbChange(&dbChange);
+ _bc->dbTimeHistory(&th);
+
+ const double pressureScale = _TestTimeDependentPoints::pressureScale;
+ const double lengthScale = _TestTimeDependentPoints::lengthScale;
+ const double timeScale = _TestTimeDependentPoints::timeScale;
+ const double forceScale = pressureScale * lengthScale * lengthScale;
+ const char* fieldName = "force";
+ _bc->_queryDatabases(*_mesh, forceScale, fieldName);
+ _bc->_calculateValue(_TestTimeDependentPoints::tValue/timeScale);
+
+ const double tolerance = 1.0e-06;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ CPPUNIT_ASSERT(0 != _bc->_parameters);
+
+ // Check values.
+ const ALE::Obj<RealSection>& valueSection =
+ _bc->_parameters->get("value").section();
+ CPPUNIT_ASSERT(!valueSection.isNull());
+ _TestTimeDependentPoints::_checkValues(_TestTimeDependentPoints::valuesChangeTH,
+ numBCDOF, valueSection, forceScale);
+} // testCalculateValueChangeTH
+
+// ----------------------------------------------------------------------
+// Test _calculateValue() with initial, rate, and temporal change w/time history.
+void
+pylith::bc::TestTimeDependentPoints::testCalculateValueAll(void)
+{ // testCalculateValueAll
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _bc);
+
+ spatialdata::spatialdb::SimpleDB dbInitial("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbInitialIO;
+ dbInitialIO.filename("data/tri3_force.spatialdb");
+ dbInitial.ioHandler(&dbInitialIO);
+ dbInitial.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::SimpleDB dbRate("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbRateIO;
+ dbRateIO.filename("data/tri3_force_rate.spatialdb");
+ dbRate.ioHandler(&dbRateIO);
+ dbRate.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::SimpleDB dbChange("TestTimeDependentPoints _queryDatabases");
+ spatialdata::spatialdb::SimpleIOAscii dbChangeIO;
+ dbChangeIO.filename("data/tri3_force_change.spatialdb");
+ dbChange.ioHandler(&dbChangeIO);
+ dbChange.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ spatialdata::spatialdb::TimeHistory th("TestTimeDependentPoints _queryDatabases");
+ th.filename("data/tri3_force.timedb");
+
+ _bc->dbInitial(&dbInitial);
+ _bc->dbRate(&dbRate);
+ _bc->dbChange(&dbChange);
+ _bc->dbTimeHistory(&th);
+
+ const double pressureScale = _TestTimeDependentPoints::pressureScale;
+ const double lengthScale = _TestTimeDependentPoints::lengthScale;
+ const double timeScale = _TestTimeDependentPoints::timeScale;
+ const double forceScale = pressureScale * lengthScale * lengthScale;
+ const char* fieldName = "force";
+ _bc->_queryDatabases(*_mesh, forceScale, fieldName);
+ _bc->_calculateValue(_TestTimeDependentPoints::tValue/timeScale);
+
+ const double tolerance = 1.0e-06;
+ const int numBCDOF = _TestTimeDependentPoints::numBCDOF;
+ CPPUNIT_ASSERT(0 != _bc->_parameters);
+
+ // Check values.
+ const int npoints = _TestTimeDependentPoints::npointsIn;
+ double_array valuesE(npoints*numBCDOF);
+ for (int i=0; i < valuesE.size(); ++i)
+ valuesE[i] =
+ _TestTimeDependentPoints::initial[i] +
+ _TestTimeDependentPoints::valuesRate[i] +
+ _TestTimeDependentPoints::valuesChangeTH[i];
+
+ const ALE::Obj<RealSection>& valueSection =
+ _bc->_parameters->get("value").section();
+ CPPUNIT_ASSERT(!valueSection.isNull());
+ _TestTimeDependentPoints::_checkValues(&valuesE[0],
+ numBCDOF, valueSection, forceScale);
+} // testCalculateValueAll
+
+// ----------------------------------------------------------------------
+// Check values in section against expected values.
+void
+pylith::bc::_TestTimeDependentPoints::_checkValues(const double* valuesE,
+ const int fiberDimE,
+ const ALE::Obj<RealSection>& section,
+ const double scale)
+{ // _checkValues
+ CPPUNIT_ASSERT(!section.isNull());
+
+ const double tolerance = 1.0e-06;
+
+ // Check values at points associated with BC.
+ const int npointsIn = _TestTimeDependentPoints::npointsIn;
+ for (int i=0; i < npointsIn; ++i) {
+ const int p_bc = _TestTimeDependentPoints::pointsIn[i];
+ const int fiberDim = section->getFiberDimension(p_bc);
+ CPPUNIT_ASSERT_EQUAL(fiberDimE, fiberDim);
+
+ const double* values = section->restrictPoint(p_bc);
+ for (int iDim=0; iDim < fiberDimE; ++iDim)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesE[i*fiberDimE+iDim]/scale,
+ values[iDim], tolerance);
+ } // for
+
+ // Check points not associated with BC.
+ const int npointsOut = _TestTimeDependentPoints::npointsOut;
+ for (int i=0; i < npointsOut; ++i) {
+ const int p_bc = _TestTimeDependentPoints::pointsOut[i];
+ const int fiberDim = section->getFiberDimension(p_bc);
+ CPPUNIT_ASSERT_EQUAL(0, fiberDim);
+ } // for
+} // _checkValues
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependentPoints.hh 2009-06-08 04:40:31 UTC (rev 15137)
@@ -0,0 +1,98 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestTimeDependentPoints.hh
+ *
+ * @brief C++ TestTimeDependentPoints object.
+ *
+ * C++ unit testing for TimeDependentPoints.
+ */
+
+#if !defined(pylith_bc_testtimedependentpoints_hh)
+#define pylith_bc_testtimedependentpoints_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/topology/topologyfwd.hh" // forward declarations
+#include "pylith/bc/bcfwd.hh" // forward declarations
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestTimeDependentPoints;
+ } // bc
+} // pylith
+
+/// C++ unit testing for TimeDependentPoints.
+class pylith::bc::TestTimeDependentPoints : public CppUnit::TestFixture
+{ // class TestTimeDependentPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestTimeDependentPoints );
+
+ CPPUNIT_TEST( testGetLabel );
+ CPPUNIT_TEST( testQueryDB );
+ CPPUNIT_TEST( testQueryDatabases );
+ CPPUNIT_TEST( testCalculateValueInitial );
+ CPPUNIT_TEST( testCalculateValueRate );
+ CPPUNIT_TEST( testCalculateValueChange );
+ CPPUNIT_TEST( testCalculateValueChangeTH );
+ CPPUNIT_TEST( testCalculateValueAll );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Test _getLabel().
+ void testGetLabel(void);
+
+ /// Test _queryDB().
+ void testQueryDB(void);
+
+ /// Test _queryDatabases().
+ void testQueryDatabases(void);
+
+ /// Test _calculateValue() with initial value.
+ void testCalculateValueInitial(void);
+
+ /// Test _calculateValue() with rate.
+ void testCalculateValueRate(void);
+
+ /// Test _calculateValue() with temporal change.
+ void testCalculateValueChange(void);
+
+ /// Test _calculateValue() with temporal change w/time history.
+ void testCalculateValueChangeTH(void);
+
+ /// Test _calculateValue() with initial, rate, and temporal change w/time history.
+ void testCalculateValueAll(void);
+
+ // PRIVATE MEMBERS ////////////////////////////////////////////////////
+private :
+
+ topology::Mesh* _mesh; ///< Finite-element mesh.
+ PointForce* _bc; ///< Point force boundary condition as tester.
+
+}; // class TestTimeDependentPoints
+
+#endif // pylith_bc_timedependentpoints_hh
+
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am 2009-06-08 04:40:31 UTC (rev 15137)
@@ -23,6 +23,9 @@
tri3_vel2.spatialdb \
tri3_tractions.spatialdb \
tri3_force.spatialdb \
+ tri3_force_rate.spatialdb \
+ tri3_force_change.spatialdb \
+ tri3_force.timedb \
elasticplanestrain.spatialdb \
quad4.mesh \
quad4_disp.spatialdb \
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb 2009-06-07 16:58:06 UTC (rev 15136)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb 2009-06-08 04:40:31 UTC (rev 15137)
@@ -1,8 +1,8 @@
#SPATIAL.ascii 1
SimpleDB {
- num-values = 1
- value-names = force-y
- value-units = Pa*m**2
+ num-values = 2
+ value-names = force-x force-y
+ value-units = Pa*m**2 Pa*m**2
num-locs = 2
data-dim = 1
space-dim = 2
@@ -11,5 +11,5 @@
space-dim = 2
}
}
- 0.0 -1.0 0.3
- 1.0 0.0 0.7
+ 0.0 -1.0 0.4 0.3
+ 1.0 0.0 0.6 0.7
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.timedb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.timedb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.timedb 2009-06-08 04:40:31 UTC (rev 15137)
@@ -0,0 +1,7 @@
+#TIME HISTORY ascii
+TimeHistory {
+ num-points = 2
+ time-units = second
+}
+ 0.0 1.0
+ 10.0 0.0
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_change.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_change.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_change.spatialdb 2009-06-08 04:40:31 UTC (rev 15137)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = force-x force-y change-start-time
+ value-units = Pa*m**2 Pa*m**2 s
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 -1.0 1.4 1.3 2.0
+ 1.0 0.0 1.6 1.7 2.4
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_rate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_rate.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force_rate.spatialdb 2009-06-08 04:40:31 UTC (rev 15137)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = force-rate-x force-rate-y rate-start-time
+ value-units = Pa*m**2 Pa*m**2 s
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 -1.0 -0.1 -0.2 0.5
+ 1.0 0.0 +0.3 +0.4 0.8
More information about the CIG-COMMITS
mailing list