[cig-commits] r12769 - short/3D/PyLith/trunk/libsrc/faults
brad at geodynamics.org
brad at geodynamics.org
Mon Sep 1 15:43:27 PDT 2008
Author: brad
Date: 2008-09-01 15:43:27 -0700 (Mon, 01 Sep 2008)
New Revision: 12769
Modified:
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
Log:
Added switch for adjusting topology with fault mesh or with group of vertices.
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2008-09-01 22:35:40 UTC (rev 12768)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2008-09-01 22:43:27 UTC (rev 12769)
@@ -61,21 +61,27 @@
{ // adjustTopology
assert(std::string("") != label());
- if (!mesh->hasIntSection(label())) {
- std::ostringstream msg;
- msg << "Mesh missing group of vertices '" << label()
- << " for fault interface condition.";
- throw std::runtime_error(msg.str());
- } // if
-
- // Get group of vertices associated with fault
- const ALE::Obj<int_section_type>& groupField =
- mesh->getIntSection(label());
- assert(!groupField.isNull());
-
- ALE::Obj<Mesh> faultMesh;
- CohesiveTopology::create(&faultMesh, mesh, groupField, id(),
- _useLagrangeConstraints());
+ if (!_useFaultMesh) {
+ // Use group of vertices to define fault.
+ if (!mesh->hasIntSection(label())) {
+ std::ostringstream msg;
+ msg << "Mesh missing group of vertices '" << label()
+ << " for fault interface condition.";
+ throw std::runtime_error(msg.str());
+ } // if
+
+ // Get group of vertices associated with fault
+ const ALE::Obj<int_section_type>& groupField =
+ mesh->getIntSection(label());
+ assert(!groupField.isNull());
+
+ ALE::Obj<Mesh> faultMesh;
+ CohesiveTopology::create(&faultMesh, mesh, groupField, id(),
+ _useLagrangeConstraints());
+ } else {
+ // Use fault mesh to define fault.
+ std::cout << "ADD FAULT MESH ADJUSTING TOPOLOGY STUFF HERE." << std::endl;
+ } // else
} // adjustTopology
More information about the cig-commits
mailing list