[cig-commits] r12407 - in short/3D/PyLith/trunk: libsrc/feassemble libsrc/materials libsrc/utils unittests/libtests/feassemble

brad at geodynamics.org brad at geodynamics.org
Mon Jul 14 08:28:06 PDT 2008


Author: brad
Date: 2008-07-14 08:28:05 -0700 (Mon, 14 Jul 2008)
New Revision: 12407

Modified:
   short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
   short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc
   short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
   short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc
   short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc
   short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc
   short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc
   short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc
   short/3D/PyLith/trunk/libsrc/utils/constdefs.h
   short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc
   short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc
Log:
Added prefix to MAXDOUBLE and MAXFLOAT constants to prevent conflicts with system MAXFLOAT, etc.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -70,7 +70,7 @@
 pylith::feassemble::Integrator::stableTimeStep(void) const
 { // stableTimeStep
   // Assume any time step will work.
-  return pylith::MAXDOUBLE;
+  return pylith::PYLITH_MAXDOUBLE;
 } // stableTimeStep
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -230,7 +230,7 @@
 pylith::materials::ElasticIsotropic3D::_stableTimeStepImplicit(const double* properties,
 				 const int numProperties) const
 { // _stableTimeStepImplicit
-  return pylith::MAXDOUBLE;
+  return pylith::PYLITH_MAXDOUBLE;
 } // _stableTimeStepImplicit
 
 

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -111,7 +111,7 @@
   const int totalPropsQuadPt = _totalPropsQuadPt;
   assert(_propertiesCell.size() == numQuadPts*totalPropsQuadPt);
 
-  double dtStable = pylith::MAXDOUBLE;
+  double dtStable = pylith::PYLITH_MAXDOUBLE;
   for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
     const double dt = 
       _stableTimeStepImplicit(&_propertiesCell[iQuad*totalPropsQuadPt],

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -209,7 +209,7 @@
 pylith::materials::ElasticPlaneStrain::_stableTimeStepImplicit(const double* properties,
 				 const int numProperties) const
 { // _stableTimeStepImplicit
-  return pylith::MAXDOUBLE;
+  return pylith::PYLITH_MAXDOUBLE;
 } // _stableTimeStepImplicit
 
 

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -206,7 +206,7 @@
 pylith::materials::ElasticPlaneStress::_stableTimeStepImplicit(const double* properties,
 				 const int numProperties) const
 { // _stableTimeStepImplicit
-  return pylith::MAXDOUBLE;
+  return pylith::PYLITH_MAXDOUBLE;
 } // _stableTimeStepImplicit
 
 

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -188,7 +188,7 @@
 pylith::materials::ElasticStrain1D::_stableTimeStepImplicit(const double* properties,
 				 const int numProperties) const
 { // _stableTimeStepImplicit
-  return pylith::MAXDOUBLE;
+  return pylith::PYLITH_MAXDOUBLE;
 } // _stableTimeStepImplicit
 
 

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -185,7 +185,7 @@
 pylith::materials::ElasticStress1D::_stableTimeStepImplicit(const double* properties,
 				 const int numProperties) const
 { // _stableTimeStepImplicit
-  return pylith::MAXDOUBLE;
+  return pylith::PYLITH_MAXDOUBLE;
 } // _stableTimeStepImplicit
 
 

Modified: short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -545,7 +545,7 @@
   assert(0 != properties);
   assert(_totalPropsQuadPt == numProperties);
 
-  double dtStable = pylith::MAXDOUBLE;
+  double dtStable = pylith::PYLITH_MAXDOUBLE;
 
   const int numMaxwellModels = _GenMaxwellIsotropic3D::numMaxwellModels;
   for (int i=0; i < numMaxwellModels; ++i) {

Modified: short/3D/PyLith/trunk/libsrc/utils/constdefs.h
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/constdefs.h	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/libsrc/utils/constdefs.h	2008-07-14 15:28:05 UTC (rev 12407)
@@ -20,8 +20,8 @@
 #define pylith_utils_constdefs_h
 
 namespace pylith {
-  static const double MAXDOUBLE = 1.0e+30;
-  //static const float MAXFLOAT = 1.0e+30;
+  static const double PYLITH_MAXDOUBLE = 1.0e+30;
+  static const float PYLITH_MAXFLOAT = 1.0e+30;
 }
     
 

Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -92,7 +92,7 @@
   integrator.material(&material);
 
   const double stableTimeStep = integrator.stableTimeStep();
-  CPPUNIT_ASSERT_EQUAL(pylith::MAXDOUBLE, stableTimeStep);
+  CPPUNIT_ASSERT_EQUAL(pylith::PYLITH_MAXDOUBLE, stableTimeStep);
 } // testStableTimeStep
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc	2008-07-14 04:08:57 UTC (rev 12406)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc	2008-07-14 15:28:05 UTC (rev 12407)
@@ -17,7 +17,7 @@
 #include "pylith/feassemble/ElasticityExplicit.hh" // USES ElasticityExplicit
 #include "pylith/feassemble/ElasticityImplicit.hh" // USES ElasticityImplicit
 #include "pylith/feassemble/Quadrature1D.hh" // USES Quadrature1D
-#include "pylith/utils/constdefs.h" // USES MAXFLOAT
+#include "pylith/utils/constdefs.h" // USES MAXDOUBLE
 
 #include "spatialdata/spatialdb/GravityField.hh" // USES GravityField
 #include "spatialdata/geocoords/CSCart.hh" // USES CSCart
@@ -46,7 +46,7 @@
 { // testStableTimeStep
   ElasticityExplicit integrator;
 
-  CPPUNIT_ASSERT_EQUAL(pylith::MAXDOUBLE, integrator.stableTimeStep());
+  CPPUNIT_ASSERT_EQUAL(pylith::PYLITH_MAXDOUBLE, integrator.stableTimeStep());
 } // testStableTimeStep
 
 // ----------------------------------------------------------------------



More information about the cig-commits mailing list