[cig-commits] r6484 - short/3D/PyLith/trunk/libsrc/feassemble

willic3 at geodynamics.org willic3 at geodynamics.org
Fri Mar 30 19:34:26 PDT 2007


Author: willic3
Date: 2007-03-30 19:34:25 -0700 (Fri, 30 Mar 2007)
New Revision: 6484

Added:
   short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.cc
Log:
Initial version of IntegratorImplicit.cc.


Added: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.cc	2007-03-31 02:08:46 UTC (rev 6483)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.cc	2007-03-31 02:34:25 UTC (rev 6484)
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include <portinfo>
+
+#include "IntegratorImplicit.hh" // implementation of class methods
+
+#include <assert.h> // USES assert()
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::feassemble::IntegratorImplicit::IntegratorImplicit(void) :
+  Integrator(),
+  _dt(0.0),
+  _dtm1(0.0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::feassemble::IntegratorImplicit::~IntegratorImplicit(void)
+{ // destructor
+} // destructor
+  
+// ----------------------------------------------------------------------
+// Copy constructor
+pylith::feassemble::IntegratorImplicit::IntegratorImplicit(const IntegratorImplicit& i) :
+  Integrator(i),
+  _dt(i._dt),
+  _dtm1(i._dtm1)
+{ // copy constructor
+} // copy constructor
+
+// ----------------------------------------------------------------------
+// Set time step for advancing from time t to time t+dt.
+void
+pylith::feassemble::IntegratorImplicit::timeStep(const double dt)
+{ // timeStep
+  _dtm1 = _dt;
+  _dt = dt;
+  assert(_dt == _dtm1); // For now, don't allow variable time step
+} // timeStep
+
+// ----------------------------------------------------------------------
+// Get stable time step for advancing from time t to time t+dt.
+double
+pylith::feassemble::IntegratorImplicit::stableTimeStep(void) const
+{ // stableTimeStep
+  // Default is current time step
+  return _dt;
+} // stableTimeStep
+
+
+// End of file 



More information about the cig-commits mailing list