[cig-commits] r13433 - in short/3D/PyLith/trunk: libsrc libsrc/bc libsrc/faults libsrc/feassemble libsrc/meshio libsrc/topology pylith/utils unittests/libtests/materials
brad at geodynamics.org
brad at geodynamics.org
Mon Dec 1 15:33:58 PST 2008
Author: brad
Date: 2008-12-01 15:33:58 -0800 (Mon, 01 Dec 2008)
New Revision: 13433
Modified:
short/3D/PyLith/trunk/libsrc/Makefile.am
short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc
short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh
short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc
short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh
short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
short/3D/PyLith/trunk/libsrc/topology/Makefile.am
short/3D/PyLith/trunk/pylith/utils/VTKDataReader.py
short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc
Log:
More work on nondimensionalization.
Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am 2008-12-01 23:33:58 UTC (rev 13433)
@@ -92,8 +92,9 @@
meshio/PsetFileBinary.cc \
meshio/VertexFilter.cc \
meshio/VertexFilterVecNorm.cc \
+ topology/Distributor.cc \
topology/FieldsManager.cc \
- topology/Distributor.cc \
+ topology/FieldOps.cc \
topology/MeshOps.cc \
topology/MeshRefiner.cc \
topology/RefineUniform.cc \
Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -154,6 +154,7 @@
// Container for data returned in query of database
double_array queryData(numValues);
double_array quadPtRef(cellDim);
+ double_array quadPtsGlobal(numQuadPts*spaceDim);
// Container for damping constants for current cell
double_array dampingConstsLocal(fiberDim);
@@ -164,6 +165,7 @@
assert(!coordinates.isNull());
assert(0 != _normalizer);
+ const double lengthScale = _normalizer->lengthScale();
const double densityScale = _normalizer->densityScale();
const double velocityScale =
_normalizer->lengthScale() / _normalizer->timeScale();
@@ -172,20 +174,23 @@
c_iter != cells->end();
++c_iter) {
_quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
- const double_array& quadPts = _quadrature->quadPts();
+ const double_array& quadPtsNondim = _quadrature->quadPts();
const double_array& quadPtsRef = _quadrature->quadPtsRef();
+ quadPtsGlobal = quadPtsNondim;
+ _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
+ lengthScale);
dampingConstsGlobal = 0.0;
for(int iQuad = 0; iQuad < numQuadPts; ++iQuad) {
// Compute damping constants in normal/tangential coordinates
const int err = _db->query(&queryData[0], numValues,
- &quadPts[iQuad*spaceDim], spaceDim, cs);
+ &quadPtsGlobal[iQuad*spaceDim], spaceDim, cs);
if (err) {
std::ostringstream msg;
msg << "Could not find parameters for physical properties at \n"
<< "(";
for (int i=0; i < spaceDim; ++i)
- msg << " " << quadPts[iQuad*spaceDim+i];
+ msg << " " << quadPtsGlobal[iQuad*spaceDim+i];
msg << ") for absorbing boundary condition " << _label << "\n"
<< "using spatial database " << _db->label() << ".";
throw std::runtime_error(msg.str());
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -117,6 +117,7 @@
_boundaryMesh->allocate(_values);
double_array queryValues(2*numFixedDOF);
+ double_array vCoordsGlobal(spaceDim);
assert(0 != _normalizer);
const double lengthScale = _normalizer->lengthScale();
@@ -127,28 +128,32 @@
v_iter != verticesEnd;
++v_iter) {
// Get coordinates of vertex
- const real_section_type::value_type* vCoords =
+ const real_section_type::value_type* vCoordsNondim =
coordinates->restrictPoint(*v_iter);
- int err = _db->query(&queryValues[0], numFixedDOF, vCoords,
- spaceDim, cs);
+ for (int i=0; i < spaceDim; ++i)
+ vCoordsGlobal[i] = vCoordsNondim[i];
+ _normalizer->dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(),
+ lengthScale);
+ int err = _db->query(&queryValues[0], numFixedDOF,
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find values at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << vCoords[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _db->label() << ".";
throw std::runtime_error(msg.str());
} // if
for (int i=0; i < numFixedDOF; ++i)
_normalizer->nondimensionalize(queryValues[i], lengthScale);
- err = _dbRate->query(&queryValues[numFixedDOF], numFixedDOF, vCoords,
- spaceDim, cs);
+ err = _dbRate->query(&queryValues[numFixedDOF], numFixedDOF,
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find values at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << vCoords[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbRate->label() << ".";
throw std::runtime_error(msg.str());
} // if
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -104,17 +104,22 @@
_valuesInitial.resize(numPoints*numFixedDOF);
_valuesRate.resize(numPoints*numFixedDOF);
double_array queryValues(numFixedDOF);
+ double_array vCoordsGlobal(spaceDim);
for (int iPoint=0; iPoint < numPoints; ++iPoint) {
// Get coordinates of vertex
- const real_section_type::value_type* vCoords =
+ const real_section_type::value_type* vCoordsNondim =
coordinates->restrictPoint(_points[iPoint]);
- int err = _db->query(&queryValues[0], numFixedDOF, vCoords,
- spaceDim, cs);
+ for (int i=0; i < spaceDim; ++i)
+ vCoordsGlobal[i] = vCoordsNondim[i];
+ _normalizer->dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(),
+ lengthScale);
+ int err = _db->query(&queryValues[0], numFixedDOF,
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find values at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << vCoords[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _db->label() << ".";
throw std::runtime_error(msg.str());
} // if
@@ -122,13 +127,13 @@
_valuesInitial[numFixedDOF*iPoint+iDOF] =
_normalizer->nondimensionalize(queryValues[iDOF], lengthScale);
- err = _dbRate->query(&queryValues[0], numFixedDOF, vCoords,
- spaceDim, cs);
+ err = _dbRate->query(&queryValues[0], numFixedDOF,
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find values at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << vCoords[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbRate->label() << ".";
throw std::runtime_error(msg.str());
} // if
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -173,6 +173,7 @@
// reference geometry.
double_array tractionDataLocal(spaceDim);
double_array quadPtRef(cellDim);
+ double_array quadPtsGlobal(numQuadPts*spaceDim);
const double_array& quadPtsRef = _quadrature->quadPtsRef();
// Container for cell tractions rotated to global coordinates.
@@ -182,9 +183,9 @@
const ALE::Obj<real_section_type>& coordinates =
mesh->getRealSection("coordinates");
assert(!coordinates.isNull());
- // coordinates->view("Mesh coordinates from Neumann::initialize");
assert(0 != _normalizer);
+ const double lengthScale = _normalizer->lengthScale();
const double pressureScale = _normalizer->pressureScale();
// Loop over cells in boundary mesh, compute orientations, and then
@@ -195,7 +196,10 @@
++c_iter) {
// std::cout << "c_iter: " << *c_iter << std::endl;
_quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
- const double_array& quadPts = _quadrature->quadPts();
+ const double_array& quadPtsNondim = _quadrature->quadPts();
+ quadPtsGlobal = quadPtsNondim;
+ _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
+ lengthScale);
_boundaryMesh->restrictClosure(coordinates, *c_iter,
&cellVertices[0], cellVertices.size());
@@ -204,13 +208,13 @@
++iQuad, iRef+=cellDim, iSpace+=spaceDim) {
// Get traction vector in local coordinate system at quadrature point
const int err = _db->query(&tractionDataLocal[0], spaceDim,
- &quadPts[iSpace], spaceDim, cs);
+ &quadPtsGlobal[iSpace], spaceDim, cs);
if (err) {
std::ostringstream msg;
msg << "Could not find traction values at \n"
<< "(";
for (int i=0; i < spaceDim; ++i)
- msg << " " << quadPts[i+iSpace];
+ msg << " " << quadPtsGlobal[i+iSpace];
msg << ") for traction boundary condition " << _label << "\n"
<< "using spatial database " << _db->label() << ".";
throw std::runtime_error(msg.str());
Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -135,34 +135,38 @@
normalizer.lengthScale() / normalizer.timeScale();
double_array paramsVertex(fiberDim);
+ double_array vCoordsGlobal(spaceDim);
for (Mesh::label_sequence::iterator v_iter=vertices->begin();
v_iter != verticesEnd;
++v_iter) {
- // Get coordinates of vertex
- const real_section_type::value_type* coordsVertex =
+ const real_section_type::value_type* vCoordsNondim =
coordinates->restrictPoint(*v_iter);
- assert(0 != coordsVertex);
-
+ assert(0 != vCoordsNondim);
+ for (int i=0; i < spaceDim; ++i)
+ vCoordsGlobal[i] = vCoordsNondim[i];
+ normalizer.dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(),
+ lengthScale);
+
int err = _dbFinalSlip->query(¶msVertex[indexFinalSlip], spaceDim,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find final slip at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbFinalSlip->label() << ".";
throw std::runtime_error(msg.str());
} // if
normalizer.nondimensionalize(¶msVertex[indexFinalSlip], spaceDim,
lengthScale);
err = _dbPeakRate->query(¶msVertex[indexPeakRate], 1,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find peak slip rate at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbPeakRate->label() << ".";
throw std::runtime_error(msg.str());
} // if
@@ -170,12 +174,12 @@
velocityScale);
err = _dbSlipTime->query(¶msVertex[indexSlipTime], 1,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find slip initiation time at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbSlipTime->label() << ".";
throw std::runtime_error(msg.str());
} // if
Modified: short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -118,27 +118,32 @@
faultMesh->getRealSection("coordinates");
assert(!coordinates.isNull());
+ const double lengthScale = normalizer.lengthScale();
const double timeScale = normalizer.timeScale();
const double velocityScale =
normalizer.lengthScale() / normalizer.timeScale();
double_array paramsVertex(fiberDim);
+ double_array vCoordsGlobal(spaceDim);
for (Mesh::label_sequence::iterator v_iter=vertices->begin();
v_iter != verticesEnd;
++v_iter) {
- // Get coordinates of vertex
- const real_section_type::value_type* coordsVertex =
+ const real_section_type::value_type* vCoordsNondim =
coordinates->restrictPoint(*v_iter);
- assert(0 != coordsVertex);
+ assert(0 != vCoordsNondim);
+ for (int i=0; i < spaceDim; ++i)
+ vCoordsGlobal[i] = vCoordsNondim[i];
+ normalizer.dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(),
+ lengthScale);
int err = _dbSlipRate->query(¶msVertex[indexSlipRate], spaceDim,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find slip rate at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbSlipRate->label() << ".";
throw std::runtime_error(msg.str());
} // if
@@ -146,12 +151,12 @@
velocityScale);
err = _dbSlipTime->query(¶msVertex[indexSlipTime], 1,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find slip initiation time at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbSlipTime->label() << ".";
throw std::runtime_error(msg.str());
} // if
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -20,6 +20,7 @@
#include "pylith/feassemble/Quadrature.hh" // USES Quadrature
#include "pylith/feassemble/CellGeometry.hh" // USES CellGeometry
#include "pylith/topology/FieldsManager.hh" // USES FieldsManager
+#include "pylith/topology/FieldOps.hh" // USES FieldOps
#include "pylith/utils/array.hh" // USES double_array
#include <petscmat.h> // USES PETSc Mat
@@ -560,55 +561,78 @@
{ // vertexField
assert(!_faultMesh.isNull());
assert(!_orientation.isNull());
+ assert(0 != _normalizer);
const int cohesiveDim = _faultMesh->getDimension();
+ const int spaceDim = _quadrature->spaceDim();
const int slipStrLen = strlen("final_slip");
const int timeStrLen = strlen("slip_time");
+ double scale = 0.0;
+ int fiberDim = 0;
if (0 == strcasecmp("slip", name)) {
*fieldType = VECTOR_FIELD;
assert(!_cumSlip.isNull());
- return _cumSlip;
+ _allocateBufferVertexVector();
+ topology::FieldOps::copyValues(_bufferVertexVector, _cumSlip);
+ _bufferTmp = _bufferVertexVector;
+ scale = _normalizer->lengthScale();
+ fiberDim = spaceDim;
} else if (cohesiveDim > 0 && 0 == strcasecmp("strike_dir", name)) {
+ *fieldType = VECTOR_FIELD;
_bufferTmp = _orientation->getFibration(0);
- *fieldType = VECTOR_FIELD;
- return _bufferTmp;
+ scale = 0.0;
+ fiberDim = spaceDim;
} else if (2 == cohesiveDim && 0 == strcasecmp("dip_dir", name)) {
+ *fieldType = VECTOR_FIELD;
_bufferTmp = _orientation->getFibration(1);
- *fieldType = VECTOR_FIELD;
- return _bufferTmp;
+ scale = 0.0;
+ fiberDim = spaceDim;
} else if (0 == strcasecmp("normal_dir", name)) {
+ *fieldType = VECTOR_FIELD;
const int space =
(0 == cohesiveDim) ? 0 : (1 == cohesiveDim) ? 1 : 2;
_bufferTmp = _orientation->getFibration(space);
- *fieldType = VECTOR_FIELD;
- return _bufferTmp;
+ scale = 0.0;
+ fiberDim = spaceDim;
} else if (0 == strncasecmp("final_slip_X", name, slipStrLen)) {
const std::string value = std::string(name).substr(slipStrLen+1);
+ *fieldType = VECTOR_FIELD;
const srcs_type::const_iterator s_iter = _eqSrcs.find(value);
assert(s_iter != _eqSrcs.end());
- _bufferTmp = s_iter->second->finalSlip();
- *fieldType = VECTOR_FIELD;
- return _bufferTmp;
+ _allocateBufferVertexVector();
+ topology::FieldOps::copyValues(_bufferVertexVector,
+ s_iter->second->finalSlip());
+ _bufferTmp = _bufferVertexVector;
+ scale = _normalizer->lengthScale();
+ fiberDim = spaceDim;
+
} else if (0 == strncasecmp("slip_time_X", name, timeStrLen)) {
+ *fieldType = SCALAR_FIELD;
const std::string value = std::string(name).substr(timeStrLen+1);
const srcs_type::const_iterator s_iter = _eqSrcs.find(value);
assert(s_iter != _eqSrcs.end());
- _bufferTmp = s_iter->second->slipTime();
- *fieldType = SCALAR_FIELD;
- return _bufferTmp;
+ _allocateBufferVertexScalar();
+ topology::FieldOps::copyValues(_bufferVertexScalar,
+ s_iter->second->slipTime());
+ _bufferTmp = _bufferVertexScalar;
+ scale = _normalizer->timeScale();
+ fiberDim = 1;
+
} else if (0 == strcasecmp("traction_change", name)) {
*fieldType = VECTOR_FIELD;
const ALE::Obj<real_section_type>& solution = fields->getSolution();
_calcTractionsChange(&_bufferVertexVector, mesh, solution);
- return _bufferVertexVector;
-
+ _bufferTmp = _bufferVertexVector;
+ scale = _normalizer->pressureScale();
+ fiberDim = spaceDim;
+
} else {
std::ostringstream msg;
msg << "Request for unknown vertex field '" << name
@@ -616,8 +640,25 @@
throw std::runtime_error(msg.str());
} // else
- // Return generic section to satisfy member function definition.
- return _bufferVertexScalar;
+ if (0 != scale) {
+ // dimensionalize values
+ double_array valuesGlobal(fiberDim);
+ const ALE::Obj<Mesh::label_sequence>& vertices = _faultMesh->depthStratum(0);
+ assert(!vertices.isNull());
+ const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+ for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+ v_iter != verticesEnd;
+ ++v_iter) {
+ assert(fiberDim == _bufferTmp->getFiberDimension(*v_iter));
+ const real_section_type::value_type* valuesNondim =
+ _bufferTmp->restrictPoint(*v_iter);
+ for (int i=0; i < fiberDim; ++i)
+ valuesGlobal[i] = _normalizer->dimensionalize(valuesNondim[i], scale);
+ _bufferTmp->updatePointAll(*v_iter, &valuesGlobal[0]);
+ } // for
+ } // if
+
+ return _bufferTmp;
} // vertexField
// ----------------------------------------------------------------------
@@ -953,7 +994,7 @@
// ----------------------------------------------------------------------
// Compute change in tractions on fault surface using solution.
-// NOTE: We must convert vertex labels to fault vertex labels
+// NOTE: We must convert vertex labels to fault vertex labels
void
pylith::faults::FaultCohesiveKin::_calcTractionsChange(
ALE::Obj<real_section_type>* tractions,
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh 2008-12-01 23:33:58 UTC (rev 13433)
@@ -286,6 +286,7 @@
/// Field over the fault mesh vertices of vector field of cumulative slip.
ALE::Obj<real_section_type> _cumSlip;
+ /// Map label of cohesive cell to label of cells in fault mesh.
std::map<Mesh::point_type, Mesh::point_type> _cohesiveToFault;
/// Scalar field for vertex information over fault mesh.
Modified: short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -133,22 +133,26 @@
const double timeScale = normalizer.timeScale();
double_array paramsVertex(fiberDim);
+ double_array vCoordsGlobal(spaceDim);
for (Mesh::label_sequence::iterator v_iter=vertices->begin();
v_iter != verticesEnd;
++v_iter) {
- // Get coordinates of vertex
- const real_section_type::value_type* coordsVertex =
+ const real_section_type::value_type* vCoordsNondim =
coordinates->restrictPoint(*v_iter);
- assert(0 != coordsVertex);
-
+ assert(0 != vCoordsNondim);
+ for (int i=0; i < spaceDim; ++i)
+ vCoordsGlobal[i] = vCoordsNondim[i];
+ normalizer.dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(),
+ lengthScale);
+
int err = _dbFinalSlip->query(¶msVertex[indexFinalSlip], spaceDim,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find final slip at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbFinalSlip->label() << ".";
throw std::runtime_error(msg.str());
} // if
@@ -156,12 +160,12 @@
lengthScale);
err = _dbRiseTime->query(¶msVertex[indexRiseTime], 1,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find rise time at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbRiseTime->label() << ".";
throw std::runtime_error(msg.str());
} // if
@@ -169,12 +173,12 @@
timeScale);
err = _dbSlipTime->query(¶msVertex[indexSlipTime], 1,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find slip initiation time at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbSlipTime->label() << ".";
throw std::runtime_error(msg.str());
} // if
Modified: short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -122,22 +122,26 @@
const double timeScale = normalizer.timeScale();
double_array paramsVertex(fiberDim);
+ double_array vCoordsGlobal(spaceDim);
for (Mesh::label_sequence::iterator v_iter=vertices->begin();
v_iter != verticesEnd;
++v_iter) {
- // Get coordinates of vertex
- const real_section_type::value_type* coordsVertex =
+ const real_section_type::value_type* vCoordsNondim =
coordinates->restrictPoint(*v_iter);
- assert(0 != coordsVertex);
-
+ assert(0 != vCoordsNondim);
+ for (int i=0; i < spaceDim; ++i)
+ vCoordsGlobal[i] = vCoordsNondim[i];
+ normalizer.dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(),
+ lengthScale);
+
int err = _dbFinalSlip->query(¶msVertex[indexFinalSlip], spaceDim,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find final slip at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbFinalSlip->label() << ".";
throw std::runtime_error(msg.str());
} // if
@@ -145,12 +149,12 @@
lengthScale);
err = _dbSlipTime->query(¶msVertex[indexSlipTime], 1,
- coordsVertex, spaceDim, cs);
+ &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
if (err) {
std::ostringstream msg;
msg << "Could not find slip initiation time at (";
for (int i=0; i < spaceDim; ++i)
- msg << " " << coordsVertex[i];
+ msg << " " << vCoordsGlobal[i];
msg << ") using spatial database " << _dbSlipTime->label() << ".";
throw std::runtime_error(msg.str());
} // if
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -169,10 +169,14 @@
// Precompute the geometric and function space information
_quadrature->precomputeGeometry(mesh, coordinates, cells);
- // Allocate vector for cell values.
+ // Allocate vectors for cell values.
_initCellVector();
const int cellVecSize = numBasis*spaceDim;
double_array dispTBctpdtCell(cellVecSize);
+ double_array totalStrain(numQuadPts*tensorSize);
+ totalStrain = 0.0;
+ double_array gravVec(spaceDim);
+ double_array quadPtsGlobal(numQuadPts*spaceDim);
// Set up gravity field database for querying
if (0 != _gravityField) {
@@ -191,17 +195,20 @@
} // else
} // if
- // Allocate vector for total strain
- double_array totalStrain(numQuadPts*tensorSize);
- totalStrain = 0.0;
PetscLogEventEnd(setupEvent,0,0,0,0);
ALE::ISieveVisitor::RestrictVisitor<real_section_type> rV(*dispTBctpdt, cellVecSize, &dispTBctpdtCell[0]);
if (mesh->depth() > 1) {
//ISieveVisitor::PointRetriever<sieve_type,ISieveVisitor::RestrictVisitor<Section> > pV((int) pow((double) mesh->getSieve()->getMaxConeSize(), this->depth())+1, rV, true);
throw ALE::Exception("Need to reorganize to use a different visitor class");
- }
+ } // if
+ assert(0 != _normalizer);
+ const double lengthScale = _normalizer->lengthScale();
+ const double gravityScale =
+ _normalizer->pressureScale() / (_normalizer->lengthScale() *
+ _normalizer->densityScale());
+
// Loop over cells
int c_index = 0;
for (Mesh::label_sequence::iterator c_iter=cells->begin();
@@ -229,34 +236,30 @@
const double_array& basis = _quadrature->basis();
const double_array& basisDeriv = _quadrature->basisDeriv();
const double_array& jacobianDet = _quadrature->jacobianDet();
- const double_array& quadPts = _quadrature->quadPts();
+ const double_array& quadPtsNondim = _quadrature->quadPts();
if (cellDim != spaceDim)
- throw std::logic_error("Not implemented yet.");
+ throw std::logic_error("Integration for cells with spatial dimensions "
+ "different than the spatial dimension of the "
+ "domain not implemented yet.");
-
// Compute body force vector if gravity is being used.
if (0 != _gravityField) {
-
// Get density at quadrature points for this cell
const double_array& density = _material->calcDensity();
- assert(0 != _normalizer);
- const double gravityScale =
- _normalizer->pressureScale() / (_normalizer->lengthScale() *
- _normalizer->densityScale());
+ quadPtsGlobal = quadPtsNondim;
+ _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
+ lengthScale);
// Compute action for element body forces
for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
- double gravVec[spaceDim];
- double coords[spaceDim];
- memcpy(coords, &quadPts[iQuad * spaceDim], sizeof(double)*spaceDim);
-
- const int err = _gravityField->query(gravVec, spaceDim,
- coords, spaceDim, cs);
+ const int err = _gravityField->query(&gravVec[0], gravVec.size(),
+ &quadPtsGlobal[0], spaceDim, cs);
if (err)
throw std::runtime_error("Unable to get gravity vector for point.");
- _normalizer->nondimensionalize(gravVec, spaceDim, gravityScale);
+ _normalizer->nondimensionalize(&gravVec[0], gravVec.size(),
+ gravityScale);
const double wt = quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad];
for (int iBasis=0, iQ=iQuad*numBasis;
iBasis < numBasis; ++iBasis) {
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -274,57 +274,63 @@
// ----------------------------------------------------------------------
void
pylith::feassemble::Quadrature::precomputeGeometry(
- const ALE::Obj<Mesh>& mesh,
- const ALE::Obj<real_section_type>& coordinates,
- const ALE::Obj<Mesh::label_sequence>& cells)
+ const ALE::Obj<Mesh>& mesh,
+ const ALE::Obj<real_section_type>& coordinates,
+ const ALE::Obj<Mesh::label_sequence>& cells)
{ // precomputeGeometry
- if (_precomputed) return;
- const Mesh::label_sequence::iterator end = cells->end();
+ if (_precomputed)
+ return;
- _quadPtsPre->setChart(real_section_type::chart_type(*std::min_element(cells->begin(), cells->end()),
- *std::max_element(cells->begin(), cells->end())+1));
+ _quadPtsPre->setChart(real_section_type::chart_type(
+ *std::min_element(cells->begin(), cells->end()),
+ *std::max_element(cells->begin(), cells->end())+1));
_quadPtsPre->setFiberDimension(cells, _numQuadPts*_spaceDim);
_quadPtsPre->allocatePoint();
- _quadPtsPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(*_quadPtsPre, _numQuadPts*_spaceDim, &_quadPts[0]);
+ _quadPtsPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(
+ *_quadPtsPre, _numQuadPts*_spaceDim, &_quadPts[0]);
+
_jacobianPre->getAtlas()->setAtlas(_quadPtsPre->getAtlas()->getAtlas());
_jacobianPre->getAtlas()->allocatePoint();
_jacobianPre->setFiberDimension(cells, _numQuadPts*_cellDim*_spaceDim);
_jacobianPre->allocatePoint();
- _jacobianPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(*_jacobianPre, _numQuadPts*_cellDim*_spaceDim, &_jacobian[0]);
+ _jacobianPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(
+ *_jacobianPre, _numQuadPts*_cellDim*_spaceDim, &_jacobian[0]);
+
_jacobianDetPre->getAtlas()->setAtlas(_quadPtsPre->getAtlas()->getAtlas());
_jacobianDetPre->getAtlas()->allocatePoint();
_jacobianDetPre->setFiberDimension(cells, _numQuadPts);
_jacobianDetPre->allocatePoint();
_jacobianDetPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(*_jacobianDetPre, _numQuadPts, &_jacobianDet[0]);
+
_jacobianInvPre->setAtlas(_jacobianPre->getAtlas());
_jacobianInvPre->setFiberDimension(cells, _numQuadPts*_cellDim*_spaceDim);
_jacobianInvPre->allocatePoint();
_jacobianInvPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(*_jacobianInvPre, _numQuadPts*_cellDim*_spaceDim, &_jacobianInv[0]);
//_jITag = _jacobianInvPre->copyCustomAtlas(_jacobianPre, _jTag);
+
_basisDerivPre->getAtlas()->setAtlas(_quadPtsPre->getAtlas()->getAtlas());
_basisDerivPre->getAtlas()->allocatePoint();
_basisDerivPre->setFiberDimension(cells, _numQuadPts*_numBasis*_spaceDim);
_basisDerivPre->allocatePoint();
_basisDerivPreV = new ALE::ISieveVisitor::RestrictVisitor<real_section_type>(*_basisDerivPre, _numQuadPts*_numBasis*_spaceDim, &_basisDeriv[0]);
+#if 0
const int ncells = cells->size();
- const int nbytes =
- (
- _numQuadPts*_spaceDim + // quadPts
- _numQuadPts*_cellDim*_spaceDim + // jacobian
- //_numQuadPts*_cellDim*_spaceDim + // jacobianInv
- _numQuadPts + // jacobianDet
- _numQuadPts*_numBasis*_spaceDim // basisDeriv
- ) * ncells * sizeof(double);
-
-#if 0
+ const int nbytes = (_numQuadPts*_spaceDim + // quadPts
+ _numQuadPts*_cellDim*_spaceDim + // jacobian
+ _numQuadPts*_cellDim*_spaceDim + // jacobianInv
+ _numQuadPts + // jacobianDet
+ _numQuadPts*_numBasis*_spaceDim // basisDeriv
+ ) * ncells * sizeof(double);
+
std::cout << "Quadrature::precomputeGeometry() allocating "
<< nbytes/(1024*1024) << " MB."
<< std::endl;
#endif
+ const Mesh::label_sequence::iterator cellsEnd = cells->end();
for(Mesh::label_sequence::iterator c_iter = cells->begin();
- c_iter != end;
+ c_iter != cellsEnd;
++c_iter) {
this->computeGeometry(mesh, coordinates, *c_iter);
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -14,12 +14,12 @@
#include "MeshIO.hh" // implementation of class methods
-#include "Selection.hh" // USES boundary()
-
#include "pylith/utils/array.hh" // USES double_array, int_array
-#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+#include "Selection.hh" // USES boundary()
+
#include <assert.h> // USES assert()
#include <sstream> // USES std::ostringstream
#include <stdexcept> // USES std::runtime_error
@@ -27,9 +27,10 @@
// ----------------------------------------------------------------------
// Constructor
pylith::meshio::MeshIO::MeshIO(void) :
+ _mesh(0),
+ _normalizer(new spatialdata::units::Nondimensional),
_debug(false),
- _interpolate(false),
- _mesh(0)
+ _interpolate(false)
{ // constructor
} // constructor
@@ -37,6 +38,7 @@
// Destructor
pylith::meshio::MeshIO::~MeshIO(void)
{ // destructor
+ delete _normalizer; _normalizer = 0;
} // destructor
// ----------------------------------------------------------------------
@@ -75,9 +77,9 @@
} // write
// ----------------------------------------------------------------------
-// Set vertices in mesh.
+// Set vertices and cells in mesh.
void
-pylith::meshio::MeshIO::_buildMesh(const double_array& coordinates,
+pylith::meshio::MeshIO::_buildMesh(double_array* coordinates,
const int numVertices,
const int spaceDim,
const int_array& cells,
@@ -86,6 +88,7 @@
const int meshDim)
{ // _buildMesh
assert(0 != _mesh);
+ assert(0 != coordinates);
MPI_Comm comm = PETSC_COMM_WORLD;
int dim = meshDim;
int rank;
@@ -125,7 +128,7 @@
logger.stagePush("MeshCreation");
if (!rank) {
- assert(coordinates.size() == numVertices*spaceDim);
+ assert(coordinates->size() == numVertices*spaceDim);
assert(cells.size() == numCells*numCorners);
if (!_interpolate) {
// Create the ISieve
@@ -225,23 +228,29 @@
<< " bytes" << std::endl << std::endl;
#endif
- ALE::SieveBuilder<Mesh>::buildCoordinates(*_mesh, spaceDim, &coordinates[0]);
+ assert(0 != _normalizer);
+ const double lengthScale = _normalizer->lengthScale();
+ _normalizer->nondimensionalize(&(*coordinates)[0], coordinates->size(),
+ lengthScale);
+
+ ALE::SieveBuilder<Mesh>::buildCoordinates(*_mesh, spaceDim,
+ &(*coordinates)[0]);
} // _buildMesh
// ----------------------------------------------------------------------
-// Set vertices in fault mesh.
+// Set vertices and cells for fault mesh.
void
pylith::meshio::MeshIO::_buildFaultMesh(const double_array& coordinates,
- const int numVertices,
- const int spaceDim,
- const int_array& cells,
- const int numCells,
- const int numCorners,
- const int firstCell,
- const int_array& faceCells,
- const int meshDim,
- const Obj<Mesh>& fault,
- Obj<ALE::Mesh>& faultBd)
+ const int numVertices,
+ const int spaceDim,
+ const int_array& cells,
+ const int numCells,
+ const int numCorners,
+ const int firstCell,
+ const int_array& faceCells,
+ const int meshDim,
+ const Obj<Mesh>& fault,
+ Obj<ALE::Mesh>& faultBd)
{ // _buildFaultMesh
MPI_Comm comm = PETSC_COMM_WORLD;
int dim = meshDim;
@@ -320,7 +329,6 @@
<< " bytes" << std::endl << std::endl;
#endif
- //ALE::SieveBuilder<Mesh>::buildCoordinates(fault, spaceDim, &coordinates[0]);
} // _buildFaultMesh
// ----------------------------------------------------------------------
@@ -359,6 +367,11 @@
for (int iDim=0; iDim < *spaceDim; ++iDim)
(*coordinates)[i++] = vertexCoords[iDim];
} // for
+
+ assert(0 != _normalizer);
+ const double lengthScale = _normalizer->lengthScale();
+ _normalizer->dimensionalize(&(*coordinates)[0], coordinates->size(),
+ lengthScale);
} // _getVertices
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh 2008-12-01 23:33:58 UTC (rev 13433)
@@ -17,15 +17,20 @@
// string_vector
#include "pylith/utils/sievetypes.hh" // USES Obj, PETSc Mesh
+#include "Mesh.hh" // USES ALE::Mesh
-#include "Mesh.hh" // Needs ALE::Mesh
-
namespace pylith {
namespace meshio {
class MeshIO;
} // meshio
} // pylith
+namespace spatialdata {
+ namespace units {
+ class Nondimensional;
+ } // units
+} // spatialdata
+
class pylith::meshio::MeshIO
{ // MeshIO
@@ -69,17 +74,23 @@
*/
bool interpolate(void) const;
+ /** Set scales used to nondimensionalize mesh.
+ *
+ * @param dim Nondimensionalizer.
+ */
+ void normalizer(const spatialdata::units::Nondimensional& dim);
+
/** Read mesh from file.
*
* @param mesh Pointer to PETSc mesh object
*/
- void read(ALE::Obj<pylith::Mesh>* mesh);
+ void read(ALE::Obj<Mesh>* mesh);
/** Write mesh to file.
*
- * @param mesh Pointer to PETSc mesh object
+ * @param mesh Pointer to PETSc mesh object.
*/
- void write(ALE::Obj<pylith::Mesh>* mesh);
+ void write(ALE::Obj<Mesh>* mesh);
// PROTECTED MEMBERS ////////////////////////////////////////////////////
protected :
@@ -111,7 +122,7 @@
* @param numCorners Number of vertices per cell
* @param meshDim Dimension of cells in mesh
*/
- void _buildMesh(const double_array& coordinates,
+ void _buildMesh(double_array* coordinates,
const int numVertices,
const int spaceDim,
const int_array& cells,
@@ -214,11 +225,12 @@
// PRIVATE MEMBERS //////////////////////////////////////////////////////
private :
+ ALE::Obj<Mesh>* _mesh; ///< Pointer to PETSc mesh object
+ spatialdata::units::Nondimensional* _normalizer; ///< Nondimensionalizer
+
bool _debug; ///< True to turn of mesh debugging output
bool _interpolate; ///< True if building intermediate topology elements
- ALE::Obj<pylith::Mesh>* _mesh; ///< Pointer to PETSc mesh object
-
}; // MeshIO
#include "MeshIO.icc" // inline methods
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -47,7 +47,7 @@
} // destructor
// ----------------------------------------------------------------------
-// Unpickle mesh
+// Read mesh.
void
pylith::meshio::MeshIOAscii::_read(void)
{ // _read
@@ -134,7 +134,7 @@
if (readDim && readCells && readVertices && !builtMesh) {
// Can now build mesh
- _buildMesh(coordinates, numVertices, spaceDim,
+ _buildMesh(&coordinates, numVertices, spaceDim,
cells, numCells, numCorners, meshDim);
_setMaterials(materialIds);
builtMesh = true;
@@ -161,7 +161,7 @@
} // catch
filein.close();
} else {
- _buildMesh(coordinates, numVertices, spaceDim,
+ _buildMesh(&coordinates, numVertices, spaceDim,
cells, numCells, numCorners, meshDim);
_setMaterials(materialIds);
} // if/else
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -75,7 +75,7 @@
_readVertices(ncfile, &coordinates, &numVertices, &spaceDim);
_readCells(ncfile, &cells, &materialIds, &numCells, &numCorners);
_orientCells(&cells, numCells, numCorners, meshDim);
- _buildMesh(coordinates, numVertices, spaceDim,
+ _buildMesh(&coordinates, numVertices, spaceDim,
cells, numCells, numCorners, meshDim);
_setMaterials(materialIds);
@@ -92,7 +92,7 @@
throw std::runtime_error(msg.str());
} // try/catch
} else {
- _buildMesh(coordinates, numVertices, spaceDim,
+ _buildMesh(&coordinates, numVertices, spaceDim,
cells, numCells, numCorners, meshDim);
_setMaterials(materialIds);
}
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -212,7 +212,7 @@
_orientCellsBinary(&cells, numCells, numCorners, meshDim);
} // if/else
}
- _buildMesh(coordinates, numVertices, spaceDim,
+ _buildMesh(&coordinates, numVertices, spaceDim,
cells, numCells, numCorners, meshDim);
_setMaterials(materialIds);
Modified: short/3D/PyLith/trunk/libsrc/topology/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Makefile.am 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/libsrc/topology/Makefile.am 2008-12-01 23:33:58 UTC (rev 13433)
@@ -16,6 +16,7 @@
subpkginclude_HEADERS = \
Distributor.hh \
FieldsManager.hh \
+ FieldOps.hh \
MeshOps.hh \
MeshRefiner.hh \
RefineUniform.hh
Modified: short/3D/PyLith/trunk/pylith/utils/VTKDataReader.py
===================================================================
--- short/3D/PyLith/trunk/pylith/utils/VTKDataReader.py 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/pylith/utils/VTKDataReader.py 2008-12-01 23:33:58 UTC (rev 13433)
@@ -28,6 +28,7 @@
"(https://svn.enthought.com/enthought/wiki/MayaVi)"
print " in order to enable verification of output."
has_vtk.flag = False
+ has_vtk.flag = False
return has_vtk.flag
Modified: short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc 2008-12-01 23:23:36 UTC (rev 13432)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc 2008-12-01 23:33:58 UTC (rev 13433)
@@ -25,6 +25,7 @@
#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
#include "pylith/utils/sievetypes.hh" // USES Mesh
@@ -187,11 +188,13 @@
db.ioHandler(&iohandler);
db.queryType(spatialdata::spatialdb::SimpleDB::NEAREST);
+ spatialdata::units::Nondimensional normalizer;
+
ElasticIsotropic3D material;
material.db(&db);
material.id(materialID);
material.label("my_material");
- material.initialize(mesh, &cs, &quadrature);
+ material.initialize(mesh, &cs, &quadrature, normalizer);
const double densityA = 2000.0;
const double vsA = 100.0;
More information about the CIG-COMMITS
mailing list