[cig-commits] r8063 - in short/3D/PyLith/trunk/unittests/libtests/bc: . data

brad at geodynamics.org brad at geodynamics.org
Sun Sep 30 19:19:42 PDT 2007


Author: brad
Date: 2007-09-30 19:19:41 -0700 (Sun, 30 Sep 2007)
New Revision: 8063

Added:
   short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.hh
Modified:
   short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
Log:
Started work on unit tests for absorbing dampers boundary condition.

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am	2007-10-01 02:19:41 UTC (rev 8063)
@@ -21,6 +21,7 @@
 
 # Primary source files
 testbc_SOURCES = \
+	TestAbsorbingDampers.cc \
 	TestBoundaryCondition.cc \
 	TestDirichlet.cc \
 	TestDirichletLine2.cc \
@@ -36,6 +37,7 @@
 	test_bc.cc
 
 noinst_HEADERS = \
+	TestAbsorbingDampers.hh \
 	TestBoundaryCondition.hh \
 	TestDirichlet.hh \
 	TestDirichletLine2.hh \
@@ -51,6 +53,8 @@
 
 # Source files associated with testing data
 testbc_SOURCES += \
+	data/AbsorbingDampersData.cc \
+	data/AbsorbingDampersData1D.cc \
 	data/DirichletData.cc \
 	data/DirichletDataLine2.cc \
 	data/DirichletDataLine2b.cc \
@@ -64,6 +68,8 @@
 	data/NeumannDataHex8.cc
 
 noinst_HEADERS += \
