[cig-commits] r6503 - short/3D/PyLith/trunk/libsrc/feassemble
willic3 at geodynamics.org
willic3 at geodynamics.org
Mon Apr 2 13:16:11 PDT 2007
Author: willic3
Date: 2007-04-02 13:16:11 -0700 (Mon, 02 Apr 2007)
New Revision: 6503
Added:
short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh
Modified:
short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.hh
Log:
Updated some stuff for quasi-static implicit solution.
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.hh 2007-04-02 18:46:55 UTC (rev 6502)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.hh 2007-04-02 20:16:11 UTC (rev 6503)
@@ -103,11 +103,11 @@
* Includes element internal force contribution.
*
*
- * @param b Constant field (output)
+ * @param b Residual field (output)
* @param dispT Displacement field at time t
* @param coordinates Field of cell vertex coordinates
*/
- void integrateConstant(const ALE::Obj<real_section_type>& b,
+ void integrateResidual(const ALE::Obj<real_section_type>& b,
const ALE::Obj<real_section_type>& dispT,
const ALE::Obj<real_section_type>& coordinates);
Added: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh 2007-04-02 18:46:55 UTC (rev 6502)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh 2007-04-02 20:16:11 UTC (rev 6503)
@@ -0,0 +1,127 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/**
+ * @file pylith/feassemble/IntegratorImplicit.hh
+ *
+ * @brief Abstract base class for implicit time integration of
+ * finite-element actions.
+ *
+ * Note: This object operates on a single finite-element family, which
+ * is defined by the quadrature and a database of material property
+ * parameters.
+ *
+ * Computes terms A and b in A(t) u(t+dt) = b(u(t), u(t-dt)), where
+ * A(t) is a sparse matrix or vector, u(t+dt) is the field we want to
+ * compute at time t+dt and b is a vector that depends on the field at
+ * time t and t-dt.
+ */
+
+#if !defined(pylith_feassemble_integratorimplicit_hh)
+#define pylith_feassemble_integratorimplicit_hh
+
+#include "pylith/utils/petscfwd.h" // USES PetscMat
+
+#include "Integrator.hh" // ISA Integrator
+
+namespace pylith {
+ namespace feassemble {
+ class IntegratorImplicit;
+ class TestIntegratorImplicit;
+ } // feassemble
+} // pylith
+
+class pylith::feassemble::IntegratorImplicit : public Integrator
+{ // Integrator
+ friend class TestIntegratorImplicit; // unit testing
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public :
+
+ /// Constructor
+ IntegratorImplicit(void);
+
+ /// Destructor
+ virtual
+ ~IntegratorImplicit(void);
+
+ /// Create a copy of this object.
+ virtual
+ IntegratorImplicit* clone(void) const = 0;
+
+ /** Set time step for advancing from time t to time t+dt.
+ *
+ * @param dt Time step
+ */
+ void timeStep(const double dt);
+
+ /** Get stable time step for advancing from time t to time t+dt.
+ *
+ * Default is current time step.
+ *
+ * @returns Time step
+ */
+ virtual
+ double stableTimeStep(void) const;
+
+ /** Integrate constant term (b) for dynamic elasticity term
+ * for finite elements.
+ *
+ * @param fieldOut Constant field (output)
+ * @param fieldInT Input field at time t
+ * @param fieldInTmdt Input field at time t-dt
+ * @param coordinates Field of cell vertex coordinates
+ */
+ virtual
+ void integrateConstant(const ALE::Obj<real_section_type>& fieldOut,
+ const ALE::Obj<real_section_type>& fieldInT,
+ const ALE::Obj<real_section_type>& fieldInTmdt,
+ const ALE::Obj<real_section_type>& coordinates) = 0;
+
+ /** Compute Jacobian matrix (A) associated with operator.
+ *
+ * @param mat Sparse matrix
+ * @param fieldIn Input field at time t
+ * @param coordinates Field of cell vertex coordinates
+ */
+ virtual
+ void integrateJacobian(PetscMat* mat,
+ const ALE::Obj<real_section_type>& fieldIn,
+ const ALE::Obj<real_section_type>& coordinates) = 0;
+
+// PROTECTED METHODS ////////////////////////////////////////////////////
+protected :
+
+ /** Copy constructor.
+ *
+ * @param i Integrator to copy
+ */
+ IntegratorImplicit(const IntegratorImplicit& i);
+
+// PRIVATE METHODS //////////////////////////////////////////////////////
+private :
+
+ /// Not implemented
+ const IntegratorImplicit& operator=(const IntegratorImplicit&);
+
+// PROTECTED MEMBERS ////////////////////////////////////////////////////
+protected :
+
+ double _dt; ///< Time step for t -> t+dt
+ double _dtm1; ///< Time step for t-dt1 -> t
+
+}; // IntegratorImplicit
+
+#endif // pylith_feassemble_integratorimplicit_hh
+
+
+// End of file
More information about the cig-commits
mailing list