[cig-commits] r11626 - in short/3D/PyLith/trunk/libsrc: faults feassemble materials
brad at geodynamics.org
brad at geodynamics.org
Fri Mar 28 13:57:19 PDT 2008
Author: brad
Date: 2008-03-28 13:57:19 -0700 (Fri, 28 Mar 2008)
New Revision: 11626
Modified:
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh
short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.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/materials/MaxwellIsotropic3D.cc
Log:
Fixed field type for cell data. Must be OTHER_FIELD because we compute fields at all quadrature points.
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -484,12 +484,17 @@
const int cohesiveDim = _faultMesh->getDimension();
if (0 == strcasecmp("traction_change", name)) {
- _allocateBufferCellVector();
- *fieldType = VECTOR_FIELD;
+ _allocateBufferCellOther();
+ *fieldType = OTHER_FIELD;
const ALE::Obj<real_section_type>& solution = fields->getSolution();
- _calcTractionsChange(&_bufferCellVector, solution);
- return _bufferCellVector;
- } // if
+ _calcTractionsChange(&_bufferCellOther, solution);
+ return _bufferCellOther;
+ } else {
+ std::ostringstream msg;
+ msg << "Request for unknown cell field '" << name
+ << "' for fault '" << label() << "'.";
+ throw std::runtime_error(msg.str());
+ } // else
// Should not reach this point if requested field was found
std::ostringstream msg;
@@ -498,7 +503,7 @@
throw std::runtime_error(msg.str());
// Return generic section to satisfy member function definition.
- return _bufferCellVector;
+ return _bufferCellOther;
} // cellField
// ----------------------------------------------------------------------
@@ -869,21 +874,21 @@
// ----------------------------------------------------------------------
// Allocate vector field for output of cell information.
void
-pylith::faults::FaultCohesiveKin::_allocateBufferCellVector(void)
-{ // _allocateBufferCellVector
+pylith::faults::FaultCohesiveKin::_allocateBufferCellOther(void)
+{ // _allocateBufferCellOther
assert(0 != _quadrature);
const int numQuadPts = _quadrature->numQuadPts();
const int spaceDim = _quadrature->spaceDim();
const int fiberDim = numQuadPts * spaceDim;
- if (_bufferCellVector.isNull()) {
- _bufferCellVector = new real_section_type(_faultMesh->comm(),
+ if (_bufferCellOther.isNull()) {
+ _bufferCellOther = new real_section_type(_faultMesh->comm(),
_faultMesh->debug());
const ALE::Obj<Mesh::label_sequence>& cells =
_faultMesh->heightStratum(0);
- _bufferCellVector->setFiberDimension(cells, fiberDim);
- _faultMesh->allocate(_bufferCellVector);
+ _bufferCellOther->setFiberDimension(cells, fiberDim);
+ _faultMesh->allocate(_bufferCellOther);
} // if
-} // _allocateBufferCellVector
+} // _allocateBufferCellOther
// End of file
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh 2008-03-28 20:57:19 UTC (rev 11626)
@@ -207,8 +207,8 @@
/// Allocate vector field for output of vertex information.
void _allocateBufferVertexVector(void);
- /// Allocate vector field for output of cell information.
- void _allocateBufferCellVector(void);
+ /// Allocate other field for output of cell information.
+ void _allocateBufferCellOther(void);
// NOT IMPLEMENTED ////////////////////////////////////////////////////
private :
@@ -251,7 +251,7 @@
ALE::Obj<real_section_type> _bufferVertexVector;
/// Vector field for cell information over fault mesh.
- ALE::Obj<real_section_type> _bufferCellVector;
+ ALE::Obj<real_section_type> _bufferCellOther;
}; // class FaultCohesiveKin
Modified: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -229,14 +229,14 @@
(0 == strcasecmp(name, "total-strain") ||
0 == strcasecmp(name, "stress")) ) {
assert(0 != fields);
- _calcStrainStressField(&_bufferCellTensor, name, mesh, fields);
- return _bufferCellTensor;
+ _calcStrainStressField(&_bufferCellOther, name, mesh, fields);
+ return _bufferCellOther;
} else if (0 == strcasecmp(name, "stress")) {
- _material->propertyField(&_bufferCellTensor,
+ _material->propertyField(&_bufferCellOther,
"total-strain", mesh, numQuadPts);
_calcStressFromStrain(&_bufferCellTensor, mesh);
- return _bufferCellTensor;
+ return _bufferCellOther;
} else {
const VectorFieldEnum fieldType = _material->propertyFieldType(name);
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticIsotropic3D.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -38,9 +38,9 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
};
/// Indices of physical properties
const int pidDensity = 0;
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStrain.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -36,9 +36,9 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
};
/// Indices of physical properties
const int pidDensity = 0;
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticPlaneStress.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -36,9 +36,9 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
};
/// Indices of physical properties
const int pidDensity = 0;
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStrain1D.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -34,9 +34,9 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
};
/// Indices of physical properties
const int pidDensity = 0;
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticStress1D.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -34,9 +34,9 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
};
/// Indices of physical properties
const int pidDensity = 0;
Modified: short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/GenMaxwellIsotropic3D.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -44,12 +44,12 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
{ "shear-ratio", numMaxwellModels, OTHER_FIELD },
{ "Maxwell-time", numMaxwellModels, OTHER_FIELD },
- { "total-strain", tensorSize, TENSOR_FIELD },
+ { "total-strain", tensorSize, OTHER_FIELD },
{ "viscous-strain", numMaxwellModels*tensorSize, OTHER_FIELD },
};
/// Indices (order) of properties.
Modified: short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc 2008-03-28 20:52:23 UTC (rev 11625)
+++ short/3D/PyLith/trunk/libsrc/materials/MaxwellIsotropic3D.cc 2008-03-28 20:57:19 UTC (rev 11626)
@@ -41,12 +41,12 @@
/// Physical properties.
const Material::PropMetaData properties[] = {
- { "density", 1, SCALAR_FIELD },
- { "lambda", 1, SCALAR_FIELD },
- { "mu", 1, SCALAR_FIELD },
- { "Maxwell-time", 1, SCALAR_FIELD },
- { "total-strain", 6, TENSOR_FIELD },
- { "viscous-strain", 6, TENSOR_FIELD },
+ { "density", 1, OTHER_FIELD },
+ { "lambda", 1, OTHER_FIELD },
+ { "mu", 1, OTHER_FIELD },
+ { "Maxwell-time", 1, OTHER_FIELD },
+ { "total-strain", 6, OTHER_FIELD },
+ { "viscous-strain", 6, OTHER_FIELD },
};
/// Indices (order) of properties.
const int pidDensity = 0;
More information about the cig-commits
mailing list