[cig-commits] r8000 - in short/3D/PyLith/trunk: libsrc/materials
unittests/libtests/materials
brad at geodynamics.org
brad at geodynamics.org
Fri Sep 21 14:27:10 PDT 2007
Author: brad
Date: 2007-09-21 14:27:09 -0700 (Fri, 21 Sep 2007)
New Revision: 8000
Modified:
short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.hh
short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh
short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.hh
short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.hh
short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.hh
short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.hh
short/3D/PyLith/trunk/libsrc/materials/Material.cc
short/3D/PyLith/trunk/libsrc/materials/Material.hh
short/3D/PyLith/trunk/libsrc/materials/Material.icc
short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc
short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.hh
short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc
Log:
Made numParamValues a member of Material. Eliminates creation of numParamValues array on the fly. Updated materials and unit tests accordingly.
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -57,7 +57,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::ElasticIsotropic3D::ElasticIsotropic3D(void)
+pylith::materials::ElasticIsotropic3D::ElasticIsotropic3D(void) :
+ ElasticMaterial(_ElasticIsotropic3D::numParamValues,
+ _ElasticIsotropic3D::numParameters)
{ // constructor
_dimension = 3;
} // constructor
@@ -93,19 +95,6 @@
} // _parameterNames
// ----------------------------------------------------------------------
-// Get number of values for each parameter for physical properties.
-void
-pylith::materials::ElasticIsotropic3D::_numParamValues(int_array* numValues) const
-{ // _numParamValues
- assert(0 != numValues);
-
- const int numParams = _ElasticIsotropic3D::numParameters;
- numValues->resize(numParams);
- for (int i=0; i < numParams; ++i)
- (*numValues)[i] = _ElasticIsotropic3D::numParamValues[i];
-} // _numParamValues
-
-// ----------------------------------------------------------------------
// Compute parameters from values in spatial database.
void
pylith::materials::ElasticIsotropic3D::_dbToParameters(std::vector<double_array>* paramVals,
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -72,12 +72,6 @@
*/
const char** _parameterNames(void) const;
- /** Get number of values for each parameter for physical properties.
- *
- * @param numValues Array of number of values for each parameter.
- */
- void _numParamValues(int_array* numValues) const;
-
/** Compute parameters from values in spatial database.
*
* Order of values in arrays matches order used in dbValues() and
@@ -148,8 +142,6 @@
}; // class ElasticIsotropic3D
-#include "ElasticIsotropic3D.icc" // inline methods
-
#endif // pylith_materials_elasticisotropic3d_hh
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -23,7 +23,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::ElasticMaterial::ElasticMaterial(void) :
+pylith::materials::ElasticMaterial::ElasticMaterial(const int* numParamValues,
+ const int size) :
+ Material(numParamValues, size),
_numQuadPts(0)
{ // constructor
} // constructor
@@ -101,8 +103,7 @@
_density[iQuad].resize(1);
_stress[iQuad].resize(_tensorSize());
_elasticConsts[iQuad].resize(_numElasticConsts());
- int_array numParamValues;
- _numParamValues(&numParamValues);
+ const int_array& numParamValues = _getNumParamValues();
const int numParams = numParamValues.size();
_paramsCell[iQuad].resize(numParams);
for (int iParam=0; iParam < numParams; ++iParam)
@@ -127,8 +128,7 @@
for (int iQuad=0; iQuad < numQuadPts; ++iQuad)
_updateState(&_paramsCell[iQuad], totalStrain[iQuad]);
- int_array numParamValues;
- _numParamValues(&numParamValues);
+ const int_array& numParamValues = _getNumParamValues();
const int numParams = numParamValues.size();
const char** paramNames = _parameterNames();
@@ -159,8 +159,7 @@
const int numQuadPts = _numQuadPts;
assert(_paramsCell.size() == numQuadPts);
- int_array numParamValues;
- _numParamValues(&numParamValues);
+ const int_array& numParamValues = _getNumParamValues();
const int numParams = numParamValues.size();
const char** paramNames = _parameterNames();
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -41,8 +41,13 @@
// PUBLIC METHODS /////////////////////////////////////////////////////
public :
- /// Default constructor.
- ElasticMaterial(void);
+ /** Default constructor.
+ *
+ * @param numParamValues Array of number of values for each parameter.
+ * @param size Size of array
+ */
+ ElasticMaterial(const int* numParamValues,
+ const int size);
/// Destructor.
virtual
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -57,7 +57,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::ElasticPlaneStrain::ElasticPlaneStrain(void)
+pylith::materials::ElasticPlaneStrain::ElasticPlaneStrain(void) :
+ ElasticMaterial(_ElasticPlaneStrain::numParamValues,
+ _ElasticPlaneStrain::numParameters)
{ // constructor
_dimension = 2;
} // constructor
@@ -93,19 +95,6 @@
} // _parameterNames
// ----------------------------------------------------------------------
-// Get number of values for each parameter for physical properties.
-void
-pylith::materials::ElasticPlaneStrain::_numParamValues(int_array* numValues) const
-{ // _numParamValues
- assert(0 != numValues);
-
- const int numParams = _ElasticPlaneStrain::numParameters;
- numValues->resize(numParams);
- for (int i=0; i < numParams; ++i)
- (*numValues)[i] = _ElasticPlaneStrain::numParamValues[i];
-} // _numParamValues
-
-// ----------------------------------------------------------------------
// Compute parameters from values in spatial database.
void
pylith::materials::ElasticPlaneStrain::_dbToParameters(
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -72,12 +72,6 @@
*/
const char** _parameterNames(void) const;
- /** Get number of values for each parameter for physical properties.
- *
- * @param numValues Array of number of values for each parameter.
- */
- void _numParamValues(int_array* numValues) const;
-
/** Compute parameters from values in spatial database.
*
* Order of values in arrays matches order used in dbValues() and
@@ -148,8 +142,6 @@
}; // class ElasticPlaneStrain
-#include "ElasticPlaneStrain.icc" // inline methods
-
#endif // pylith_materials_elasticplanestrain_hh
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -56,7 +56,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::ElasticPlaneStress::ElasticPlaneStress(void)
+pylith::materials::ElasticPlaneStress::ElasticPlaneStress(void) :
+ ElasticMaterial(_ElasticPlaneStress::numParamValues,
+ _ElasticPlaneStress::numParameters)
{ // constructor
_dimension = 2;
} // constructor
@@ -92,19 +94,6 @@
} // _parameterNames
// ----------------------------------------------------------------------
-// Get number of values for each parameter for physical properties.
-void
-pylith::materials::ElasticPlaneStress::_numParamValues(int_array* numValues) const
-{ // _numParamValues
- assert(0 != numValues);
-
- const int numParams = _ElasticPlaneStress::numParameters;
- numValues->resize(numParams);
- for (int i=0; i < numParams; ++i)
- (*numValues)[i] = _ElasticPlaneStress::numParamValues[i];
-} // _numParamValues
-
-// ----------------------------------------------------------------------
// Compute parameters from values in spatial database.
void
pylith::materials::ElasticPlaneStress::_dbToParameters(
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -72,12 +72,6 @@
*/
const char** _parameterNames(void) const;
- /** Get number of values for each parameter for physical properties.
- *
- * @param numValues Array of number of values for each parameter.
- */
- void _numParamValues(int_array* numValues) const;
-
/** Compute parameters from values in spatial database.
*
* Order of values in arrays matches order used in dbValues() and
@@ -148,8 +142,6 @@
}; // class ElasticPlaneStress
-#include "ElasticPlaneStress.icc" // inline methods
-
#endif // pylith_materials_elasticplanestress_hh
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -52,7 +52,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::ElasticStrain1D::ElasticStrain1D(void)
+pylith::materials::ElasticStrain1D::ElasticStrain1D(void) :
+ ElasticMaterial(_ElasticStrain1D::numParamValues,
+ _ElasticStrain1D::numParameters)
{ // constructor
_dimension = 1;
} // constructor
@@ -88,19 +90,6 @@
} // _parameterNames
// ----------------------------------------------------------------------
-// Get number of values for each parameter for physical properties.
-void
-pylith::materials::ElasticStrain1D::_numParamValues(int_array* numValues) const
-{ // _numParamValues
- assert(0 != numValues);
-
- const int numParams = _ElasticStrain1D::numParameters;
- numValues->resize(numParams);
- for (int i=0; i < numParams; ++i)
- (*numValues)[i] = _ElasticStrain1D::numParamValues[i];
-} // _numParamValues
-
-// ----------------------------------------------------------------------
// Compute parameters from values in spatial database.
void
pylith::materials::ElasticStrain1D::_dbToParameters(std::vector<double_array>* const paramVals,
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -71,12 +71,6 @@
*/
const char** _parameterNames(void) const;
- /** Get number of values for each parameter for physical properties.
- *
- * @param numValues Array of number of values for each parameter.
- */
- void _numParamValues(int_array* numValues) const;
-
/** Compute parameters from values in spatial database.
*
* Order of values in arrays matches order used in dbValues() and
@@ -147,8 +141,6 @@
}; // class ElasticStrain1D
-#include "ElasticStrain1D.icc" // inline methods
-
#endif // pylith_materials_elasticstrain1d_hh
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -55,7 +55,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::ElasticStress1D::ElasticStress1D(void)
+pylith::materials::ElasticStress1D::ElasticStress1D(void) :
+ ElasticMaterial(_ElasticStress1D::numParamValues,
+ _ElasticStress1D::numParameters)
{ // constructor
_dimension = 1;
} // constructor
@@ -91,19 +93,6 @@
} // _parameterNames
// ----------------------------------------------------------------------
-// Get number of values for each parameter for physical properties.
-void
-pylith::materials::ElasticStress1D::_numParamValues(int_array* numValues) const
-{ // _numParamValues
- assert(0 != numValues);
-
- const int numParams = _ElasticStress1D::numParameters;
- numValues->resize(numParams);
- for (int i=0; i < numParams; ++i)
- (*numValues)[i] = _ElasticStress1D::numParamValues[i];
-} // _numParamValues
-
-// ----------------------------------------------------------------------
// Compute parameters from values in spatial database.
void
pylith::materials::ElasticStress1D::_dbToParameters(std::vector<double_array>* const paramVals,
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -72,12 +72,6 @@
*/
const char** _parameterNames(void) const;
- /** Get number of values for each parameter for physical properties.
- *
- * @param numValues Array of number of values for each parameter.
- */
- void _numParamValues(int_array* numValues) const;
-
/** Compute parameters from values in spatial database.
*
* Order of values in arrays matches order used in dbValues() and
@@ -148,8 +142,6 @@
}; // class ElasticStress1D
-#include "ElasticStress1D.icc" // inline methods
-
#endif // pylith_materials_elasticstress1d_hh
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -28,14 +28,16 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::materials::Material::Material(void) :
+pylith::materials::Material::Material(const int* numParamValues,
+ const int size) :
_dt(0.0),
_parameters(0),
_dimension(0),
_needNewJacobian(false),
_db(0),
_id(0),
- _label("")
+ _label(""),
+ _numParamValues(numParamValues, size)
{ // constructor
} // constructor
@@ -87,9 +89,7 @@
const int spaceDim = quadrature->spaceDim();
const int tensorSize = (3 == spaceDim) ? 6 : ((2 == spaceDim) ? 4 : 1);
- int_array numParamValues;
- _numParamValues(&numParamValues);
- const int numParams = numParamValues.size();
+ const int numParams = _numParamValues.size();
const char** paramNames = _parameterNames();
std::vector<ALE::Obj<real_section_type> > paramSections(numParams);
@@ -105,8 +105,8 @@
// Fiber dimension is number of quadrature points times number of
// values per parameter
- const int fiberDim = numQuadPts * numParamValues[iParam];
- if (1 == numParamValues[iParam])
+ const int fiberDim = numQuadPts * _numParamValues[iParam];
+ if (1 == _numParamValues[iParam])
if (-1 != indexScalarLayout) {
paramSections[iParam]->setAtlas(paramSections[indexScalarLayout]->getAtlas());
paramSections[iParam]->allocateStorage();
@@ -115,7 +115,7 @@
paramSections[iParam]->setFiberDimension(cells, fiberDim);
mesh->allocate(paramSections[iParam]);
} // if/else
- else if (spaceDim == numParamValues[iParam]) {
+ else if (spaceDim == _numParamValues[iParam]) {
if (-1 != indexVectorLayout) {
paramSections[iParam]->setAtlas(paramSections[indexVectorLayout]->getAtlas());
paramSections[iParam]->allocateStorage();
@@ -125,7 +125,7 @@
mesh->allocate(paramSections[iParam]);
} // if/else
} // if/else
- else if (tensorSize == numParamValues[iParam]) {
+ else if (tensorSize == _numParamValues[iParam]) {
if (-1 != indexTensorLayout) {
paramSections[iParam]->setAtlas(paramSections[indexTensorLayout]->getAtlas());
paramSections[iParam]->allocateStorage();
@@ -157,9 +157,9 @@
std::vector<double_array> cellData(numParams);
for (int iParam = 0; iParam < numParams; ++iParam) {
- const int fiberDim = numQuadPts * numParamValues[iParam];
+ const int fiberDim = numQuadPts * _numParamValues[iParam];
cellData[iParam].resize(fiberDim);
- paramData[iParam].resize(numParamValues[iParam]);
+ paramData[iParam].resize(_numParamValues[iParam]);
} // for
for (ALE::Mesh::label_sequence::iterator cellIter=cells->begin();
@@ -189,7 +189,7 @@
_dbToParameters(¶mData, queryData);
for (int iParam=0; iParam < numParams; ++iParam) {
- const int numValues = numParamValues[iParam];
+ const int numValues = _numParamValues[iParam];
for (int iValue=0; iValue < numValues; ++iValue)
cellData[iParam][iQuadPt*numValues+iValue] =
paramData[iParam][iValue];
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -65,8 +65,13 @@
// PUBLIC METHODS /////////////////////////////////////////////////////
public :
- /// Default constructor.
- Material(void);
+ /** Default constructor.
+ *
+ * @param numParamValues Array of number of values for each parameter.
+ * @param size Size of array
+ */
+ Material(const int* numParamValues,
+ const int size);
/// Destructor.
virtual
@@ -171,10 +176,9 @@
/** Get number of values for each parameter for physical properties.
*
- * @param numValues Array of number of values for each parameter.
+ * @returns Array of number of values for each parameter.
*/
- virtual
- void _numParamValues(int_array* numValues) const = 0;
+ const int_array& _getNumParamValues(void) const;
/** Compute parameters from values in spatial database.
*
@@ -216,6 +220,13 @@
int _id; ///< Material identifier
std::string _label; ///< Label of material
+ /** Number of values associated with each parameter.
+ *
+ * size = numParams
+ * index = iParam
+ */
+ int_array _numParamValues;
+
}; // class Material
#include "Material.icc" // inline methods
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.icc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.icc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -79,13 +79,20 @@
return _needNewJacobian;
} // needNewJacobian
-/// Reset flag indicating whether Jacobian matrix must be reformed for
-/// current state.
+// Reset flag indicating whether Jacobian matrix must be reformed for
+// current state.
inline
void
pylith::materials::Material::resetNeedNewJacobian(void) {
_needNewJacobian = false;
} // resetNeedNewJacobian
+// Get number of values for each parameter for physical properties.
+inline
+const pylith::int_array&
+pylith::materials::Material::_getNumParamValues(void) const {
+ return _numParamValues;
+} // _getNumParamValues
+
// End of file
Modified: short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -61,6 +61,8 @@
// ----------------------------------------------------------------------
// Default constructor.
pylith::materials::MaxwellIsotropic3D::MaxwellIsotropic3D(void) :
+ ElasticMaterial(_MaxwellIsotropic3D::numParamValues,
+ _MaxwellIsotropic3D::numParameters),
_calcElasticConstsFn(&pylith::materials::MaxwellIsotropic3D::_calcElasticConstsElastic),
_calcStressFn(&pylith::materials::MaxwellIsotropic3D::_calcStressElastic),
_updateStateFn(&pylith::materials::MaxwellIsotropic3D::_updateStateElastic)
@@ -99,19 +101,6 @@
} // _parameterNames
// ----------------------------------------------------------------------
-// Get number of values for each parameter
-void
-pylith::materials::MaxwellIsotropic3D::_numParamValues(int_array* numValues) const
-{ // _numParamValues
- assert(0 != numValues);
-
- const int numParams = _MaxwellIsotropic3D::numParameters;
- numValues->resize(numParams);
- for (int i=0; i< numParams; ++i)
- (*numValues)[i] = _MaxwellIsotropic3D::numParamValues[i];
-} // _numParamValues
-
-// ----------------------------------------------------------------------
// Compute parameters from values in spatial database.
void
pylith::materials::MaxwellIsotropic3D::_dbToParameters(std::vector<double_array>* paramVals,
Modified: short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.hh 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.hh 2007-09-21 21:27:09 UTC (rev 8000)
@@ -91,12 +91,6 @@
*/
const char** _parameterNames(void) const;
- /** Get number of parameters for physical properties.
- *
- * @returns Number of parameters
- */
- void _numParamValues(int_array* numValues) const;
-
/** Compute parameters from values in spatial database.
*
* Order of values in arrays matches order used in dbValues() and
Modified: short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc 2007-09-21 21:25:39 UTC (rev 7999)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc 2007-09-21 21:27:09 UTC (rev 8000)
@@ -285,8 +285,7 @@
const int numParameters = data.numParameters;
- int_array numParamValues;
- material->_numParamValues(&numParamValues);
+ const int_array& numParamValues = material->_getNumParamValues();
CPPUNIT_ASSERT_EQUAL(numParameters, int(numParamValues.size()));
char** const namesE = data.parameterNames;
More information about the cig-commits
mailing list