[cig-commits] r6680 - in short/3D/PyLith/trunk: . libsrc/faults
brad at geodynamics.org
brad at geodynamics.org
Tue Apr 24 17:41:46 PDT 2007
Author: brad
Date: 2007-04-24 17:41:46 -0700 (Tue, 24 Apr 2007)
New Revision: 6680
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/faults/Fault.hh
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
Log:
Started work on setting up initialization of cohesive elements (orientation).
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-04-24 23:00:42 UTC (rev 6679)
+++ short/3D/PyLith/trunk/TODO 2007-04-25 00:41:46 UTC (rev 6680)
@@ -4,6 +4,11 @@
Cleanup
+ Add check in MeshIO to make sure cell dimension matches space
+ dimension. We don't have enough information to determine the fault
+ orientation information for a cell in a higher
+ dimension coordinate space.
+
Use pylith/utils/sievefwd.hh and pylith/utils/sievetypes.hh in unit
tests. Remove typedefs when possible (take advantage of typedefs in
seivefwd.hh).
Modified: short/3D/PyLith/trunk/libsrc/faults/Fault.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/Fault.hh 2007-04-24 23:00:42 UTC (rev 6679)
+++ short/3D/PyLith/trunk/libsrc/faults/Fault.hh 2007-04-25 00:41:46 UTC (rev 6680)
@@ -20,7 +20,9 @@
#if !defined(pylith_faults_fault_hh)
#define pylith_faults_fault_hh
-#include "pylith/utils/sievefwd.hh"
+#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
+#include "pylith/utils/arrayfwd.hh" // USES double_array
+
#include <string> // HASA std::string
/// Namespace for pylith package
@@ -82,8 +84,20 @@
* @param mesh PETSc mesh
*/
virtual
- void adjustTopology(ALE::Obj<ALE::Mesh>* mesh) const = 0;
+ void adjustTopology(ALE::Obj<ALE::Mesh>* mesh) = 0;
+ /** Initialize fault. Determine orientation and setup boundary
+ * condition parameters.
+ *
+ * @param mesh PETSc mesh
+ * @param upDir Direction perpendicular to along-strike direction that is
+ * not collinear with fault normal (usually "up" direction but could
+ * be up-dip direction).
+ */
+ virtual
+ void initialize(ALE::Obj<ALE::Mesh>* mesh,
+ const double_array& upDir) = 0;
+
// PROTECTED METHODS //////////////////////////////////////////////////
protected :
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2007-04-24 23:00:42 UTC (rev 6679)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2007-04-25 00:41:46 UTC (rev 6680)
@@ -17,6 +17,7 @@
#include "CohesiveTopology.hh" // USES CohesiveTopology::create()
#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
+#include "pylith/utils/array.hh" // USES double_array
#include <assert.h> // USES assert()
#include <sstream> // USES std::ostringstream
@@ -40,6 +41,7 @@
// Copy constructor.
pylith::faults::FaultCohesive::FaultCohesive(const FaultCohesive& f) :
Fault(f),
+ Integrator(f),
_faultMesh(new ALE::Obj<ALE::Mesh>)
{ // copy constructor
*_faultMesh = *f._faultMesh;
@@ -48,7 +50,7 @@
// ----------------------------------------------------------------------
// Adjust mesh topology for fault implementation.
void
-pylith::faults::FaultCohesive::adjustTopology(ALE::Obj<ALE::Mesh>* mesh) const
+pylith::faults::FaultCohesive::adjustTopology(ALE::Obj<ALE::Mesh>* mesh)
{ // adjustTopology
assert(0 != mesh);
assert("" != label());
@@ -61,5 +63,22 @@
CohesiveTopology::create(_faultMesh, *mesh, groupField, id());
} // adjustTopology
+// ----------------------------------------------------------------------
+// Initialize fault. Determine orientation and setup boundary
+void
+pylith::faults::FaultCohesive::initialize(ALE::Obj<ALE::Mesh>* mesh,
+ const double_array& upDir)
+{ // initialize
+ assert(0 != mesh);
+ assert(0 != _quadrature);
+
+ if (3 != upDir.size())
+ throw std::runtime_error("Up direction for fault orientation must be "
+ "a vector with 3 components.");
+
+
+
+} // initialize
+
// End of file
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh 2007-04-24 23:00:42 UTC (rev 6679)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh 2007-04-25 00:41:46 UTC (rev 6680)
@@ -19,7 +19,8 @@
#if !defined(pylith_faults_faultcohesive_hh)
#define pylith_faults_faultcohesive_hh
-#include "Fault.hh"
+#include "Fault.hh" // ISA Fault
+#include "pylith/feassemble/Integrator.hh" // ISA Integrator
#include "pylith/utils/sievefwd.hh" // HOLDSA PETSc Mesh
@@ -33,7 +34,8 @@
/// C++ abstract base class for a fault surface implemented with
/// cohesive elements.
-class pylith::faults::FaultCohesive : public Fault
+class pylith::faults::FaultCohesive : public Fault,
+ public feassemble::Integrator
{ // class FaultCohesive
friend class TestFaultCohesive; // unit testing
@@ -51,8 +53,20 @@
*
* @param mesh PETSc mesh
*/
- void adjustTopology(ALE::Obj<ALE::Mesh>* mesh) const;
+ void adjustTopology(ALE::Obj<ALE::Mesh>* mesh);
+ /** Initialize fault. Determine orientation and setup boundary
+ * condition parameters.
+ *
+ * @param mesh PETSc mesh
+ * @param upDir Direction perpendicular to along-strike direction that is
+ * not collinear with fault normal (usually "up" direction but could
+ * be up-dip direction).
+ */
+ virtual
+ void initialize(ALE::Obj<ALE::Mesh>* mesh,
+ const double_array& upDir);
+
// PROTECTED METHODS //////////////////////////////////////////////////
protected :
More information about the cig-commits
mailing list