[cig-commits] r22353 - short/3D/PyLith/trunk/libsrc/pylith/faults
brad at geodynamics.org
brad at geodynamics.org
Mon Jun 17 17:10:09 PDT 2013
Author: brad
Date: 2013-06-17 17:10:09 -0700 (Mon, 17 Jun 2013)
New Revision: 22353
Modified:
short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc
Log:
Added debugging output for impulses (turned off).
Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc 2013-06-18 00:09:39 UTC (rev 22352)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc 2013-06-18 00:10:09 UTC (rev 22353)
@@ -345,9 +345,6 @@
const int v_fault = _cohesiveVertices[iVertex].fault;
PetscInt goff;
- // :BUG: MATT This doesn't work. The offsets are all positive. I
- // expected negative offsets for nonlocal values. Is the SF not
- // setup properly for a section over the fault?
err = PetscSectionGetOffset(amplitudeGlobalSection, v_fault, &goff);PYLITH_CHECK_ERROR(err);
if (goff < 0) {
continue;
@@ -440,6 +437,27 @@
} // for
} // for
+#if 0 // DEBUGGING
+ topology::VecVisitorMesh amplitudeVisitor(_fields->get("impulse amplitude"));
+ const PetscScalar* amplitudeArray = amplitudeVisitor.localArray();
+ int impulse = 0;
+ for (int irank=0; irank < commSize; ++irank) {
+ MPI_Barrier(comm);
+ if (commRank == irank) {
+ std::cout << "RANK: " << commRank << ", # impulses: " << _impulsePoints.size() << std::endl;
+ const srcs_type::const_iterator impulsePointsEnd = _impulsePoints.end();
+ for (srcs_type::const_iterator piter=_impulsePoints.begin(); piter != impulsePointsEnd; ++piter) {
+ const int impulse = piter->first;
+ const ImpulseInfoStruct& info = piter->second;
+ const PetscInt aoff = amplitudeVisitor.sectionOffset(_cohesiveVertices[info.indexCohesive].fault);
+ assert(1 == amplitudeVisitor.sectionDof(_cohesiveVertices[info.indexCohesive].fault));
+ std::cout << "["<<irank<<"]: " << impulse << " -> (" << info.indexCohesive << "," << info.indexDOF << "), v_fault: " << _cohesiveVertices[info.indexCohesive].fault << ", amplitude: " << amplitudeArray[aoff] << std::endl;
+ } // for
+ } // if
+ } // for
+#endif
+
+
PYLITH_METHOD_END;
} // _setupImpulseOrder
More information about the CIG-COMMITS
mailing list