[cig-commits] r15131 - in short/3D/PyLith/trunk: . libsrc libsrc/bc unittests/libtests/bc unittests/libtests/bc/data
brad at geodynamics.org
brad at geodynamics.org
Sat Jun 6 20:30:58 PDT 2009
Author: brad
Date: 2009-06-06 20:30:55 -0700 (Sat, 06 Jun 2009)
New Revision: 15131
Added:
short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc
short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh
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/libsrc/bc/TimeDependentPoints.hh
short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.icc
short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.hh
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/PointForceData.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8_disp.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b_disp.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_disp.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_disp.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp2.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_vel2.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp2.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel2.spatialdb
Removed:
short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/line2-tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4-tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4-tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a_rate.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3-tractions.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b_rate.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_rate.spatialdb
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/Makefile.am
short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh
short/3D/PyLith/trunk/libsrc/bc/Makefile.am
short/3D/PyLith/trunk/libsrc/bc/PointForce.cc
short/3D/PyLith/trunk/libsrc/bc/PointForce.hh
short/3D/PyLith/trunk/libsrc/bc/PointForce.icc
short/3D/PyLith/trunk/libsrc/bc/bcfwd.hh
short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTri3.cc
Log:
Refactored time dependence in PointForce boundary condition in preparation for adding tme dependent capabilities to other BC. Started work on corresponding unit tests.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/TODO 2009-06-07 03:30:55 UTC (rev 15131)
@@ -7,14 +7,17 @@
field split
Brad
+ PointForce
+ time-dependent BC
+ Field
+ replace newSection(chart, fiberDim) with newSection(field, fiberDim)
+ choose points to set fiberDim based on other field
field split (setup fields)
symmetric matrix (use in examples, testing)
full-scale testing
cleanup
test uniform refinement
- PointForce
- time-dependent BC
Charles
3-D Power-law rheology
Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am 2009-06-07 03:30:55 UTC (rev 15131)
@@ -24,6 +24,9 @@
libpylith_la_SOURCES = \
bc/BoundaryCondition.cc \
+ bc/BoundaryConditionPoints.cc \
+ bc/TimeDependent.cc \
+ bc/TimeDependentPoints.cc \
bc/DirichletBC.cc \
bc/DirichletBoundary.cc \
bc/Neumann.cc \
Modified: short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -58,6 +58,7 @@
*/
const char* label(void) const;
+ // REMOVE THIS
/** Set database for boundary condition parameters.
*
* @param db Spatial database
Added: short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "BoundaryConditionPoints.hh" // implementation of object methods
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+
+#include <stdexcept> // USES std::runtime_error()
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::bc::BoundaryConditionPoints::BoundaryConditionPoints(void) :
+ _parameters(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::bc::BoundaryConditionPoints::~BoundaryConditionPoints(void)
+{ // destructor
+ delete _parameters; _parameters = 0;
+} // destructor
+
+// ----------------------------------------------------------------------
+// Get mesh labels for points associated with boundary condition.
+void
+pylith::bc::BoundaryConditionPoints::_getPoints(const topology::Mesh& mesh)
+{ // _getPoints
+ typedef topology::Mesh::IntSection::chart_type chart_type;
+
+ const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+ assert(!sieveMesh.isNull());
+
+ const ALE::Obj<SieveMesh::int_section_type>& groupField =
+ sieveMesh->getIntSection(_label);
+ if (groupField.isNull()) {
+ std::ostringstream msg;
+ msg << "Could not find group of points '" << _label << "' in mesh.";
+ throw std::runtime_error(msg.str());
+ } // if
+ assert(!groupField.isNull());
+ const chart_type& chart = groupField->getChart();
+ const chart_type::const_iterator& chartEnd = chart.end();
+ const int numPoints = groupField->size();
+ _points.resize(numPoints);
+ int i = 0;
+ for(chart_type::const_iterator c_iter = chart.begin();
+ c_iter != chartEnd;
+ ++c_iter)
+ if (groupField->getFiberDimension(*c_iter))
+ _points[i++] = *c_iter;
+} // _getPoints
+
+
+// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,75 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/bc/BoundaryConditionPoints.hh
+ *
+ * @brief C++ abstract base class for BoundaryCondition object with
+ * boundary condition applied at a set of points.
+ *
+ * Interface definition for boundary conditions applied at a set of points.
+ */
+
+#if !defined(pylith_bc_boundaryconditionpoints_hh)
+#define pylith_bc_boundaryconditionpoints_hh
+
+// Include directives ---------------------------------------------------
+#include "BoundaryCondition.hh" // ISA BoundaryCondition
+
+#include "pylith/utils/array.hh" // HASA int_array
+
+// BoundaryConditionPoints ----------------------------------------------
+class pylith::bc::BoundaryConditionPoints : public BoundaryCondition
+{ // class BoundaryCondition
+ friend class TestBoundaryConditionPoints; // unit testing
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Default constructor.
+ BoundaryConditionPoints(void);
+
+ /// Destructor.
+ virtual
+ ~BoundaryConditionPoints(void);
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /** Get mesh labels for points associated with applied forces.
+ *
+ * @param mesh Finite-element mesh.
+ */
+ void _getPoints(const topology::Mesh& mesh);
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ /// Parameters for boundary condition.
+ topology::Fields<topology::Field<topology::Mesh> >* _parameters;
+
+ int_array _points; ///< Points for forces.
+
+ // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+ /// Not implemented
+ BoundaryConditionPoints(const BoundaryConditionPoints&);
+
+ /// Not implemented
+ const BoundaryConditionPoints& operator=(const BoundaryConditionPoints&);
+
+}; // class BoundaryConditionPoints
+
+#endif // pylith_bc_boundaryconditionpoints_hh
+
+
+// End of file
Modified: short/3D/PyLith/trunk/libsrc/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Makefile.am 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/bc/Makefile.am 2009-06-07 03:30:55 UTC (rev 15131)
@@ -14,14 +14,21 @@
include $(top_srcdir)/subpackage.am
subpkginclude_HEADERS = \
- AbsorbingDampers.hh \
BoundaryCondition.hh \
BoundaryCondition.icc \
+ BoundaryConditionPoints.hh \
+ TimeDependent.hh \
+ TimeDependent.icc \
+ TimeDependentPoints.hh \
+ TimeDependentPoints.icc \
+ AbsorbingDampers.hh \
DirichletBC.hh \
DirichletBC.icc \
DirichletBoundary.hh \
DirichletBoundary.icc \
Neumann.hh \
+ PointForce.hh \
+ PointForce.icc \
bcfwd.hh
noinst_HEADERS =
Modified: short/3D/PyLith/trunk/libsrc/bc/PointForce.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/PointForce.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/bc/PointForce.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -15,8 +15,6 @@
#include "PointForce.hh" // implementation of object methods
#include "pylith/topology/Field.hh" // USES Field
-#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
-#include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
@@ -31,14 +29,7 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::bc::PointForce::PointForce(void) :
- _parameters(0),
- _dbInitial(0),
- _dbRate(0),
- _dbRateTime(0),
- _dbChange(0),
- _dbChangeTime(0),
- _dbTimeHistory(0)
+pylith::bc::PointForce::PointForce(void)
{ // constructor
} // constructor
@@ -46,34 +37,9 @@
// Destructor.
pylith::bc::PointForce::~PointForce(void)
{ // destructor
- if (0 != _dbTimeHistory)
- _dbTimeHistory->close();
-
- delete _parameters; _parameters = 0;
-
- _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
// ----------------------------------------------------------------------
-// Set indices of vertices with point forces.
-void
-pylith::bc::PointForce::forceDOF(const int* flags,
- const int size)
-{ // forceDOF
- if (size > 0)
- assert(0 != flags);
-
- _bcDOF.resize(size);
- for (int i=0; i < size; ++i)
- _bcDOF[i] = flags[i];
-} // forceDOF
-
-// ----------------------------------------------------------------------
// Initialize boundary condition.
void
pylith::bc::PointForce::initialize(const topology::Mesh& mesh,
@@ -135,317 +101,16 @@
residualVertex[_bcDOF[iDOF]] += valuesVertex[iDOF];
residualSection->updateAddPoint(p_bc, &residualVertex[0]);
} // for
-
} // integrateResidualAssembled
// ----------------------------------------------------------------------
-// Calculate temporal and spatial variation of value over the list of points.
-void
-pylith::bc::PointForce::_calculateValue(const double t)
-{ // _calculateValue
- assert(0 != _parameters);
- assert(0 != _normalizer);
-
- const ALE::Obj<RealSection>& valueSection =
- _parameters->get("value").section();
- valueSection->zero();
-
- const int numPoints = _points.size();
- const int numBCDOF = _bcDOF.size();
- const double timeScale = _normalizer->timeScale();
-
- const ALE::Obj<RealSection>& changeSection = (0 != _dbChange) ?
- _parameters->get("change").section() : 0;
- const ALE::Obj<RealSection>& changeTimeSection = (0 != _dbChange) ?
- _parameters->get("change time").section() : 0;
-
- // Contribution from initial value
- if (0 != _dbInitial) {
- double_array values(numBCDOF);
- const ALE::Obj<RealSection>& initialSection =
- _parameters->get("initial").section();
- assert(!initialSection.isNull());
-
- for (int iPoint=0; iPoint < numPoints; ++iPoint) {
- const int p_bc = _points[iPoint]; // Get point label
-
- initialSection->restrictPoint(p_bc, &values[0], values.size());
- valueSection->updateAddPoint(p_bc, &values[0]);
- } // for
- } // if
-
-
- // Contribution from rate of change of value
- if (0 != _dbRate) {
- double_array values(numBCDOF);
- double tRate = 0.0;
- const ALE::Obj<RealSection>& rateSection =
- _parameters->get("rate").section();
- assert(!rateSection.isNull());
- const ALE::Obj<RealSection>& rateTimeSection =
- _parameters->get("rate time").section();
- assert(!rateTimeSection.isNull());
-
- for (int iPoint=0; iPoint < numPoints; ++iPoint) {
- const int p_bc = _points[iPoint]; // Get point label
-
- rateSection->restrictPoint(p_bc, &values[0], values.size());
- rateTimeSection->restrictPoint(p_bc, &tRate, 1);
- if (t > tRate) { // rate of change integrated over time
- values *= (t - tRate);
- valueSection->updateAddPoint(p_bc, &values[0]);
- } // if
- } // for
- } // if
-
- // Contribution from change of value
- if (0 != _dbChange) {
- double_array values(numBCDOF);
- double tChange = 0.0;
- const ALE::Obj<RealSection>& changeSection =
- _parameters->get("change").section();
- assert(!changeSection.isNull());
- const ALE::Obj<RealSection>& changeTimeSection =
- _parameters->get("change time").section();
- assert(!changeTimeSection.isNull());
-
- for (int iPoint=0; iPoint < numPoints; ++iPoint) {
- const int p_bc = _points[iPoint]; // Get point label
-
- changeSection->restrictPoint(p_bc, &values[0], values.size());
- changeTimeSection->restrictPoint(p_bc, &tChange, 1);
- if (t > tChange) { // change in value over time
- double scale = 1.0;
- if (0 != _dbTimeHistory) {
- double tDim = t - tChange;
- _normalizer->dimensionalize(&tDim, 1, timeScale);
- const int err = _dbTimeHistory->query(&scale, tDim);
- if (0 != err) {
- std::ostringstream msg;
- msg << "Error querying for time '" << tDim << "' in time history database "
- << _dbTimeHistory->label() << ".";
- throw std::runtime_error(msg.str());
- } // if
- } // if
- values *= scale;
- valueSection->updateAddPoint(p_bc, &values[0]);
- } // if
- } // for
- } // if
-} // _calculateValue
-
-// ----------------------------------------------------------------------
// Verify configuration is acceptable.
void
pylith::bc::PointForce::verifyConfiguration(const topology::Mesh& mesh) const
{ // verifyConfiguration
- if (0 != _dbRate && 0 == _dbRateTime) {
- std::ostringstream msg;
- msg << "Point force boundary condition '" << label() << "',\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 << "Point force boundary condition '" << label() << "',\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 << "Point force boundary condition '" << label() << "',\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 << "Point force boundary condition '" << label() << "',\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 << "Point force boundary condition '" << label() << "',\n has a "
- << "time history database but not change in value spatial database.";
- throw std::runtime_error(msg.str());
-} // if
+ BoundaryCondition::verifyConfiguration(mesh);
+ TimeDependent::verifyConfiguration(mesh);
} // verifyConfiguration
-// ----------------------------------------------------------------------
-// Get mesh labels for points associated with point forces.
-void
-pylith::bc::PointForce::_getPoints(const topology::Mesh& mesh)
-{ // _getPoints
- typedef topology::Mesh::IntSection::chart_type chart_type;
- const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
- assert(!sieveMesh.isNull());
-
- const ALE::Obj<SieveMesh::int_section_type>& groupField =
- sieveMesh->getIntSection(_label);
- if (groupField.isNull()) {
- std::ostringstream msg;
- msg << "Could not find group of points '" << _label << "' in mesh.";
- throw std::runtime_error(msg.str());
- } // if
- assert(!groupField.isNull());
- const chart_type& chart = groupField->getChart();
- const chart_type::const_iterator& chartEnd = chart.end();
- const int numPoints = groupField->size();
- _points.resize(numPoints);
- int i = 0;
- for(chart_type::const_iterator c_iter = chart.begin();
- c_iter != chartEnd;
- ++c_iter)
- if (groupField->getFiberDimension(*c_iter))
- _points[i++] = *c_iter;
-} // _getPoints
-
-// ----------------------------------------------------------------------
-// Query databases for parameters.
-void
-pylith::bc::PointForce::_queryDatabases(const topology::Mesh& mesh,
- const double valueScale,
- const char* fieldName)
-{ // _queryDatabases
- assert(0 != _normalizer);
- const double timeScale = _normalizer->timeScale();
- const double rateScale = valueScale / timeScale;
-
- const int numPoints = _points.size();
- const int numBCDOF = _bcDOF.size();
- char** valueNames = (numBCDOF > 0) ? new char*[numBCDOF] : 0;
- for (int i=0; i < numBCDOF; ++i) {
- std::ostringstream name;
- name << "dof-" << _bcDOF[i];
- const int size = 1 + name.str().length();
- valueNames[i] = new char[size];
- strcpy(valueNames[i], name.str().c_str());
- } // for
-
- delete _parameters;
- _parameters = new topology::Fields<topology::Field<topology::Mesh> >(mesh);
-
- if (0 != _dbInitial) { // Setup initial values, if provided.
- std::string fieldLabel = std::string("initial_") + std::string(fieldName);
- _parameters->add("initial", fieldLabel.c_str());
- topology::Field<topology::Mesh>& initial =
- _parameters->get("initial");
- initial.newSection(_points, numBCDOF);
- initial.allocate();
- initial.scale(valueScale);
- initial.vectorFieldType(topology::FieldBase::OTHER);
-
- _dbInitial->queryVals(valueNames, numBCDOF);
- _queryDB(&initial, _dbInitial, numBCDOF, valueScale);
- } // if
-
- if (0 != _dbRate) { // Setup rate of change of values, if provided.
- std::string fieldLabel = std::string("rate_") + std::string(fieldName);
- _parameters->add("rate", fieldLabel.c_str());
- topology::Field<topology::Mesh>& rate =
- _parameters->get("rate");
- rate.newSection(_points, numBCDOF);
- rate.allocate();
- rate.scale(valueScale);
- rate.vectorFieldType(topology::FieldBase::VECTOR);
- const ALE::Obj<RealSection>& rateSection = rate.section();
- assert(!rateSection.isNull());
-
- _dbRate->queryVals(valueNames, numBCDOF);
- _queryDB(&rate, _dbRate, numBCDOF, rateScale);
-
- std::string timeLabel =
- std::string("rate_time_") + std::string(fieldName);
- _parameters->add("rate time", timeLabel.c_str());
- topology::Field<topology::Mesh>& rateTime =
- _parameters->get("rate time");
- rateTime.newSection(rateSection->getChart(), 1);
- rateTime.allocate();
- rateTime.scale(timeScale);
- rateTime.vectorFieldType(topology::FieldBase::SCALAR);
-
- const char* timeNames[1] = { "rate-start-time" };
- _dbRateTime->queryVals(timeNames, 1);
- _queryDB(&rateTime, _dbRateTime, 1, timeScale);
- } // if
-
- if (0 != _dbChange) { // Setup change of values, if provided.
- // ADD STUFF HERE
-
- if (0 != _dbTimeHistory)
- _dbTimeHistory->open();
- } // if
-
- _parameters->add("value", fieldName);
- topology::Field<topology::Mesh>& value = _parameters->get("value");
- value.scale(valueScale);
- value.vectorFieldType(topology::FieldBase::OTHER);
-} // _queryDatabases
-
-
-// ----------------------------------------------------------------------
-// Query database for values.
-void
-pylith::bc::PointForce::_queryDB(topology::Field<topology::Mesh>* field,
- spatialdata::spatialdb::SpatialDB* const db,
- const int querySize,
- const double scale)
-{ // _queryDB
- assert(0 != field);
- assert(0 != db);
- assert(0 != _normalizer);
-
- const topology::Mesh& mesh = field->mesh();
- const spatialdata::geocoords::CoordSys* cs = mesh.coordsys();
- assert(0 != cs);
- const int spaceDim = cs->spaceDim();
-
- assert(0 != _normalizer);
- const double lengthScale = _normalizer->lengthScale();
-
- double_array coordsVertex(spaceDim);
- const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
- assert(!sieveMesh.isNull());
- const ALE::Obj<RealSection>& coordinates =
- sieveMesh->getRealSection("coordinates");
- assert(!coordinates.isNull());
-
- const ALE::Obj<RealSection>& section = field->section();
- assert(!section.isNull());
-
- double_array valuesVertex(querySize);
-
- db->open();
- const int numPoints = _points.size();
- for (int iPoint=0; iPoint < numPoints; ++iPoint) {
- // Get dimensionalized coordinates of vertex
- coordinates->restrictPoint(_points[iPoint],
- &coordsVertex[0], coordsVertex.size());
- _normalizer->dimensionalize(&coordsVertex[0], coordsVertex.size(),
- lengthScale);
- int err = db->query(&valuesVertex[0], valuesVertex.size(),
- &coordsVertex[0], coordsVertex.size(), cs);
- if (err) {
- std::ostringstream msg;
- msg << "Error querying for '" << field->label() << "' at (";
- for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
- msg << ") using spatial database " << db->label() << ".";
- throw std::runtime_error(msg.str());
- } // if
- _normalizer->nondimensionalize(&valuesVertex[0], valuesVertex.size(),
- scale);
- section->updatePoint(_points[iPoint], &valuesVertex[0]);
- } // for
-
- db->close();
-} // _queryDB
-
-
// End of file
Modified: short/3D/PyLith/trunk/libsrc/bc/PointForce.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/PointForce.hh 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/bc/PointForce.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -19,16 +19,13 @@
#define pylith_bc_pointforce_hh
// Include directives ---------------------------------------------------
-#include "BoundaryCondition.hh" // ISA BoundaryCondition
+#include "TimeDependentPoints.hh" // ISA TimeDependentPoints
#include "pylith/topology/Mesh.hh" // ISA Integrator<Quadrature<Mesh> >
#include "pylith/feassemble/Quadrature.hh" // ISA Integrator<Quadrature<Mesh >
#include "pylith/feassemble/Integrator.hh" // ISA Integrator
-#include "pylith/topology/topologyfwd.hh" // USES Fields<Mesh>
-#include "pylith/utils/array.hh" // HASA int_array
-
// PointForce ------------------------------------------------------
-class pylith::bc::PointForce : public BoundaryCondition,
+class pylith::bc::PointForce : public TimeDependentPoints,
public feassemble::Integrator<feassemble::Quadrature<topology::Mesh> >
{ // class PointForce
friend class TestPointForce; // unit testing
@@ -42,56 +39,6 @@
/// Destructor.
~PointForce(void);
- /** Set indices of vertices with point forces.
- *
- * Note: forces at all points are applied to the same degrees of freedom.
- *
- * Example: [0, 1] to apply forces to x and y degrees of freedom in
- * Cartesian system.
- *
- * @param flags Array of indices for degrees of freedom for forces.
- * @param size Size of array
- */
- void forceDOF(const int* flags,
- const int size);
-
- /** Set database for initial values.
- *
- * @param db Spatial database
- */
- void dbInitial(spatialdata::spatialdb::SpatialDB* const db);
-
- /** Set database for rate of change of values.
- *
- * @param db Spatial database
- */
- 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.
- */
- void dbTimeHistory(spatialdata::spatialdb::TimeHistory* const db);
-
-
/** Initialize boundary condition.
*
* @param mesh PETSc mesh
@@ -119,68 +66,12 @@
// PROTECTED METHODS //////////////////////////////////////////////////
protected :
- /** Get mesh labels for points associated with applied forces.
+ /** Get manager of scales used to nondimensionalize problem.
*
- * @param mesh Finite-element mesh.
+ * @returns Nondimensionalizer.
*/
- void _getPoints(const topology::Mesh& mesh);
+ const spatialdata::units::Nondimensional& getNormalizer(void) const;
- /** Query databases for time dependent parameters.
- *
- * @param mesh Finite-element mesh.
- * @param valueScale Dimension scale for value.
- * @param fieldName Name of field associated with value.
- */
- void _queryDatabases(const topology::Mesh& mesh,
- const double valueScale,
- const char* fieldName);
-
- /** Wuery database for values.
- *
- * @param field Field in which to store values.
- * @param db Spatial database with values.
- * @param querySize Number of values at each location.
- * @param scale Dimension scale associated with values.
- */
- void _queryDB(topology::Field<topology::Mesh>* field,
- spatialdata::spatialdb::SpatialDB* const db,
- const int querySize,
- const double scale);
-
- /** Calculate spatial and temporal variation of value over the list
- * of points.
- *
- * @param t Current time.
- */
- void _calculateValue(const double t);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- /// Parameters for point forces.
- topology::Fields<topology::Field<topology::Mesh> >* _parameters;
-
- /// Spatial database for initial values.
- spatialdata::spatialdb::SpatialDB* _dbInitial;
-
- /// 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;
-
- int_array _points; ///< Points for forces.
- int_array _bcDOF; ///< Indices of degrees of freedom with boundary condition.
-
// NOT IMPLEMENTED ////////////////////////////////////////////////////
private :
Modified: short/3D/PyLith/trunk/libsrc/bc/PointForce.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/PointForce.icc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/bc/PointForce.icc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -14,47 +14,15 @@
#error "PointForce.icc can only be included from PointForce.hh"
#endif
-// Set database for initial values.
-inline
-void
-pylith::bc::PointForce::dbInitial(spatialdata::spatialdb::SpatialDB* const db) {
- _dbInitial = db;
-}
+#include <cassert> // USES assert()
-// Set database for rate of change of values.
+// Get manager of scales used to nondimensionalize problem.
inline
-void
-pylith::bc::PointForce::dbRate(spatialdata::spatialdb::SpatialDB* const db) {
- _dbRate = db;
+const spatialdata::units::Nondimensional&
+pylith::bc::PointForce::getNormalizer(void) const {
+ assert(0 != _normalizer);
+ return *_normalizer;
}
-// Set database for start time of rate change.
-inline
-void
-pylith::bc::PointForce::dbRateTime(spatialdata::spatialdb::SpatialDB* const db) {
- _dbRateTime = db;
-}
-// Set database for change in values.
-inline
-void
-pylith::bc::PointForce::dbChange(spatialdata::spatialdb::SpatialDB* const db) {
- _dbChange = db;
-}
-
-// Set database for start time of change in values.
-inline
-void
-pylith::bc::PointForce::dbChangeTime(spatialdata::spatialdb::SpatialDB* const db) {
- _dbChangeTime = db;
-}
-
-// Set database for temporal evolution of change in value.
-inline
-void
-pylith::bc::PointForce::dbTimeHistory(spatialdata::spatialdb::TimeHistory* const db) {
- _dbTimeHistory = db;
-}
-
-
// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,107 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TimeDependent.hh" // implementation of object methods
+
+#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
+#include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
+
+#include <stdexcept> // USES std::runtime_error
+#include <sstream> // USES std::ostringstream
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::bc::TimeDependent::TimeDependent(void) :
+ _dbInitial(0),
+ _dbRate(0),
+ _dbRateTime(0),
+ _dbChange(0),
+ _dbChangeTime(0),
+ _dbTimeHistory(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::bc::TimeDependent::~TimeDependent(void)
+{ // destructor
+ if (0 != _dbTimeHistory)
+ _dbTimeHistory->close();
+
+ _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
+
+// ----------------------------------------------------------------------
+// Set indices of vertices with point forces.
+void
+pylith::bc::TimeDependent::bcDOF(const int* flags,
+ const int size)
+{ // bcDOF
+ if (size > 0)
+ assert(0 != flags);
+
+ _bcDOF.resize(size);
+ for (int i=0; i < size; ++i)
+ _bcDOF[i] = flags[i];
+} // bcDOF
+
+// ----------------------------------------------------------------------
+// Verify configuration is acceptable.
+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 "
+ << "time history database but not change in value spatial database.";
+ throw std::runtime_error(msg.str());
+ } // if
+} // verifyConfiguration
+
+
+// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/bc/TimeDependent.hh
+ *
+ * @brief C++ implementation of point force on vertices.
+ */
+
+#if !defined(pylith_bc_timedependent_hh)
+#define pylith_bc_timedependent_hh
+
+// Include directives ---------------------------------------------------
+#include "bcfwd.hh" // forward declarations
+
+#include "pylith/utils/array.hh" // HASA int_array
+#include "pylith/topology/topologyfwd.hh" // USES Mesh
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+#include "spatialdata/units/unitsfwd.hh" // USES Nondimensional
+
+// TimeDependent ------------------------------------------------------
+class pylith::bc::TimeDependent
+{ // class TimeDependent
+ friend class TestTimeDependent; // unit testing
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Default constructor.
+ TimeDependent(void);
+
+ /// Destructor.
+ ~TimeDependent(void);
+
+ /** Set indices of degrees of freedom associated with BC.
+ *
+ * Note: Forces at all points are applied to the same degrees of freedom.
+ *
+ * Example: [0, 1] to apply forces to x and y degrees of freedom in
+ * Cartesian system.
+ *
+ * @param flags Array of indices for degrees of freedom for forces.
+ * @param size Size of array
+ */
+ void bcDOF(const int* flags,
+ const int size);
+
+ /** Set database for initial values.
+ *
+ * @param db Spatial database
+ */
+ void dbInitial(spatialdata::spatialdb::SpatialDB* const db);
+
+ /** Set database for rate of change of values.
+ *
+ * @param db Spatial database
+ */
+ 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.
+ */
+ void dbTimeHistory(spatialdata::spatialdb::TimeHistory* const db);
+
+ /** Verify configuration is acceptable.
+ *
+ * @param mesh Finite-element mesh
+ */
+ virtual
+ void verifyConfiguration(const topology::Mesh& mesh) const;
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /** Get label of boundary condition surface.
+ *
+ * @returns Label of surface (from mesh generator).
+ */
+ virtual
+ const char* getLabel(void) const = 0;
+
+ /** Get manager of scales used to nondimensionalize problem.
+ *
+ * @returns Nondimensionalizer.
+ */
+ virtual
+ const spatialdata::units::Nondimensional& getNormalizer(void) const = 0;
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ /// Spatial database for initial values.
+ spatialdata::spatialdb::SpatialDB* _dbInitial;
+
+ /// 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;
+
+ int_array _bcDOF; ///< Degrees of freedom associated with BC.
+
+ // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+ TimeDependent(const TimeDependent&); ///< Not implemented.
+ const TimeDependent& operator=(const TimeDependent&); ///< Not implemented.
+
+}; // class TimeDependent
+
+#include "TimeDependent.icc" // inline methods
+
+#endif // pylith_bc_timedependent_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.icc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#if !defined(pylith_bc_timedependent_hh)
+#error "TimeDependent.icc can only be included from TimeDependent.hh"
+#endif
+
+// Set database for initial values.
+inline
+void
+pylith::bc::TimeDependent::dbInitial(spatialdata::spatialdb::SpatialDB* const db) {
+ _dbInitial = db;
+}
+
+// Set database for rate of change of values.
+inline
+void
+pylith::bc::TimeDependent::dbRate(spatialdata::spatialdb::SpatialDB* const db) {
+ _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
+pylith::bc::TimeDependent::dbChange(spatialdata::spatialdb::SpatialDB* const db) {
+ _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
+pylith::bc::TimeDependent::dbTimeHistory(spatialdata::spatialdb::TimeHistory* const db) {
+ _dbTimeHistory = db;
+}
+
+
+// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,334 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TimeDependentPoints.hh" // implementation of object methods
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
+#include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
+#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+
+#include <cstring> // USES strcpy()
+#include <cassert> // USES assert()
+#include <stdexcept> // USES std::runtime_error
+#include <sstream> // USES std::ostringstream
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::bc::TimeDependentPoints::TimeDependentPoints(void)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::bc::TimeDependentPoints::~TimeDependentPoints(void)
+{ // destructor
+} // destructor
+
+// ----------------------------------------------------------------------
+// Query databases for parameters.
+void
+pylith::bc::TimeDependentPoints::_queryDatabases(const topology::Mesh& mesh,
+ const double valueScale,
+ const char* fieldName)
+{ // _queryDatabases
+ const double timeScale = getNormalizer().timeScale();
+ const double rateScale = valueScale / timeScale;
+
+ const int numPoints = _points.size();
+ const int numBCDOF = _bcDOF.size();
+ char** valueNames = (numBCDOF > 0) ? new char*[numBCDOF] : 0;
+ char** rateNames = (numBCDOF > 0) ? new char*[numBCDOF] : 0;
+ const std::string& valuePrefix = std::string(fieldName) + "-";
+ const std::string& ratePrefix = std::string(fieldName) + "-rate-";
+ for (int i=0; i < numBCDOF; ++i) {
+ std::string suffix;
+ switch (_bcDOF[i])
+ { // switch
+ case 0 :
+ suffix = "x";
+ break;
+ case 1 :
+ suffix = "y";
+ break;
+ case 2 :
+ suffix = "z";
+ break;
+ } // switch
+ std::string name = valuePrefix + suffix;
+ int size = 1 + name.length();
+ valueNames[i] = new char[size];
+ strcpy(valueNames[i], name.c_str());
+
+ name = ratePrefix + suffix;
+ size = 1 + name.length();
+ rateNames[i] = new char[size];
+ strcpy(rateNames[i], name.c_str());
+ } // for
+
+ delete _parameters;
+ _parameters = new topology::Fields<topology::Field<topology::Mesh> >(mesh);
+
+ if (0 != _dbInitial) { // Setup initial values, if provided.
+ std::string fieldLabel = std::string("initial_") + std::string(fieldName);
+ _parameters->add("initial", fieldLabel.c_str());
+ topology::Field<topology::Mesh>& initial =
+ _parameters->get("initial");
+ initial.newSection(_points, numBCDOF);
+ initial.allocate();
+ initial.scale(valueScale);
+ initial.vectorFieldType(topology::FieldBase::OTHER);
+
+ _dbInitial->open();
+ _dbInitial->queryVals(valueNames, numBCDOF);
+ _queryDB(&initial, _dbInitial, numBCDOF, valueScale);
+ _dbInitial->close();
+ } // if
+
+ if (0 != _dbRate) { // Setup rate of change of values, if provided.
+ std::string fieldLabel = std::string("rate_") + std::string(fieldName);
+ _parameters->add("rate", fieldLabel.c_str());
+ topology::Field<topology::Mesh>& rate =
+ _parameters->get("rate");
+ rate.newSection(_points, numBCDOF);
+ rate.allocate();
+ rate.scale(valueScale);
+ rate.vectorFieldType(topology::FieldBase::OTHER);
+ const ALE::Obj<RealSection>& rateSection = rate.section();
+ assert(!rateSection.isNull());
+
+ _dbRate->open();
+ _dbRate->queryVals(rateNames, numBCDOF);
+ _queryDB(&rate, _dbRate, numBCDOF, rateScale);
+ _dbRate->close();
+
+ std::string timeLabel =
+ std::string("rate_time_") + std::string(fieldName);
+ _parameters->add("rate time", timeLabel.c_str());
+ topology::Field<topology::Mesh>& rateTime =
+ _parameters->get("rate time");
+ rateTime.newSection(_points, 1);
+ rateTime.allocate();
+ rateTime.scale(timeScale);
+ 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();
+ } // if
+
+ if (0 != _dbChange) { // Setup change of values, if provided.
+ std::string fieldLabel = std::string("change_") + std::string(fieldName);
+ _parameters->add("change", fieldLabel.c_str());
+ topology::Field<topology::Mesh>& change =
+ _parameters->get("change");
+ change.newSection(_points, numBCDOF);
+ change.allocate();
+ change.scale(valueScale);
+ change.vectorFieldType(topology::FieldBase::OTHER);
+ const ALE::Obj<RealSection>& changeSection = change.section();
+ assert(!changeSection.isNull());
+
+ _dbChange->open();
+ _dbChange->queryVals(valueNames, numBCDOF);
+ _queryDB(&change, _dbChange, numBCDOF, valueScale);
+ _dbChange->close();
+
+ std::string timeLabel =
+ std::string("change_time_") + std::string(fieldName);
+ _parameters->add("change time", timeLabel.c_str());
+ topology::Field<topology::Mesh>& changeTime =
+ _parameters->get("change time");
+ changeTime.newSection(_points, 1);
+ changeTime.allocate();
+ changeTime.scale(timeScale);
+ 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();
+
+ if (0 != _dbTimeHistory)
+ _dbTimeHistory->open();
+ } // if
+
+ _parameters->add("value", fieldName);
+ topology::Field<topology::Mesh>& value = _parameters->get("value");
+ value.scale(valueScale);
+ value.vectorFieldType(topology::FieldBase::OTHER);
+ value.newSection(_points, numBCDOF);
+ value.allocate();
+} // _queryDatabases
+
+// ----------------------------------------------------------------------
+// Query database for values.
+void
+pylith::bc::TimeDependentPoints::_queryDB(topology::Field<topology::Mesh>* field,
+ spatialdata::spatialdb::SpatialDB* const db,
+ const int querySize,
+ const double scale)
+{ // _queryDB
+ assert(0 != field);
+ assert(0 != db);
+
+ const topology::Mesh& mesh = field->mesh();
+ const spatialdata::geocoords::CoordSys* cs = mesh.coordsys();
+ assert(0 != cs);
+ const int spaceDim = cs->spaceDim();
+
+ const double lengthScale = getNormalizer().lengthScale();
+
+ double_array coordsVertex(spaceDim);
+ const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+ assert(!sieveMesh.isNull());
+ const ALE::Obj<RealSection>& coordinates =
+ sieveMesh->getRealSection("coordinates");
+ assert(!coordinates.isNull());
+
+ const ALE::Obj<RealSection>& section = field->section();
+ assert(!section.isNull());
+
+ double_array valuesVertex(querySize);
+
+ const int numPoints = _points.size();
+ for (int iPoint=0; iPoint < numPoints; ++iPoint) {
+ // Get dimensionalized coordinates of vertex
+ coordinates->restrictPoint(_points[iPoint],
+ &coordsVertex[0], coordsVertex.size());
+ getNormalizer().dimensionalize(&coordsVertex[0], coordsVertex.size(),
+ lengthScale);
+ int err = db->query(&valuesVertex[0], valuesVertex.size(),
+ &coordsVertex[0], coordsVertex.size(), cs);
+ if (err) {
+ std::ostringstream msg;
+ msg << "Error querying for '" << field->label() << "' at (";
+ for (int i=0; i < spaceDim; ++i)
+ msg << " " << coordsVertex[i];
+ msg << ") using spatial database " << db->label() << ".";
+ throw std::runtime_error(msg.str());
+ } // if
+ getNormalizer().nondimensionalize(&valuesVertex[0], valuesVertex.size(),
+ scale);
+ section->updatePoint(_points[iPoint], &valuesVertex[0]);
+ } // for
+} // _queryDB
+
+// ----------------------------------------------------------------------
+// Calculate temporal and spatial variation of value over the list of points.
+void
+pylith::bc::TimeDependentPoints::_calculateValue(const double t)
+{ // _calculateValue
+ assert(0 != _parameters);
+
+ const ALE::Obj<RealSection>& valueSection =
+ _parameters->get("value").section();
+ assert(!valueSection.isNull());
+ valueSection->zero();
+
+ const int numPoints = _points.size();
+ const int numBCDOF = _bcDOF.size();
+ const double timeScale = getNormalizer().timeScale();
+
+ const ALE::Obj<RealSection>& changeSection = (0 != _dbChange) ?
+ _parameters->get("change").section() : 0;
+ const ALE::Obj<RealSection>& changeTimeSection = (0 != _dbChange) ?
+ _parameters->get("change time").section() : 0;
+
+ // Contribution from initial value
+ if (0 != _dbInitial) {
+ double_array values(numBCDOF);
+ const ALE::Obj<RealSection>& initialSection =
+ _parameters->get("initial").section();
+ assert(!initialSection.isNull());
+
+ for (int iPoint=0; iPoint < numPoints; ++iPoint) {
+ const int p_bc = _points[iPoint]; // Get point label
+
+ initialSection->restrictPoint(p_bc, &values[0], values.size());
+ valueSection->updateAddPoint(p_bc, &values[0]);
+ } // for
+ } // if
+
+ // Contribution from rate of change of value
+ if (0 != _dbRate) {
+ double_array values(numBCDOF);
+ double tRate = 0.0;
+ const ALE::Obj<RealSection>& rateSection =
+ _parameters->get("rate").section();
+ assert(!rateSection.isNull());
+ const ALE::Obj<RealSection>& rateTimeSection =
+ _parameters->get("rate time").section();
+ assert(!rateTimeSection.isNull());
+
+ for (int iPoint=0; iPoint < numPoints; ++iPoint) {
+ const int p_bc = _points[iPoint]; // Get point label
+
+ rateSection->restrictPoint(p_bc, &values[0], values.size());
+ rateTimeSection->restrictPoint(p_bc, &tRate, 1);
+ if (t > tRate) { // rate of change integrated over time
+ values *= (t - tRate);
+ valueSection->updateAddPoint(p_bc, &values[0]);
+ } // if
+ } // for
+ } // if
+
+ // Contribution from change of value
+ if (0 != _dbChange) {
+ double_array values(numBCDOF);
+ double tChange = 0.0;
+ const ALE::Obj<RealSection>& changeSection =
+ _parameters->get("change").section();
+ assert(!changeSection.isNull());
+ const ALE::Obj<RealSection>& changeTimeSection =
+ _parameters->get("change time").section();
+ assert(!changeTimeSection.isNull());
+
+ for (int iPoint=0; iPoint < numPoints; ++iPoint) {
+ const int p_bc = _points[iPoint]; // Get point label
+
+ changeSection->restrictPoint(p_bc, &values[0], values.size());
+ changeTimeSection->restrictPoint(p_bc, &tChange, 1);
+ if (t > tChange) { // change in value over time
+ double scale = 1.0;
+ if (0 != _dbTimeHistory) {
+ double tDim = t - tChange;
+ getNormalizer().dimensionalize(&tDim, 1, timeScale);
+ const int err = _dbTimeHistory->query(&scale, tDim);
+ if (0 != err) {
+ std::ostringstream msg;
+ msg << "Error querying for time '" << tDim << "' in time history database "
+ << _dbTimeHistory->label() << ".";
+ throw std::runtime_error(msg.str());
+ } // if
+ } // if
+ values *= scale;
+ valueSection->updateAddPoint(p_bc, &values[0]);
+ } // if
+ } // for
+ } // if
+} // _calculateValue
+
+
+// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/bc/TimeDependentPoints.hh
+ *
+ * @brief C++ implementation of time dependent boundary conditions
+ * applied to a set of vertices.
+ */
+
+#if !defined(pylith_bc_timedependentpoints_hh)
+#define pylith_bc_timedependentpoints_hh
+
+// Include directives ---------------------------------------------------
+#include "BoundaryConditionPoints.hh" // ISA BoundaryConditionPoints
+#include "TimeDependent.hh" // ISA TimeDependent
+
+#include "pylith/utils/array.hh" // HASA int_array
+
+// TimeDependentPoints ------------------------------------------------------
+class pylith::bc::TimeDependentPoints : public BoundaryConditionPoints,
+ public TimeDependent
+{ // class TimeDependentPoints
+ friend class TestTimeDependentPoints; // unit testing
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Default constructor.
+ TimeDependentPoints(void);
+
+ /// Destructor.
+ ~TimeDependentPoints(void);
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /** Get label of boundary condition surface.
+ *
+ * @returns Label of surface (from mesh generator).
+ */
+ const char* getLabel(void) const;
+
+ /** Query databases for time dependent parameters.
+ *
+ * @param mesh Finite-element mesh.
+ * @param valueScale Dimension scale for value.
+ * @param fieldName Name of field associated with value.
+ */
+ void _queryDatabases(const topology::Mesh& mesh,
+ const double valueScale,
+ const char* fieldName);
+
+ /** Wuery database for values.
+ *
+ * @param field Field in which to store values.
+ * @param db Spatial database with values.
+ * @param querySize Number of values at each location.
+ * @param scale Dimension scale associated with values.
+ */
+ void _queryDB(topology::Field<topology::Mesh>* field,
+ spatialdata::spatialdb::SpatialDB* const db,
+ const int querySize,
+ const double scale);
+
+ /** Calculate spatial and temporal variation of value over the list
+ * of points.
+ *
+ * @param t Current time.
+ */
+ void _calculateValue(const double t);
+
+ // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+ TimeDependentPoints(const TimeDependentPoints&); ///< Not implemented.
+ const TimeDependentPoints& operator=(const TimeDependentPoints&); ///< Not implemented.
+
+}; // class TimeDependentPoints
+
+#include "TimeDependentPoints.icc"
+
+#endif // pylith_bc_timedependentpoints_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.icc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.icc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,25 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#if !defined(pylith_bc_timedependentpoints_hh)
+#error "TimeDependentPoints.icc can only be included from TimeDependentPoints.hh"
+#endif
+
+// Get label of boundary condition surface.
+inline
+const char*
+pylith::bc::TimeDependentPoints::getLabel(void) const {
+ return label();
+}
+
+
+// End of file
Modified: short/3D/PyLith/trunk/libsrc/bc/bcfwd.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/bcfwd.hh 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/libsrc/bc/bcfwd.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -25,6 +25,10 @@
namespace bc {
class BoundaryCondition;
+ class BoundaryConditionPoints;
+ class TimeDependent;
+ class TimeDependentPoints;
+ class TimeDependentSubMesh;
class DirichletBC;
class DirichletBoundary;
class Neumann;
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2009-06-07 03:30:55 UTC (rev 15131)
@@ -22,6 +22,18 @@
# Primary source files
testbc_SOURCES = \
TestBoundaryCondition.cc \
+ TestTimeDependent.cc \
+ TestBoundaryMesh.cc \
+ TestBoundaryMeshTri3.cc \
+ TestBoundaryMeshQuad4.cc \
+ TestBoundaryMeshTet4.cc \
+ TestBoundaryMeshHex8.cc \
+ TestAbsorbingDampers.cc \
+ TestAbsorbingDampersLine2.cc \
+ TestAbsorbingDampersTri3.cc \
+ TestAbsorbingDampersQuad4.cc \
+ TestAbsorbingDampersTet4.cc \
+ TestAbsorbingDampersHex8.cc \
TestDirichletBC.cc \
TestDirichletBCLine2.cc \
TestDirichletBCLine2b.cc \
@@ -43,34 +55,25 @@
TestNeumannQuad4.cc \
TestNeumannTet4.cc \
TestNeumannHex8.cc \
- TestAbsorbingDampers.cc \
- TestAbsorbingDampersLine2.cc \
- TestAbsorbingDampersTri3.cc \
- TestAbsorbingDampersQuad4.cc \
- TestAbsorbingDampersTet4.cc \
- TestAbsorbingDampersHex8.cc \
- TestBoundaryMesh.cc \
- TestBoundaryMeshTri3.cc \
- TestBoundaryMeshQuad4.cc \
- TestBoundaryMeshTet4.cc \
- TestBoundaryMeshHex8.cc \
+ TestPointForce.cc \
+ TestPointForceTri3.cc \
test_bc.cc
-
noinst_HEADERS = \
+ TestBoundaryCondition.hh \
+ TestTimeDependent.hh \
+ TestBoundaryMesh.hh \
+ TestBoundaryMeshTri3.hh \
+ TestBoundaryMeshQuad4.hh \
+ TestBoundaryMeshTet4.hh \
+ TestBoundaryMeshHex8.hh \
TestAbsorbingDampers.hh \
TestAbsorbingDampersLine2.hh \
TestAbsorbingDampersTri3.hh \
TestAbsorbingDampersQuad4.hh \
TestAbsorbingDampersTet4.hh \
TestAbsorbingDampersHex8.hh \
- TestBoundaryCondition.hh \
- TestBoundaryMesh.hh \
- TestBoundaryMeshTri3.hh \
- TestBoundaryMeshQuad4.hh \
- TestBoundaryMeshTet4.hh \
- TestBoundaryMeshHex8.hh \
TestDirichletBoundary.hh \
TestDirichletBoundaryTri3.hh \
TestDirichletBoundaryQuad4.hh \
@@ -91,21 +94,23 @@
TestNeumannTri3.hh \
TestNeumannQuad4.hh \
TestNeumannTet4.hh \
- TestNeumannHex8.hh
+ TestNeumannHex8.hh \
+ TestPointForce.hh \
+ TestPointForceTri3.hh
# Source files associated with testing data
testbc_SOURCES += \
+ data/BoundaryMeshData.cc \
+ data/BoundaryMeshDataTri3.cc \
+ data/BoundaryMeshDataQuad4.cc \
+ data/BoundaryMeshDataTet4.cc \
+ data/BoundaryMeshDataHex8.cc \
data/AbsorbingDampersData.cc \
data/AbsorbingDampersDataLine2.cc \
data/AbsorbingDampersDataTri3.cc \
data/AbsorbingDampersDataQuad4.cc \
data/AbsorbingDampersDataTet4.cc \
data/AbsorbingDampersDataHex8.cc \
- data/BoundaryMeshData.cc \
- data/BoundaryMeshDataTri3.cc \
- data/BoundaryMeshDataQuad4.cc \
- data/BoundaryMeshDataTet4.cc \
- data/BoundaryMeshDataHex8.cc \
data/DirichletData.cc \
data/DirichletDataLine2.cc \
data/DirichletDataLine2b.cc \
@@ -121,20 +126,22 @@
data/NeumannDataTri3.cc \
data/NeumannDataQuad4.cc \
data/NeumannDataTet4.cc \
- data/NeumannDataHex8.cc
+ data/NeumannDataHex8.cc \
+ data/PointForceData.cc \
+ data/PointForceDataTri3.cc
noinst_HEADERS += \
+ data/BoundaryMeshData.hh \
+ data/BoundaryMeshDataTri3.hh \
+ data/BoundaryMeshDataQuad4.hh \
+ data/BoundaryMeshDataTet4.hh \
+ data/BoundaryMeshDataHex8.hh \
data/AbsorbingDampersData.hh \
data/AbsorbingDampersDataLine2.hh \
data/AbsorbingDampersDataTri3.hh \
data/AbsorbingDampersDataQuad4.hh \
data/AbsorbingDampersDataTet4.hh \
data/AbsorbingDampersDataHex8.hh \
- data/BoundaryMeshData.hh \
- data/BoundaryMeshDataTri3.hh \
- data/BoundaryMeshDataQuad4.hh \
- data/BoundaryMeshDataTet4.hh \
- data/BoundaryMeshDataHex8.hh \
data/DirichletData.hh \
data/DirichletDataLine2.hh \
data/DirichletDataLine2b.hh \
@@ -150,8 +157,11 @@
data/NeumannDataTri3.hh \
data/NeumannDataQuad4.hh \
data/NeumannDataTet4.hh \
- data/NeumannDataHex8.hh
+ data/NeumannDataHex8.hh \
+ data/PointForceData.hh \
+ data/PointForceDataTri3.hh
+
AM_CPPFLAGS = \
$(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) \
$(PETSC_SIEVE_FLAGS) $(PETSC_INCLUDE)
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,230 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestPointForce.hh" // Implementation of class methods
+
+#include "pylith/bc/PointForce.hh" // USES PointForce
+
+#include "data/PointForceData.hh" // USES PointForceData
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/SolutionFields.hh" // USES SolutionFields
+#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/UniformDB.hh" // USES UniformDB
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestPointForce );
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestPointForce::setUp(void)
+{ // setUp
+ _data = 0;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestPointForce::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::bc::TestPointForce::testConstructor(void)
+{ // testConstructor
+ PointForce bc;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test initialize().
+void
+pylith::bc::TestPointForce::testInitialize(void)
+{ // testInitialize
+ topology::Mesh mesh;
+ PointForce bc;
+ _initialize(&mesh, &bc);
+ CPPUNIT_ASSERT(0 != _data);
+
+ const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+ CPPUNIT_ASSERT(!sieveMesh.isNull());
+
+ const int numCells = sieveMesh->heightStratum(0)->size();
+ const int numForceDOF = _data->numForceDOF;
+ const size_t numPoints = _data->numForcePts;
+
+ // Check points
+ const int offset = numCells;
+ if (numForceDOF > 0) {
+ CPPUNIT_ASSERT_EQUAL(numPoints, bc._points.size());
+ for (int i=0; i < numPoints; ++i)
+ CPPUNIT_ASSERT_EQUAL(_data->forcePoints[i]+offset, bc._points[i]);
+ } // if
+
+ // Check values
+ CPPUNIT_ASSERT(0 != bc._parameters);
+ const ALE::Obj<RealSection>& initialSection =
+ bc._parameters->get("initial").section();
+ CPPUNIT_ASSERT(!initialSection.isNull());
+
+ const double tolerance = 1.0e-06;
+ for (int i=0; i < numPoints; ++i) {
+ const int p_force = _data->forcePoints[i]+offset;
+ CPPUNIT_ASSERT_EQUAL(numForceDOF, initialSection->getFiberDimension(p_force));
+ const double* valuesInitial = initialSection->restrictPoint(p_force);
+ for (int iDOF=0; iDOF < numForceDOF; ++iDOF)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->forceInitial[i*numForceDOF+iDOF],
+ valuesInitial[iDOF], tolerance);
+ } // for
+
+ // Check rate of change
+ const ALE::Obj<RealSection>& rateSection =
+ bc._parameters->get("rate").section();
+ CPPUNIT_ASSERT(!rateSection.isNull());
+
+ for (int i=0; i < numPoints; ++i) {
+ const int p_force = _data->forcePoints[i]+offset;
+ CPPUNIT_ASSERT_EQUAL(numForceDOF, rateSection->getFiberDimension(p_force));
+ const double* valuesRate = rateSection->restrictPoint(p_force);
+ for (int iDOF=0; iDOF < numForceDOF; ++iDOF)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->forceRate,
+ valuesRate[iDOF], tolerance);
+ } // for
+} // testInitialize
+
+// ----------------------------------------------------------------------
+// Test integrateResidualAssembled().
+void
+pylith::bc::TestPointForce::testIntegrateResidualAssembled(void)
+{ // testIntegrateResidualAssembled
+ topology::Mesh mesh;
+ PointForce bc;
+ _initialize(&mesh, &bc);
+
+ topology::Field<topology::Mesh> residual(mesh);
+ const spatialdata::geocoords::CoordSys* cs = mesh.coordsys();
+ CPPUNIT_ASSERT(0 != cs);
+ const int spaceDim = cs->spaceDim();
+ residual.newSection(topology::FieldBase::VERTICES_FIELD, spaceDim);
+ residual.allocate();
+ residual.zero();
+
+ topology::SolutionFields fields(mesh);
+
+ const double t = _data->tResidual;
+ bc.integrateResidualAssembled(&residual, t, &fields);
+
+ const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+ CPPUNIT_ASSERT(!sieveMesh.isNull());
+ CPPUNIT_ASSERT(!sieveMesh->depthStratum(0).isNull());
+
+ const double* valsE = _data->residual;
+ const int totalNumVertices = sieveMesh->depthStratum(0)->size();
+ const int sizeE = spaceDim * totalNumVertices;
+
+ const ALE::Obj<RealSection>& residualSection = residual.section();
+ CPPUNIT_ASSERT(!residualSection.isNull());
+ const double* vals = residualSection->restrictSpace();
+ const int size = residualSection->sizeWithBC();
+ CPPUNIT_ASSERT_EQUAL(sizeE, size);
+
+ residual.view("RESIDUAL");
+
+ const double tolerance = 1.0e-06;
+ for (int i=0; i < size; ++i)
+ if (fabs(valsE[i]) > 1.0)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
+ else
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
+} // testIntegrateResidualAssembled
+
+// ----------------------------------------------------------------------
+// Test verifyConfiguration().
+void
+pylith::bc::TestPointForce::testVerifyConfiguration(void)
+{ // testVerifyConfiguration
+ topology::Mesh mesh;
+ PointForce bc;
+ _initialize(&mesh, &bc);
+
+ bc.verifyConfiguration(mesh);
+} // testVerifyConfiguration
+
+// ----------------------------------------------------------------------
+void
+pylith::bc::TestPointForce::_initialize(topology::Mesh* mesh,
+ PointForce* const bc) const
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+ CPPUNIT_ASSERT(0 != bc);
+
+ meshio::MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(mesh);
+
+ spatialdata::geocoords::CSCart cs;
+ spatialdata::units::Nondimensional normalizer;
+ cs.setSpaceDim(mesh->dimension());
+ cs.initialize();
+ mesh->coordsys(&cs);
+ mesh->nondimensionalize(normalizer);
+
+ spatialdata::spatialdb::SimpleDB dbInitial("TestPointForce initial");
+ spatialdata::spatialdb::SimpleIOAscii dbInitialIO;
+ dbInitialIO.filename(_data->dbFilename);
+ dbInitial.ioHandler(&dbInitialIO);
+ dbInitial.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+
+ 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 double values[numValues] = { _data->forceRate,
+ _data->forceRate,
+ _data->forceRate };
+ 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
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForce.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestPointForce.hh
+ *
+ * @brief C++ TestPointForce object.
+ *
+ * C++ unit testing for PointForce.
+ */
+
+#if !defined(pylith_bc_testpointforce_hh)
+#define pylith_bc_testpointforce_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/bc/bcfwd.hh" // forward declarations
+#include "pylith/topology/topologyfwd.hh" // forward declarations
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestPointForce;
+ class PointForceData;
+ } // bc
+} // pylith
+
+/// C++ unit testing for PointForce.
+class pylith::bc::TestPointForce : public CppUnit::TestFixture
+{ // class TestPointForce
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestPointForce );
+
+ CPPUNIT_TEST( testConstructor );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Test constructor.
+ void testConstructor(void);
+
+ /// Test initialize().
+ void testInitialize(void);
+
+ /// Test integrateResidualAssembled().
+ void testIntegrateResidualAssembled(void);
+
+ /// Test verifyConfiguration().
+ void testVerifyConfiguration(void);
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ PointForceData* _data; ///< Data for testing
+
+ // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+ /** Initialize PointForce boundary condition.
+ *
+ * @param mesh Finite-element mesh to initialize.
+ * @param bc PointForce boundary condition to initialize.
+ */
+ void _initialize(topology::Mesh* mesh,
+ PointForce* const bc) const;
+
+}; // class TestPointForce
+
+#endif // pylith_bc_pointforce_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestPointForceTri3.hh" // Implementation of class methods
+
+#include "data/PointForceDataTri3.hh" // USES DirichletDataTri3
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestPointForceTri3 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestPointForceTri3::setUp(void)
+{ // setUp
+ _data = new PointForceDataTri3();
+} // setUp
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestPointForceTri3.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestPointForceTri3.hh
+ *
+ * @brief C++ TestPointForce object.
+ *
+ * C++ unit testing for PointForce for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testpointforcebctri3_hh)
+#define pylith_bc_testpointforcebctri3_hh
+
+#include "TestPointForce.hh" // ISA TestPointForce
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestPointForceTri3;
+ } // bc
+} // pylith
+
+/// C++ unit testing for PointForce for mesh with 2-D tri cells.
+class pylith::bc::TestPointForceTri3 : public TestPointForce
+{ // class TestPointForce
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestPointForceTri3, TestPointForce );
+
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testIntegrateResidualAssembled );
+ CPPUNIT_TEST( testVerifyConfiguration );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestPointForceTri3
+
+#endif // pylith_bc_pointforcebctri3_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,283 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestTimeDependent.hh" // Implementation of class methods
+
+#include "pylith/bc/PointForce.hh" // USES PointForce
+#include "pylith/topology/Mesh.hh" // USES Mesh
+
+#include "spatialdata/spatialdb/UniformDB.hh" // USES UniformDB
+#include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestTimeDependent );
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::bc::TestTimeDependent::testBCDOF(void)
+{ // testBCDOF
+ PointForce bc;
+
+ const size_t numDOF = 4;
+ const int fixedDOF[numDOF] = { 0, 2, 3, 5 };
+ bc.bcDOF(fixedDOF, numDOF);
+
+ CPPUNIT_ASSERT_EQUAL(numDOF, bc._bcDOF.size());
+ for (int i=0; i < numDOF; ++i)
+ CPPUNIT_ASSERT_EQUAL(fixedDOF[i], bc._bcDOF[i]);
+} // testBCDOF
+
+// ----------------------------------------------------------------------
+// Test dbInitial().
+void
+pylith::bc::TestTimeDependent::testDBInitial(void)
+{ // testDBInitial
+ PointForce bc;
+
+ spatialdata::spatialdb::UniformDB db;
+ bc.dbInitial(&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);
+} // testDBInitial
+
+// ----------------------------------------------------------------------
+// Test dbRate().
+void
+pylith::bc::TestTimeDependent::testDBRate(void)
+{ // testDBRate
+ PointForce bc;
+
+ spatialdata::spatialdb::UniformDB db;
+ bc.dbRate(&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);
+} // 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)
+{ // testDBChange
+ PointForce bc;
+
+ spatialdata::spatialdb::UniformDB db;
+ bc.dbChange(&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);
+} // 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)
+{ // testDBTimeHistory
+ PointForce bc;
+
+ spatialdata::spatialdb::TimeHistory th;
+ bc.dbTimeHistory(&th);
+
+ 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
+
+// ----------------------------------------------------------------------
+// Test verifyConfiguration().
+void
+pylith::bc::TestTimeDependent::testVerifyConfiguration(void)
+{ // testVerifyConfiguration
+ topology::Mesh mesh;
+ spatialdata::spatialdb::UniformDB db;
+ spatialdata::spatialdb::TimeHistory th;
+
+ { // initial
+ PointForce bc;
+ bc.dbInitial(&db);
+ bc.TimeDependent::verifyConfiguration(mesh);
+ } // initial
+
+ { // 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 {
+ 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.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
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestTimeDependent.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestTimeDependent.hh
+ *
+ * @brief C++ TestTimeDependent object.
+ *
+ * C++ unit testing for TimeDependent.
+ */
+
+#if !defined(pylith_bc_testtimedependent_hh)
+#define pylith_bc_testtimedependent_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestTimeDependent;
+ } // bc
+} // pylith
+
+/// C++ unit testing for PointForce.
+class pylith::bc::TestTimeDependent : public CppUnit::TestFixture
+{ // class TestTimeDependent
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestTimeDependent );
+
+ CPPUNIT_TEST( testBCDOF );
+ CPPUNIT_TEST( testDBInitial );
+ CPPUNIT_TEST( testDBRate );
+ CPPUNIT_TEST( testDBRateTime );
+ CPPUNIT_TEST( testDBChange );
+ CPPUNIT_TEST( testDBChangeTime );
+ CPPUNIT_TEST( testDBTimeHistory );
+ CPPUNIT_TEST( testVerifyConfiguration );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Test bcDOF.
+ void testBCDOF(void);
+
+ /// Test dbInitial().
+ void testDBInitial(void);
+
+ /// 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);
+
+ /// Test verifyConfiguration().
+ void testVerifyConfiguration(void);
+
+}; // class TestTimeDependent
+
+#endif // pylith_bc_pointforce_hh
+
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -51,7 +51,7 @@
const char* pylith::bc::DirichletDataHex8::_meshFilename =
"data/hex8.mesh";
const char* pylith::bc::DirichletDataHex8::_dbFilename =
- "data/hex8.spatialdb";
+ "data/hex8_disp.spatialdb";
pylith::bc::DirichletDataHex8::DirichletDataHex8(void)
{ // constructor
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -46,7 +46,7 @@
const char* pylith::bc::DirichletDataLine2::_meshFilename =
"data/line2.mesh";
const char* pylith::bc::DirichletDataLine2::_dbFilename =
- "data/line2.spatialdb";
+ "data/line2_disp.spatialdb";
pylith::bc::DirichletDataLine2::DirichletDataLine2(void)
{ // constructor
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -37,7 +37,7 @@
const char* pylith::bc::DirichletDataLine2b::_meshFilename =
"data/line2.mesh";
const char* pylith::bc::DirichletDataLine2b::_dbFilename =
- "data/line2.spatialdb";
+ "data/line2_disp2.spatialdb";
pylith::bc::DirichletDataLine2b::DirichletDataLine2b(void)
{ // constructor
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTet4.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTet4.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -69,9 +69,9 @@
const int pylith::bc::DirichletDataMultiTet4::_constrainedPointsA[] = { 0, 2, 3, 4 };
const char* pylith::bc::DirichletDataMultiTet4::_dbFilenameA =
- "data/tet4_a.spatialdb";
+ "data/tet4_disp2.spatialdb";
const char* pylith::bc::DirichletDataMultiTet4::_dbFilenameARate =
- "data/tet4_a_rate.spatialdb";
+ "data/tet4_vel2.spatialdb";
const double pylith::bc::DirichletDataMultiTet4::_tRefA = 0.0;
const int pylith::bc::DirichletDataMultiTet4::_idB = 1;
@@ -82,9 +82,9 @@
const int pylith::bc::DirichletDataMultiTet4::_constrainedPointsB[] = { 0, 2, 3 };
const char* pylith::bc::DirichletDataMultiTet4::_dbFilenameB =
- "data/tet4_a.spatialdb";
+ "data/tet4_disp2.spatialdb";
const char* pylith::bc::DirichletDataMultiTet4::_dbFilenameBRate =
- "data/tet4_a_rate.spatialdb";
+ "data/tet4_vel2.spatialdb";
const double pylith::bc::DirichletDataMultiTet4::_tRefB = 0.0;
const int pylith::bc::DirichletDataMultiTet4::_idC = 1;
@@ -95,9 +95,9 @@
const int pylith::bc::DirichletDataMultiTet4::_constrainedPointsC[] = { 1, 2, 3 };
const char* pylith::bc::DirichletDataMultiTet4::_dbFilenameC =
- "data/tet4_a.spatialdb";
+ "data/tet4_disp2.spatialdb";
const char* pylith::bc::DirichletDataMultiTet4::_dbFilenameCRate =
- "data/tet4_a_rate.spatialdb";
+ "data/tet4_vel2.spatialdb";
const double pylith::bc::DirichletDataMultiTet4::_tRefC = 0.0;
const int pylith::bc::DirichletDataMultiTet4::_constraintSizes[] = {
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -49,9 +49,9 @@
const int pylith::bc::DirichletDataMultiTri3::_constrainedPointsA[] = { 1, 3 };
const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameA =
- "data/tri3.spatialdb";
+ "data/tri3_disp.spatialdb";
const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameARate =
- "data/tri3_rate.spatialdb";
+ "data/tri3_vel.spatialdb";
const double pylith::bc::DirichletDataMultiTri3::_tRefA = 3.2;
const int pylith::bc::DirichletDataMultiTri3::_idB = 1;
@@ -62,9 +62,9 @@
const int pylith::bc::DirichletDataMultiTri3::_constrainedPointsB[] = { 2, 3 };
const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameB =
- "data/tri3_b.spatialdb";
+ "data/tri3_disp2.spatialdb";
const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameBRate =
- "data/tri3_b_rate.spatialdb";
+ "data/tri3_vel2.spatialdb";
const double pylith::bc::DirichletDataMultiTri3::_tRefB = 0.4;
const int pylith::bc::DirichletDataMultiTri3::_constraintSizes[] = {
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -45,7 +45,7 @@
const char* pylith::bc::DirichletDataQuad4::_meshFilename =
"data/quad4.mesh";
const char* pylith::bc::DirichletDataQuad4::_dbFilename =
- "data/quad4.spatialdb";
+ "data/quad4_disp.spatialdb";
pylith::bc::DirichletDataQuad4::DirichletDataQuad4(void)
{ // constructor
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -49,7 +49,7 @@
const char* pylith::bc::DirichletDataTet4::_meshFilename =
"data/tet4.mesh";
const char* pylith::bc::DirichletDataTet4::_dbFilename =
- "data/tet4.spatialdb";
+ "data/tet4_disp.spatialdb";
pylith::bc::DirichletDataTet4::DirichletDataTet4(void)
{ // constructor
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -44,7 +44,7 @@
const char* pylith::bc::DirichletDataTri3::_meshFilename =
"data/tri3.mesh";
const char* pylith::bc::DirichletDataTri3::_dbFilename =
- "data/tri3.spatialdb";
+ "data/tri3_disp.spatialdb";
pylith::bc::DirichletDataTri3::DirichletDataTri3(void)
{ // constructor
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am 2009-06-07 03:30:55 UTC (rev 15131)
@@ -12,30 +12,32 @@
dist_noinst_DATA = \
line2.mesh \
- line2.spatialdb \
- line2-tractions.spatialdb \
+ line2_disp.spatialdb \
+ line2_tractions.spatialdb \
elasticstrain1d.spatialdb \
tri3.mesh \
- tri3.spatialdb \
- tri3_rate.spatialdb \
- tri3_b.spatialdb \
- tri3_b_rate.spatialdb \
- tri3-tractions.spatialdb \
+ tri3_disp.spatialdb \
+ tri3_vel.spatialdb \
+ tri3_disp2.spatialdb \
+ tri3_vel2.spatialdb \
+ tri3_tractions.spatialdb \
+ tri3_force.spatialdb \
elasticplanestrain.spatialdb \
quad4.mesh \
- quad4.spatialdb \
- quad4-tractions.spatialdb \
+ quad4_disp.spatialdb \
+ quad4_tractions.spatialdb \
tet4.mesh \
- tet4.spatialdb \
- tet4_a.spatialdb \
- tet4_a_rate.spatialdb \
- tet4-tractions.spatialdb \
+ tet4_disp.spatialdb \
+ tet4_disp2.spatialdb \
+ tet4_vel2.spatialdb \
+ tet4_tractions.spatialdb \
elasticisotropic3d.spatialdb \
hex8.mesh \
- hex8.spatialdb \
+ hex8_disp.spatialdb \
hex8b.mesh \
- hex8b.spatialdb
+ hex8b_disp.spatialdb
+
# 'export' the input files by performing a mock install
export_datadir = $(top_builddir)/unittests/libtests/bc/data
export-data: $(dist_noinst_DATA)
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataLine2.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataLine2.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -40,7 +40,7 @@
};
const char* pylith::bc::NeumannDataLine2::_spatialDBFilename =
- "data/line2-tractions.spatialdb";
+ "data/line2_tractions.spatialdb";
const int pylith::bc::NeumannDataLine2::_id = 0;
const char* pylith::bc::NeumannDataLine2::_label = "bc1";
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataQuad4.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataQuad4.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -58,7 +58,7 @@
};
const char* pylith::bc::NeumannDataQuad4::_spatialDBFilename =
- "data/quad4-tractions.spatialdb";
+ "data/quad4_tractions.spatialdb";
const int pylith::bc::NeumannDataQuad4::_id = 0;
const char* pylith::bc::NeumannDataQuad4::_label = "bc3";
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -53,7 +53,7 @@
};
const char* pylith::bc::NeumannDataTet4::_spatialDBFilename =
- "data/tet4-tractions.spatialdb";
+ "data/tet4_tractions.spatialdb";
const int pylith::bc::NeumannDataTet4::_id = 0;
const char* pylith::bc::NeumannDataTet4::_label = "bc3";
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTri3.cc 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTri3.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -48,7 +48,7 @@
};
const char* pylith::bc::NeumannDataTri3::_spatialDBFilename =
- "data/tri3-tractions.spatialdb";
+ "data/tri3_tractions.spatialdb";
const int pylith::bc::NeumannDataTri3::_id = 0;
const char* pylith::bc::NeumannDataTri3::_label = "bc";
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,42 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "PointForceData.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::bc::PointForceData::PointForceData(void) :
+ tRef(0),
+ forceRate(0),
+ tResidual(0),
+ numDOF(0),
+ numForceDOF(0),
+ numForcePts(0),
+ id(0),
+ label(0),
+ forceDOF(0),
+ forcePoints(0),
+ forceInitial(0),
+ residual(0),
+ meshFilename(0),
+ dbFilename(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::bc::PointForceData::~PointForceData(void)
+{ // destructor
+} // destructor
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_pointforcedata_hh)
+#define pylith_bc_pointforcedata_hh
+
+namespace pylith {
+ namespace bc {
+ class PointForceData;
+ } // pylith
+} // bc
+
+class pylith::bc::PointForceData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+ /// Constructor
+ PointForceData(void);
+
+ /// Destructor
+ ~PointForceData(void);
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+ double tRef; ///< Reference time for rate of change of forces.
+ double forceRate; ///< Rate of change of force.
+ double tResidual; ///< Time for computing residual.
+
+ int numDOF; ///< Number of degrees of freedom at each point.
+ int numForceDOF; ///< Number of forces at points.
+ int numForcePts; ///< Number of points with forces.
+
+ int id; ///< Boundary condition identifier
+ char* label; ///< Label for boundary condition group
+
+ int* forceDOF; ///< Degrees of freedom that are constrained at each point
+ int* forcePoints; ///< Array of indices of points with forces.
+ double* forceInitial; ///< Forces at points.
+ double* residual; ///< Residual field.
+
+ char* meshFilename; ///< Filename for input mesh.
+ char* dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_pointforcedata_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.cc 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTri3.txt
+ *
+ * PointForce BC at vertices 1 and 3.
+ *
+ * Force DOF: { 1 }
+ *
+ * Values
+ * 1: 0.3
+ * 3: 0.7
+ * tRef = 0.7
+ * Rate of change = -0.2
+ */
+
+#include "PointForceDataTri3.hh"
+
+const int pylith::bc::PointForceDataTri3::_id = 0;
+
+const char* pylith::bc::PointForceDataTri3::_label = "bc";
+
+const int pylith::bc::PointForceDataTri3::_numDOF = 2;
+const int pylith::bc::PointForceDataTri3::_numForceDOF = 1;
+const int pylith::bc::PointForceDataTri3::_forceDOF[] = { 1 };
+
+const int pylith::bc::PointForceDataTri3::_numForcePts = 2;
+const int pylith::bc::PointForceDataTri3::_forcePoints[] = { 1, 3 };
+
+const double pylith::bc::PointForceDataTri3::_tRef = 0.7;
+const double pylith::bc::PointForceDataTri3::_forceRate = -0.2;
+const double pylith::bc::PointForceDataTri3::_forceInitial[] =
+ { 0.3, 0.7 };
+
+const double pylith::bc::PointForceDataTri3::_tResidual = 1.5;
+const double pylith::bc::PointForceDataTri3::_residual[] =
+ { 0.0, 0.0,
+ 0.0, 0.14,
+ 0.0, 0.0,
+ 0.0, 0.54,
+ };
+
+const char* pylith::bc::PointForceDataTri3::_meshFilename =
+ "data/tri3.mesh";
+const char* pylith::bc::PointForceDataTri3::_dbFilename =
+ "data/tri3_force.spatialdb";
+
+pylith::bc::PointForceDataTri3::PointForceDataTri3(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numForceDOF = _numForceDOF;
+ forceDOF = const_cast<int*>(_forceDOF);
+
+ numForcePts = _numForcePts;
+ forcePoints = const_cast<int*>(_forcePoints);
+
+ tRef = _tRef;
+ forceRate = _forceRate;
+ forceInitial = const_cast<double*>(_forceInitial);
+
+ tResidual = _tResidual;
+ residual = const_cast<double*>(_residual);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::PointForceDataTri3::~PointForceDataTri3(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceDataTri3.hh 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,61 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_forcedatadatatri3_hh)
+#define pylith_bc_forcedatadatatri3_hh
+
+#include "PointForceData.hh"
+
+namespace pylith {
+ namespace bc {
+ class PointForceDataTri3;
+ } // pylith
+} // bc
+
+class pylith::bc::PointForceDataTri3 : public PointForceData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ PointForceDataTri3(void);
+
+ /// Destructor
+ ~PointForceDataTri3(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const double _tRef; ///< Reference time for rate of change of forces.
+ static const double _forceRate; ///< Rate of change of force.
+ static const double _tResidual; ///< Time for computing residual.
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+ static const int _numForceDOF; ///< Number of forces at points.
+ static const int _numForcePts; ///< Number of points with forces.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; ///< Label for boundary condition group
+
+ static const int _forceDOF[]; ///< Degrees of freedom that are constrained at each point
+ static const int _forcePoints[]; ///< Array of indices of points with forces.
+ static const double _forceInitial[]; ///< Forces at points.
+ static const double _residual[]; ///< Residual field.
+
+ static const char* _meshFilename; ///< Filename for input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_forcedatadatatri3_hh
+
+// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,17 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 3
- value-names = dof-0 dof-1 dof-2
- value-units = m m m
- num-locs = 4
- data-dim = 1
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
--1.0 -1.0 -1.0 -0.2 9.9 0.3
--1.0 1.0 -1.0 0.1 9.9 0.7
--1.0 -1.0 1.0 0.5 9.9 0.4
--1.0 1.0 1.0 3.2 9.9 6.1
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8_disp.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8_disp.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8_disp.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,17 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 4
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+-1.0 -1.0 -1.0 -0.2 9.9 0.3
+-1.0 1.0 -1.0 0.1 9.9 0.7
+-1.0 -1.0 1.0 0.5 9.9 0.4
+-1.0 1.0 1.0 3.2 9.9 6.1
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 3
- value-names = horiz-shear-traction vert-shear-traction normal-traction
- value-units = Pa Pa Pa
- num-locs = 1
- data-dim = 0
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
- 0.0 0.0 0.0 4.0 0.0 0.0
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b_disp.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b_disp.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8b_disp.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = horiz-shear-traction vert-shear-traction normal-traction
+ value-units = Pa Pa Pa
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+ 0.0 0.0 0.0 4.0 0.0 0.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/line2-tractions.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/line2-tractions.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/line2-tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = normal-traction
- value-units = Pa
- num-locs = 1
- data-dim = 0
- space-dim = 1
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 1
- }
-}
- 0.0 1.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-0
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 1
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 1
- }
-}
--1.0 1.1
-+1.0 2.2
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_disp.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_disp.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_disp.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-0
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 1
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 1
+ }
+}
+-1.0 1.1
++1.0 2.2
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_tractions.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/line2-tractions.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_tractions.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/line2_tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = normal-traction
+ value-units = Pa
+ num-locs = 1
+ data-dim = 0
+ space-dim = 1
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 1
+ }
+}
+ 0.0 1.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4-tractions.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4-tractions.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4-tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = shear-traction normal-traction
- value-units = Pa Pa
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
--1.0 0.0 0.0 0.0
- 1.0 0.0 0.0 1.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,16 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = dof-0 dof-1
- value-units = m m
- num-locs = 3
- data-dim = 2
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
--1.0 -1.0 0.1 0.6
- 0.0 -1.0 0.5 0.3
- 1.0 -1.0 0.4 0.2
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_disp.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_disp.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_disp.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = dof-0 dof-1
+ value-units = m m
+ num-locs = 3
+ data-dim = 2
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+-1.0 -1.0 0.1 0.6
+ 0.0 -1.0 0.5 0.3
+ 1.0 -1.0 0.4 0.2
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_tractions.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4-tractions.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_tractions.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4_tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = shear-traction normal-traction
+ value-units = Pa Pa
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+-1.0 0.0 0.0 0.0
+ 1.0 0.0 0.0 1.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4-tractions.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4-tractions.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4-tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 3
- value-names = horiz-shear-traction vert-shear-traction normal-traction
- value-units = Pa Pa Pa
- num-locs = 1
- data-dim = 0
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
- 0.0 0.0 0.0 1.0 1.0 1.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = dof-1 dof-2
- value-units = m m
- num-locs = 1
- data-dim = 0
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
-0.0 0.0 0.0 0.7 0.2
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,18 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 3
- value-names = dof-0 dof-1 dof-2
- value-units = m m m
- num-locs = 5
- data-dim = 3
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
- 0.0 0.0 0.0 0.1 99.9 0.01
- 1.0 0.0 0.0 9.9 11.0 9.99
- 0.0 1.0 0.0 0.2 22.0 0.02
- 0.0 0.0 1.0 0.3 33.0 0.03
--1.0 0.0 0.0 0.4 99.9 9.99
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a_rate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a_rate.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a_rate.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,18 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 3
- value-names = dof-0 dof-1 dof-2
- value-units = m m m
- num-locs = 5
- data-dim = 3
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
- 0.0 0.0 0.0 1.0 99.9 -1.0
- 1.0 0.0 0.0 9.9 10.0 -9.9
- 0.0 1.0 0.0 2.0 20.0 -2.0
- 0.0 0.0 1.0 3.0 30.0 -3.0
--1.0 0.0 0.0 4.0 99.9 -9.9
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = dof-1 dof-2
+ value-units = m m
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 0.7 0.2
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp2.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp2.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_disp2.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,18 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 5
+ data-dim = 3
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+ 0.0 0.0 0.0 0.1 99.9 0.01
+ 1.0 0.0 0.0 9.9 11.0 9.99
+ 0.0 1.0 0.0 0.2 22.0 0.02
+ 0.0 0.0 1.0 0.3 33.0 0.03
+-1.0 0.0 0.0 0.4 99.9 9.99
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_tractions.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4-tractions.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_tractions.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = horiz-shear-traction vert-shear-traction normal-traction
+ value-units = Pa Pa Pa
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+ 0.0 0.0 0.0 1.0 1.0 1.0
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_vel2.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_a_rate.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_vel2.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4_vel2.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,18 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 5
+ data-dim = 3
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+ 0.0 0.0 0.0 1.0 99.9 -1.0
+ 1.0 0.0 0.0 9.9 10.0 -9.9
+ 0.0 1.0 0.0 2.0 20.0 -2.0
+ 0.0 0.0 1.0 3.0 30.0 -3.0
+-1.0 0.0 0.0 4.0 99.9 -9.9
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3-tractions.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3-tractions.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3-tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = shear-traction normal-traction
- value-units = Pa Pa
- num-locs = 1
- data-dim = 0
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
- 0.0 0.0 1.0 1.0
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-1
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
- 0.0 -1.0 0.3
- 1.0 0.0 0.7
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-0
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
- 0.0 1.0 0.9
- 1.0 0.0 0.5
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b_rate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b_rate.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b_rate.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-0
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
- 0.0 1.0 -0.4
- 1.0 0.0 0.2
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-1
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 -1.0 0.3
+ 1.0 0.0 0.7
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp2.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp2.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_disp2.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-0
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 1.0 0.9
+ 1.0 0.0 0.5
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_force.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = force-y
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 -1.0 0.3
+ 1.0 0.0 0.7
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_rate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_rate.spatialdb 2009-06-07 02:46:05 UTC (rev 15130)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_rate.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-1
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
- 0.0 -1.0 0.2
- 1.0 0.0 0.8
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_tractions.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3-tractions.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_tractions.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_tractions.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = shear-traction normal-traction
+ value-units = Pa Pa
+ num-locs = 1
+ data-dim = 0
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 0.0 1.0 1.0
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_rate.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-1
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 -1.0 0.2
+ 1.0 0.0 0.8
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel2.spatialdb (from rev 15127, short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b_rate.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel2.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_vel2.spatialdb 2009-06-07 03:30:55 UTC (rev 15131)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-0
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 1.0 -0.4
+ 1.0 0.0 0.2
More information about the CIG-COMMITS
mailing list