[cig-commits] r21459 - short/3D/PyLith/trunk/unittests/libtests/bc/data

brad at geodynamics.org brad at geodynamics.org
Wed Mar 6 16:53:26 PST 2013


Author: brad
Date: 2013-03-06 16:53:25 -0800 (Wed, 06 Mar 2013)
New Revision: 21459

Modified:
   short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh
Log:
Started added scales to PointForce and Neumann unit tests.

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.cc	2013-03-07 00:51:35 UTC (rev 21458)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.cc	2013-03-07 00:53:25 UTC (rev 21459)
@@ -22,6 +22,10 @@
 // Constructor
 pylith::bc::NeumannData::NeumannData(void) :
   meshFilename(0),
+  lengthScale(1.0e+3),
+  pressureScale(2.25e+10),
+  densityScale(1.0),
+  timeScale(2.0),
   numBasis(0),
   numQuadPts(0),
   quadPts(0),
@@ -40,6 +44,8 @@
   tractionsCell(0),
   valsResidual(0)
 { // constructor
+  const PylithScalar velScale = lengthScale / timeScale;
+  densityScale = pressureScale / (velScale*velScale);
 } // constructor
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.hh	2013-03-07 00:51:35 UTC (rev 21458)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannData.hh	2013-03-07 00:53:25 UTC (rev 21459)
@@ -44,6 +44,14 @@
 
   const char* meshFilename; ///< Filename for input mesh.
 
+  /// @name Scales information for nondimensionalization.
+  //@{
+  PylithScalar lengthScale; ///< Length scale.
+  PylithScalar pressureScale; ///< Pressure scale.
+  PylithScalar timeScale; ///< Time scale.
+  PylithScalar densityScale; ///< Density scale.
+  //@}
+
   /// @name Quadrature information
   //@{
   int numBasis; ///< Number of basis functions for surface cells.

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc	2013-03-07 00:51:35 UTC (rev 21458)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.cc	2013-03-07 00:53:25 UTC (rev 21459)
@@ -34,8 +34,14 @@
   forceInitial(0),
   residual(0),
   meshFilename(0),
-  dbFilename(0)
+  dbFilename(0),
+  lengthScale(1.0e+3),
+  pressureScale(2.25e+10),
+  densityScale(1.0),
+  timeScale(2.0)
 { // constructor
+  const PylithScalar velScale = lengthScale / timeScale;
+  densityScale = pressureScale / (velScale*velScale);
 } // constructor
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh	2013-03-07 00:51:35 UTC (rev 21458)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/PointForceData.hh	2013-03-07 00:53:25 UTC (rev 21459)
@@ -60,6 +60,15 @@
 
   char* meshFilename; ///< Filename for input mesh.
   char* dbFilename; ///< Filename of simple spatial database.
+
+  /// @name Scales information for nondimensionalization.
+  //@{
+  PylithScalar lengthScale; ///< Length scale.
+  PylithScalar pressureScale; ///< Pressure scale.
+  PylithScalar timeScale; ///< Time scale.
+  PylithScalar densityScale; ///< Density scale.
+  //@}
+
 };
 
 #endif // pylith_bc_pointforcedata_hh



More information about the CIG-COMMITS mailing list