[cig-commits] r9148 - short/3D/PyLith/trunk/libsrc/faults

brad at geodynamics.org brad at geodynamics.org
Mon Jan 28 10:29:37 PST 2008


Author: brad
Date: 2008-01-28 10:29:37 -0800 (Mon, 28 Jan 2008)
New Revision: 9148

Modified:
   short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh
   short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc
   short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
   short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh
Log:
Added ability to output final slip and slip time for kinematic fault interface condition.

Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh	2008-01-28 18:28:48 UTC (rev 9147)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh	2008-01-28 18:29:37 UTC (rev 9148)
@@ -104,6 +104,18 @@
 					      const double t1,
 					      const std::set<Mesh::point_type>& vertices);
 
+  /** Get final slip.
+   *
+   * @returns Final slip.
+   */
+  ALE::Obj<real_section_type> finalSlip(void);
+
+  /** Get time when slip begins at each point.
+   *
+   * @returns Time when slip begins.
+   */
+  ALE::Obj<real_section_type> slipTime(void);
+
 // NOT IMPLEMENTED //////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc	2008-01-28 18:28:48 UTC (rev 9147)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc	2008-01-28 18:29:37 UTC (rev 9148)
@@ -74,5 +74,23 @@
   return _slipfn->slipIncr(t0, t1, vertices);
 } // slip
 
+// ----------------------------------------------------------------------
+// Get final slip.
+ALE::Obj<pylith::real_section_type>
+pylith::faults::EqKinSrc::finalSlip(void)
+{ // finalSlip
+  assert(0 != _slipfn);
+  return _slipfn->finalSlip();
+} // finalSlip
 
+// ----------------------------------------------------------------------
+// Get time when slip begins at each point.
+ALE::Obj<pylith::real_section_type>
+pylith::faults::EqKinSrc::slipTime(void)
+{ // slipTime
+  assert(0 != _slipfn);
+  return _slipfn->slipTime();
+} // slipTime
+
+
 // End of file 

Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh	2008-01-28 18:28:48 UTC (rev 9147)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh	2008-01-28 18:29:37 UTC (rev 9148)
@@ -99,6 +99,20 @@
 			      const double t1,
 			      const std::set<Mesh::point_type>& vertices);
 
+  /** Get final slip.
+   *
+   * @returns Final slip.
+   */
+  virtual
+  ALE::Obj<real_section_type> finalSlip(void);
+
+  /** Get time when slip begins at each point.
+   *
+   * @returns Time when slip begins.
+   */
+  virtual
+  ALE::Obj<real_section_type> slipTime(void);
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2008-01-28 18:28:48 UTC (rev 9147)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2008-01-28 18:29:37 UTC (rev 9148)
@@ -669,6 +669,10 @@
 				    const char* name,
 				    const ALE::Obj<Mesh>& mesh)
 { // vertexField
+  assert(!_faultMesh.isNull());
+  assert(!_orientation.isNull());
+  assert(0 != _eqsrc);
+
   const int cohesiveDim = _faultMesh->getDimension();
 
   if (cohesiveDim > 0 && 0 == strcasecmp("strike_dir", name)) {
@@ -696,14 +700,14 @@
     return _outputVertexVector;
   } else if (0 == strcasecmp("final_slip", name)) {
     _allocateOutputVertexVector();
-    // ADD STUFF HERE
-    //_projectCohesiveVertexField(&_outputVertexVector, finalSlip, mesh);
+    const ALE::Obj<real_section_type>& finalSlip = _eqsrc->finalSlip();
+    _projectCohesiveVertexField(&_outputVertexVector, finalSlip, mesh);
     *fieldType = meshio::DataWriter::VECTOR_FIELD;
     return _outputVertexVector;
   } else if (0 == strcasecmp("slip_time", name)) {
     _allocateOutputVertexScalar();
-    // ADD STUFF HERE
-    //_projectCohesiveVertexField(&_outputVertexScalar, slipTime, mesh);
+    const ALE::Obj<real_section_type>& slipTime = _eqsrc->slipTime();
+    _projectCohesiveVertexField(&_outputVertexScalar, slipTime, mesh);
     *fieldType = meshio::DataWriter::SCALAR_FIELD;
     return _outputVertexScalar;
   } // if/else

Modified: short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh	2008-01-28 18:28:48 UTC (rev 9147)
+++ short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh	2008-01-28 18:29:37 UTC (rev 9148)
@@ -73,6 +73,7 @@
    *
    * @param t Time t.
    * @param vertices Vertices where slip will be prescribed.
+   * @returns Slip vector as left-lateral/reverse/normal.
    */
   virtual
   const ALE::Obj<real_section_type>& slip(const double t,
@@ -83,12 +84,27 @@
    * @param t0 Time t.
    * @param t1 Time t+dt.
    * @param vertices Vertices where slip will be prescribed.
+   * @returns Increment in slip vector as left-lateral/reverse/normal.
    */
   virtual
   const ALE::Obj<real_section_type>& slipIncr(const double t0,
 					      const double t1,
 					      const std::set<Mesh::point_type>& vertices) = 0;
 
+  /** Get final slip.
+   *
+   * @returns Final slip.
+   */
+  virtual
+  ALE::Obj<real_section_type> finalSlip(void) = 0;
+
+  /** Get time when slip begins at each point.
+   *
+   * @returns Time when slip begins.
+   */
+  virtual
+  ALE::Obj<real_section_type> slipTime(void) = 0;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 



More information about the cig-commits mailing list