[cig-commits] r9153 - in short/3D/PyLith/trunk: . libsrc libsrc/bc modulesrc/bc pylith pylith/bc unittests/libtests/bc unittests/libtests/bc/data unittests/pytests/bc
brad at geodynamics.org
brad at geodynamics.org
Mon Jan 28 15:35:39 PST 2008
Author: brad
Date: 2008-01-28 15:35:39 -0800 (Mon, 28 Jan 2008)
New Revision: 9153
Added:
short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.hh
short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.icc
short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.hh
short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletPoints.py
Removed:
short/3D/PyLith/trunk/libsrc/bc/Dirichlet.cc
short/3D/PyLith/trunk/libsrc/bc/Dirichlet.hh
short/3D/PyLith/trunk/libsrc/bc/Dirichlet.icc
short/3D/PyLith/trunk/pylith/bc/Dirichlet.py
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh
short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/Makefile.am
short/3D/PyLith/trunk/libsrc/bc/Makefile.am
short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src
short/3D/PyLith/trunk/pylith/Makefile.am
short/3D/PyLith/trunk/pylith/bc/BCFourSides.py
short/3D/PyLith/trunk/pylith/bc/BCSingle.py
short/3D/PyLith/trunk/pylith/bc/BCSixSides.py
short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py
short/3D/PyLith/trunk/pylith/bc/__init__.py
short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryCondition.cc
short/3D/PyLith/trunk/unittests/pytests/bc/Makefile.am
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py
short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py
Log:
Changed Dirichlet to DirichletPoints (set of points without any topology) in preparation for adding DirichletBoundary (set of points with topology).
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/TODO 2008-01-28 23:35:39 UTC (rev 9153)
@@ -7,24 +7,21 @@
1. Finish Neumann BC [CHARLES]
2. Reimplement SolutionIO [BRAD & MATT]
- c. Implement output of fault data.
- Need to create fault mesh from cohesive cells (Matt will do)
- i. getFaultMesh()
- ii. getVertexField()
- iii. getCellField()
- d. Implement output of material information.
+ a. Implement output of fault data.
+ Need to finish implementing output of traction_change.
+ b. Implement output of material information.
i. CellFilterAvg (average data over quadrature points)
- e. Implement output of Neumann information.
+ c. Implement output of Neumann information.
i. BoundaryCondition::writeInfo()?
- f. Implement output of Dirichlet information.
+ d. Implement output of Dirichlet information.
i. DirichletBoundary versus DirichletPoints
- g. Implement output of solution subset (ground surface).
+ e. Implement output of solution subset (ground surface).
i. OutputSubdomain
ii. OutputPoints
- h. VertexFilterChangeCS
+ f. VertexFilterChangeCS
i. OutputFilter for writing vertex coordinates in another
coordinate system.
- i. DataWriterHDF5
+ g. DataWriterHDF5
Use Cases
@@ -87,7 +84,7 @@
Solution field (time history)
3. Optimization [BRAD]
- a. Fault? (all parameters in one section)?
+ a. Fault? (all parameters in one section over fault mesh)?
b. Absorbing BC?
c. Neumann BC?
Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am 2008-01-28 23:35:39 UTC (rev 9153)
@@ -24,7 +24,7 @@
libpylith_la_SOURCES = \
bc/AbsorbingDampers.cc \
bc/BoundaryCondition.cc \
- bc/Dirichlet.cc \
+ bc/DirichletPoints.cc \
bc/Neumann.cc \
faults/BruneSlipFn.cc \
faults/CohesiveTopology.cc \
Deleted: short/3D/PyLith/trunk/libsrc/bc/Dirichlet.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Dirichlet.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/libsrc/bc/Dirichlet.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,215 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "Dirichlet.hh" // implementation of object methods
-
-#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
-#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
-
-#include <assert.h> // USES assert()
-#include <stdexcept> // USES std::runtime_error
-#include <sstream> // USES std::ostringstream
-
-// ----------------------------------------------------------------------
-// Default constructor.
-pylith::bc::Dirichlet::Dirichlet(void)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor.
-pylith::bc::Dirichlet::~Dirichlet(void)
-{ // destructor
-} // destructor
-
-// ----------------------------------------------------------------------
-// Initialize boundary condition.
-void
-pylith::bc::Dirichlet::initialize(const ALE::Obj<ALE::Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
- const double_array& upDir)
-{ // initialize
- assert(0 != _db);
- assert(!mesh.isNull());
- assert(0 != cs);
-
- const int numFixedDOF = _fixedDOF.size();
- if (0 == numFixedDOF)
- return;
-
- // Get points associated with boundary condition
- const ALE::Obj<int_section_type>& groupField = mesh->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 int_section_type::chart_type& chart = groupField->getChart();
- const int numPoints = chart.size();
- _points.resize(numPoints);
- int i = 0;
- for(int_section_type::chart_type::iterator c_iter = chart.begin();
- c_iter != chart.end();
- ++c_iter) {
- _points[i++] = *c_iter;
- }
-
- // Get values for degrees of freedom
- char** valueNames = (numFixedDOF > 0) ? new char*[numFixedDOF] : 0;
- for (int i=0; i < numFixedDOF; ++i) {
- std::ostringstream name;
- name << "dof-" << _fixedDOF[i];
- const int size = 1 + name.str().length();
- valueNames[i] = new char[size];
- strcpy(valueNames[i], name.str().c_str());
- } // for
- _db->open();
- _db->queryVals((const char**) valueNames, numFixedDOF);
- for (int i=0; i < numFixedDOF; ++i) {
- delete[] valueNames[i]; valueNames[i] = 0;
- } // for
- delete[] valueNames; valueNames = 0;
-
- const ALE::Obj<real_section_type>& coordinates =
- mesh->getRealSection("coordinates");
- assert(!coordinates.isNull());
- const int spaceDim = cs->spaceDim();
-
- _values.resize(numPoints*numFixedDOF);
- double_array queryValues(numFixedDOF);
- for (int iPoint=0, i=0; iPoint < numPoints; ++iPoint) {
- // Get coordinates of vertex
- const real_section_type::value_type* vCoords =
- coordinates->restrictPoint(_points[iPoint]);
- int err = _db->query(&queryValues[0], numFixedDOF, vCoords, spaceDim, cs);
- if (err) {
- std::ostringstream msg;
- msg << "Could not find values at (";
- for (int i=0; i < spaceDim; ++i)
- msg << " " << vCoords[i];
- msg << ") using spatial database " << _db->label() << ".";
- throw std::runtime_error(msg.str());
- } // if
- for (int iDOF=0; iDOF < numFixedDOF; ++iDOF)
- _values[i++] = queryValues[iDOF];
- } // for
- _db->close();
-} // initialize
-
-// ----------------------------------------------------------------------
-// Set number of degrees of freedom that are constrained at points in field.
-void
-pylith::bc::Dirichlet::setConstraintSizes(const ALE::Obj<real_section_type>& field,
- const ALE::Obj<ALE::Mesh>& mesh)
-{ // setConstraintSizes
- assert(!field.isNull());
- assert(!mesh.isNull());
-
- const int numFixedDOF = _fixedDOF.size();
- if (0 == numFixedDOF)
- return;
-
- const int numPoints = _points.size();
- _offsetLocal.resize(numPoints);
- for (int iPoint=0; iPoint < numPoints; ++iPoint) {
- const int fiberDim = field->getFiberDimension(_points[iPoint]);
- const int curNumConstraints = field->getConstraintDimension(_points[iPoint]);
- if (curNumConstraints + numFixedDOF > fiberDim) {
- std::ostringstream msg;
- msg << "Found overly constrained point while setting up constraints for Dirichlet "
- << "boundary condition '" << _label << "'.\n" << "Number of DOF at point "
- << _points[iPoint] << " is " << fiberDim << " and number of attempted constraints is "
- << curNumConstraints+numFixedDOF << ".";
- throw std::runtime_error(msg.str());
- } // if
- _offsetLocal[iPoint] = curNumConstraints;
- field->addConstraintDimension(_points[iPoint], numFixedDOF);
- } // for
-} // setConstraintSizes
-
-// ----------------------------------------------------------------------
-// Set which degrees of freedom are constrained at points in field.
-void
-pylith::bc::Dirichlet::setConstraints(const ALE::Obj<real_section_type>& field,
- const ALE::Obj<ALE::Mesh>& mesh)
-{ // setConstraints
- assert(!field.isNull());
- assert(!mesh.isNull());
-
- const int numFixedDOF = _fixedDOF.size();
- if (0 == numFixedDOF)
- return;
-
- const int numPoints = _points.size();
- for (int iPoint=0; iPoint < numPoints; ++iPoint) {
- const Mesh::point_type point = _points[iPoint];
-
- // Get list of currently constrained DOF
- const int* curFixedDOF = field->getConstraintDof(point);
- const int numTotalConstrained = field->getConstraintDimension(point);
-
- // Create array holding all constrained DOF
- int_array allFixedDOF(curFixedDOF, numTotalConstrained);
-
- // Add in the ones for this Dirichlet BC
- for (int iDOF=0; iDOF < numFixedDOF; ++iDOF)
- allFixedDOF[_offsetLocal[iPoint]+iDOF] = _fixedDOF[iDOF];
-
- // Fill in rest of values not yet set (will be set by another Dirichlet BC)
- for (int iDOF=_offsetLocal[iPoint]+numFixedDOF;
- iDOF < numTotalConstrained;
- ++iDOF)
- allFixedDOF[_offsetLocal[iPoint]+iDOF] = 999;
-
- // Sort list of constrained DOF
- // I need these sorted for my update algorithms to work properly
- std::sort(&allFixedDOF[0], &allFixedDOF[numTotalConstrained]);
-
- // Update list of constrained DOF
- field->setConstraintDof(point, &allFixedDOF[0]);
- } // for
-} // setConstraints
-
-// ----------------------------------------------------------------------
-// Set values in field.
-void
-pylith::bc::Dirichlet::setField(const double t,
- const ALE::Obj<real_section_type>& field,
- const ALE::Obj<ALE::Mesh>& mesh)
-{ // setField
- assert(!field.isNull());
- assert(!mesh.isNull());
-
- const int numFixedDOF = _fixedDOF.size();
- if (0 == numFixedDOF)
- return;
-
-
- const int numPoints = _points.size();
- const int fiberDimension =
- (numPoints > 0) ? field->getFiberDimension(_points[0]) : 0;
- double_array allValues(fiberDimension);
- for (int iPoint=0, i=0; iPoint < numPoints; ++iPoint) {
- const Mesh::point_type point = _points[iPoint];
- assert(fiberDimension == field->getFiberDimension(point));
- mesh->restrict(field, point, &allValues[0], fiberDimension);
- for (int iDOF=0; iDOF < numFixedDOF; ++iDOF)
- allValues[_fixedDOF[iDOF]] = _values[i++];
- field->updatePointAll(_points[iPoint], &allValues[0]);
- } // for
-} // setField
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/libsrc/bc/Dirichlet.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Dirichlet.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/libsrc/bc/Dirichlet.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,124 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/** @file libsrc/bc/Dirichlet.hh
- *
- * @brief C++ implementation of Dirichlet (prescribed values at
- * degrees of freedom) boundary conditions.
- */
-
-#if !defined(pylith_bc_dirichlet_hh)
-#define pylith_bc_dirichlet_hh
-
-#include "BoundaryCondition.hh" // ISA BoundaryCondition
-#include "pylith/feassemble/Constraint.hh" // ISA Constraint
-
-#include "pylith/utils/array.hh" // USES std::vector, double_array, int_array
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class Dirichlet;
- class TestDirichlet; // unit testing
- } // bc
-} // pylith
-
-
-/// C++ implementation of Dirichlet boundary conditions.
-class pylith::bc::Dirichlet : public BoundaryCondition,
- public feassemble::Constraint
-{ // class Dirichlet
- friend class TestDirichlet; // unit testing
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Default constructor.
- Dirichlet(void);
-
- /// Destructor.
- ~Dirichlet(void);
-
- /** Set indices of fixed degrees of freedom.
- *
- * Note: all points associated with boundary condition has same
- * degrees of freedom fixed.
- *
- * Example: [0, 1] to fix x and y degrees of freedom in Cartesian system.
- *
- * @param flags Indices of fixed degrees of freedom.
- */
- void fixedDOF(const int_array& flags);
-
- /** Initialize boundary condition.
- *
- * @param mesh PETSc mesh
- * @param cs Coordinate system for mesh
- */
- void initialize(const ALE::Obj<ALE::Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
- const double_array& upDir);
-
- /** Set number of degrees of freedom that are constrained at points in field.
- *
- * @param field Solution field
- * @param mesh PETSc mesh
- */
- void setConstraintSizes(const ALE::Obj<real_section_type>& field,
- const ALE::Obj<ALE::Mesh>& mesh);
-
- /** Set which degrees of freedom are constrained at points in field.
- *
- * @param field Solution field
- * @param mesh PETSc mesh
- */
- void setConstraints(const ALE::Obj<real_section_type>& field,
- const ALE::Obj<ALE::Mesh>& mesh);
-
- /** Set values in field.
- *
- * @param t Current time
- * @param field Solution field
- * @param mesh PETSc mesh
- */
- void setField(const double t,
- const ALE::Obj<real_section_type>& field,
- const ALE::Obj<ALE::Mesh>& mesh);
-
- // NOT IMPLEMENTED ////////////////////////////////////////////////////
-private :
-
- /// Not implemented
- Dirichlet(const Dirichlet& m);
-
- /// Not implemented
- const Dirichlet& operator=(const Dirichlet& m);
-
- // PRIVATE MEMBERS ////////////////////////////////////////////////////
-private :
-
- std::vector<Mesh::point_type> _points; ///< Locations of boundary condition
- double_array _values; ///< Values at degrees of freedom
- int_array _fixedDOF; ///< Indices of fixed degrees of freedom
-
- /// Offset in list of fixed DOF at point to get to fixed DOF
- /// associated with this Dirichlet boundary condition.
- int_array _offsetLocal;
-
-}; // class Dirichlet
-
-#include "Dirichlet.icc" // inline methods
-
-#endif // pylith_bc_dirichlet_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/libsrc/bc/Dirichlet.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Dirichlet.icc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/libsrc/bc/Dirichlet.icc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,27 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#if !defined(pylith_bc_dirichlet_hh)
-#error "Dirichlet.icc can only be included from Dirichlet.hh"
-#endif
-
-// Set indices of fixed degrees of freedom.
-inline
-void
-pylith::bc::Dirichlet::fixedDOF(const int_array& flags) {
- const size_t size = flags.size();
- _fixedDOF.resize(size);
- _fixedDOF = flags;
-} // fixedDOF
-
-
-// End of file
Copied: short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc (from rev 9151, short/3D/PyLith/trunk/libsrc/bc/Dirichlet.cc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,218 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "DirichletPoints.hh" // implementation of object methods
+
+#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
+#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
+
+#include <assert.h> // USES assert()
+#include <stdexcept> // USES std::runtime_error
+#include <sstream> // USES std::ostringstream
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::bc::DirichletPoints::DirichletPoints(void)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::bc::DirichletPoints::~DirichletPoints(void)
+{ // destructor
+} // destructor
+
+// ----------------------------------------------------------------------
+// Initialize boundary condition.
+void
+pylith::bc::DirichletPoints::initialize(
+ const ALE::Obj<ALE::Mesh>& mesh,
+ const spatialdata::geocoords::CoordSys* cs,
+ const double_array& upDir)
+{ // initialize
+ assert(0 != _db);
+ assert(!mesh.isNull());
+ assert(0 != cs);
+
+ const int numFixedDOF = _fixedDOF.size();
+ if (0 == numFixedDOF)
+ return;
+
+ // Get points associated with boundary condition
+ const ALE::Obj<int_section_type>& groupField = mesh->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 int_section_type::chart_type& chart = groupField->getChart();
+ const int numPoints = chart.size();
+ _points.resize(numPoints);
+ int i = 0;
+ for(int_section_type::chart_type::iterator c_iter = chart.begin();
+ c_iter != chart.end();
+ ++c_iter) {
+ _points[i++] = *c_iter;
+ }
+
+ // Get values for degrees of freedom
+ char** valueNames = (numFixedDOF > 0) ? new char*[numFixedDOF] : 0;
+ for (int i=0; i < numFixedDOF; ++i) {
+ std::ostringstream name;
+ name << "dof-" << _fixedDOF[i];
+ const int size = 1 + name.str().length();
+ valueNames[i] = new char[size];
+ strcpy(valueNames[i], name.str().c_str());
+ } // for
+ _db->open();
+ _db->queryVals((const char**) valueNames, numFixedDOF);
+ for (int i=0; i < numFixedDOF; ++i) {
+ delete[] valueNames[i]; valueNames[i] = 0;
+ } // for
+ delete[] valueNames; valueNames = 0;
+
+ const ALE::Obj<real_section_type>& coordinates =
+ mesh->getRealSection("coordinates");
+ assert(!coordinates.isNull());
+ const int spaceDim = cs->spaceDim();
+
+ _values.resize(numPoints*numFixedDOF);
+ double_array queryValues(numFixedDOF);
+ for (int iPoint=0, i=0; iPoint < numPoints; ++iPoint) {
+ // Get coordinates of vertex
+ const real_section_type::value_type* vCoords =
+ coordinates->restrictPoint(_points[iPoint]);
+ int err = _db->query(&queryValues[0], numFixedDOF, vCoords, spaceDim, cs);
+ if (err) {
+ std::ostringstream msg;
+ msg << "Could not find values at (";
+ for (int i=0; i < spaceDim; ++i)
+ msg << " " << vCoords[i];
+ msg << ") using spatial database " << _db->label() << ".";
+ throw std::runtime_error(msg.str());
+ } // if
+ for (int iDOF=0; iDOF < numFixedDOF; ++iDOF)
+ _values[i++] = queryValues[iDOF];
+ } // for
+ _db->close();
+} // initialize
+
+// ----------------------------------------------------------------------
+// Set number of degrees of freedom that are constrained at points in field.
+void
+pylith::bc::DirichletPoints::setConstraintSizes(
+ const ALE::Obj<real_section_type>& field,
+ const ALE::Obj<ALE::Mesh>& mesh)
+{ // setConstraintSizes
+ assert(!field.isNull());
+ assert(!mesh.isNull());
+
+ const int numFixedDOF = _fixedDOF.size();
+ if (0 == numFixedDOF)
+ return;
+
+ const int numPoints = _points.size();
+ _offsetLocal.resize(numPoints);
+ for (int iPoint=0; iPoint < numPoints; ++iPoint) {
+ const int fiberDim = field->getFiberDimension(_points[iPoint]);
+ const int curNumConstraints = field->getConstraintDimension(_points[iPoint]);
+ if (curNumConstraints + numFixedDOF > fiberDim) {
+ std::ostringstream msg;
+ msg << "Found overly constrained point while setting up constraints for DirichletPoints "
+ << "boundary condition '" << _label << "'.\n" << "Number of DOF at point "
+ << _points[iPoint] << " is " << fiberDim << " and number of attempted constraints is "
+ << curNumConstraints+numFixedDOF << ".";
+ throw std::runtime_error(msg.str());
+ } // if
+ _offsetLocal[iPoint] = curNumConstraints;
+ field->addConstraintDimension(_points[iPoint], numFixedDOF);
+ } // for
+} // setConstraintSizes
+
+// ----------------------------------------------------------------------
+// Set which degrees of freedom are constrained at points in field.
+void
+pylith::bc::DirichletPoints::setConstraints(
+ const ALE::Obj<real_section_type>& field,
+ const ALE::Obj<ALE::Mesh>& mesh)
+{ // setConstraints
+ assert(!field.isNull());
+ assert(!mesh.isNull());
+
+ const int numFixedDOF = _fixedDOF.size();
+ if (0 == numFixedDOF)
+ return;
+
+ const int numPoints = _points.size();
+ for (int iPoint=0; iPoint < numPoints; ++iPoint) {
+ const Mesh::point_type point = _points[iPoint];
+
+ // Get list of currently constrained DOF
+ const int* curFixedDOF = field->getConstraintDof(point);
+ const int numTotalConstrained = field->getConstraintDimension(point);
+
+ // Create array holding all constrained DOF
+ int_array allFixedDOF(curFixedDOF, numTotalConstrained);
+
+ // Add in the ones for this DirichletPoints BC
+ for (int iDOF=0; iDOF < numFixedDOF; ++iDOF)
+ allFixedDOF[_offsetLocal[iPoint]+iDOF] = _fixedDOF[iDOF];
+
+ // Fill in rest of values not yet set (will be set by another DirichletPoints BC)
+ for (int iDOF=_offsetLocal[iPoint]+numFixedDOF;
+ iDOF < numTotalConstrained;
+ ++iDOF)
+ allFixedDOF[_offsetLocal[iPoint]+iDOF] = 999;
+
+ // Sort list of constrained DOF
+ // I need these sorted for my update algorithms to work properly
+ std::sort(&allFixedDOF[0], &allFixedDOF[numTotalConstrained]);
+
+ // Update list of constrained DOF
+ field->setConstraintDof(point, &allFixedDOF[0]);
+ } // for
+} // setConstraints
+
+// ----------------------------------------------------------------------
+// Set values in field.
+void
+pylith::bc::DirichletPoints::setField(const double t,
+ const ALE::Obj<real_section_type>& field,
+ const ALE::Obj<ALE::Mesh>& mesh)
+{ // setField
+ assert(!field.isNull());
+ assert(!mesh.isNull());
+
+ const int numFixedDOF = _fixedDOF.size();
+ if (0 == numFixedDOF)
+ return;
+
+
+ const int numPoints = _points.size();
+ const int fiberDimension =
+ (numPoints > 0) ? field->getFiberDimension(_points[0]) : 0;
+ double_array allValues(fiberDimension);
+ for (int iPoint=0, i=0; iPoint < numPoints; ++iPoint) {
+ const Mesh::point_type point = _points[iPoint];
+ assert(fiberDimension == field->getFiberDimension(point));
+ mesh->restrict(field, point, &allValues[0], fiberDimension);
+ for (int iDOF=0; iDOF < numFixedDOF; ++iDOF)
+ allValues[_fixedDOF[iDOF]] = _values[i++];
+ field->updatePointAll(_points[iPoint], &allValues[0]);
+ } // for
+} // setField
+
+
+// End of file
Copied: short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.hh (from rev 9151, short/3D/PyLith/trunk/libsrc/bc/Dirichlet.hh)
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.hh (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/bc/DirichletPoints.hh
+ *
+ * @brief C++ implementation of Dirichlet (prescribed values at
+ * degrees of freedom) boundary conditions with a set of points.
+ */
+
+#if !defined(pylith_bc_dirichletpoints_hh)
+#define pylith_bc_dirichletpoints_hh
+
+#include "BoundaryCondition.hh" // ISA BoundaryCondition
+#include "pylith/feassemble/Constraint.hh" // ISA Constraint
+
+#include "pylith/utils/array.hh" // USES std::vector, double_array, int_array
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class DirichletPoints;
+ class TestDirichletPoints; // unit testing
+ } // bc
+} // pylith
+
+
+/// C++ implementation of DirichletPoints boundary conditions.
+class pylith::bc::DirichletPoints : public BoundaryCondition,
+ public feassemble::Constraint
+{ // class DirichletPoints
+ friend class TestDirichletPoints; // unit testing
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Default constructor.
+ DirichletPoints(void);
+
+ /// Destructor.
+ ~DirichletPoints(void);
+
+ /** Set indices of fixed degrees of freedom.
+ *
+ * Note: all points associated with boundary condition has same
+ * degrees of freedom fixed.
+ *
+ * Example: [0, 1] to fix x and y degrees of freedom in Cartesian system.
+ *
+ * @param flags Indices of fixed degrees of freedom.
+ */
+ void fixedDOF(const int_array& flags);
+
+ /** Initialize boundary condition.
+ *
+ * @param mesh PETSc mesh
+ * @param cs Coordinate system for mesh
+ */
+ void initialize(const ALE::Obj<ALE::Mesh>& mesh,
+ const spatialdata::geocoords::CoordSys* cs,
+ const double_array& upDir);
+
+ /** Set number of degrees of freedom that are constrained at points in field.
+ *
+ * @param field Solution field
+ * @param mesh PETSc mesh
+ */
+ void setConstraintSizes(const ALE::Obj<real_section_type>& field,
+ const ALE::Obj<ALE::Mesh>& mesh);
+
+ /** Set which degrees of freedom are constrained at points in field.
+ *
+ * @param field Solution field
+ * @param mesh PETSc mesh
+ */
+ void setConstraints(const ALE::Obj<real_section_type>& field,
+ const ALE::Obj<ALE::Mesh>& mesh);
+
+ /** Set values in field.
+ *
+ * @param t Current time
+ * @param field Solution field
+ * @param mesh PETSc mesh
+ */
+ void setField(const double t,
+ const ALE::Obj<real_section_type>& field,
+ const ALE::Obj<ALE::Mesh>& mesh);
+
+ // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+ /// Not implemented
+ DirichletPoints(const DirichletPoints& m);
+
+ /// Not implemented
+ const DirichletPoints& operator=(const DirichletPoints& m);
+
+ // PRIVATE MEMBERS ////////////////////////////////////////////////////
+private :
+
+ std::vector<Mesh::point_type> _points; ///< Locations of boundary condition
+ double_array _values; ///< Values at degrees of freedom
+ int_array _fixedDOF; ///< Indices of fixed degrees of freedom
+
+ /// Offset in list of fixed DOF at point to get to fixed DOF
+ /// associated with this DirichletPoints boundary condition.
+ int_array _offsetLocal;
+
+}; // class DirichletPoints
+
+#include "DirichletPoints.icc" // inline methods
+
+#endif // pylith_bc_dirichletpoints_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.icc (from rev 9151, short/3D/PyLith/trunk/libsrc/bc/Dirichlet.icc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.icc (rev 0)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.icc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,27 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#if !defined(pylith_bc_dirichletpoints_hh)
+#error "DirichletPoints.icc can only be included from DirichletPoints.hh"
+#endif
+
+// Set indices of fixed degrees of freedom.
+inline
+void
+pylith::bc::DirichletPoints::fixedDOF(const int_array& flags) {
+ const size_t size = flags.size();
+ _fixedDOF.resize(size);
+ _fixedDOF = flags;
+} // fixedDOF
+
+
+// End of file
Modified: short/3D/PyLith/trunk/libsrc/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Makefile.am 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/libsrc/bc/Makefile.am 2008-01-28 23:35:39 UTC (rev 9153)
@@ -17,8 +17,8 @@
AbsorbingDampers.hh \
BoundaryCondition.hh \
BoundaryCondition.icc \
- Dirichlet.hh \
- Dirichlet.icc \
+ DirichletPoints.hh \
+ DirichletPoints.icc \
Neumann.hh
noinst_HEADERS =
Modified: short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src 2008-01-28 23:35:39 UTC (rev 9153)
@@ -15,7 +15,7 @@
#include "pylith/feassemble/Constraint.hh"
#include "pylith/feassemble/Integrator.hh"
#include "pylith/bc/AbsorbingDampers.hh"
-#include "pylith/bc/Dirichlet.hh"
+#include "pylith/bc/DirichletPoints.hh"
#include "pylith/bc/Neumann.hh"
#include "pylith/utils/array.hh"
@@ -229,17 +229,17 @@
# ----------------------------------------------------------------------
-cdef class Dirichlet(BoundaryCondition):
+cdef class DirichletPoints(BoundaryCondition):
def __init__(self):
"""
Constructor.
"""
# create shim for constructor
- #embed{ void* Dirichlet_constructor()
+ #embed{ void* DirichletPoints_constructor()
void* result = 0;
try {
- result = (void*)(new pylith::bc::Dirichlet);
+ result = (void*)(new pylith::bc::DirichletPoints);
assert(0 != result);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
@@ -255,7 +255,7 @@
#}embed
BoundaryCondition.__init__(self)
- self.thisptr = Dirichlet_constructor()
+ self.thisptr = DirichletPoints_constructor()
self.handle = self._createHandle()
return
@@ -266,12 +266,12 @@
Set fixed DOF.
"""
# create shim for method 'fixedDOF'
- #embed{ void Dirichlet_fixedDOF_set(void* objVptr, int* dofVptr, int numFixedDOF)
+ #embed{ void DirichletPoints_fixedDOF_set(void* objVptr, int* dofVptr, int numFixedDOF)
try {
assert(0 != objVptr);
assert(0 != dofVptr);
pylith::int_array fixedDOF((int*) dofVptr, numFixedDOF);
- ((pylith::bc::Dirichlet*) objVptr)->fixedDOF(fixedDOF);
+ ((pylith::bc::DirichletPoints*) objVptr)->fixedDOF(fixedDOF);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -289,7 +289,7 @@
assert(fixedDOF != NULL)
for i from 0 <= i < numFixedDOF:
fixedDOF[i] = value[i]
- Dirichlet_fixedDOF_set(self.thisptr, fixedDOF, numFixedDOF)
+ DirichletPoints_fixedDOF_set(self.thisptr, fixedDOF, numFixedDOF)
free(fixedDOF)
@@ -298,14 +298,14 @@
Set number of degrees of freedom that are constrained at points in field.
"""
# create shim for method 'setConstraintSizes'
- #embed{ void Dirichlet_setConstraintSizes(void* objVptr, void* fieldVptr, void* meshVptr)
+ #embed{ void DirichletPoints_setConstraintSizes(void* objVptr, void* fieldVptr, void* meshVptr)
try {
assert(0 != objVptr);
assert(0 != fieldVptr);
assert(0 != meshVptr);
ALE::Obj<pylith::real_section_type>* field = (ALE::Obj<pylith::real_section_type>*) fieldVptr;
ALE::Obj<ALE::Mesh>* mesh = (ALE::Obj<ALE::Mesh>*) meshVptr;
- ((pylith::bc::Dirichlet*) objVptr)->setConstraintSizes(*field, *mesh);
+ ((pylith::bc::DirichletPoints*) objVptr)->setConstraintSizes(*field, *mesh);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -322,7 +322,7 @@
raise TypeError, \
"Argument must be extension module type " \
"'pylith::topology::Mesh'."
- Dirichlet_setConstraintSizes(self.thisptr, PyCObject_AsVoidPtr(field),
+ DirichletPoints_setConstraintSizes(self.thisptr, PyCObject_AsVoidPtr(field),
ptrFromHandle(mesh))
return
@@ -332,14 +332,14 @@
Set which degrees of freedom that are constrained at points in field.
"""
# create shim for method 'setConstraints'
- #embed{ void Dirichlet_setConstraints(void* objVptr, void* fieldVptr, void* meshVptr)
+ #embed{ void DirichletPoints_setConstraints(void* objVptr, void* fieldVptr, void* meshVptr)
try {
assert(0 != objVptr);
assert(0 != fieldVptr);
assert(0 != meshVptr);
ALE::Obj<pylith::real_section_type>* field = (ALE::Obj<pylith::real_section_type>*) fieldVptr;
ALE::Obj<ALE::Mesh>* mesh = (ALE::Obj<ALE::Mesh>*) meshVptr;
- ((pylith::bc::Dirichlet*) objVptr)->setConstraints(*field, *mesh);
+ ((pylith::bc::DirichletPoints*) objVptr)->setConstraints(*field, *mesh);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -356,7 +356,7 @@
raise TypeError, \
"Argument must be extension module type " \
"'pylith::topology::Mesh'."
- Dirichlet_setConstraints(self.thisptr, PyCObject_AsVoidPtr(field), ptrFromHandle(mesh))
+ DirichletPoints_setConstraints(self.thisptr, PyCObject_AsVoidPtr(field), ptrFromHandle(mesh))
return
@@ -365,14 +365,14 @@
Set values in field.
"""
# create shim for method 'setField'
- #embed{ void Dirichlet_setField(void* objVptr, double t, void* fieldVptr, void* meshVptr)
+ #embed{ void DirichletPoints_setField(void* objVptr, double t, void* fieldVptr, void* meshVptr)
try {
assert(0 != objVptr);
assert(0 != fieldVptr);
assert(0 != meshVptr);
ALE::Obj<pylith::real_section_type>* field = (ALE::Obj<pylith::real_section_type>*) fieldVptr;
ALE::Obj<ALE::Mesh>* mesh = (ALE::Obj<ALE::Mesh>*) meshVptr;
- ((pylith::bc::Dirichlet*) objVptr)->setField(t, *field, *mesh);
+ ((pylith::bc::DirichletPoints*) objVptr)->setField(t, *field, *mesh);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -389,7 +389,7 @@
raise TypeError, \
"Argument must be extension module type " \
"'pylith::topology::Mesh'."
- Dirichlet_setField(self.thisptr, t, PyCObject_AsVoidPtr(field),
+ DirichletPoints_setField(self.thisptr, t, PyCObject_AsVoidPtr(field),
ptrFromHandle(mesh))
return
@@ -400,10 +400,10 @@
Set solution increment flag.
"""
# create shim for method 'useSolnIncr'
- #embed{ void Dirichlet_useSolnIncr_set(void* objVptr, int flag)
+ #embed{ void DirichletPoints_useSolnIncr_set(void* objVptr, int flag)
try {
assert(0 != objVptr);
- ((pylith::bc::Dirichlet*) objVptr)->useSolnIncr(flag);
+ ((pylith::bc::DirichletPoints*) objVptr)->useSolnIncr(flag);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -415,7 +415,7 @@
"Caught unknown C++ exception.");
} // try/catch
#}embed
- Dirichlet_useSolnIncr_set(self.thisptr, flag)
+ DirichletPoints_useSolnIncr_set(self.thisptr, flag)
# ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/Makefile.am 2008-01-28 23:35:39 UTC (rev 9153)
@@ -17,7 +17,7 @@
bc/AbsorbingDampers.py \
bc/BCIntegrator.py \
bc/BoundaryCondition.py \
- bc/Dirichlet.py \
+ bc/DirichletPoints.py \
bc/BCSingle.py \
bc/BCTwoSides.py \
bc/BCFourSides.py \
Modified: short/3D/PyLith/trunk/pylith/bc/BCFourSides.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCFourSides.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/bc/BCFourSides.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -51,22 +51,22 @@
import pyre.inventory
- from pylith.bc.Dirichlet import Dirichlet
+ from pylith.bc.DirichletPoints import DirichletPoints
xPos = pyre.inventory.facility("x_pos", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
xPos.meta['tip'] = "Boundary condition on +x face of 2-D box."
xNeg = pyre.inventory.facility("x_neg", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
xNeg.meta['tip'] = "Boundary condition on -x face of 2-D box."
yPos = pyre.inventory.facility("y_pos", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
yPos.meta['tip'] = "Boundary condition on +y face of 2-D box."
yNeg = pyre.inventory.facility("y_neg", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
yNeg.meta['tip'] = "Boundary condition on -y face of 2-D box."
Modified: short/3D/PyLith/trunk/pylith/bc/BCSingle.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCSingle.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/bc/BCSingle.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -44,10 +44,10 @@
import pyre.inventory
- from pylith.bc.Dirichlet import Dirichlet
+ from pylith.bc.DirichletPoints import DirichletPoints
bc = pyre.inventory.facility("bc", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
bc.meta['tip'] = "Boundary condition."
Modified: short/3D/PyLith/trunk/pylith/bc/BCSixSides.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCSixSides.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/bc/BCSixSides.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -53,30 +53,30 @@
import pyre.inventory
- from pylith.bc.Dirichlet import Dirichlet
+ from pylith.bc.DirichletPoints import DirichletPoints
xPos = pyre.inventory.facility("x_pos", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
xPos.meta['tip'] = "Boundary condition on +x face of 3-D box."
xNeg = pyre.inventory.facility("x_neg", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
xNeg.meta['tip'] = "Boundary condition on -x face of 3-D box."
yPos = pyre.inventory.facility("y_pos", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
yPos.meta['tip'] = "Boundary condition on +y face of 3-D box."
yNeg = pyre.inventory.facility("y_neg", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
yNeg.meta['tip'] = "Boundary condition on -y face of 3-D box."
zPos = pyre.inventory.facility("z_pos", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
zPos.meta['tip'] = "Boundary condition on +z face of 3-D box."
zNeg = pyre.inventory.facility("z_neg", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
zNeg.meta['tip'] = "Boundary condition on -z face of 3-D box."
Modified: short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -49,14 +49,14 @@
import pyre.inventory
- from pylith.bc.Dirichlet import Dirichlet
+ from pylith.bc.DirichletPoints import DirichletPoints
pos = pyre.inventory.facility("pos", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
pos.meta['tip'] = "Boundary condition on positive face of 1-D box."
neg = pyre.inventory.facility("neg", family="boundary_condition",
- factory=Dirichlet)
+ factory=DirichletPoints)
neg.meta['tip'] = "Boundary condition on negative face of 1-D box."
Deleted: short/3D/PyLith/trunk/pylith/bc/Dirichlet.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/Dirichlet.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/bc/Dirichlet.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,138 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/bc/Dirichlet.py
-##
-## @brief Python object for managing a Dirichlet (prescribed
-## displacements) boundary condition.
-##
-## Factory: boundary_condition
-
-from BoundaryCondition import BoundaryCondition
-from pylith.feassemble.Constraint import Constraint
-
-def validateDOF(value):
- """
- Validate list of fixed degrees of freedom.
- """
- try:
- size = len(value)
- num = map(int, value)
- for v in num:
- if v < 0:
- raise ValueError
- except:
- raise ValueError, \
- "'fixed_dof' must be a zero based list of indices of fixed " \
- "degrees of freedom."
- return num
-
-
-# Dirichlet class
-class Dirichlet(BoundaryCondition, Constraint):
- """
- Python object for managing a Dirichlet (prescribed displacements)
- boundary condition.
-
- Factory: boundary_condition
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(BoundaryCondition.Inventory):
- """
- Python object for managing BoundaryCondition facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing BoundaryCondition facilities and properties.
- ##
- ## \b Properties
- ## @li \b fixed_dof Indices of fixed DOF (0=1st DOF, 1=2nd DOF, etc).
- ##
- ## \b Facilities
- ## @li None
-
- import pyre.inventory
-
- fixedDOF = pyre.inventory.list("fixed_dof", default=[],
- validator=validateDOF)
- fixedDOF.meta['tip'] = "Indices of fixed DOF (0=1st DOF, 1=2nd DOF, etc)."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="dirichlet"):
- """
- Constructor.
- """
- BoundaryCondition.__init__(self, name)
- Constraint.__init__(self)
- self._loggingPrefix = "DiBC "
- self.fixedDOF = []
- return
-
-
- def preinitialize(self, mesh):
- """
- Do pre-initialization setup.
- """
- BoundaryCondition.preinitialize(self, mesh)
- Constraint.preinitialize(self, mesh)
- self.cppHandle.fixedDOF = self.fixedDOF
- return
-
-
- def initialize(self, totalTime, numTimeSteps):
- """
- Initialize Dirichlet boundary condition.
- """
- logEvent = "%sinit" % self._loggingPrefix
- self._logger.eventBegin(logEvent)
-
- BoundaryCondition.initialize(self, totalTime, numTimeSteps)
-
- self._logger.eventEnd(logEvent)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Setup members using inventory.
- """
- BoundaryCondition._configure(self)
- self.fixedDOF = self.inventory.fixedDOF
- return
-
-
- def _createCppHandle(self):
- """
- Create handle to corresponding C++ object.
- """
- if None == self.cppHandle:
- import pylith.bc.bc as bindings
- self.cppHandle = bindings.Dirichlet()
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def boundary_condition():
- """
- Factory associated with Dirichlet.
- """
- return Dirichlet()
-
-
-# End of file
Copied: short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py (from rev 9151, short/3D/PyLith/trunk/pylith/bc/Dirichlet.py)
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py (rev 0)
+++ short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,138 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/bc/DirichletPoints.py
+##
+## @brief Python object for managing a Dirichlet (prescribed
+## displacements) boundary condition with a set of points.
+##
+## Factory: boundary_condition
+
+from BoundaryCondition import BoundaryCondition
+from pylith.feassemble.Constraint import Constraint
+
+def validateDOF(value):
+ """
+ Validate list of fixed degrees of freedom.
+ """
+ try:
+ size = len(value)
+ num = map(int, value)
+ for v in num:
+ if v < 0:
+ raise ValueError
+ except:
+ raise ValueError, \
+ "'fixed_dof' must be a zero based list of indices of fixed " \
+ "degrees of freedom."
+ return num
+
+
+# DirichletPoints class
+class DirichletPoints(BoundaryCondition, Constraint):
+ """
+ Python object for managing a DirichletPoints (prescribed displacements)
+ boundary condition.
+
+ Factory: boundary_condition
+ """
+
+ # INVENTORY //////////////////////////////////////////////////////////
+
+ class Inventory(BoundaryCondition.Inventory):
+ """
+ Python object for managing BoundaryCondition facilities and properties.
+ """
+
+ ## @class Inventory
+ ## Python object for managing BoundaryCondition facilities and properties.
+ ##
+ ## \b Properties
+ ## @li \b fixed_dof Indices of fixed DOF (0=1st DOF, 1=2nd DOF, etc).
+ ##
+ ## \b Facilities
+ ## @li None
+
+ import pyre.inventory
+
+ fixedDOF = pyre.inventory.list("fixed_dof", default=[],
+ validator=validateDOF)
+ fixedDOF.meta['tip'] = "Indices of fixed DOF (0=1st DOF, 1=2nd DOF, etc)."
+
+
+ # PUBLIC METHODS /////////////////////////////////////////////////////
+
+ def __init__(self, name="dirichlet"):
+ """
+ Constructor.
+ """
+ BoundaryCondition.__init__(self, name)
+ Constraint.__init__(self)
+ self._loggingPrefix = "DiBC "
+ self.fixedDOF = []
+ return
+
+
+ def preinitialize(self, mesh):
+ """
+ Do pre-initialization setup.
+ """
+ BoundaryCondition.preinitialize(self, mesh)
+ Constraint.preinitialize(self, mesh)
+ self.cppHandle.fixedDOF = self.fixedDOF
+ return
+
+
+ def initialize(self, totalTime, numTimeSteps):
+ """
+ Initialize DirichletPoints boundary condition.
+ """
+ logEvent = "%sinit" % self._loggingPrefix
+ self._logger.eventBegin(logEvent)
+
+ BoundaryCondition.initialize(self, totalTime, numTimeSteps)
+
+ self._logger.eventEnd(logEvent)
+ return
+
+
+ # PRIVATE METHODS ////////////////////////////////////////////////////
+
+ def _configure(self):
+ """
+ Setup members using inventory.
+ """
+ BoundaryCondition._configure(self)
+ self.fixedDOF = self.inventory.fixedDOF
+ return
+
+
+ def _createCppHandle(self):
+ """
+ Create handle to corresponding C++ object.
+ """
+ if None == self.cppHandle:
+ import pylith.bc.bc as bindings
+ self.cppHandle = bindings.DirichletPoints()
+ return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def boundary_condition():
+ """
+ Factory associated with DirichletPoints.
+ """
+ return DirichletPoints()
+
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/bc/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/__init__.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/pylith/bc/__init__.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -21,7 +21,7 @@
'BCTwoSides',
'BoundaryCondition',
'BCIntegrator',
- 'Dirichlet']
+ 'DirichletPoints']
# End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2008-01-28 23:35:39 UTC (rev 9153)
@@ -28,15 +28,15 @@
TestAbsorbingDampersTet4.cc \
TestAbsorbingDampersHex8.cc \
TestBoundaryCondition.cc \
- TestDirichlet.cc \
- TestDirichletLine2.cc \
- TestDirichletLine2b.cc \
- TestDirichletTri3.cc \
- TestDirichletQuad4.cc \
- TestDirichletTet4.cc \
- TestDirichletHex8.cc \
- TestDirichletMulti.cc \
- TestDirichletMultiTri3.cc \
+ TestDirichletPoints.cc \
+ TestDirichletPointsLine2.cc \
+ TestDirichletPointsLine2b.cc \
+ TestDirichletPointsTri3.cc \
+ TestDirichletPointsQuad4.cc \
+ TestDirichletPointsTet4.cc \
+ TestDirichletPointsHex8.cc \
+ TestDirichletPointsMulti.cc \
+ TestDirichletPointsMultiTri3.cc \
TestNeumann.cc \
TestNeumannLine2.cc \
TestNeumannTri3.cc \
@@ -53,15 +53,15 @@
TestAbsorbingDampersTet4.hh \
TestAbsorbingDampersHex8.hh \
TestBoundaryCondition.hh \
- TestDirichlet.hh \
- TestDirichletLine2.hh \
- TestDirichletLine2b.hh \
- TestDirichletTri3.hh \
- TestDirichletQuad4.hh \
- TestDirichletTet4.hh \
- TestDirichletHex8.hh \
- TestDirichletMulti.hh \
- TestDirichletMultiTri3.hh \
+ TestDirichletPoints.hh \
+ TestDirichletPointsLine2.hh \
+ TestDirichletPointsLine2b.hh \
+ TestDirichletPointsTri3.hh \
+ TestDirichletPointsQuad4.hh \
+ TestDirichletPointsTet4.hh \
+ TestDirichletPointsHex8.hh \
+ TestDirichletPointsMulti.hh \
+ TestDirichletPointsMultiTri3.hh \
TestNeumann.hh \
TestNeumannLine2.hh \
TestNeumannTri3.hh \
@@ -77,15 +77,15 @@
data/AbsorbingDampersDataQuad4.cc \
data/AbsorbingDampersDataTet4.cc \
data/AbsorbingDampersDataHex8.cc \
- data/DirichletData.cc \
- data/DirichletDataLine2.cc \
- data/DirichletDataLine2b.cc \
- data/DirichletDataTri3.cc \
- data/DirichletDataQuad4.cc \
- data/DirichletDataTet4.cc \
- data/DirichletDataHex8.cc \
- data/DirichletDataMulti.cc \
- data/DirichletDataMultiTri3.cc \
+ data/DirichletPointsData.cc \
+ data/DirichletPointsDataLine2.cc \
+ data/DirichletPointsDataLine2b.cc \
+ data/DirichletPointsDataTri3.cc \
+ data/DirichletPointsDataQuad4.cc \
+ data/DirichletPointsDataTet4.cc \
+ data/DirichletPointsDataHex8.cc \
+ data/DirichletPointsDataMulti.cc \
+ data/DirichletPointsDataMultiTri3.cc \
data/NeumannData.cc \
data/NeumannDataLine2.cc \
data/NeumannDataTri3.cc \
@@ -100,15 +100,15 @@
data/AbsorbingDampersDataQuad4.hh \
data/AbsorbingDampersDataTet4.hh \
data/AbsorbingDampersDataHex8.hh \
- data/DirichletData.hh \
- data/DirichletDataLine2.hh \
- data/DirichletDataLine2b.hh \
- data/DirichletDataTri3.hh \
- data/DirichletDataQuad4.hh \
- data/DirichletDataTet4.hh \
- data/DirichletDataHex8.hh \
- data/DirichletDataMulti.hh \
- data/DirichletDataMultiTri3.hh \
+ data/DirichletPointsData.hh \
+ data/DirichletPointsDataLine2.hh \
+ data/DirichletPointsDataLine2b.hh \
+ data/DirichletPointsDataTri3.hh \
+ data/DirichletPointsDataQuad4.hh \
+ data/DirichletPointsDataTet4.hh \
+ data/DirichletPointsDataHex8.hh \
+ data/DirichletPointsDataMulti.hh \
+ data/DirichletPointsDataMultiTri3.hh \
data/NeumannData.hh \
data/NeumannDataLine2.hh \
data/NeumannDataTri3.hh \
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryCondition.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryCondition.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryCondition.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -14,7 +14,7 @@
#include "TestBoundaryCondition.hh" // Implementation of class methods
-#include "pylith/bc/Dirichlet.hh" // USES Dirichlet
+#include "pylith/bc/DirichletPoints.hh" // USES DirichletPoints
#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
@@ -29,7 +29,7 @@
pylith::bc::TestBoundaryCondition::testID(void)
{ // testID
const int id = 346;
- Dirichlet bc;
+ DirichletPoints bc;
bc.id(id);
CPPUNIT_ASSERT(id == bc.id());
@@ -41,7 +41,7 @@
pylith::bc::TestBoundaryCondition::testLabel(void)
{ // testLabel
const std::string label = "the_database";
- Dirichlet bc;
+ DirichletPoints bc;
bc.label(label.c_str());
CPPUNIT_ASSERT_EQUAL(label, bc.label());
@@ -54,7 +54,7 @@
{ // testDB
const std::string label = "my db";
spatialdata::spatialdb::SimpleDB db(label.c_str());
- Dirichlet bc;
+ DirichletPoints bc;
bc.db(&db);
CPPUNIT_ASSERT(0 != bc._db);
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,293 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichlet.hh" // Implementation of class methods
-
-#include "pylith/bc/Dirichlet.hh" // USES Dirichlet
-
-#include "data/DirichletData.hh" // USES DirichletData
-#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
-#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
-
-#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
-#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
-#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichlet );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichlet::setUp(void)
-{ // setUp
- _data = 0;
-} // setUp
-
-// ----------------------------------------------------------------------
-// Tear down testing data.
-void
-pylith::bc::TestDirichlet::tearDown(void)
-{ // tearDown
- delete _data; _data = 0;
-} // tearDown
-
-// ----------------------------------------------------------------------
-// Test constructor.
-void
-pylith::bc::TestDirichlet::testConstructor(void)
-{ // testConstructor
- Dirichlet bc;
-} // testConstructor
-
-// ----------------------------------------------------------------------
-// Test fixedDOF()
-void
-pylith::bc::TestDirichlet::testFixedDOF(void)
-{ // testfixedDOF
- Dirichlet bc;
-
- const size_t numDOF = 4;
- const int dof[] = { 0, 2, 3, 5 };
- int_array fixedDOF(dof, numDOF);
- bc.fixedDOF(fixedDOF);
-
- CPPUNIT_ASSERT_EQUAL(numDOF, bc._fixedDOF.size());
- for (int i=0; i < numDOF; ++i)
- CPPUNIT_ASSERT_EQUAL(fixedDOF[i], bc._fixedDOF[i]);
-} // testFixedDOF
-
-// ----------------------------------------------------------------------
-// Test initialize().
-void
-pylith::bc::TestDirichlet::testInitialize(void)
-{ // testInitialize
- ALE::Obj<Mesh> mesh;
- Dirichlet bc;
- _initialize(&mesh, &bc);
-
- CPPUNIT_ASSERT(0 != _data);
-
- const int numCells = mesh->heightStratum(0)->size();
-
- const int numFixedDOF = _data->numFixedDOF;
- const size_t numPoints = _data->numConstrainedPts;
-
- // Check points
- const int offset = numCells;
- if (numFixedDOF > 0) {
- CPPUNIT_ASSERT_EQUAL(numPoints, bc._points.size());
- for (int i=0; i < numPoints; ++i)
- CPPUNIT_ASSERT_EQUAL(_data->constrainedPoints[i]+offset, bc._points[i]);
- } // if
-
- // Check values
- const size_t size = numPoints * numFixedDOF;
- CPPUNIT_ASSERT_EQUAL(size, bc._values.size());
- const double tolerance = 1.0e-06;
- for (int i=0; i < size; ++i)
- CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->values[i], bc._values[i], tolerance);
-} // testInitialize
-
-// ----------------------------------------------------------------------
-// Test setConstraintSizes().
-void
-pylith::bc::TestDirichlet::testSetConstraintSizes(void)
-{ // testSetConstraintSizes
- ALE::Obj<Mesh> mesh;
- Dirichlet bc;
- _initialize(&mesh, &bc);
-
- const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
- const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
- field->setFiberDimension(vertices, _data->numDOF);
- bc.setConstraintSizes(field, mesh);
-
- CPPUNIT_ASSERT(0 != _data);
-
- const int numCells = mesh->heightStratum(0)->size();
- const int offset = numCells;
- int iConstraint = 0;
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- if (*v_iter != _data->constrainedPoints[iConstraint] + offset) {
- CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
- CPPUNIT_ASSERT_EQUAL(0, field->getConstraintDimension(*v_iter));
- } else {
- CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
- CPPUNIT_ASSERT_EQUAL(_data->numFixedDOF,
- field->getConstraintDimension(*v_iter));
- ++iConstraint;
- } // if/else
- } // for
-} // testSetConstraintSizes
-
-// ----------------------------------------------------------------------
-// Test setConstraints().
-void
-pylith::bc::TestDirichlet::testSetConstraints(void)
-{ // testSetConstraints
- ALE::Obj<Mesh> mesh;
- Dirichlet bc;
- _initialize(&mesh, &bc);
-
- const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
- const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
- field->setFiberDimension(vertices, _data->numDOF);
- bc.setConstraintSizes(field, mesh);
- mesh->allocate(field);
- bc.setConstraints(field, mesh);
-
- CPPUNIT_ASSERT(0 != _data);
-
- const int numCells = mesh->heightStratum(0)->size();
- const int offset = numCells;
- int iConstraint = 0;
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- const int* fixedDOF = field->getConstraintDof(*v_iter);
- if (*v_iter != _data->constrainedPoints[iConstraint] + offset) {
- CPPUNIT_ASSERT_EQUAL(0, field->getConstraintDimension(*v_iter));
- //CPPUNIT_ASSERT(0 == fixedDOF);
- } else {
- CPPUNIT_ASSERT(0 != fixedDOF);
- CPPUNIT_ASSERT_EQUAL(_data->numFixedDOF,
- field->getConstraintDimension(*v_iter));
- for (int iDOF=0; iDOF < _data->numFixedDOF; ++iDOF)
- CPPUNIT_ASSERT_EQUAL(_data->fixedDOF[iDOF], fixedDOF[iDOF]);
- ++iConstraint;
- } // if/else
- } // for
-} // testSetConstraints
-
-// ----------------------------------------------------------------------
-// Test setField().
-void
-pylith::bc::TestDirichlet::testSetField(void)
-{ // testSetField
- ALE::Obj<Mesh> mesh;
- Dirichlet bc;
- _initialize(&mesh, &bc);
-
- const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
- const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
- field->setFiberDimension(vertices, _data->numDOF);
- bc.setConstraintSizes(field, mesh);
- mesh->allocate(field);
- bc.setConstraints(field, mesh);
-
- CPPUNIT_ASSERT(0 != _data);
- const double tolerance = 1.0e-06;
-
- // All values should be zero.
- field->zero();
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- const int fiberDim = field->getFiberDimension(*v_iter);
- const real_section_type::value_type* values =
- mesh->restrict(field, *v_iter);
- for (int i=0; i < fiberDim; ++i)
- CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
- } // for
-
- // Only unconstrained values should be zero.
- const double t = 1.0;
- bc.setField(t, field, mesh);
-
- // Create list of unconstrained DOF at constrained DOF
- const int numFreeDOF = _data->numDOF - _data->numFixedDOF;
- int_array freeDOF(numFreeDOF);
- int index = 0;
- for (int iDOF=0; iDOF < _data->numDOF; ++iDOF) {
- bool free = true;
- for (int iFixed=0; iFixed < _data->numFixedDOF; ++iFixed)
- if (iDOF == _data->fixedDOF[iFixed])
- free = false;
- if (free)
- freeDOF[index] = iDOF;
- } // for
-
- const int numCells = mesh->heightStratum(0)->size();
- const int offset = numCells;
- const int numFixedDOF = _data->numFixedDOF;
- int iConstraint = 0;
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- const int fiberDim = field->getFiberDimension(*v_iter);
- const real_section_type::value_type* values =
- mesh->restrict(field, *v_iter);
-
- if (*v_iter != _data->constrainedPoints[iConstraint] + offset) {
- // unconstrained point
- for (int i=0; i < fiberDim; ++i)
- CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
- } else {
- // constrained point
-
- // check unconstrained DOF
- for (int iDOF=0; iDOF < numFreeDOF; ++iDOF)
- CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[freeDOF[iDOF]], tolerance);
-
- // check constrained DOF
- for (int iDOF=0; iDOF < numFixedDOF; ++iDOF) {
- const int index = iConstraint * numFixedDOF + iDOF;
- CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->values[index],
- values[_data->fixedDOF[iDOF]],
- tolerance);
- } // for
- ++iConstraint;
- } // if/else
- } // for
-} // testSetField
-
-// ----------------------------------------------------------------------
-void
-pylith::bc::TestDirichlet::_initialize(ALE::Obj<Mesh>* mesh,
- Dirichlet* const bc) const
-{ // _initialize
- CPPUNIT_ASSERT(0 != _data);
- CPPUNIT_ASSERT(0 != bc);
-
- meshio::MeshIOAscii iohandler;
- iohandler.filename(_data->meshFilename);
- iohandler.read(mesh);
- CPPUNIT_ASSERT(!mesh->isNull());
- (*mesh)->getFactory()->clear();
-
- spatialdata::geocoords::CSCart cs;
- cs.setSpaceDim((*mesh)->getDimension());
- cs.initialize();
-
- spatialdata::spatialdb::SimpleDB db("TestDirichlet");
- spatialdata::spatialdb::SimpleIOAscii dbIO;
- dbIO.filename(_data->dbFilename);
- db.ioHandler(&dbIO);
-
- int_array fixedDOF(_data->fixedDOF, _data->numFixedDOF);
- const double upDirVals[] = { 0.0, 0.0, 1.0 };
- double_array upDir(upDirVals, 3);
-
- bc->id(_data->id);
- bc->label(_data->label);
- bc->db(&db);
- bc->fixedDOF(fixedDOF);
- bc->initialize(*mesh, &cs, upDir);
-} // _initialize
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,96 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichlet.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet.
- */
-
-#if !defined(pylith_bc_testdirichlet_hh)
-#define pylith_bc_testdirichlet_hh
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichlet;
-
- class Dirichlet;
- class DirichletData;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet.
-class pylith::bc::TestDirichlet : public CppUnit::TestFixture
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUITE( TestDirichlet );
- CPPUNIT_TEST( testConstructor );
- CPPUNIT_TEST( testFixedDOF );
- 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 fixedDOF().
- void testFixedDOF(void);
-
- /// Test initialize().
- void testInitialize(void);
-
- /// Test setConstraintSizes().
- void testSetConstraintSizes(void);
-
- /// Test setConstraints().
- void testSetConstraints(void);
-
- /// Test setField().
- void testSetField(void);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- DirichletData* _data; ///< Data for testing
-
- // PRIVATE METHODS ////////////////////////////////////////////////////
-private :
-
- /** Initialize Dirichlet boundary condition.
- *
- * @param mesh PETSc mesh to initialize
- * @param bc Dirichlet boundary condition to initialize.
- */
- void _initialize(ALE::Obj<ALE::Mesh>* mesh,
- Dirichlet* const bc) const;
-
-}; // class TestDirichlet
-
-#endif // pylith_bc_dirichlet_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletHex8.hh" // Implementation of class methods
-
-#include "data/DirichletDataHex8.hh" // USES DirichletDataHex8
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletHex8 );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletHex8::setUp(void)
-{ // setUp
- _data = new DirichletDataHex8();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletHex8.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichlethex8_hh)
-#define pylith_bc_testdirichlethex8_hh
-
-#include "TestDirichlet.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletHex8;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 3-D hex cells.
-class pylith::bc::TestDirichletHex8 : public TestDirichlet
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUB_SUITE( TestDirichletHex8, TestDirichlet );
- CPPUNIT_TEST( testInitialize );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletHex8
-
-#endif // pylith_bc_dirichlethex8_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletLine2.hh" // Implementation of class methods
-
-#include "data/DirichletDataLine2.hh" // USES DirichletDataLine2
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletLine2 );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletLine2::setUp(void)
-{ // setUp
- _data = new DirichletDataLine2();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletLine2.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichletline2_hh)
-#define pylith_bc_testdirichletline2_hh
-
-#include "TestDirichlet.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletLine2;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 1-D line cells.
-class pylith::bc::TestDirichletLine2 : public TestDirichlet
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUB_SUITE( TestDirichletLine2, TestDirichlet );
- CPPUNIT_TEST( testInitialize );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletLine2
-
-#endif // pylith_bc_dirichletline2_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletLine2b.hh" // Implementation of class methods
-
-#include "data/DirichletDataLine2b.hh" // USES DirichletDataLine2b
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletLine2b );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletLine2b::setUp(void)
-{ // setUp
- _data = new DirichletDataLine2b();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletLine2b.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichletline2b_hh)
-#define pylith_bc_testdirichletline2b_hh
-
-#include "TestDirichlet.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletLine2b;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 1-D line cells.
-class pylith::bc::TestDirichletLine2b : public TestDirichlet
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUB_SUITE( TestDirichletLine2b, TestDirichlet );
- CPPUNIT_TEST( testInitialize );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletLine2b
-
-#endif // pylith_bc_dirichletline2b_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,210 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletMulti.hh" // Implementation of class methods
-
-#include "pylith/bc/Dirichlet.hh" // USES Dirichlet
-
-#include "data/DirichletDataMulti.hh" // USES DirichletData
-#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
-#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
-
-#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
-#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
-#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletMulti::setUp(void)
-{ // setUp
- _data = 0;
-} // setUp
-
-// ----------------------------------------------------------------------
-// Tear down testing data.
-void
-pylith::bc::TestDirichletMulti::tearDown(void)
-{ // tearDown
- delete _data; _data = 0;
-} // tearDown
-
-// ----------------------------------------------------------------------
-// Test setConstraintSizes().
-void
-pylith::bc::TestDirichletMulti::testSetConstraintSizes(void)
-{ // testSetConstraintSizes
- ALE::Obj<Mesh> mesh;
- Dirichlet bcA;
- Dirichlet bcB;
- _initialize(&mesh, &bcA, &bcB);
-
- const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
- const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
- field->setFiberDimension(vertices, _data->numDOF);
- bcA.setConstraintSizes(field, mesh);
- bcB.setConstraintSizes(field, mesh);
-
- CPPUNIT_ASSERT(0 != _data);
-
- const int numCells = mesh->heightStratum(0)->size();
- const int offset = numCells;
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
-
- CPPUNIT_ASSERT_EQUAL(_data->constraintSizes[*v_iter-offset],
- field->getConstraintDimension(*v_iter));
- } // for
-} // testSetConstraintSizes
-
-// ----------------------------------------------------------------------
-// Test setConstraints().
-void
-pylith::bc::TestDirichletMulti::testSetConstraints(void)
-{ // testSetConstraints
- ALE::Obj<Mesh> mesh;
- Dirichlet bcA;
- Dirichlet bcB;
- _initialize(&mesh, &bcA, &bcB);
-
- const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
- const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
- field->setFiberDimension(vertices, _data->numDOF);
- bcA.setConstraintSizes(field, mesh);
- bcB.setConstraintSizes(field, mesh);
- mesh->allocate(field);
- bcA.setConstraints(field, mesh);
- bcB.setConstraints(field, mesh);
-
- CPPUNIT_ASSERT(0 != _data);
-
- const int numCells = mesh->heightStratum(0)->size();
- const int offset = numCells;
- int index = 0;
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- const int numConstrainedDOF = _data->constraintSizes[*v_iter-offset];
- if (numConstrainedDOF > 0) {
- const int* fixedDOF = field->getConstraintDof(*v_iter);
- for (int iDOF=0; iDOF < numConstrainedDOF; ++iDOF)
- CPPUNIT_ASSERT_EQUAL(_data->constrainedDOF[index++], fixedDOF[iDOF]);
- } // if
- } // for
-} // testSetConstraints
-
-// ----------------------------------------------------------------------
-// Test setField().
-void
-pylith::bc::TestDirichletMulti::testSetField(void)
-{ // testSetField
- ALE::Obj<Mesh> mesh;
- Dirichlet bcA;
- Dirichlet bcB;
- _initialize(&mesh, &bcA, &bcB);
-
- const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
- const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
- field->setFiberDimension(vertices, _data->numDOF);
- bcA.setConstraintSizes(field, mesh);
- bcB.setConstraintSizes(field, mesh);
- mesh->allocate(field);
- bcA.setConstraints(field, mesh);
- bcB.setConstraints(field, mesh);
-
- CPPUNIT_ASSERT(0 != _data);
- const double tolerance = 1.0e-06;
-
- // All values should be zero.
- field->zero();
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- const int fiberDim = field->getFiberDimension(*v_iter);
- const real_section_type::value_type* values =
- mesh->restrict(field, *v_iter);
- for (int i=0; i < fiberDim; ++i)
- CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
- } // for
-
- // Only unconstrained values should be zero.
- // Expected values set in _data->field
- const double t = 1.0;
- bcA.setField(t, field, mesh);
- bcB.setField(t, field, mesh);
-
- int i = 0;
- for (Mesh::label_sequence::iterator v_iter = vertices->begin();
- v_iter != vertices->end();
- ++v_iter) {
- const int fiberDim = field->getFiberDimension(*v_iter);
- const real_section_type::value_type* values =
- mesh->restrict(field, *v_iter);
- for (int iDOF=0; iDOF < fiberDim; ++iDOF)
- CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->field[i++], values[iDOF], tolerance);
- } // for
-} // testSetField
-
-// ----------------------------------------------------------------------
-void
-pylith::bc::TestDirichletMulti::_initialize(ALE::Obj<Mesh>* mesh,
- Dirichlet* const bcA,
- Dirichlet* const bcB) const
-{ // _initialize
- CPPUNIT_ASSERT(0 != _data);
- CPPUNIT_ASSERT(0 != bcA);
- CPPUNIT_ASSERT(0 != bcB);
-
- meshio::MeshIOAscii iohandler;
- iohandler.filename(_data->meshFilename);
- iohandler.read(mesh);
- CPPUNIT_ASSERT(!mesh->isNull());
-
- spatialdata::geocoords::CSCart cs;
- cs.setSpaceDim((*mesh)->getDimension());
- cs.initialize();
-
- // Setup boundary condition A
- spatialdata::spatialdb::SimpleDB db("TestDirichletMulti");
- spatialdata::spatialdb::SimpleIOAscii dbIO;
- dbIO.filename(_data->dbFilenameA);
- db.ioHandler(&dbIO);
-
- int_array fixedDOFA(_data->fixedDOFA, _data->numFixedDOFA);
- const double upDirVals[] = { 0.0, 0.0, 1.0 };
- double_array upDir(upDirVals, 3);
-
- bcA->id(_data->idA);
- bcA->label(_data->labelA);
- bcA->db(&db);
- bcA->fixedDOF(fixedDOFA);
- bcA->initialize(*mesh, &cs, upDir);
-
- // Setup boundary condition B
- dbIO.filename(_data->dbFilenameB);
- db.ioHandler(&dbIO);
-
- int_array fixedDOFB(_data->fixedDOFB, _data->numFixedDOFB);
-
- bcB->id(_data->idB);
- bcB->label(_data->labelB);
- bcB->db(&db);
- bcB->fixedDOF(fixedDOFB);
- bcB->initialize(*mesh, &cs, upDir);
-} // _initialize
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,83 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletMulti.hh
- *
- * @brief C++ TestDirichletMulti object.
- *
- * C++ unit testing for DirichletMulti.
- */
-
-#if !defined(pylith_bc_testdirichletmulti_hh)
-#define pylith_bc_testdirichletmulti_hh
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletMulti;
-
- class Dirichlet;
- class DirichletDataMulti;
- } // bc
-} // pylith
-
-/// C++ unit testing for DirichletMulti.
-class pylith::bc::TestDirichletMulti : public CppUnit::TestFixture
-{ // class TestDirichletMulti
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
- /// Tear down testing data.
- void tearDown(void);
-
- /// Test setConstraintSizes().
- void testSetConstraintSizes(void);
-
- /// Test setConstraints().
- void testSetConstraints(void);
-
- /// Test setField().
- void testSetField(void);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- DirichletDataMulti* _data; ///< Data for testing
-
- // PRIVATE METHODS ////////////////////////////////////////////////////
-private :
-
- /** Initialize DirichletMulti boundary condition.
- *
- * @param mesh PETSc mesh to initialize
- * @param bcA Dirichlet boundary condition A to initialize.
- * @param bcB Dirichlet boundary condition B to initialize.
- */
- void _initialize(ALE::Obj<ALE::Mesh>* mesh,
- Dirichlet* const bcA,
- Dirichlet* const bcB) const;
-
-}; // class TestDirichletMulti
-
-#endif // pylith_bc_dirichletmulti_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletMultiTri3.hh" // Implementation of class methods
-
-#include "data/DirichletDataMultiTri3.hh" // USES DirichletDataMultiTri3
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletMultiTri3 );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletMultiTri3::setUp(void)
-{ // setUp
- _data = new DirichletDataMultiTri3();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletMultiTri3.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichletmultitri3_hh)
-#define pylith_bc_testdirichletmultitri3_hh
-
-#include "TestDirichletMulti.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletMultiTri3;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 2-D tri cells.
-class pylith::bc::TestDirichletMultiTri3 : public TestDirichletMulti
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUITE( TestDirichletMultiTri3 );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletMultiTri3
-
-#endif // pylith_bc_dirichletmultitri3_hh
-
-
-// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,293 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPoints.hh" // Implementation of class methods
+
+#include "pylith/bc/DirichletPoints.hh" // USES DirichletPoints
+
+#include "data/DirichletPointsData.hh" // USES DirichletPointsData
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPoints );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPoints::setUp(void)
+{ // setUp
+ _data = 0;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletPoints::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::bc::TestDirichletPoints::testConstructor(void)
+{ // testConstructor
+ DirichletPoints bc;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test fixedDOF()
+void
+pylith::bc::TestDirichletPoints::testFixedDOF(void)
+{ // testfixedDOF
+ DirichletPoints bc;
+
+ const size_t numDOF = 4;
+ const int dof[] = { 0, 2, 3, 5 };
+ int_array fixedDOF(dof, numDOF);
+ bc.fixedDOF(fixedDOF);
+
+ CPPUNIT_ASSERT_EQUAL(numDOF, bc._fixedDOF.size());
+ for (int i=0; i < numDOF; ++i)
+ CPPUNIT_ASSERT_EQUAL(fixedDOF[i], bc._fixedDOF[i]);
+} // testFixedDOF
+
+// ----------------------------------------------------------------------
+// Test initialize().
+void
+pylith::bc::TestDirichletPoints::testInitialize(void)
+{ // testInitialize
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bc;
+ _initialize(&mesh, &bc);
+
+ CPPUNIT_ASSERT(0 != _data);
+
+ const int numCells = mesh->heightStratum(0)->size();
+
+ const int numFixedDOF = _data->numFixedDOF;
+ const size_t numPoints = _data->numConstrainedPts;
+
+ // Check points
+ const int offset = numCells;
+ if (numFixedDOF > 0) {
+ CPPUNIT_ASSERT_EQUAL(numPoints, bc._points.size());
+ for (int i=0; i < numPoints; ++i)
+ CPPUNIT_ASSERT_EQUAL(_data->constrainedPoints[i]+offset, bc._points[i]);
+ } // if
+
+ // Check values
+ const size_t size = numPoints * numFixedDOF;
+ CPPUNIT_ASSERT_EQUAL(size, bc._values.size());
+ const double tolerance = 1.0e-06;
+ for (int i=0; i < size; ++i)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->values[i], bc._values[i], tolerance);
+} // testInitialize
+
+// ----------------------------------------------------------------------
+// Test setConstraintSizes().
+void
+pylith::bc::TestDirichletPoints::testSetConstraintSizes(void)
+{ // testSetConstraintSizes
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bc;
+ _initialize(&mesh, &bc);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bc.setConstraintSizes(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+
+ const int numCells = mesh->heightStratum(0)->size();
+ const int offset = numCells;
+ int iConstraint = 0;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ if (*v_iter != _data->constrainedPoints[iConstraint] + offset) {
+ CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
+ CPPUNIT_ASSERT_EQUAL(0, field->getConstraintDimension(*v_iter));
+ } else {
+ CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
+ CPPUNIT_ASSERT_EQUAL(_data->numFixedDOF,
+ field->getConstraintDimension(*v_iter));
+ ++iConstraint;
+ } // if/else
+ } // for
+} // testSetConstraintSizes
+
+// ----------------------------------------------------------------------
+// Test setConstraints().
+void
+pylith::bc::TestDirichletPoints::testSetConstraints(void)
+{ // testSetConstraints
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bc;
+ _initialize(&mesh, &bc);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bc.setConstraintSizes(field, mesh);
+ mesh->allocate(field);
+ bc.setConstraints(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+
+ const int numCells = mesh->heightStratum(0)->size();
+ const int offset = numCells;
+ int iConstraint = 0;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int* fixedDOF = field->getConstraintDof(*v_iter);
+ if (*v_iter != _data->constrainedPoints[iConstraint] + offset) {
+ CPPUNIT_ASSERT_EQUAL(0, field->getConstraintDimension(*v_iter));
+ //CPPUNIT_ASSERT(0 == fixedDOF);
+ } else {
+ CPPUNIT_ASSERT(0 != fixedDOF);
+ CPPUNIT_ASSERT_EQUAL(_data->numFixedDOF,
+ field->getConstraintDimension(*v_iter));
+ for (int iDOF=0; iDOF < _data->numFixedDOF; ++iDOF)
+ CPPUNIT_ASSERT_EQUAL(_data->fixedDOF[iDOF], fixedDOF[iDOF]);
+ ++iConstraint;
+ } // if/else
+ } // for
+} // testSetConstraints
+
+// ----------------------------------------------------------------------
+// Test setField().
+void
+pylith::bc::TestDirichletPoints::testSetField(void)
+{ // testSetField
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bc;
+ _initialize(&mesh, &bc);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bc.setConstraintSizes(field, mesh);
+ mesh->allocate(field);
+ bc.setConstraints(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+ const double tolerance = 1.0e-06;
+
+ // All values should be zero.
+ field->zero();
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int fiberDim = field->getFiberDimension(*v_iter);
+ const real_section_type::value_type* values =
+ mesh->restrict(field, *v_iter);
+ for (int i=0; i < fiberDim; ++i)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
+ } // for
+
+ // Only unconstrained values should be zero.
+ const double t = 1.0;
+ bc.setField(t, field, mesh);
+
+ // Create list of unconstrained DOF at constrained DOF
+ const int numFreeDOF = _data->numDOF - _data->numFixedDOF;
+ int_array freeDOF(numFreeDOF);
+ int index = 0;
+ for (int iDOF=0; iDOF < _data->numDOF; ++iDOF) {
+ bool free = true;
+ for (int iFixed=0; iFixed < _data->numFixedDOF; ++iFixed)
+ if (iDOF == _data->fixedDOF[iFixed])
+ free = false;
+ if (free)
+ freeDOF[index] = iDOF;
+ } // for
+
+ const int numCells = mesh->heightStratum(0)->size();
+ const int offset = numCells;
+ const int numFixedDOF = _data->numFixedDOF;
+ int iConstraint = 0;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int fiberDim = field->getFiberDimension(*v_iter);
+ const real_section_type::value_type* values =
+ mesh->restrict(field, *v_iter);
+
+ if (*v_iter != _data->constrainedPoints[iConstraint] + offset) {
+ // unconstrained point
+ for (int i=0; i < fiberDim; ++i)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
+ } else {
+ // constrained point
+
+ // check unconstrained DOF
+ for (int iDOF=0; iDOF < numFreeDOF; ++iDOF)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[freeDOF[iDOF]], tolerance);
+
+ // check constrained DOF
+ for (int iDOF=0; iDOF < numFixedDOF; ++iDOF) {
+ const int index = iConstraint * numFixedDOF + iDOF;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->values[index],
+ values[_data->fixedDOF[iDOF]],
+ tolerance);
+ } // for
+ ++iConstraint;
+ } // if/else
+ } // for
+} // testSetField
+
+// ----------------------------------------------------------------------
+void
+pylith::bc::TestDirichletPoints::_initialize(ALE::Obj<Mesh>* mesh,
+ DirichletPoints* const bc) const
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+ CPPUNIT_ASSERT(0 != bc);
+
+ meshio::MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(mesh);
+ CPPUNIT_ASSERT(!mesh->isNull());
+ (*mesh)->getFactory()->clear();
+
+ spatialdata::geocoords::CSCart cs;
+ cs.setSpaceDim((*mesh)->getDimension());
+ cs.initialize();
+
+ spatialdata::spatialdb::SimpleDB db("TestDirichletPoints");
+ spatialdata::spatialdb::SimpleIOAscii dbIO;
+ dbIO.filename(_data->dbFilename);
+ db.ioHandler(&dbIO);
+
+ int_array fixedDOF(_data->fixedDOF, _data->numFixedDOF);
+ const double upDirVals[] = { 0.0, 0.0, 1.0 };
+ double_array upDir(upDirVals, 3);
+
+ bc->id(_data->id);
+ bc->label(_data->label);
+ bc->db(&db);
+ bc->fixedDOF(fixedDOF);
+ bc->initialize(*mesh, &cs, upDir);
+} // _initialize
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPoints.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,96 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPoints.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints.
+ */
+
+#if !defined(pylith_bc_testdirichletpoints_hh)
+#define pylith_bc_testdirichletpoints_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPoints;
+
+ class DirichletPoints;
+ class DirichletPointsData;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints.
+class pylith::bc::TestDirichletPoints : public CppUnit::TestFixture
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletPoints );
+ CPPUNIT_TEST( testConstructor );
+ CPPUNIT_TEST( testFixedDOF );
+ 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 fixedDOF().
+ void testFixedDOF(void);
+
+ /// Test initialize().
+ void testInitialize(void);
+
+ /// Test setConstraintSizes().
+ void testSetConstraintSizes(void);
+
+ /// Test setConstraints().
+ void testSetConstraints(void);
+
+ /// Test setField().
+ void testSetField(void);
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DirichletPointsData* _data; ///< Data for testing
+
+ // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+ /** Initialize DirichletPoints boundary condition.
+ *
+ * @param mesh PETSc mesh to initialize
+ * @param bc DirichletPoints boundary condition to initialize.
+ */
+ void _initialize(ALE::Obj<ALE::Mesh>* mesh,
+ DirichletPoints* const bc) const;
+
+}; // class TestDirichletPoints
+
+#endif // pylith_bc_dirichletpoints_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsHex8.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataHex8.hh" // USES DirichletPointsDataHex8
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsHex8 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsHex8::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataHex8();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsHex8.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsHex8.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointshex8_hh)
+#define pylith_bc_testdirichletpointshex8_hh
+
+#include "TestDirichletPoints.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsHex8;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 3-D hex cells.
+class pylith::bc::TestDirichletPointsHex8 : public TestDirichletPoints
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestDirichletPointsHex8, TestDirichletPoints );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsHex8
+
+#endif // pylith_bc_dirichletpointshex8_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsLine2.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataLine2.hh" // USES DirichletPointsDataLine2
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsLine2 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsLine2::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataLine2();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsLine2.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointsline2_hh)
+#define pylith_bc_testdirichletpointsline2_hh
+
+#include "TestDirichletPoints.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsLine2;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+class pylith::bc::TestDirichletPointsLine2 : public TestDirichletPoints
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestDirichletPointsLine2, TestDirichletPoints );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsLine2
+
+#endif // pylith_bc_dirichletpointsline2_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsLine2b.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataLine2b.hh" // USES DirichletPointsDataLine2b
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsLine2b );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsLine2b::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataLine2b();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2b.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsLine2b.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsLine2b.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointsline2b_hh)
+#define pylith_bc_testdirichletpointsline2b_hh
+
+#include "TestDirichletPoints.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsLine2b;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+class pylith::bc::TestDirichletPointsLine2b : public TestDirichletPoints
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestDirichletPointsLine2b, TestDirichletPoints );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsLine2b
+
+#endif // pylith_bc_dirichletpointsline2b_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,210 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsMulti.hh" // Implementation of class methods
+
+#include "pylith/bc/DirichletPoints.hh" // USES DirichletPoints
+
+#include "data/DirichletPointsDataMulti.hh" // USES DirichletPointsData
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsMulti::setUp(void)
+{ // setUp
+ _data = 0;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletPointsMulti::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test setConstraintSizes().
+void
+pylith::bc::TestDirichletPointsMulti::testSetConstraintSizes(void)
+{ // testSetConstraintSizes
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bcA;
+ DirichletPoints bcB;
+ _initialize(&mesh, &bcA, &bcB);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bcA.setConstraintSizes(field, mesh);
+ bcB.setConstraintSizes(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+
+ const int numCells = mesh->heightStratum(0)->size();
+ const int offset = numCells;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
+
+ CPPUNIT_ASSERT_EQUAL(_data->constraintSizes[*v_iter-offset],
+ field->getConstraintDimension(*v_iter));
+ } // for
+} // testSetConstraintSizes
+
+// ----------------------------------------------------------------------
+// Test setConstraints().
+void
+pylith::bc::TestDirichletPointsMulti::testSetConstraints(void)
+{ // testSetConstraints
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bcA;
+ DirichletPoints bcB;
+ _initialize(&mesh, &bcA, &bcB);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bcA.setConstraintSizes(field, mesh);
+ bcB.setConstraintSizes(field, mesh);
+ mesh->allocate(field);
+ bcA.setConstraints(field, mesh);
+ bcB.setConstraints(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+
+ const int numCells = mesh->heightStratum(0)->size();
+ const int offset = numCells;
+ int index = 0;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int numConstrainedDOF = _data->constraintSizes[*v_iter-offset];
+ if (numConstrainedDOF > 0) {
+ const int* fixedDOF = field->getConstraintDof(*v_iter);
+ for (int iDOF=0; iDOF < numConstrainedDOF; ++iDOF)
+ CPPUNIT_ASSERT_EQUAL(_data->constrainedDOF[index++], fixedDOF[iDOF]);
+ } // if
+ } // for
+} // testSetConstraints
+
+// ----------------------------------------------------------------------
+// Test setField().
+void
+pylith::bc::TestDirichletPointsMulti::testSetField(void)
+{ // testSetField
+ ALE::Obj<Mesh> mesh;
+ DirichletPoints bcA;
+ DirichletPoints bcB;
+ _initialize(&mesh, &bcA, &bcB);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bcA.setConstraintSizes(field, mesh);
+ bcB.setConstraintSizes(field, mesh);
+ mesh->allocate(field);
+ bcA.setConstraints(field, mesh);
+ bcB.setConstraints(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+ const double tolerance = 1.0e-06;
+
+ // All values should be zero.
+ field->zero();
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int fiberDim = field->getFiberDimension(*v_iter);
+ const real_section_type::value_type* values =
+ mesh->restrict(field, *v_iter);
+ for (int i=0; i < fiberDim; ++i)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
+ } // for
+
+ // Only unconstrained values should be zero.
+ // Expected values set in _data->field
+ const double t = 1.0;
+ bcA.setField(t, field, mesh);
+ bcB.setField(t, field, mesh);
+
+ int i = 0;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int fiberDim = field->getFiberDimension(*v_iter);
+ const real_section_type::value_type* values =
+ mesh->restrict(field, *v_iter);
+ for (int iDOF=0; iDOF < fiberDim; ++iDOF)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->field[i++], values[iDOF], tolerance);
+ } // for
+} // testSetField
+
+// ----------------------------------------------------------------------
+void
+pylith::bc::TestDirichletPointsMulti::_initialize(ALE::Obj<Mesh>* mesh,
+ DirichletPoints* const bcA,
+ DirichletPoints* const bcB) const
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+ CPPUNIT_ASSERT(0 != bcA);
+ CPPUNIT_ASSERT(0 != bcB);
+
+ meshio::MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(mesh);
+ CPPUNIT_ASSERT(!mesh->isNull());
+
+ spatialdata::geocoords::CSCart cs;
+ cs.setSpaceDim((*mesh)->getDimension());
+ cs.initialize();
+
+ // Setup boundary condition A
+ spatialdata::spatialdb::SimpleDB db("TestDirichletPointsMulti");
+ spatialdata::spatialdb::SimpleIOAscii dbIO;
+ dbIO.filename(_data->dbFilenameA);
+ db.ioHandler(&dbIO);
+
+ int_array fixedDOFA(_data->fixedDOFA, _data->numFixedDOFA);
+ const double upDirVals[] = { 0.0, 0.0, 1.0 };
+ double_array upDir(upDirVals, 3);
+
+ bcA->id(_data->idA);
+ bcA->label(_data->labelA);
+ bcA->db(&db);
+ bcA->fixedDOF(fixedDOFA);
+ bcA->initialize(*mesh, &cs, upDir);
+
+ // Setup boundary condition B
+ dbIO.filename(_data->dbFilenameB);
+ db.ioHandler(&dbIO);
+
+ int_array fixedDOFB(_data->fixedDOFB, _data->numFixedDOFB);
+
+ bcB->id(_data->idB);
+ bcB->label(_data->labelB);
+ bcB->db(&db);
+ bcB->fixedDOF(fixedDOFB);
+ bcB->initialize(*mesh, &cs, upDir);
+} // _initialize
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMulti.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsMulti.hh
+ *
+ * @brief C++ TestDirichletPointsMulti object.
+ *
+ * C++ unit testing for DirichletPointsMulti.
+ */
+
+#if !defined(pylith_bc_testdirichletpointsmulti_hh)
+#define pylith_bc_testdirichletpointsmulti_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsMulti;
+
+ class DirichletPoints;
+ class DirichletPointsDataMulti;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPointsMulti.
+class pylith::bc::TestDirichletPointsMulti : public CppUnit::TestFixture
+{ // class TestDirichletPointsMulti
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Test setConstraintSizes().
+ void testSetConstraintSizes(void);
+
+ /// Test setConstraints().
+ void testSetConstraints(void);
+
+ /// Test setField().
+ void testSetField(void);
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DirichletPointsDataMulti* _data; ///< Data for testing
+
+ // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+ /** Initialize DirichletPointsMulti boundary condition.
+ *
+ * @param mesh PETSc mesh to initialize
+ * @param bcA DirichletPoints boundary condition A to initialize.
+ * @param bcB DirichletPoints boundary condition B to initialize.
+ */
+ void _initialize(ALE::Obj<ALE::Mesh>* mesh,
+ DirichletPoints* const bcA,
+ DirichletPoints* const bcB) const;
+
+}; // class TestDirichletPointsMulti
+
+#endif // pylith_bc_dirichletpointsmulti_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsMultiTri3.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataMultiTri3.hh" // USES DirichletPointsDataMultiTri3
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsMultiTri3 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsMultiTri3::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataMultiTri3();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsMultiTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsMultiTri3.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointsmultitri3_hh)
+#define pylith_bc_testdirichletpointsmultitri3_hh
+
+#include "TestDirichletPointsMulti.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsMultiTri3;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 2-D tri cells.
+class pylith::bc::TestDirichletPointsMultiTri3 : public TestDirichletPointsMulti
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletPointsMultiTri3 );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsMultiTri3
+
+#endif // pylith_bc_dirichletpointsmultitri3_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsQuad4.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataQuad4.hh" // USES DirichletPointsDataQuad4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsQuad4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsQuad4::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataQuad4();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsQuad4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsQuad4.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointsquad4_hh)
+#define pylith_bc_testdirichletpointsquad4_hh
+
+#include "TestDirichletPoints.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsQuad4;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 2-D quad cells.
+class pylith::bc::TestDirichletPointsQuad4 : public TestDirichletPoints
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestDirichletPointsQuad4, TestDirichletPoints );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsQuad4
+
+#endif // pylith_bc_dirichletpointsquad4_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsTet4.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataTet4.hh" // USES DirichletPointsDataTet4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsTet4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsTet4::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataTet4();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTet4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsTet4.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointstet4_hh)
+#define pylith_bc_testdirichletpointset4_hh
+
+#include "TestDirichletPoints.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsTet4;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 3-D tet cells.
+class pylith::bc::TestDirichletPointsTet4 : public TestDirichletPoints
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestDirichletPointsTet4, TestDirichletPoints );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsTet4
+
+#endif // pylith_bc_dirichletpointstet4_hh
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletPointsTri3.hh" // Implementation of class methods
+
+#include "data/DirichletPointsDataTri3.hh" // USES DirichletPointsDataTri3
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletPointsTri3 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletPointsTri3::setUp(void)
+{ // setUp
+ _data = new DirichletPointsDataTri3();
+} // setUp
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletPointsTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletPointsTri3.hh
+ *
+ * @brief C++ TestDirichletPoints object.
+ *
+ * C++ unit testing for DirichletPoints for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletpointstri3_hh)
+#define pylith_bc_testdirichletpointstri3_hh
+
+#include "TestDirichletPoints.hh" // ISA TestDirichletPoints
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletPointsTri3;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletPoints for mesh with 2-D tri cells.
+class pylith::bc::TestDirichletPointsTri3 : public TestDirichletPoints
+{ // class TestDirichletPoints
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUB_SUITE( TestDirichletPointsTri3, TestDirichletPoints );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDirichletPointsTri3
+
+#endif // pylith_bc_dirichletpointstri3_hh
+
+
+// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletQuad4.hh" // Implementation of class methods
-
-#include "data/DirichletDataQuad4.hh" // USES DirichletDataQuad4
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletQuad4 );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletQuad4::setUp(void)
-{ // setUp
- _data = new DirichletDataQuad4();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletQuad4.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichletquad4_hh)
-#define pylith_bc_testdirichletquad4_hh
-
-#include "TestDirichlet.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletQuad4;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 2-D quad cells.
-class pylith::bc::TestDirichletQuad4 : public TestDirichlet
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUB_SUITE( TestDirichletQuad4, TestDirichlet );
- CPPUNIT_TEST( testInitialize );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletQuad4
-
-#endif // pylith_bc_dirichletquad4_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletTet4.hh" // Implementation of class methods
-
-#include "data/DirichletDataTet4.hh" // USES DirichletDataTet4
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletTet4 );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletTet4::setUp(void)
-{ // setUp
- _data = new DirichletDataTet4();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletTet4.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichlettet4_hh)
-#define pylith_bc_testdirichletet4_hh
-
-#include "TestDirichlet.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletTet4;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 3-D tet cells.
-class pylith::bc::TestDirichletTet4 : public TestDirichlet
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUB_SUITE( TestDirichletTet4, TestDirichlet );
- CPPUNIT_TEST( testInitialize );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletTet4
-
-#endif // pylith_bc_dirichlettet4_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-#include <portinfo>
-
-#include "TestDirichletTri3.hh" // Implementation of class methods
-
-#include "data/DirichletDataTri3.hh" // USES DirichletDataTri3
-
-// ----------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletTri3 );
-
-// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::bc::TestDirichletTri3::setUp(void)
-{ // setUp
- _data = new DirichletDataTri3();
-} // setUp
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// ----------------------------------------------------------------------
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ----------------------------------------------------------------------
-//
-
-/**
- * @file unittests/libtests/bc/TestDirichletTri3.hh
- *
- * @brief C++ TestDirichlet object.
- *
- * C++ unit testing for Dirichlet for mesh with 1-D line cells.
- */
-
-#if !defined(pylith_bc_testdirichlettri3_hh)
-#define pylith_bc_testdirichlettri3_hh
-
-#include "TestDirichlet.hh" // ISA TestDirichlet
-
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class TestDirichletTri3;
- } // bc
-} // pylith
-
-/// C++ unit testing for Dirichlet for mesh with 2-D tri cells.
-class pylith::bc::TestDirichletTri3 : public TestDirichlet
-{ // class TestDirichlet
-
- // CPPUNIT TEST SUITE /////////////////////////////////////////////////
- CPPUNIT_TEST_SUB_SUITE( TestDirichletTri3, TestDirichlet );
- CPPUNIT_TEST( testInitialize );
- CPPUNIT_TEST( testSetConstraintSizes );
- CPPUNIT_TEST( testSetConstraints );
- CPPUNIT_TEST( testSetField );
- CPPUNIT_TEST_SUITE_END();
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
- /// Setup testing data.
- void setUp(void);
-
-}; // class TestDirichletTri3
-
-#endif // pylith_bc_dirichlettri3_hh
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#include "DirichletData.hh"
-
-// ----------------------------------------------------------------------
-// Constructor
-pylith::bc::DirichletData::DirichletData(void) :
- numDOF(0),
- numFixedDOF(0),
- numConstrainedPts(0),
- id(0),
- label(0),
- fixedDOF(0),
- constrainedPoints(0),
- values(0),
- meshFilename(0),
- dbFilename(0)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor
-pylith::bc::DirichletData::~DirichletData(void)
-{ // destructor
-} // destructor
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,54 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdata_hh)
-#define pylith_bc_dirichletdata_hh
-
-namespace pylith {
- namespace bc {
- class DirichletData;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public :
-
- /// Constructor
- DirichletData(void);
-
- /// Destructor
- ~DirichletData(void);
-
-// PUBLIC MEMBERS ///////////////////////////////////////////////////////
-public:
-
- int numDOF; ///< Number of degrees of freedom at each point.
- int numFixedDOF; ///< Number of fixedDOF at constrained points.
- int numConstrainedPts; ///< Number of points constrained.
-
- int id; ///< Boundary condition identifier
- char* label; ///< Label for boundary condition group
-
- int* fixedDOF; ///< Degrees of freedom that are constrained at each point
- int* constrainedPoints; ///< Array of indices of constrained points.
- double* values; ///< Values at constrained points.
-
- char* meshFilename; ///< Filename for input mesh.
- char* dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_cohesivedata_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,71 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshHex8.txt
- *
- * Dirichlet BC at vertices 0, 1, 6, 7.
- *
- * Fixed DOF: { 0, 2 }
- *
- * Values
- * 0: -0.2, 0.3
- * 1: 0.1, 0.7
- * 6: 0.5, 0.4
- * 7: 3.2, 6.1
- */
-
-#include "DirichletDataHex8.hh"
-
-const int pylith::bc::DirichletDataHex8::_id = 0;
-
-const char* pylith::bc::DirichletDataHex8::_label = "bc";
-
-const int pylith::bc::DirichletDataHex8::_numDOF = 3;
-const int pylith::bc::DirichletDataHex8::_numFixedDOF = 2;
-const int pylith::bc::DirichletDataHex8::_fixedDOF[] = { 0, 2 };
-
-const int pylith::bc::DirichletDataHex8::_numConstrainedPts = 4;
-const int pylith::bc::DirichletDataHex8::_constrainedPoints[] = { 0, 1, 6, 7 };
-const double pylith::bc::DirichletDataHex8::_values[] = {
- -0.2, 0.3,
- 0.1, 0.7,
- 0.5, 0.4,
- 3.2, 6.1,
-};
-
-const char* pylith::bc::DirichletDataHex8::_meshFilename =
- "data/hex8.mesh";
-const char* pylith::bc::DirichletDataHex8::_dbFilename =
- "data/hex8.spatialdb";
-
-pylith::bc::DirichletDataHex8::DirichletDataHex8(void)
-{ // constructor
- id = _id;
- label = const_cast<char*>(_label);
-
- numDOF = _numDOF;
- numFixedDOF = _numFixedDOF;
- fixedDOF = const_cast<int*>(_fixedDOF);
-
- numConstrainedPts = _numConstrainedPts;
- constrainedPoints = const_cast<int*>(_constrainedPoints);
- values = const_cast<double*>(_values);
-
- meshFilename = const_cast<char*>(_meshFilename);
- dbFilename = const_cast<char*>(_dbFilename);
-} // constructor
-
-pylith::bc::DirichletDataHex8::~DirichletDataHex8(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdatahex8_hh)
-#define pylith_bc_dirichletdatahex8_hh
-
-#include "DirichletData.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataHex8;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataHex8 : public DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataHex8(void);
-
- /// Destructor
- ~DirichletDataHex8(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPts; ///< Number of points constrained.
-
- static const int _id; ///< Boundary condition identifier
- static const char* _label; /// Label for boundary condition group
-
- static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
-
- static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
- static const double _values[]; ///< Values at constrained points.
-
- static const char* _meshFilename; ///< Filename of input mesh.
- static const char* _dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_dirichletdatahex8_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,65 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshLine2.txt
- *
- * Dirichlet BC at vertices 0 and 2.
- *
- * Fixed DOF: { 0 }
- *
- * Values
- * 0: 1.1 [constrained]
- * 1: 0.8 [solution]
- * 2: 2.2 [constrained]
- */
-
-#include "DirichletDataLine2.hh"
-
-const int pylith::bc::DirichletDataLine2::_id = 0;
-
-const char* pylith::bc::DirichletDataLine2::_label = "bc0";
-
-const int pylith::bc::DirichletDataLine2::_numDOF = 1;
-const int pylith::bc::DirichletDataLine2::_numFixedDOF = 1;
-const int pylith::bc::DirichletDataLine2::_fixedDOF[] = { 0 };
-
-const int pylith::bc::DirichletDataLine2::_numConstrainedPts = 2;
-const int pylith::bc::DirichletDataLine2::_constrainedPoints[] = { 0, 2 };
-const double pylith::bc::DirichletDataLine2::_values[] = { 1.1, 2.2 };
-
-const char* pylith::bc::DirichletDataLine2::_meshFilename =
- "data/line2.mesh";
-const char* pylith::bc::DirichletDataLine2::_dbFilename =
- "data/line2.spatialdb";
-
-pylith::bc::DirichletDataLine2::DirichletDataLine2(void)
-{ // constructor
- id = _id;
- label = const_cast<char*>(_label);
-
- numDOF = _numDOF;
- numFixedDOF = _numFixedDOF;
- fixedDOF = const_cast<int*>(_fixedDOF);
-
- numConstrainedPts = _numConstrainedPts;
- constrainedPoints = const_cast<int*>(_constrainedPoints);
- values = const_cast<double*>(_values);
-
- meshFilename = const_cast<char*>(_meshFilename);
- dbFilename = const_cast<char*>(_dbFilename);
-} // constructor
-
-pylith::bc::DirichletDataLine2::~DirichletDataLine2(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdataline2_hh)
-#define pylith_bc_dirichletdataline2_hh
-
-#include "DirichletData.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataLine2;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataLine2 : public DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataLine2(void);
-
- /// Destructor
- ~DirichletDataLine2(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPts; ///< Number of points constrained.
-
- static const int _id; ///< Boundary condition identifier
- static const char* _label; /// Label for boundary condition group
-
- static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
-
- static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
- static const double _values[]; ///< Values at constrained points.
-
- static const char* _meshFilename; ///< Filename of input mesh.
- static const char* _dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_dirichletdataline2_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,60 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshLine2.txt
- *
- * Dirichlet BC at vertices 0 and 2.
- *
- * Fixed DOF: None
- */
-
-#include "DirichletDataLine2b.hh"
-
-const int pylith::bc::DirichletDataLine2b::_id = 0;
-
-const char* pylith::bc::DirichletDataLine2b::_label = "bc0";
-
-const int pylith::bc::DirichletDataLine2b::_numDOF = 1;
-const int pylith::bc::DirichletDataLine2b::_numFixedDOF = 0;
-const int pylith::bc::DirichletDataLine2b::_fixedDOF[] = {};
-
-const int pylith::bc::DirichletDataLine2b::_numConstrainedPts = 2;
-const int pylith::bc::DirichletDataLine2b::_constrainedPoints[] = { 0, 2 };
-const double pylith::bc::DirichletDataLine2b::_values[] = {0};
-
-const char* pylith::bc::DirichletDataLine2b::_meshFilename =
- "data/line2.mesh";
-const char* pylith::bc::DirichletDataLine2b::_dbFilename =
- "data/line2.spatialdb";
-
-pylith::bc::DirichletDataLine2b::DirichletDataLine2b(void)
-{ // constructor
- id = _id;
- label = const_cast<char*>(_label);
-
- numDOF = _numDOF;
- numFixedDOF = _numFixedDOF;
- fixedDOF = const_cast<int*>(_fixedDOF);
-
- numConstrainedPts = _numConstrainedPts;
- constrainedPoints = const_cast<int*>(_constrainedPoints);
- values = const_cast<double*>(_values);
-
- meshFilename = const_cast<char*>(_meshFilename);
- dbFilename = const_cast<char*>(_dbFilename);
-} // constructor
-
-pylith::bc::DirichletDataLine2b::~DirichletDataLine2b(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdataline2b_hh)
-#define pylith_bc_dirichletdataline2b_hh
-
-#include "DirichletData.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataLine2b;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataLine2b : public DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataLine2b(void);
-
- /// Destructor
- ~DirichletDataLine2b(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPts; ///< Number of points constrained.
-
- static const int _id; ///< Boundary condition identifier
- static const char* _label; /// Label for boundary condition group
-
- static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
-
- static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
- static const double _values[]; ///< Values at constrained points.
-
- static const char* _meshFilename; ///< Filename of input mesh.
- static const char* _dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_dirichletdataline2b_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#include "DirichletDataMulti.hh"
-
-// ----------------------------------------------------------------------
-// Constructor
-pylith::bc::DirichletDataMulti::DirichletDataMulti(void) :
- numDOF(0),
- numFixedDOFA(0),
- numConstrainedPtsA(0),
- idA(0),
- labelA(0),
- fixedDOFA(0),
- constrainedPointsA(0),
- valuesA(0),
- dbFilenameA(0),
- numFixedDOFB(0),
- numConstrainedPtsB(0),
- idB(0),
- labelB(0),
- fixedDOFB(0),
- constrainedPointsB(0),
- valuesB(0),
- dbFilenameB(0),
- field(0),
- constraintSizes(0),
- constrainedDOF(0),
- meshFilename(0)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor
-pylith::bc::DirichletDataMulti::~DirichletDataMulti(void)
-{ // destructor
-} // destructor
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdatamulti_hh)
-#define pylith_bc_dirichletdatamulti_hh
-
-namespace pylith {
- namespace bc {
- class DirichletDataMulti;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataMulti
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public :
-
- /// Constructor
- DirichletDataMulti(void);
-
- /// Destructor
- ~DirichletDataMulti(void);
-
-// PUBLIC MEMBERS ///////////////////////////////////////////////////////
-public:
-
- int numDOF; ///< Number of degrees of freedom at each point.
-
- //@{ Boundary condition A
- int numFixedDOFA; ///< Number of fixedDOF at constrained points.
- int numConstrainedPtsA; ///< Number of points constrained.
- int idA; ///< Boundary condition identifier
- char* labelA; ///< Label for boundary condition group
- int* fixedDOFA; ///< Degrees of freedom that are constrained at each point
- int* constrainedPointsA; ///< Array of indices of constrained points.
- double* valuesA; ///< Values at constrained points.
- char* dbFilenameA; ///< Filename of simple spatial datamultibase.
- //@}
-
- //@{ Boundary condition B
- int numFixedDOFB; ///< Number of fixedDOF at constrained points.
- int numConstrainedPtsB; ///< Number of points constrained.
- int idB; ///< Boundary condition identifier
- char* labelB; ///< Label for boundary condition group
- int* fixedDOFB; ///< Degrees of freedom that are constrained at each point
- int* constrainedPointsB; ///< Array of indices of constrained points.
- double* valuesB; ///< Values at constrained points.
- char* dbFilenameB; ///< Filename of simple spatial datamultibase.
- //@}
-
- double* field; ///< Values in field
- int* constraintSizes; ///< Number of constrained DOF at each vertex
- int* constrainedDOF; ///< Indices of constrained DOF at each constrained vertex
-
- char* meshFilename; ///< Filename for input mesh.
-};
-
-#endif // pylith_bc_cohesivedatamulti_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,112 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshTri3.txt
- *
- * Dirichlet BC A at vertices 1 and 3.
- *
- * Fixed DOF: { 1 }
- *
- * Values
- * 1: 0.3
- * 3: 0.7
- *
- * Dirichlet BC B at vertex 0 and 3.
- *
- * Fixed DOF: { 0 }
- *
- * Values
- * 0: 0.9
- * 3: 0.5
- */
-
-#include "DirichletDataMultiTri3.hh"
-
-const int pylith::bc::DirichletDataMultiTri3::_numDOF = 2;
-
-const int pylith::bc::DirichletDataMultiTri3::_idA = 0;
-const char* pylith::bc::DirichletDataMultiTri3::_labelA = "bc";
-const int pylith::bc::DirichletDataMultiTri3::_numFixedDOFA = 1;
-const int pylith::bc::DirichletDataMultiTri3::_fixedDOFA[] = { 1 };
-const int pylith::bc::DirichletDataMultiTri3::_numConstrainedPtsA = 2;
-const int pylith::bc::DirichletDataMultiTri3::_constrainedPointsA[] = { 1, 3 };
-const double pylith::bc::DirichletDataMultiTri3::_valuesA[] = { 0.3, 0.7 };
-const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameA =
- "data/tri3.spatialdb";
-
-const int pylith::bc::DirichletDataMultiTri3::_idB = 1;
-const char* pylith::bc::DirichletDataMultiTri3::_labelB = "bc2";
-const int pylith::bc::DirichletDataMultiTri3::_numFixedDOFB = 1;
-const int pylith::bc::DirichletDataMultiTri3::_fixedDOFB[] = { 0 };
-const int pylith::bc::DirichletDataMultiTri3::_numConstrainedPtsB = 1;
-const int pylith::bc::DirichletDataMultiTri3::_constrainedPointsB[] = { 0, 3 };
-const double pylith::bc::DirichletDataMultiTri3::_valuesB[] = { 0.9, 0.5 };
-const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameB =
- "data/tri3_b.spatialdb";
-
-const int pylith::bc::DirichletDataMultiTri3::_constraintSizes[] = {
- 1,
- 1,
- 0,
- 2
-};
-
-const int pylith::bc::DirichletDataMultiTri3::_constrainedDOF[] = {
- 0,
- 1,
- 0, 1
-};
-
-const double pylith::bc::DirichletDataMultiTri3::_field[] = {
- 0.9, 0.0,
- 0.0, 0.3,
- 0.0, 0.0,
- 0.5, 0.7
-};
-
-const char* pylith::bc::DirichletDataMultiTri3::_meshFilename =
- "data/tri3.mesh";
-
-pylith::bc::DirichletDataMultiTri3::DirichletDataMultiTri3(void)
-{ // constructor
- numDOF = _numDOF;
-
- idA = _idA;
- labelA = const_cast<char*>(_labelA);
- numFixedDOFA = _numFixedDOFA;
- fixedDOFA = const_cast<int*>(_fixedDOFA);
- numConstrainedPtsA = _numConstrainedPtsA;
- constrainedPointsA = const_cast<int*>(_constrainedPointsA);
- valuesA = const_cast<double*>(_valuesA);
- dbFilenameA = const_cast<char*>(_dbFilenameA);
-
- idB = _idA;
- labelB = const_cast<char*>(_labelB);
- numFixedDOFB = _numFixedDOFB;
- fixedDOFB = const_cast<int*>(_fixedDOFB);
- numConstrainedPtsB = _numConstrainedPtsB;
- constrainedPointsB = const_cast<int*>(_constrainedPointsB);
- valuesB = const_cast<double*>(_valuesB);
- dbFilenameB = const_cast<char*>(_dbFilenameB);
-
- field = const_cast<double*>(_field);
- constraintSizes = const_cast<int*>(_constraintSizes);
- constrainedDOF = const_cast<int*>(_constrainedDOF);
-
- meshFilename = const_cast<char*>(_meshFilename);
-} // constructor
-
-pylith::bc::DirichletDataMultiTri3::~DirichletDataMultiTri3(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,68 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdatamultitri3_hh)
-#define pylith_bc_dirichletdatamultitri3_hh
-
-#include "DirichletDataMulti.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataMultiTri3;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataMultiTri3 : public DirichletDataMulti
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataMultiTri3(void);
-
- /// Destructor
- ~DirichletDataMultiTri3(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOFA; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPtsA; ///< Number of points constrained.
- static const int _idA; ///< Boundary condition identifier
- static const char* _labelA; /// Label for boundary condition group
- static const int _fixedDOFA[]; ///< Degrees of freedom constrained at points
- static const int _constrainedPointsA[]; ///< Array of indices of constrained pts.
- static const double _valuesA[]; ///< Values at constrained points.
- static const char* _dbFilenameA; ///< Filename of simple spatial database.
-
- static const int _numFixedDOFB; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPtsB; ///< Number of points constrained.
- static const int _idB; ///< Boundary condition identifier
- static const char* _labelB; /// Label for boundary condition group
- static const int _fixedDOFB[]; ///< Degrees of freedom constrained at points
- static const int _constrainedPointsB[]; ///< Array of indices of constrained pts.
- static const double _valuesB[]; ///< Values at constrained points.
- static const char* _dbFilenameB; ///< Filename of simple spatial database.
-
- static const double _field[]; ///< Values in field
- static const int _constraintSizes[]; ///< Number of constrained DOF at each vertex
- static const int _constrainedDOF[]; ///< Indices of constrained DOF at each constrained vertex
-
- static const char* _meshFilename; ///< Filename of input mesh.
-};
-
-#endif // pylith_bc_dirichletdatamultitri3_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,66 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshQuad4.txt
- *
- * Dirichlet BC at vertices 0, 1, 4.
- *
- * Fixed DOF: { 0, 1 }
- *
- * Values
- * 0: 0.1, 0.6
- * 1: 0.5, 0.3
- * 4: 0.4, 0.2
- */
-
-#include "DirichletDataQuad4.hh"
-
-const int pylith::bc::DirichletDataQuad4::_id = 0;
-
-const char* pylith::bc::DirichletDataQuad4::_label = "bc";
-
-const int pylith::bc::DirichletDataQuad4::_numDOF = 2;
-const int pylith::bc::DirichletDataQuad4::_numFixedDOF = 2;
-const int pylith::bc::DirichletDataQuad4::_fixedDOF[] = { 0, 1 };
-
-const int pylith::bc::DirichletDataQuad4::_numConstrainedPts = 3;
-const int pylith::bc::DirichletDataQuad4::_constrainedPoints[] = { 0, 1, 4 };
-const double pylith::bc::DirichletDataQuad4::_values[] =
- { 0.1, 0.6, 0.5, 0.3, 0.4, 0.2 };
-
-const char* pylith::bc::DirichletDataQuad4::_meshFilename =
- "data/quad4.mesh";
-const char* pylith::bc::DirichletDataQuad4::_dbFilename =
- "data/quad4.spatialdb";
-
-pylith::bc::DirichletDataQuad4::DirichletDataQuad4(void)
-{ // constructor
- id = _id;
- label = const_cast<char*>(_label);
-
- numDOF = _numDOF;
- numFixedDOF = _numFixedDOF;
- fixedDOF = const_cast<int*>(_fixedDOF);
-
- numConstrainedPts = _numConstrainedPts;
- constrainedPoints = const_cast<int*>(_constrainedPoints);
- values = const_cast<double*>(_values);
-
- meshFilename = const_cast<char*>(_meshFilename);
- dbFilename = const_cast<char*>(_dbFilename);
-} // constructor
-
-pylith::bc::DirichletDataQuad4::~DirichletDataQuad4(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdataquad4_hh)
-#define pylith_bc_dirichletdataquad4_hh
-
-#include "DirichletData.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataQuad4;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataQuad4 : public DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataQuad4(void);
-
- /// Destructor
- ~DirichletDataQuad4(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPts; ///< Number of points constrained.
-
- static const int _id; ///< Boundary condition identifier
- static const char* _label; /// Label for boundary condition group
-
- static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
-
- static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
- static const double _values[]; ///< Values at constrained points.
-
- static const char* _meshFilename; ///< Filename of input mesh.
- static const char* _dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_dirichletdataquad4_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,63 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshTet4.txt
- *
- * Dirichlet BC at vertices 2.
- *
- * Fixed DOF: { 1, 2 }
- *
- * Values
- * 2: 0.7, 0.2
- */
-
-#include "DirichletDataTet4.hh"
-
-const int pylith::bc::DirichletDataTet4::_id = 0;
-
-const char* pylith::bc::DirichletDataTet4::_label = "bc";
-
-const int pylith::bc::DirichletDataTet4::_numDOF = 3;
-const int pylith::bc::DirichletDataTet4::_numFixedDOF = 2;
-const int pylith::bc::DirichletDataTet4::_fixedDOF[] = { 1, 2 };
-
-const int pylith::bc::DirichletDataTet4::_numConstrainedPts = 1;
-const int pylith::bc::DirichletDataTet4::_constrainedPoints[] = { 2 };
-const double pylith::bc::DirichletDataTet4::_values[] = { 0.7, 0.2 };
-
-const char* pylith::bc::DirichletDataTet4::_meshFilename =
- "data/tet4.mesh";
-const char* pylith::bc::DirichletDataTet4::_dbFilename =
- "data/tet4.spatialdb";
-
-pylith::bc::DirichletDataTet4::DirichletDataTet4(void)
-{ // constructor
- id = _id;
- label = const_cast<char*>(_label);
-
- numDOF = _numDOF;
- numFixedDOF = _numFixedDOF;
- fixedDOF = const_cast<int*>(_fixedDOF);
-
- numConstrainedPts = _numConstrainedPts;
- constrainedPoints = const_cast<int*>(_constrainedPoints);
- values = const_cast<double*>(_values);
-
- meshFilename = const_cast<char*>(_meshFilename);
- dbFilename = const_cast<char*>(_dbFilename);
-} // constructor
-
-pylith::bc::DirichletDataTet4::~DirichletDataTet4(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdatatet4_hh)
-#define pylith_bc_dirichletdatatet4_hh
-
-#include "DirichletData.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataTet4;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataTet4 : public DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataTet4(void);
-
- /// Destructor
- ~DirichletDataTet4(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPts; ///< Number of points constrained.
-
- static const int _id; ///< Boundary condition identifier
- static const char* _label; /// Label for boundary condition group
-
- static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
-
- static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
- static const double _values[]; ///< Values at constrained points.
-
- static const char* _meshFilename; ///< Filename of input mesh.
- static const char* _dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_dirichletdatatet4_hh
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/* Mesh: meshTri3.txt
- *
- * Dirichlet BC at vertices 1 and 3.
- *
- * Fixed DOF: { 1 }
- *
- * Values
- * 1: 0.3
- * 3: 0.7
- */
-
-#include "DirichletDataTri3.hh"
-
-const int pylith::bc::DirichletDataTri3::_id = 0;
-
-const char* pylith::bc::DirichletDataTri3::_label = "bc";
-
-const int pylith::bc::DirichletDataTri3::_numDOF = 2;
-const int pylith::bc::DirichletDataTri3::_numFixedDOF = 1;
-const int pylith::bc::DirichletDataTri3::_fixedDOF[] = { 1 };
-
-const int pylith::bc::DirichletDataTri3::_numConstrainedPts = 2;
-const int pylith::bc::DirichletDataTri3::_constrainedPoints[] = { 1, 3 };
-const double pylith::bc::DirichletDataTri3::_values[] = { 0.3, 0.7 };
-
-const char* pylith::bc::DirichletDataTri3::_meshFilename =
- "data/tri3.mesh";
-const char* pylith::bc::DirichletDataTri3::_dbFilename =
- "data/tri3.spatialdb";
-
-pylith::bc::DirichletDataTri3::DirichletDataTri3(void)
-{ // constructor
- id = _id;
- label = const_cast<char*>(_label);
-
- numDOF = _numDOF;
- numFixedDOF = _numFixedDOF;
- fixedDOF = const_cast<int*>(_fixedDOF);
-
- numConstrainedPts = _numConstrainedPts;
- constrainedPoints = const_cast<int*>(_constrainedPoints);
- values = const_cast<double*>(_values);
-
- meshFilename = const_cast<char*>(_meshFilename);
- dbFilename = const_cast<char*>(_dbFilename);
-} // constructor
-
-pylith::bc::DirichletDataTri3::~DirichletDataTri3(void)
-{}
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_bc_dirichletdatatri3_hh)
-#define pylith_bc_dirichletdatatri3_hh
-
-#include "DirichletData.hh"
-
-namespace pylith {
- namespace bc {
- class DirichletDataTri3;
- } // pylith
-} // bc
-
-class pylith::bc::DirichletDataTri3 : public DirichletData
-{
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public:
-
- /// Constructor
- DirichletDataTri3(void);
-
- /// Destructor
- ~DirichletDataTri3(void);
-
-// PRIVATE MEMBERS //////////////////////////////////////////////////////
-private:
-
- static const int _numDOF; ///< Number of degrees of freedom at each point.
-
- static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
- static const int _numConstrainedPts; ///< Number of points constrained.
-
- static const int _id; ///< Boundary condition identifier
- static const char* _label; /// Label for boundary condition group
-
- static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
-
- static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
- static const double _values[]; ///< Values at constrained points.
-
- static const char* _meshFilename; ///< Filename of input mesh.
- static const char* _dbFilename; ///< Filename of simple spatial database.
-};
-
-#endif // pylith_bc_dirichletdatatri3_hh
-
-// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DirichletPointsData.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::bc::DirichletPointsData::DirichletPointsData(void) :
+ numDOF(0),
+ numFixedDOF(0),
+ numConstrainedPts(0),
+ id(0),
+ label(0),
+ fixedDOF(0),
+ constrainedPoints(0),
+ values(0),
+ meshFilename(0),
+ dbFilename(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::bc::DirichletPointsData::~DirichletPointsData(void)
+{ // destructor
+} // destructor
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletData.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsData.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdata_hh)
+#define pylith_bc_dirichletpointsdata_hh
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsData;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+ /// Constructor
+ DirichletPointsData(void);
+
+ /// Destructor
+ ~DirichletPointsData(void);
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+ int numDOF; ///< Number of degrees of freedom at each point.
+ int numFixedDOF; ///< Number of fixedDOF at constrained points.
+ int numConstrainedPts; ///< Number of points constrained.
+
+ int id; ///< Boundary condition identifier
+ char* label; ///< Label for boundary condition group
+
+ int* fixedDOF; ///< Degrees of freedom that are constrained at each point
+ int* constrainedPoints; ///< Array of indices of constrained points.
+ double* values; ///< Values at constrained points.
+
+ char* meshFilename; ///< Filename for input mesh.
+ char* dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_cohesivedata_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshHex8.txt
+ *
+ * DirichletPoints BC at vertices 0, 1, 6, 7.
+ *
+ * Fixed DOF: { 0, 2 }
+ *
+ * Values
+ * 0: -0.2, 0.3
+ * 1: 0.1, 0.7
+ * 6: 0.5, 0.4
+ * 7: 3.2, 6.1
+ */
+
+#include "DirichletPointsDataHex8.hh"
+
+const int pylith::bc::DirichletPointsDataHex8::_id = 0;
+
+const char* pylith::bc::DirichletPointsDataHex8::_label = "bc";
+
+const int pylith::bc::DirichletPointsDataHex8::_numDOF = 3;
+const int pylith::bc::DirichletPointsDataHex8::_numFixedDOF = 2;
+const int pylith::bc::DirichletPointsDataHex8::_fixedDOF[] = { 0, 2 };
+
+const int pylith::bc::DirichletPointsDataHex8::_numConstrainedPts = 4;
+const int pylith::bc::DirichletPointsDataHex8::_constrainedPoints[] = { 0, 1, 6, 7 };
+const double pylith::bc::DirichletPointsDataHex8::_values[] = {
+ -0.2, 0.3,
+ 0.1, 0.7,
+ 0.5, 0.4,
+ 3.2, 6.1,
+};
+
+const char* pylith::bc::DirichletPointsDataHex8::_meshFilename =
+ "data/hex8.mesh";
+const char* pylith::bc::DirichletPointsDataHex8::_dbFilename =
+ "data/hex8.spatialdb";
+
+pylith::bc::DirichletPointsDataHex8::DirichletPointsDataHex8(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataHex8::~DirichletPointsDataHex8(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataHex8.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdatahex8_hh)
+#define pylith_bc_dirichletpointsdatahex8_hh
+
+#include "DirichletPointsData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataHex8;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataHex8 : public DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataHex8(void);
+
+ /// Destructor
+ ~DirichletPointsDataHex8(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletpointsdatahex8_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,65 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshLine2.txt
+ *
+ * DirichletPoints BC at vertices 0 and 2.
+ *
+ * Fixed DOF: { 0 }
+ *
+ * Values
+ * 0: 1.1 [constrained]
+ * 1: 0.8 [solution]
+ * 2: 2.2 [constrained]
+ */
+
+#include "DirichletPointsDataLine2.hh"
+
+const int pylith::bc::DirichletPointsDataLine2::_id = 0;
+
+const char* pylith::bc::DirichletPointsDataLine2::_label = "bc0";
+
+const int pylith::bc::DirichletPointsDataLine2::_numDOF = 1;
+const int pylith::bc::DirichletPointsDataLine2::_numFixedDOF = 1;
+const int pylith::bc::DirichletPointsDataLine2::_fixedDOF[] = { 0 };
+
+const int pylith::bc::DirichletPointsDataLine2::_numConstrainedPts = 2;
+const int pylith::bc::DirichletPointsDataLine2::_constrainedPoints[] = { 0, 2 };
+const double pylith::bc::DirichletPointsDataLine2::_values[] = { 1.1, 2.2 };
+
+const char* pylith::bc::DirichletPointsDataLine2::_meshFilename =
+ "data/line2.mesh";
+const char* pylith::bc::DirichletPointsDataLine2::_dbFilename =
+ "data/line2.spatialdb";
+
+pylith::bc::DirichletPointsDataLine2::DirichletPointsDataLine2(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataLine2::~DirichletPointsDataLine2(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdataline2_hh)
+#define pylith_bc_dirichletpointsdataline2_hh
+
+#include "DirichletPointsData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataLine2;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataLine2 : public DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataLine2(void);
+
+ /// Destructor
+ ~DirichletPointsDataLine2(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletpointsdataline2_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshLine2.txt
+ *
+ * DirichletPoints BC at vertices 0 and 2.
+ *
+ * Fixed DOF: None
+ */
+
+#include "DirichletPointsDataLine2b.hh"
+
+const int pylith::bc::DirichletPointsDataLine2b::_id = 0;
+
+const char* pylith::bc::DirichletPointsDataLine2b::_label = "bc0";
+
+const int pylith::bc::DirichletPointsDataLine2b::_numDOF = 1;
+const int pylith::bc::DirichletPointsDataLine2b::_numFixedDOF = 0;
+const int pylith::bc::DirichletPointsDataLine2b::_fixedDOF[] = {};
+
+const int pylith::bc::DirichletPointsDataLine2b::_numConstrainedPts = 2;
+const int pylith::bc::DirichletPointsDataLine2b::_constrainedPoints[] = { 0, 2 };
+const double pylith::bc::DirichletPointsDataLine2b::_values[] = {0};
+
+const char* pylith::bc::DirichletPointsDataLine2b::_meshFilename =
+ "data/line2.mesh";
+const char* pylith::bc::DirichletPointsDataLine2b::_dbFilename =
+ "data/line2.spatialdb";
+
+pylith::bc::DirichletPointsDataLine2b::DirichletPointsDataLine2b(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataLine2b::~DirichletPointsDataLine2b(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2b.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataLine2b.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdataline2b_hh)
+#define pylith_bc_dirichletpointsdataline2b_hh
+
+#include "DirichletPointsData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataLine2b;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataLine2b : public DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataLine2b(void);
+
+ /// Destructor
+ ~DirichletPointsDataLine2b(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletpointsdataline2b_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DirichletPointsDataMulti.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::bc::DirichletPointsDataMulti::DirichletPointsDataMulti(void) :
+ numDOF(0),
+ numFixedDOFA(0),
+ numConstrainedPtsA(0),
+ idA(0),
+ labelA(0),
+ fixedDOFA(0),
+ constrainedPointsA(0),
+ valuesA(0),
+ dbFilenameA(0),
+ numFixedDOFB(0),
+ numConstrainedPtsB(0),
+ idB(0),
+ labelB(0),
+ fixedDOFB(0),
+ constrainedPointsB(0),
+ valuesB(0),
+ dbFilenameB(0),
+ field(0),
+ constraintSizes(0),
+ constrainedDOF(0),
+ meshFilename(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::bc::DirichletPointsDataMulti::~DirichletPointsDataMulti(void)
+{ // destructor
+} // destructor
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMulti.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,70 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdatamulti_hh)
+#define pylith_bc_dirichletpointsdatamulti_hh
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataMulti;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataMulti
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+ /// Constructor
+ DirichletPointsDataMulti(void);
+
+ /// Destructor
+ ~DirichletPointsDataMulti(void);
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+ int numDOF; ///< Number of degrees of freedom at each point.
+
+ //@{ Boundary condition A
+ int numFixedDOFA; ///< Number of fixedDOF at constrained points.
+ int numConstrainedPtsA; ///< Number of points constrained.
+ int idA; ///< Boundary condition identifier
+ char* labelA; ///< Label for boundary condition group
+ int* fixedDOFA; ///< Degrees of freedom that are constrained at each point
+ int* constrainedPointsA; ///< Array of indices of constrained points.
+ double* valuesA; ///< Values at constrained points.
+ char* dbFilenameA; ///< Filename of simple spatial datamultibase.
+ //@}
+
+ //@{ Boundary condition B
+ int numFixedDOFB; ///< Number of fixedDOF at constrained points.
+ int numConstrainedPtsB; ///< Number of points constrained.
+ int idB; ///< Boundary condition identifier
+ char* labelB; ///< Label for boundary condition group
+ int* fixedDOFB; ///< Degrees of freedom that are constrained at each point
+ int* constrainedPointsB; ///< Array of indices of constrained points.
+ double* valuesB; ///< Values at constrained points.
+ char* dbFilenameB; ///< Filename of simple spatial datamultibase.
+ //@}
+
+ double* field; ///< Values in field
+ int* constraintSizes; ///< Number of constrained DOF at each vertex
+ int* constrainedDOF; ///< Indices of constrained DOF at each constrained vertex
+
+ char* meshFilename; ///< Filename for input mesh.
+};
+
+#endif // pylith_bc_cohesivedatamulti_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTri3.txt
+ *
+ * DirichletPoints BC A at vertices 1 and 3.
+ *
+ * Fixed DOF: { 1 }
+ *
+ * Values
+ * 1: 0.3
+ * 3: 0.7
+ *
+ * DirichletPoints BC B at vertex 0 and 3.
+ *
+ * Fixed DOF: { 0 }
+ *
+ * Values
+ * 0: 0.9
+ * 3: 0.5
+ */
+
+#include "DirichletPointsDataMultiTri3.hh"
+
+const int pylith::bc::DirichletPointsDataMultiTri3::_numDOF = 2;
+
+const int pylith::bc::DirichletPointsDataMultiTri3::_idA = 0;
+const char* pylith::bc::DirichletPointsDataMultiTri3::_labelA = "bc";
+const int pylith::bc::DirichletPointsDataMultiTri3::_numFixedDOFA = 1;
+const int pylith::bc::DirichletPointsDataMultiTri3::_fixedDOFA[] = { 1 };
+const int pylith::bc::DirichletPointsDataMultiTri3::_numConstrainedPtsA = 2;
+const int pylith::bc::DirichletPointsDataMultiTri3::_constrainedPointsA[] = { 1, 3 };
+const double pylith::bc::DirichletPointsDataMultiTri3::_valuesA[] = { 0.3, 0.7 };
+const char* pylith::bc::DirichletPointsDataMultiTri3::_dbFilenameA =
+ "data/tri3.spatialdb";
+
+const int pylith::bc::DirichletPointsDataMultiTri3::_idB = 1;
+const char* pylith::bc::DirichletPointsDataMultiTri3::_labelB = "bc2";
+const int pylith::bc::DirichletPointsDataMultiTri3::_numFixedDOFB = 1;
+const int pylith::bc::DirichletPointsDataMultiTri3::_fixedDOFB[] = { 0 };
+const int pylith::bc::DirichletPointsDataMultiTri3::_numConstrainedPtsB = 1;
+const int pylith::bc::DirichletPointsDataMultiTri3::_constrainedPointsB[] = { 0, 3 };
+const double pylith::bc::DirichletPointsDataMultiTri3::_valuesB[] = { 0.9, 0.5 };
+const char* pylith::bc::DirichletPointsDataMultiTri3::_dbFilenameB =
+ "data/tri3_b.spatialdb";
+
+const int pylith::bc::DirichletPointsDataMultiTri3::_constraintSizes[] = {
+ 1,
+ 1,
+ 0,
+ 2
+};
+
+const int pylith::bc::DirichletPointsDataMultiTri3::_constrainedDOF[] = {
+ 0,
+ 1,
+ 0, 1
+};
+
+const double pylith::bc::DirichletPointsDataMultiTri3::_field[] = {
+ 0.9, 0.0,
+ 0.0, 0.3,
+ 0.0, 0.0,
+ 0.5, 0.7
+};
+
+const char* pylith::bc::DirichletPointsDataMultiTri3::_meshFilename =
+ "data/tri3.mesh";
+
+pylith::bc::DirichletPointsDataMultiTri3::DirichletPointsDataMultiTri3(void)
+{ // constructor
+ numDOF = _numDOF;
+
+ idA = _idA;
+ labelA = const_cast<char*>(_labelA);
+ numFixedDOFA = _numFixedDOFA;
+ fixedDOFA = const_cast<int*>(_fixedDOFA);
+ numConstrainedPtsA = _numConstrainedPtsA;
+ constrainedPointsA = const_cast<int*>(_constrainedPointsA);
+ valuesA = const_cast<double*>(_valuesA);
+ dbFilenameA = const_cast<char*>(_dbFilenameA);
+
+ idB = _idA;
+ labelB = const_cast<char*>(_labelB);
+ numFixedDOFB = _numFixedDOFB;
+ fixedDOFB = const_cast<int*>(_fixedDOFB);
+ numConstrainedPtsB = _numConstrainedPtsB;
+ constrainedPointsB = const_cast<int*>(_constrainedPointsB);
+ valuesB = const_cast<double*>(_valuesB);
+ dbFilenameB = const_cast<char*>(_dbFilenameB);
+
+ field = const_cast<double*>(_field);
+ constraintSizes = const_cast<int*>(_constraintSizes);
+ constrainedDOF = const_cast<int*>(_constrainedDOF);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataMultiTri3::~DirichletPointsDataMultiTri3(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataMultiTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdatamultitri3_hh)
+#define pylith_bc_dirichletpointsdatamultitri3_hh
+
+#include "DirichletPointsDataMulti.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataMultiTri3;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataMultiTri3 : public DirichletPointsDataMulti
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataMultiTri3(void);
+
+ /// Destructor
+ ~DirichletPointsDataMultiTri3(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOFA; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPtsA; ///< Number of points constrained.
+ static const int _idA; ///< Boundary condition identifier
+ static const char* _labelA; /// Label for boundary condition group
+ static const int _fixedDOFA[]; ///< Degrees of freedom constrained at points
+ static const int _constrainedPointsA[]; ///< Array of indices of constrained pts.
+ static const double _valuesA[]; ///< Values at constrained points.
+ static const char* _dbFilenameA; ///< Filename of simple spatial database.
+
+ static const int _numFixedDOFB; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPtsB; ///< Number of points constrained.
+ static const int _idB; ///< Boundary condition identifier
+ static const char* _labelB; /// Label for boundary condition group
+ static const int _fixedDOFB[]; ///< Degrees of freedom constrained at points
+ static const int _constrainedPointsB[]; ///< Array of indices of constrained pts.
+ static const double _valuesB[]; ///< Values at constrained points.
+ static const char* _dbFilenameB; ///< Filename of simple spatial database.
+
+ static const double _field[]; ///< Values in field
+ static const int _constraintSizes[]; ///< Number of constrained DOF at each vertex
+ static const int _constrainedDOF[]; ///< Indices of constrained DOF at each constrained vertex
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+};
+
+#endif // pylith_bc_dirichletpointsdatamultitri3_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,66 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshQuad4.txt
+ *
+ * DirichletPoints BC at vertices 0, 1, 4.
+ *
+ * Fixed DOF: { 0, 1 }
+ *
+ * Values
+ * 0: 0.1, 0.6
+ * 1: 0.5, 0.3
+ * 4: 0.4, 0.2
+ */
+
+#include "DirichletPointsDataQuad4.hh"
+
+const int pylith::bc::DirichletPointsDataQuad4::_id = 0;
+
+const char* pylith::bc::DirichletPointsDataQuad4::_label = "bc";
+
+const int pylith::bc::DirichletPointsDataQuad4::_numDOF = 2;
+const int pylith::bc::DirichletPointsDataQuad4::_numFixedDOF = 2;
+const int pylith::bc::DirichletPointsDataQuad4::_fixedDOF[] = { 0, 1 };
+
+const int pylith::bc::DirichletPointsDataQuad4::_numConstrainedPts = 3;
+const int pylith::bc::DirichletPointsDataQuad4::_constrainedPoints[] = { 0, 1, 4 };
+const double pylith::bc::DirichletPointsDataQuad4::_values[] =
+ { 0.1, 0.6, 0.5, 0.3, 0.4, 0.2 };
+
+const char* pylith::bc::DirichletPointsDataQuad4::_meshFilename =
+ "data/quad4.mesh";
+const char* pylith::bc::DirichletPointsDataQuad4::_dbFilename =
+ "data/quad4.spatialdb";
+
+pylith::bc::DirichletPointsDataQuad4::DirichletPointsDataQuad4(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataQuad4::~DirichletPointsDataQuad4(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataQuad4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdataquad4_hh)
+#define pylith_bc_dirichletpointsdataquad4_hh
+
+#include "DirichletPointsData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataQuad4;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataQuad4 : public DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataQuad4(void);
+
+ /// Destructor
+ ~DirichletPointsDataQuad4(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletpointsdataquad4_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTet4.txt
+ *
+ * DirichletPoints BC at vertices 2.
+ *
+ * Fixed DOF: { 1, 2 }
+ *
+ * Values
+ * 2: 0.7, 0.2
+ */
+
+#include "DirichletPointsDataTet4.hh"
+
+const int pylith::bc::DirichletPointsDataTet4::_id = 0;
+
+const char* pylith::bc::DirichletPointsDataTet4::_label = "bc";
+
+const int pylith::bc::DirichletPointsDataTet4::_numDOF = 3;
+const int pylith::bc::DirichletPointsDataTet4::_numFixedDOF = 2;
+const int pylith::bc::DirichletPointsDataTet4::_fixedDOF[] = { 1, 2 };
+
+const int pylith::bc::DirichletPointsDataTet4::_numConstrainedPts = 1;
+const int pylith::bc::DirichletPointsDataTet4::_constrainedPoints[] = { 2 };
+const double pylith::bc::DirichletPointsDataTet4::_values[] = { 0.7, 0.2 };
+
+const char* pylith::bc::DirichletPointsDataTet4::_meshFilename =
+ "data/tet4.mesh";
+const char* pylith::bc::DirichletPointsDataTet4::_dbFilename =
+ "data/tet4.spatialdb";
+
+pylith::bc::DirichletPointsDataTet4::DirichletPointsDataTet4(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataTet4::~DirichletPointsDataTet4(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTet4.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdatatet4_hh)
+#define pylith_bc_dirichletpointsdatatet4_hh
+
+#include "DirichletPointsData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataTet4;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataTet4 : public DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataTet4(void);
+
+ /// Destructor
+ ~DirichletPointsDataTet4(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletpointsdatatet4_hh
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.cc (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.cc 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTri3.txt
+ *
+ * DirichletPoints BC at vertices 1 and 3.
+ *
+ * Fixed DOF: { 1 }
+ *
+ * Values
+ * 1: 0.3
+ * 3: 0.7
+ */
+
+#include "DirichletPointsDataTri3.hh"
+
+const int pylith::bc::DirichletPointsDataTri3::_id = 0;
+
+const char* pylith::bc::DirichletPointsDataTri3::_label = "bc";
+
+const int pylith::bc::DirichletPointsDataTri3::_numDOF = 2;
+const int pylith::bc::DirichletPointsDataTri3::_numFixedDOF = 1;
+const int pylith::bc::DirichletPointsDataTri3::_fixedDOF[] = { 1 };
+
+const int pylith::bc::DirichletPointsDataTri3::_numConstrainedPts = 2;
+const int pylith::bc::DirichletPointsDataTri3::_constrainedPoints[] = { 1, 3 };
+const double pylith::bc::DirichletPointsDataTri3::_values[] = { 0.3, 0.7 };
+
+const char* pylith::bc::DirichletPointsDataTri3::_meshFilename =
+ "data/tri3.mesh";
+const char* pylith::bc::DirichletPointsDataTri3::_dbFilename =
+ "data/tri3.spatialdb";
+
+pylith::bc::DirichletPointsDataTri3::DirichletPointsDataTri3(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletPointsDataTri3::~DirichletPointsDataTri3(void)
+{}
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.hh (from rev 9151, short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletPointsDataTri3.hh 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletpointsdatatri3_hh)
+#define pylith_bc_dirichletpointsdatatri3_hh
+
+#include "DirichletPointsData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletPointsDataTri3;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletPointsDataTri3 : public DirichletPointsData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletPointsDataTri3(void);
+
+ /// Destructor
+ ~DirichletPointsDataTri3(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletpointsdatatri3_hh
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/Makefile.am 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/Makefile.am 2008-01-28 23:35:39 UTC (rev 9153)
@@ -21,7 +21,7 @@
noinst_PYTHON = \
TestAbsorbingDampers.py \
- TestDirichlet.py \
+ TestDirichletPoints.py \
TestBCSingle.py \
TestBCTwoSides.py \
TestBCFourSides.py \
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -37,11 +37,11 @@
"""
from pylith.bc.BCFourSides import BCFourSides
bc = BCFourSides()
- from pylith.bc.Dirichlet import Dirichlet
- bc.inventory.xNeg = Dirichlet()
- bc.inventory.xPos = Dirichlet()
- bc.inventory.yNeg = Dirichlet()
- bc.inventory.yPos = Dirichlet()
+ from pylith.bc.DirichletPoints import DirichletPoints
+ bc.inventory.xNeg = DirichletPoints()
+ bc.inventory.xPos = DirichletPoints()
+ bc.inventory.yNeg = DirichletPoints()
+ bc.inventory.yPos = DirichletPoints()
bc._configure()
self.assertEqual(4, len(bc.bin))
return
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -37,8 +37,8 @@
"""
from pylith.bc.BCSingle import BCSingle
bc = BCSingle()
- from pylith.bc.Dirichlet import Dirichlet
- bc.inventory.bc = Dirichlet()
+ from pylith.bc.DirichletPoints import DirichletPoints
+ bc.inventory.bc = DirichletPoints()
bc._configure()
self.assertEqual(1, len(bc.bin))
return
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -37,13 +37,13 @@
"""
from pylith.bc.BCSixSides import BCSixSides
bc = BCSixSides()
- from pylith.bc.Dirichlet import Dirichlet
- bc.inventory.xNeg = Dirichlet()
- bc.inventory.xPos = Dirichlet()
- bc.inventory.yNeg = Dirichlet()
- bc.inventory.yPos = Dirichlet()
- bc.inventory.zNeg = Dirichlet()
- bc.inventory.zPos = Dirichlet()
+ from pylith.bc.DirichletPoints import DirichletPoints
+ bc.inventory.xNeg = DirichletPoints()
+ bc.inventory.xPos = DirichletPoints()
+ bc.inventory.yNeg = DirichletPoints()
+ bc.inventory.yPos = DirichletPoints()
+ bc.inventory.zNeg = DirichletPoints()
+ bc.inventory.zPos = DirichletPoints()
bc._configure()
self.assertEqual(6, len(bc.bin))
return
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -37,9 +37,9 @@
"""
from pylith.bc.BCTwoSides import BCTwoSides
bc = BCTwoSides()
- from pylith.bc.Dirichlet import Dirichlet
- bc.inventory.neg = Dirichlet()
- bc.inventory.pos = Dirichlet()
+ from pylith.bc.DirichletPoints import DirichletPoints
+ bc.inventory.neg = DirichletPoints()
+ bc.inventory.pos = DirichletPoints()
bc._configure()
self.assertEqual(2, len(bc.bin))
return
Deleted: short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -1,182 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/bc/TestDirichlet.py
-
-## @brief Unit testing of Dirichlet object.
-
-import unittest
-
-from pylith.bc.Dirichlet import Dirichlet
-
-# ----------------------------------------------------------------------
-class TestDirichlet(unittest.TestCase):
- """
- Unit testing of Dirichlet object.
- """
-
- def test_implementsConstraint(self):
- """
- Test to make sure Dirichlet satisfies constraint requirements.
- """
- bc = Dirichlet()
- from pylith.feassemble.Constraint import implementsConstraint
- self.failUnless(implementsConstraint(bc))
- return
-
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.bc.Dirichlet import Dirichlet
- bc = Dirichlet()
- return
-
-
- def test_initialize(self):
- """
- Test initialize().
-
- WARNING: This is not a rigorous test of initialize() because we
- don't verify the results.
- """
-
- (mesh, bc) = self._initialize()
-
- self.assertNotEqual(None, bc.cppHandle)
-
- # We should really add something here to check to make sure things
- # actually initialized correctly
- return
-
-
- def test_setConstraintSizes(self):
- """
- Test setConstraintSizes().
-
- WARNING: This is not a rigorous test of setConstraintSizes() because we
- don't verify the results.
- """
-
- (mesh, bc) = self._initialize()
- field = mesh.createRealSection("field", mesh.dimension())
- bc.setConstraintSizes(field)
-
- # We should really add something here to check to make sure things
- # actually initialized correctly
- return
-
-
- def test_setConstraints(self):
- """
- Test setConstraints().
-
- WARNING: This is not a rigorous test of setConstraints() because we
- don't verify the results.
- """
-
- (mesh, bc) = self._initialize()
- field = mesh.createRealSection("field", mesh.dimension())
- bc.setConstraintSizes(field)
- mesh.allocateRealSection(field)
- bc.setConstraints(field)
-
- # We should really add something here to check to make sure things
- # actually initialized correctly
- return
-
-
- def test_useSolnIncr(self):
- """
- Test useSolnIncr().
- """
- (mesh, bc) = self._initialize()
- bc.useSolnIncr(True)
- return
-
-
- def test_setField(self):
- """
- Test setField().
-
- WARNING: This is not a rigorous test of setField() because we
- don't verify the results.
- """
-
- (mesh, bc) = self._initialize()
- field = mesh.createRealSection("field", mesh.dimension())
- bc.setConstraintSizes(field)
- mesh.allocateRealSection(field)
- bc.setConstraints(field)
- from pyre.units.time import second
- t = 1.0*second
- bc.setField(t, field)
-
- # We should really add something here to check to make sure things
- # actually initialized correctly
- return
-
-
- def test_finalize(self):
- """
- Test finalize().
-
- WARNING: This is not a rigorous test of finalize() because we
- neither set the input fields or verify the results.
- """
- (mesh, bc) = self._initialize()
- bc.finalize()
-
- # We should really add something here to check to make sure things
- # actually initialized correctly.
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _initialize(self):
- """
- Initialize Dirichlet boundary condition.
- """
- from pylith.bc.Dirichlet import Dirichlet
- bc = Dirichlet()
- bc._configure()
- bc.id = 0
- bc.label = "bc"
- bc.fixedDOF = [1]
-
- from spatialdata.spatialdb.SimpleDB import SimpleDB
- db = SimpleDB()
- db._configure()
- db.label = "TestDirichlet tri3"
- db.iohandler.filename = "data/tri3.spatialdb"
- db.initialize()
- bc.db = db
-
- from spatialdata.geocoords.CSCart import CSCart
- cs = CSCart()
- cs.spaceDim = 2
-
- from pylith.meshio.MeshIOAscii import MeshIOAscii
- importer = MeshIOAscii()
- importer.filename = "data/tri3.mesh"
- importer.coordsys = cs
- mesh = importer.read(debug=False, interpolate=False)
-
- bc.preinitialize(mesh)
- from pyre.units.time import second
- bc.initialize(totalTime=0.0*second, numTimeSteps=1)
- return (mesh, bc)
-
-
-# End of file
Copied: short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletPoints.py (from rev 9151, short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py)
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletPoints.py (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletPoints.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -0,0 +1,182 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+## @file unittests/pytests/bc/TestDirichletPoints.py
+
+## @brief Unit testing of DirichletPoints object.
+
+import unittest
+
+from pylith.bc.DirichletPoints import DirichletPoints
+
+# ----------------------------------------------------------------------
+class TestDirichletPoints(unittest.TestCase):
+ """
+ Unit testing of DirichletPoints object.
+ """
+
+ def test_implementsConstraint(self):
+ """
+ Test to make sure DirichletPoints satisfies constraint requirements.
+ """
+ bc = DirichletPoints()
+ from pylith.feassemble.Constraint import implementsConstraint
+ self.failUnless(implementsConstraint(bc))
+ return
+
+
+ def test_constructor(self):
+ """
+ Test constructor.
+ """
+ from pylith.bc.DirichletPoints import DirichletPoints
+ bc = DirichletPoints()
+ return
+
+
+ def test_initialize(self):
+ """
+ Test initialize().
+
+ WARNING: This is not a rigorous test of initialize() because we
+ don't verify the results.
+ """
+
+ (mesh, bc) = self._initialize()
+
+ self.assertNotEqual(None, bc.cppHandle)
+
+ # We should really add something here to check to make sure things
+ # actually initialized correctly
+ return
+
+
+ def test_setConstraintSizes(self):
+ """
+ Test setConstraintSizes().
+
+ WARNING: This is not a rigorous test of setConstraintSizes() because we
+ don't verify the results.
+ """
+
+ (mesh, bc) = self._initialize()
+ field = mesh.createRealSection("field", mesh.dimension())
+ bc.setConstraintSizes(field)
+
+ # We should really add something here to check to make sure things
+ # actually initialized correctly
+ return
+
+
+ def test_setConstraints(self):
+ """
+ Test setConstraints().
+
+ WARNING: This is not a rigorous test of setConstraints() because we
+ don't verify the results.
+ """
+
+ (mesh, bc) = self._initialize()
+ field = mesh.createRealSection("field", mesh.dimension())
+ bc.setConstraintSizes(field)
+ mesh.allocateRealSection(field)
+ bc.setConstraints(field)
+
+ # We should really add something here to check to make sure things
+ # actually initialized correctly
+ return
+
+
+ def test_useSolnIncr(self):
+ """
+ Test useSolnIncr().
+ """
+ (mesh, bc) = self._initialize()
+ bc.useSolnIncr(True)
+ return
+
+
+ def test_setField(self):
+ """
+ Test setField().
+
+ WARNING: This is not a rigorous test of setField() because we
+ don't verify the results.
+ """
+
+ (mesh, bc) = self._initialize()
+ field = mesh.createRealSection("field", mesh.dimension())
+ bc.setConstraintSizes(field)
+ mesh.allocateRealSection(field)
+ bc.setConstraints(field)
+ from pyre.units.time import second
+ t = 1.0*second
+ bc.setField(t, field)
+
+ # We should really add something here to check to make sure things
+ # actually initialized correctly
+ return
+
+
+ def test_finalize(self):
+ """
+ Test finalize().
+
+ WARNING: This is not a rigorous test of finalize() because we
+ neither set the input fields or verify the results.
+ """
+ (mesh, bc) = self._initialize()
+ bc.finalize()
+
+ # We should really add something here to check to make sure things
+ # actually initialized correctly.
+ return
+
+
+ # PRIVATE METHODS ////////////////////////////////////////////////////
+
+ def _initialize(self):
+ """
+ Initialize DirichletPoints boundary condition.
+ """
+ from pylith.bc.DirichletPoints import DirichletPoints
+ bc = DirichletPoints()
+ bc._configure()
+ bc.id = 0
+ bc.label = "bc"
+ bc.fixedDOF = [1]
+
+ from spatialdata.spatialdb.SimpleDB import SimpleDB
+ db = SimpleDB()
+ db._configure()
+ db.label = "TestDirichletPoints tri3"
+ db.iohandler.filename = "data/tri3.spatialdb"
+ db.initialize()
+ bc.db = db
+
+ from spatialdata.geocoords.CSCart import CSCart
+ cs = CSCart()
+ cs.spaceDim = 2
+
+ from pylith.meshio.MeshIOAscii import MeshIOAscii
+ importer = MeshIOAscii()
+ importer.filename = "data/tri3.mesh"
+ importer.coordsys = cs
+ mesh = importer.read(debug=False, interpolate=False)
+
+ bc.preinitialize(mesh)
+ from pyre.units.time import second
+ bc.initialize(totalTime=0.0*second, numTimeSteps=1)
+ return (mesh, bc)
+
+
+# End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py 2008-01-28 23:21:34 UTC (rev 9152)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py 2008-01-28 23:35:39 UTC (rev 9153)
@@ -56,8 +56,8 @@
suite = unittest.TestSuite()
- from TestDirichlet import TestDirichlet
- suite.addTest(unittest.makeSuite(TestDirichlet))
+ from TestDirichletPoints import TestDirichletPoints
+ suite.addTest(unittest.makeSuite(TestDirichletPoints))
from TestAbsorbingDampers import TestAbsorbingDampers
suite.addTest(unittest.makeSuite(TestAbsorbingDampers))
More information about the cig-commits
mailing list