[cig-commits] r6608 - short/3D/PyLith/trunk/libsrc/faults
knepley at geodynamics.org
knepley at geodynamics.org
Thu Apr 19 10:50:21 PDT 2007
Author: knepley
Date: 2007-04-19 10:50:20 -0700 (Thu, 19 Apr 2007)
New Revision: 6608
Modified:
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
Log:
Now add new cohesive vertices to fault group
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2007-04-19 17:09:56 UTC (rev 6607)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2007-04-19 17:50:20 UTC (rev 6608)
@@ -21,11 +21,23 @@
// ----------------------------------------------------------------------
void
pylith::faults::CohesiveTopology::create(const ALE::Obj<Mesh>& mesh,
- const std::set<Mesh::point_type>& faultVertices)
+ const ALE::Obj<Mesh::int_section_type>& groupField)
{ // create
typedef std::vector<Mesh::point_type> PointArray;
typedef ALE::SieveAlg<Mesh> sieveAlg;
+ // Create set with vertices on fault
+ const int_section_type::chart_type& chart = groupField->getChart();
+ std::set<Mesh::point_type> faultVertices; // Vertices on fault
+
+ const int numCells = mesh->heightStratum(0)->size();
+ for(int_section_type::chart_type::iterator c_iter = chart.begin();
+ c_iter != chart.end();
+ ++c_iter) {
+ assert(!mesh->depth(*c_iter));
+ faultVertices.insert(*c_iter);
+ } // for
+
const ALE::Obj<sieve_type>& sieve = mesh->getSieve();
const ALE::Obj<Mesh> fault = new Mesh(mesh->comm(), mesh->debug());
const ALE::Obj<sieve_type> faultSieve = new sieve_type(sieve->comm(),
@@ -121,11 +133,12 @@
for(Mesh::label_sequence::iterator v_iter = fVertices->begin();
v_iter != fVertices->end();
- ++v_iter) {
+ ++v_iter, ++newPoint) {
if (debug)
std::cout << "Duplicating " << *v_iter << " to "
<< vertexRenumber[*v_iter] << std::endl;
- vertexRenumber[*v_iter] = newPoint++;
+ vertexRenumber[*v_iter] = newPoint;
+ groupField->setFiberDimension(newPoint, 1);
} // for
// Split the mesh along the fault sieve and create cohesive elements
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh 2007-04-19 17:09:56 UTC (rev 6607)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh 2007-04-19 17:50:20 UTC (rev 6608)
@@ -42,7 +42,7 @@
*/
static
void create(const ALE::Obj<Mesh>& mesh,
- const std::set<Mesh::point_type>& faultVertices);
+ const ALE::Obj<Mesh::int_section_type>& groupField);
// PRIVATE METHODS ////////////////////////////////////////////////////
private :
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2007-04-19 17:09:56 UTC (rev 6607)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2007-04-19 17:50:20 UTC (rev 6608)
@@ -53,18 +53,8 @@
const ALE::Obj<int_section_type>& groupField =
(*mesh)->getIntSection(label());
assert(!groupField.isNull());
- const int_section_type::chart_type& chart = groupField->getChart();
- // Create set with vertices on fault
- std::set<Mesh::point_type> points; // Vertices on fault
- const int numCells = (*mesh)->heightStratum(0)->size();
- for(int_section_type::chart_type::iterator c_iter = chart.begin();
- c_iter != chart.end();
- ++c_iter) {
- assert(!(*mesh)->depth(*c_iter));
- points.insert(*c_iter);
- } // for
- CohesiveTopology::create(*mesh, points);
+ CohesiveTopology::create(*mesh, groupField);
} // adjustTopology
More information about the cig-commits
mailing list