[cig-commits] r21339 - short/3D/PyLith/branches/v1.8-mixedfault/libsrc/pylith/faults

rjolivet at geodynamics.org rjolivet at geodynamics.org
Tue Feb 5 21:12:33 PST 2013


Author: rjolivet
Date: 2013-02-05 21:12:33 -0800 (Tue, 05 Feb 2013)
New Revision: 21339

Modified:
   short/3D/PyLith/branches/v1.8-mixedfault/libsrc/pylith/faults/FaultCohesiveDynKin.cc
Log:
Last Corrections

Modified: short/3D/PyLith/branches/v1.8-mixedfault/libsrc/pylith/faults/FaultCohesiveDynKin.cc
===================================================================
--- short/3D/PyLith/branches/v1.8-mixedfault/libsrc/pylith/faults/FaultCohesiveDynKin.cc	2013-02-06 01:02:08 UTC (rev 21338)
+++ short/3D/PyLith/branches/v1.8-mixedfault/libsrc/pylith/faults/FaultCohesiveDynKin.cc	2013-02-06 05:12:33 UTC (rev 21339)
@@ -315,17 +315,17 @@
   assert(!globalOrder.isNull());
 
   // Get the dkSelector
-  if (_dkSelector) {
-    topology::Field<topology::SubMesh>& dk = _fields->get("Dynamic Kinematic Selector");
-    _dkSelector->dk(&dk);
-    const ALE::Obj<RealSection>& dkSelSection = dk.section();
-    assert(!dkSelSection.isNull());
-  }
-  else { // should never be here
-    std::ostringstream msg;                                           
-    msg << "No Dynamic Kinematic Selector available.";         
-    throw std::runtime_error(msg.str());
-  } 
+  //if (_dkSelector) {
+  topology::Field<topology::SubMesh>& dk = _fields->get("Dynamic Kinematic Selector");
+  _dkSelector->dk(&dk);
+  const ALE::Obj<RealSection>& dkSelSection = dk.section();
+  assert(!dkSelSection.isNull());
+  //}
+  //else { // should never be here
+  //  std::ostringstream msg;                                           
+  //  msg << "No Dynamic Kinematic Selector available.";         
+  //  throw std::runtime_error(msg.str());
+  //} 
 
   _logger->eventEnd(setupEvent);
 #if !defined(DETAILED_EVENT_LOGGING)
@@ -391,9 +391,8 @@
       const PylithScalar* dispRelVertex = dispRelSection->restrictPoint(v_fault);
       assert(dispRelVertex);
 
-    } else {
+    } else { // Dynamic Case
 
-      // Dynamic Case
       // Get prescribed traction perturbation at fault vertex.
       if (_tractPerturbation) {
         assert(tractPerturbFiberDim == tractPerturbSection->getFiberDimension(v_fault));
@@ -409,8 +408,7 @@
 
       // Get orientation associated with fault vertex.
       assert(spaceDim*spaceDim == orientationSection->getFiberDimension(v_fault));
-      const PylithScalar* orientationVertex = 
-        orientationSection->restrictPoint(v_fault);
+      const PylithScalar* orientationVertex = orientationSection->restrictPoint(v_fault);
       assert(orientationVertex);
 
     } // if/else
@@ -428,7 +426,7 @@
       dispTpdtVertexL[iDim] = dispTVertexL[iDim] + dispTIncrVertexL[iDim];
     } // for
     
-    if (dkSelSection[iVertex]>0.5) { // Kinematic Case
+    if (dkSelSection[iVertex] > 0.5) { // Kinematic Case
 
       residualVertexN = areaVertex * dispTpdtVertexL;
       residualVertexP = -residualVertexN;
@@ -439,9 +437,8 @@
           (dispTpdtVertexP[iDim] - dispTpdtVertexN[iDim] - dispRelVertex[iDim]);
       } // for
 
-    } else {
+    } else { // Dynamic Case
 
-      // Dynamic Case
       // Compute slip (in fault coordinates system) from displacements.
       PylithScalar slipNormal = 0.0;
       PylithScalar tractionNormal = 0.0;
@@ -491,7 +488,7 @@
 	   residualSection->getFiberDimension(v_positive));
     residualSection->updateAddPoint(v_positive, &residualVertexP[0]);
 
-    if (dkSelSection[iVertex]>0.5) { // Kinematic Case
+    if (dkSelSection[iVertex] > 0.5) { // Kinematic Case
 
       assert(residualVertexL.size() == 
             residualSection->getFiberDimension(v_lagrange));
@@ -743,7 +740,7 @@
 
   const int numVertices = _cohesiveVertices.size();
   for (int iVertex=0; iVertex < numVertices; ++iVertex) {
-    if (dkSelSection[iVertex]<0.5) // Dynamic Case
+    if (dkSelSection[iVertex] < 0.5) // Dynamic Case
       continue;
 
     const int v_lagrange = _cohesiveVertices[iVertex].lagrange;
@@ -1051,7 +1048,7 @@
   assert(!globalOrder.isNull());
 
   for (int iVertex=0; iVertex < numVertices; ++iVertex) {
-    if (dkSelSelector[iVertex])
+    if (dkSelSection[iVertex] < 0.5 ) // Dynamic Case
       continue;
 
     const int v_fault = _cohesiveVertices[iVertex].fault;



More information about the CIG-COMMITS mailing list