[cig-commits] r11459 - short/3D/PyLith/trunk/libsrc/bc
brad at geodynamics.org
brad at geodynamics.org
Mon Mar 17 12:24:58 PDT 2008
Author: brad
Date: 2008-03-17 12:24:58 -0700 (Mon, 17 Mar 2008)
New Revision: 11459
Modified:
short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc
Log:
Fixed bug (flipped iDOF and jDOF indices) in checking for overlapping constraints.
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2008-03-17 18:39:23 UTC (rev 11458)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2008-03-17 19:24:58 UTC (rev 11459)
@@ -216,12 +216,12 @@
const int numPrevious = offset[0];
for (int iDOF=0; iDOF < numPrevious; ++iDOF)
for (int jDOF=0; jDOF < numFixedDOF; ++jDOF)
- if (allFixedDOF[jDOF] == _fixedDOF[iDOF]) {
+ if (allFixedDOF[iDOF] == _fixedDOF[jDOF]) {
std::ostringstream msg;
- msg << "Found multiple constraints on degrees of freedom at "
- << "point while setting up constraints for DirichletBoundary "
+ msg << "Found multiple constraints on degrees of freedom at\n"
+ << "point while setting up constraints for DirichletPoints\n"
<< "boundary condition '" << _label << "'.\n"
- << "Degree of freedom " << _fixedDOF[iDOF]
+ << "Degree of freedom " << _fixedDOF[jDOF]
<< " is already constrained by another Dirichlet BC.";
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-03-17 18:39:23 UTC (rev 11458)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletPoints.cc 2008-03-17 19:24:58 UTC (rev 11459)
@@ -152,10 +152,12 @@
const int curNumConstraints = field->getConstraintDimension(_points[iPoint]);
if (curNumConstraints + numFixedDOF > fiberDim) {
std::ostringstream msg;
- msg << "Found overly constrained point while setting up constraints for DirichletPoints "
- << "boundary condition '" << _label << "'.\n" << "Number of DOF at point "
- << _points[iPoint] << " is " << fiberDim << " and number of attempted constraints is "
- << curNumConstraints+numFixedDOF << ".";
+ msg
+ << "Found overly constrained point while setting up constraints for\n"
+ << "DirichletPoints boundary condition '" << _label << "'.\n"
+ << "Number of DOF at point " << _points[iPoint] << " is " << fiberDim
+ << "\nand number of attempted constraints is "
+ << curNumConstraints+numFixedDOF << ".";
throw std::runtime_error(msg.str());
} // if
_offsetLocal[iPoint] = curNumConstraints;
@@ -192,12 +194,12 @@
const int numPrevious = _offsetLocal[iPoint];
for (int iDOF=0; iDOF < numPrevious; ++iDOF)
for (int jDOF=0; jDOF < numFixedDOF; ++jDOF)
- if (allFixedDOF[jDOF] == _fixedDOF[iDOF]) {
+ if (allFixedDOF[iDOF] == _fixedDOF[jDOF]) {
std::ostringstream msg;
- msg << "Found multiple constraints on degrees of freedom at "
- << "point while setting up constraints for DirichletPoints "
+ msg << "Found multiple constraints on degrees of freedom at\n"
+ << "point while setting up constraints for DirichletPoints\n"
<< "boundary condition '" << _label << "'.\n"
- << "Degree of freedom " << _fixedDOF[iDOF]
+ << "Degree of freedom " << _fixedDOF[jDOF]
<< " is already constrained by another Dirichlet BC.";
throw std::runtime_error(msg.str());
} // if
More information about the cig-commits
mailing list