[cig-commits] r8006 - in short/3D/PyLith/trunk/libsrc: bc faults
feassemble
brad at geodynamics.org
brad at geodynamics.org
Sun Sep 23 16:39:04 PDT 2007
Author: brad
Date: 2007-09-23 16:39:03 -0700 (Sun, 23 Sep 2007)
New Revision: 8006
Modified:
short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
short/3D/PyLith/trunk/libsrc/feassemble/ElasticityExplicit.cc
short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
Log:
Changed PetscLogFlops() to PetscLogFlopsNoCheck(), propagating changes in PETSc.
Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2007-09-22 21:14:05 UTC (rev 8005)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2007-09-23 23:39:03 UTC (rev 8006)
@@ -276,9 +276,7 @@
} // for
} // for
} // for
- err = PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(5*spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(3+numBasis*(1+numBasis*(5*spaceDim))));
// Assemble cell contribution into field
mesh->updateAdd(residual, *c_iter, _cellVector);
@@ -365,10 +363,7 @@
} // for
} // for
} // for
- PetscErrorCode err =
- PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+2*spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(3+numBasis*(1+numBasis*(1+2*spaceDim))));
// Assemble cell contribution into PETSc Matrix
const ALE::Obj<Mesh::order_type>& globalOrder =
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2007-09-22 21:14:05 UTC (rev 8005)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2007-09-23 23:39:03 UTC (rev 8006)
@@ -311,9 +311,7 @@
} // for
} // for
} // for
- err = PetscLogFlops(numQuadPts*(1+numBasis*(1+numBasis*(1+2*spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(1+numBasis*(1+2*spaceDim))));
// Assemble cell contribution into field
mesh->updateAdd(residual, *c_iter, _cellVector);
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2007-09-22 21:14:05 UTC (rev 8005)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2007-09-23 23:39:03 UTC (rev 8006)
@@ -479,10 +479,8 @@
// Assemble cell contribution into field
mesh->updateAdd(residual, *c_iter, &cellResidual[0]);
} // for
- PetscErrorCode err = PetscLogFlops(numConstraintVert*spaceDim*spaceDim*6 +
- numConstraintVert*spaceDim*2);
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numConstraintVert*spaceDim*spaceDim*6 +
+ numConstraintVert*spaceDim*2);
} // integrateResidual
// ----------------------------------------------------------------------
@@ -587,9 +585,7 @@
constraintOrient[kDim*spaceDim+jDim];
} // for
} // for
- err = PetscLogFlops(numConstraintVert*spaceDim*spaceDim*4);
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numConstraintVert*spaceDim*spaceDim*4);
// Assemble cell contribution into PETSc Matrix
const ALE::Obj<Mesh::order_type>& globalOrder =
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityExplicit.cc 2007-09-22 21:14:05 UTC (rev 8005)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityExplicit.cc 2007-09-23 23:39:03 UTC (rev 8006)
@@ -211,9 +211,7 @@
} // for
} // for
} // for
- err = PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(6*spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(3+numBasis*(1+numBasis*(6*spaceDim))));
// Compute action for elastic terms
if (1 == cellDim) {
@@ -232,9 +230,7 @@
_cellVector[iBasis*spaceDim ] -= N1*s11;
} // for
} // for
- err = PetscLogFlops(numQuadPts*(1+numBasis*5));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*5));
} else if (2 == cellDim) {
// Compute stresses
@@ -258,9 +254,7 @@
_cellVector[iBasis*spaceDim+1] -= N1*s12 + N2*s22;
} // for
} // for
- err = PetscLogFlops(numQuadPts*(1+numBasis*(8+2+9)));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(8+2+9)));
} else if (3 == cellDim) {
// Compute stresses
@@ -291,9 +285,7 @@
_cellVector[iBlock+2] -= N1*s13 + N2*s23 + N3*s33;
} // for
} // for
- err = PetscLogFlops(numQuadPts*(1+numBasis*(3+12)));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(3+12)));
} else {
std::cerr << "Unknown case for cellDim '" << cellDim << "'."
<< std::endl;
@@ -381,18 +373,15 @@
} // for
} // for
} // for
- PetscErrorCode err =
- PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(3+numBasis*(1+numBasis*(1+spaceDim))));
// Assemble cell contribution into PETSc Matrix
const ALE::Obj<Mesh::order_type>& globalOrder =
mesh->getFactory()->getGlobalOrder(mesh, "default", dispT);
assert(!globalOrder.isNull());
- err = updateOperator(*jacobian, mesh, dispT, globalOrder,
- *c_iter, _cellMatrix, ADD_VALUES);
+ PetscErrorCode err = updateOperator(*jacobian, mesh, dispT, globalOrder,
+ *c_iter, _cellMatrix, ADD_VALUES);
if (err)
throw std::runtime_error("Update to PETSc Mat failed.");
} // for
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2007-09-22 21:14:05 UTC (rev 8005)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2007-09-23 23:39:03 UTC (rev 8006)
@@ -263,10 +263,7 @@
} // for
} // for
} // for
- PetscErrorCode err =
- PetscLogFlops(numQuadPts*(2+numBasis*(2+2*spaceDim)));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(2+numBasis*(2+2*spaceDim)));
} // if
#endif
@@ -586,9 +583,7 @@
_cellVector[iBasis*spaceDim ] -= N1*s11;
} // for
} // for
- PetscErrorCode err = PetscLogFlops(numQuadPts*(1+numBasis*5));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*5));
} // _elasticityResidual1D
// ----------------------------------------------------------------------
@@ -622,9 +617,7 @@
_cellVector[iBasis*spaceDim+1] -= N1*s12 + N2*s22;
} // for
} // for
- PetscErrorCode err = PetscLogFlops(numQuadPts*(1+numBasis*(8+2+9)));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(8+2+9)));
} // _elasticityResidual2D
// ----------------------------------------------------------------------
@@ -666,9 +659,7 @@
_cellVector[iBlock+2] -= N1*s13 + N2*s23 + N3*s33;
} // for
} // for
- PetscErrorCode err = PetscLogFlops(numQuadPts*(1+numBasis*(3+12)));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(3+12)));
} // _elasticityResidual3D
// ----------------------------------------------------------------------
@@ -701,9 +692,7 @@
} // for
} // for
} // for
- PetscErrorCode err = PetscLogFlops(numQuadPts*(1+numBasis*(2+numBasis*3)));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(2+numBasis*3)));
} // _elasticityJacobian1D
// ----------------------------------------------------------------------
@@ -766,10 +755,7 @@
} // for
} // for
} // for
- PetscErrorCode err =
- PetscLogFlops(numQuadPts*(1+numBasis*(2+numBasis*(3*11+4))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(2+numBasis*(3*11+4))));
} // _elasticityJacobian2D
// ----------------------------------------------------------------------
@@ -881,10 +867,7 @@
} // for
} // for
} // for
- PetscErrorCode err =
- PetscLogFlops(numQuadPts*(1+numBasis*(3+numBasis*(6*26+9))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
+ PetscLogFlopsNoCheck(numQuadPts*(1+numBasis*(3+numBasis*(6*26+9))));
} // _elasticityJacobian3D
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc 2007-09-22 21:14:05 UTC (rev 8005)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc 2007-09-23 23:39:03 UTC (rev 8006)
@@ -102,7 +102,7 @@
_jacobianInv[i01] = -_jacobian[i01] / det;
_jacobianInv[i10] = -_jacobian[i10] / det;
_jacobianInv[i11] = _jacobian[i00] / det;
- PetscLogFlops(_numBasis*2 + _numBasis*_cellDim*_spaceDim*2 + 21);
+ PetscLogFlopsNoCheck(_numBasis*2 + _numBasis*_cellDim*_spaceDim*2 + 21);
// Compute derivatives of basis functions with respect to global
// coordinates
More information about the cig-commits
mailing list