+	data/AbsorbingDampersData.hh \
+	data/AbsorbingDampersData1D.hh \
 	data/DirichletData.hh \
 	data/DirichletDataLine2.hh \
 	data/DirichletDataLine2b.hh \

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc	2007-10-01 02:19:41 UTC (rev 8063)
@@ -0,0 +1,260 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestAbsorbingDampers.hh" // Implementation of class methods
+
+#include "pylith/bc/AbsorbingDampers.hh" // USES AbsorbingDampers
+
+#include "data/AbsorbingDampersData.hh" // USES AbsorbingDampersData
+
+#include "pylith/feassemble/Quadrature.hh" // USES Quadrature
+#include "pylith/topology/FieldsManager.hh" // USES FieldsManager
+#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
+
+#include <stdexcept> // TEMPORARY
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestAbsorbingDampers );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestAbsorbingDampers::setUp(void)
+{ // setUp
+  _data = 0;
+  _quadrature = 0;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestAbsorbingDampers::tearDown(void)
+{ // tearDown
+  delete _data; _data = 0;
+  delete _quadrature; _quadrature = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::bc::TestAbsorbingDampers::testConstructor(void)
+{ // testConstructor
+  AbsorbingDampers bc;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test initialize().
+void
+pylith::bc::TestAbsorbingDampers::testInitialize(void)
+{ // testInitialize
+  ALE::Obj<Mesh> mesh;
+  AbsorbingDampers bc;
+  topology::FieldsManager fields(mesh);
+  _initialize(&mesh, &bc, &fields);
+
+  CPPUNIT_ASSERT(0 != _data);
+
+  const int numCells = mesh->heightStratum(0)->size();
+
+  // ADD STUFF HERE
+} // testInitialize
+
+// ----------------------------------------------------------------------
+// Test integrateResidual().
+void
+pylith::bc::TestAbsorbingDampers::testIntegrateResidual(void)
+{ // testIntegrateResidual
+  CPPUNIT_ASSERT(0 != _data);
+
+  ALE::Obj<ALE::Mesh> mesh;
+  AbsorbingDampers bc;
+  topology::FieldsManager fields(mesh);
+  _initialize(&mesh, &bc, &fields);
+
+  const ALE::Obj<real_section_type>& residual = fields.getReal("residual");
+  CPPUNIT_ASSERT(!residual.isNull());
+  const double t = 1.0;
+  bc.integrateResidual(residual, t, &fields, mesh);
+
+  const double* valsE = _data->valsResidual;
+  const int sizeE = _data->spaceDim * _data->numVertices;
+
+  const double* vals = residual->restrict();
+  const int size = residual->sizeWithBC();
+  CPPUNIT_ASSERT_EQUAL(sizeE, size);
+
+  const double tolerance = 1.0e-06;
+  for (int i=0; i < size; ++i)
+    if (fabs(valsE[i]) > 1.0)
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
+    else
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
+} // testIntegrateResidual
+
+// ----------------------------------------------------------------------
+// Test integrateJacobian().
+void
+pylith::bc::TestAbsorbingDampers::testIntegrateJacobian(void)
+{ // testIntegrateJacobian
+  CPPUNIT_ASSERT(0 != _data);
+
+  ALE::Obj<ALE::Mesh> mesh;
+  AbsorbingDampers bc;
+  topology::FieldsManager fields(mesh);
+  _initialize(&mesh, &bc, &fields);
+  bc._needNewJacobian = true;
+
+  const ALE::Obj<pylith::real_section_type>& dispTpdt = 
+    fields.getReal("dispTpdt");
+  CPPUNIT_ASSERT(!dispTpdt.isNull());
+
+  PetscMat jacobian;
+  PetscErrorCode err = MeshCreateMatrix(mesh, dispTpdt, MATMPIBAIJ, &jacobian);
+  CPPUNIT_ASSERT(0 == err);
+
+  const double t = 1.0;
+  bc.integrateJacobian(&jacobian, t, &fields, mesh);
+  CPPUNIT_ASSERT_EQUAL(false, bc.needNewJacobian());
+
+  err = MatAssemblyBegin(jacobian, MAT_FINAL_ASSEMBLY);
+  CPPUNIT_ASSERT(0 == err);
+  err = MatAssemblyEnd(jacobian, MAT_FINAL_ASSEMBLY);
+  CPPUNIT_ASSERT(0 == err);
+
+  const double* valsE = _data->valsJacobian;
+  const int nrowsE = _data->numVertices * _data->spaceDim;
+  const int ncolsE = _data->numVertices * _data->spaceDim;
+
+  int nrows = 0;
+  int ncols = 0;
+  MatGetSize(jacobian, &nrows, &ncols);
+  CPPUNIT_ASSERT_EQUAL(nrowsE, nrows);
+  CPPUNIT_ASSERT_EQUAL(ncolsE, ncols);
+
+  PetscMat jDense;
+  PetscMat jSparseAIJ;
+  MatConvert(jacobian, MATSEQAIJ, MAT_INITIAL_MATRIX, &jSparseAIJ);
+  MatConvert(jSparseAIJ, MATSEQDENSE, MAT_INITIAL_MATRIX, &jDense);
+
+  double_array vals(nrows*ncols);
+  int_array rows(nrows);
+  int_array cols(ncols);
+  for (int iRow=0; iRow < nrows; ++iRow)
+    rows[iRow] = iRow;
+  for (int iCol=0; iCol < ncols; ++iCol)
+    cols[iCol] = iCol;
+  MatGetValues(jDense, nrows, &rows[0], ncols, &cols[0], &vals[0]);
+  const double tolerance = 1.0e-06;
+  for (int iRow=0; iRow < nrows; ++iRow)
+    for (int iCol=0; iCol < ncols; ++iCol) {
+      const int index = ncols*iRow+iCol;
+      if (fabs(valsE[index]) > 1.0)
+	CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[index]/valsE[index], tolerance);
+      else
+	CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[index], vals[index], tolerance);
+    } // for
+  MatDestroy(jDense);
+  MatDestroy(jSparseAIJ);
+} // testIntegrateJacobian
+
+// ----------------------------------------------------------------------
+void
+pylith::bc::TestAbsorbingDampers::_initialize(
+					ALE::Obj<Mesh>* mesh,
+					AbsorbingDampers* const bc,
+					topology::FieldsManager* fields) const
+{ // _initialize
+  CPPUNIT_ASSERT(0 != mesh);
+  CPPUNIT_ASSERT(0 != bc);
+  CPPUNIT_ASSERT(0 != fields);
+  CPPUNIT_ASSERT(0 != _data);
+  CPPUNIT_ASSERT(0 != _quadrature);
+
+  try {
+    // Setup mesh
+    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();
+
+    // Setup quadrature
+    _quadrature->initialize(_data->basis, _data->basisDerivRef, _data->quadPts,
+			    _data->quadWts, _data->cellDim, _data->numBasis,
+			    _data->numQuadPts, _data->spaceDim);
+
+    spatialdata::spatialdb::SimpleDB db("TestAbsorbingDampers");
+    spatialdata::spatialdb::SimpleIOAscii dbIO;
+    dbIO.filename(_data->spatialDBFilename);
+    db.ioHandler(&dbIO);
+
+    const double upDirVals[] = { 0.0, 0.0, 1.0 };
+    double_array upDir(upDirVals, 3);
+
+    bc->quadrature(_quadrature);
+    bc->timeStep(_data->dt);
+    bc->id(_data->id);
+    bc->label(_data->label);
+    bc->db(&db);
+    bc->initialize(*mesh, &cs, upDir);
+
+    // Setup fields
+    CPPUNIT_ASSERT(0 != fields);
+    fields->addReal("residual");
+    fields->addReal("dispTpdt");
+    fields->addReal("dispT");
+    fields->addReal("dispTmdt");
+    const char* history[] = { "dispTpdt", "dispT", "dispTmdt" };
+    const int historySize = 3;
+    fields->createHistory(history, historySize);
+  
+    const ALE::Obj<real_section_type>& residual = fields->getReal("residual");
+    CPPUNIT_ASSERT(!residual.isNull());
+    residual->setFiberDimension((*mesh)->depthStratum(0), _data->spaceDim);
+    (*mesh)->allocate(residual);
+    residual->zero();
+    fields->copyLayout("residual");
+    
+    const int fieldSize = _data->spaceDim * _data->numVertices;
+    const ALE::Obj<real_section_type>& dispTpdt = fields->getReal("dispTpdt");
+    const ALE::Obj<real_section_type>& dispT = fields->getReal("dispT");
+    const ALE::Obj<real_section_type>& dispTmdt = fields->getReal("dispTmdt");
+    CPPUNIT_ASSERT(!dispTpdt.isNull());
+    CPPUNIT_ASSERT(!dispT.isNull());
+    CPPUNIT_ASSERT(!dispTmdt.isNull());
+    const int offset = _data->numCells;
+    for (int iVertex=0; iVertex < _data->numVertices; ++iVertex) {
+      dispTpdt->updatePoint(iVertex+offset, 
+			    &_data->fieldTpdt[iVertex*_data->spaceDim]);
+      dispT->updatePoint(iVertex+offset, 
+			 &_data->fieldT[iVertex*_data->spaceDim]);
+      dispTmdt->updatePoint(iVertex+offset, 
+			    &_data->fieldTmdt[iVertex*_data->spaceDim]);
+    } // for
+  } catch (const ALE::Exception& err) {
+    throw std::runtime_error(err.msg());
+  } // catch
+} // _initialize
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.hh	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.hh	2007-10-01 02:19:41 UTC (rev 8063)
@@ -0,0 +1,100 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestAbsorbingDampers.hh
+ *
+ * @brief C++ TestAbsorbingDampers object.
+ *
+ * C++ unit testing for AbsorbingDampers.
+ */
+
+#if !defined(pylith_bc_testabsorbingdampers_hh)
+#define pylith_bc_testabsorbingdampers_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace bc {
+    class TestAbsorbingDampers;
+
+    class AbsorbingDampers;
+    class AbsorbingDampersData;
+  } // bc
+
+  namespace feassemble {
+    class Quadrature; // HOLDSA Quadrature
+  } // feassemble
+
+  namespace topology {
+    class FieldsManager; // USES FieldsManager
+  } // topology
+} // pylith
+
+/// C++ unit testing for AbsorbingDampers.
+class pylith::bc::TestAbsorbingDampers : public CppUnit::TestFixture
+{ // class TestAbsorbingDampers
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestAbsorbingDampers );
+  CPPUNIT_TEST( testConstructor );
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+  /// Tear down testing data.
+  void tearDown(void);
+
+  /// Test constructor.
+  void testConstructor(void);
+
+  /// Test initialize().
+  void testInitialize(void);
+
+  /// Test integrateResidual().
+  void testIntegrateResidual(void);
+
+  /// Test integrateJacobian().
+  void testIntegrateJacobian(void);
+
+  // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+  AbsorbingDampersData* _data; ///< Data for testing
+  feassemble::Quadrature* _quadrature; ///< Data used in testing
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /** Initialize AbsorbingDampers boundary condition.
+   *
+   * @param mesh PETSc mesh to initialize
+   * @param bc AbsorbingDampers boundary condition to initialize.
+   * @param fields Solution fields.
+   */
+  void _initialize(ALE::Obj<ALE::Mesh>* mesh,
+		   AbsorbingDampers* const bc,
+		   topology::FieldsManager* fields) const;
+
+}; // class TestAbsorbingDampers
+
+#endif // pylith_bc_absorbingdampers_hh
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.cc	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.cc	2007-10-01 02:19:41 UTC (rev 8063)
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "AbsorbingDampersData.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::bc::AbsorbingDampersData::AbsorbingDampersData(void) :
+  meshFilename(0),
+  spaceDim(0),
+  cellDim(0),
+  numVertices(0),
+  numCells(0),
+  vertices(0),
+  cells(0),
+  verticesRef(0),
+  numBasis(0),
+  numQuadPts(0),
+  quadPts(0),
+  quadWts(0),
+  basis(0),
+  basisDerivRef(0),
+  spatialDBFilename(0),
+  dt(0),
+  fieldTpdt(0),
+  fieldT(0),
+  fieldTmdt(0),
+  valsResidual(0),
+  valsJacobian(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::bc::AbsorbingDampersData::~AbsorbingDampersData(void)
+{ // destructor
+} // destructor
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.hh	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData.hh	2007-10-01 02:19:41 UTC (rev 8063)
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_absorbingdampersdata_hh)
+#define pylith_bc_absorbingdampersdata_hh
+
+namespace pylith {
+  namespace bc {
+     class AbsorbingDampersData;
+  } // pylith
+} // bc
+
+class pylith::bc::AbsorbingDampersData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+  
+  /// Constructor
+  AbsorbingDampersData(void);
+
+  /// Destructor
+  ~AbsorbingDampersData(void);
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+  char* meshFilename; ///< Name of file with input mesh
+
+  /// @name Boundary mesh information
+  //@{
+  int spaceDim; ///< Number of dimensions in vertex coordinates
+  int cellDim; ///< Number of dimensions associated with cell
+  int numVertices; ///< Number of vertices
+  int numCells; ///< Number of cells
+  double* vertices; ///< Coordinates of vertices
+  int* cells; ///< Indices of vertices in cells
+  double* verticesRef; ///< Coordinates of vertices in ref cell (dual basis)
+  //@}
+
+  /// @name Quadrature information
+  //@{
+  int numBasis; ///< Number of vertices in cell
+  int numQuadPts; ///< Number of quadrature points
+  double* quadPts; ///< Coordinates of quad pts in ref cell
+  double* quadWts; ///< Weights of quadrature points
+  double* basis; ///< Basis fns at quadrature points
+  double* basisDerivRef; ///< Derivatives of basis fns at quad pts
+  //@}
+
+  /// @name Parameter information
+  //@{
+  char* spatialDBFilename; ///< Filename for database of parameters.
+  int id; ///< Identifier for boundary condition
+  char* label; ///< Label for boundary condition
+  //@}
+
+  /// @name Input fields
+  //@{
+  double dt; ///< Time step
+  double* fieldTpdt; ///< Input field at time t+dt.
+  double* fieldT; ///< Input field at time t.
+  double* fieldTmdt; ///< Input field at time t-dt.
+  //@}
+
+  /// @name Calculated values.
+  //@{
+  double* valsResidual; ///< Expected values from residual calculation.
+  double* valsJacobian; ///< Expected values from Jacobian calculation.
+  //@}
+};
+
+#endif // pylith_bc_absorbingdampersdata_hh
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.cc	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.cc	2007-10-01 02:19:41 UTC (rev 8063)
@@ -0,0 +1,121 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "AbsorbingDampersData1D.hh"
+
+const char* pylith::bc::AbsorbingDampersData1D::_meshFilename = "data/meshBC1D.txt";
+
+const int pylith::bc::AbsorbingDampersData1D::_spaceDim = 1;
+
+const int pylith::bc::AbsorbingDampersData1D::_cellDim = 0;
+
+const int pylith::bc::AbsorbingDampersData1D::_numVertices = 2;
+
+const int pylith::bc::AbsorbingDampersData1D::_numCells = 1;
+
+const int pylith::bc::AbsorbingDampersData1D::_numBasis = 2;
+
+const int pylith::bc::AbsorbingDampersData1D::_numQuadPts = 1;
+
+const char* pylith::bc::AbsorbingDampersData1D::_spatialDBFilename = "data/elasticstrain1d.spatialdb";
+
+const double pylith::bc::AbsorbingDampersData1D::_dt =   1.00000000e-02;
+
+const double pylith::bc::AbsorbingDampersData1D::_vertices[] = {
+ -2.50000000e-01,
+  2.00000000e+00,
+};
+
+const int pylith::bc::AbsorbingDampersData1D::_cells[] = {
+0,1,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_verticesRef[] = {
+ -1.00000000e+00,
+  1.00000000e+00,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_quadPts[] = {
+  0.00000000e+00,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_quadWts[] = {
+  2.00000000e+00,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_basis[] = {
+  5.00000000e-01,
+  5.00000000e-01,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_basisDerivRef[] = {
+ -5.00000000e-01,
+  5.00000000e-01,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_fieldTpdt[] = {
+  1.20000000e+00,
+  1.70000000e+00,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_fieldT[] = {
+  1.10000000e+00,
+  1.50000000e+00,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_fieldTmdt[] = {
+  1.00000000e+00,
+  1.30000000e+00,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_valsResidual[] = {
+  1.60000000e+10,
+ -1.60000000e+10,
+};
+
+const double pylith::bc::AbsorbingDampersData1D::_valsJacobian[] = {
+  1.40625000e+07,
+  1.40625000e+07,
+  1.40625000e+07,
+  1.40625000e+07,
+};
+
+pylith::bc::AbsorbingDampersData1D::AbsorbingDampersData1D(void)
+{ // constructor
+  meshFilename = const_cast<char*>(_meshFilename);
+  spaceDim = _spaceDim;
+  cellDim = _cellDim;
+  numVertices = _numVertices;
+  numCells = _numCells;
+  numBasis = _numBasis;
+  numQuadPts = _numQuadPts;
+  spatialDBFilename = const_cast<char*>(_spatialDBFilename);
+  dt = _dt;
+  vertices = const_cast<double*>(_vertices);
+  cells = const_cast<int*>(_cells);
+  verticesRef = const_cast<double*>(_verticesRef);
+  quadPts = const_cast<double*>(_quadPts);
+  quadWts = const_cast<double*>(_quadWts);
+  basis = const_cast<double*>(_basis);
+  basisDerivRef = const_cast<double*>(_basisDerivRef);
+  fieldTpdt = const_cast<double*>(_fieldTpdt);
+  fieldT = const_cast<double*>(_fieldT);
+  fieldTmdt = const_cast<double*>(_fieldTmdt);
+  valsResidual = const_cast<double*>(_valsResidual);
+  valsJacobian = const_cast<double*>(_valsJacobian);
+} // constructor
+
+pylith::bc::AbsorbingDampersData1D::~AbsorbingDampersData1D(void)
+{}
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.hh	2007-09-29 00:48:07 UTC (rev 8062)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersData1D.hh	2007-10-01 02:19:41 UTC (rev 8063)
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_absorbingdampersdata1d_hh)
+#define pylith_bc_absorbingdampersdata1d_hh
+
+#include "AbsorbingDampersData.hh"
+
+namespace pylith {
+  namespace bc {
+     class AbsorbingDampersData1D;
+  } // pylith
+} // bc
+
+class pylith::bc::AbsorbingDampersData1D : public AbsorbingDampersData
+{
+
+public: 
+
+  /// Constructor
+  AbsorbingDampersData1D(void);
+
+  /// Destructor
+  ~AbsorbingDampersData1D(void);
+
+private:
+
+  static const char* _meshFilename;
+
+  static const int _spaceDim;
+
+  static const int _cellDim;
+
+  static const int _numVertices;
+
+  static const int _numCells;
+
+  static const int _numBasis;
+
+  static const int _numQuadPts;
+
+  static const char* _spatialDBFilename;
+
+  static const double _dt;
+
+  static const double _vertices[];
+
+  static const int _cells[];
+
+  static const double _verticesRef[];
+
+  static const double _quadPts[];
+
+  static const double _quadWts[];
+
+  static const double _basis[];
+
+  static const double _basisDerivRef[];
+
+  static const double _fieldTpdt[];
+
+  static const double _fieldT[];
+
+  static const double _fieldTmdt[];
+
+  static const double _valsResidual[];
+
+  static const double _valsJacobian[];
+
+};
+
+#endif // pylith_bc_absorbingdampersdata1d_hh
+
+// End of file



More information about the cig-commits mailing list