[cig-commits] r7745 - short/3D/PyLith/trunk/libsrc/bc
willic3 at geodynamics.org
willic3 at geodynamics.org
Wed Jul 25 14:26:35 PDT 2007
Author: willic3
Date: 2007-07-25 14:26:35 -0700 (Wed, 25 Jul 2007)
New Revision: 7745
Modified:
short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
Log:
Fixed error where I was doing cell stuff outside the quadrature loop.
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2007-07-25 18:08:37 UTC (rev 7744)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2007-07-25 21:26:35 UTC (rev 7745)
@@ -198,13 +198,13 @@
cellTractionsGlobal = 0.0;
for(int iDim = 0; iDim < spaceDim; ++iDim) {
for(int jDim = 0; jDim < spaceDim; ++jDim)
- cellTractionsGlobal[iDim] +=
+ cellTractionsGlobal[iDim+index] +=
orientation[iDim*spaceDim+jDim] * tractionDataLocal[jDim];
} // for
+ } // for
// Update tractionGlobal
mesh->update(_tractionGlobal, *c_iter, &cellTractionsGlobal[0]);
- } // for
} // for
_db->close();
@@ -284,6 +284,11 @@
} // for
} // for
err = PetscLogFlops(numQuadPts*(1+numBasis*(1+numBasis*(1+2*spaceDim))));
+ if (err)
+ throw std::runtime_error("Logging PETSc flops failed.");
+
+ // Assemble cell contribution into field
+ mesh->updateAdd(residual, *c_iter, _cellVector);
} // for
} // integrateResidual
More information about the cig-commits
mailing list