[cig-commits] r15055 - short/3D/PyLith/trunk/libsrc/faults
brad at geodynamics.org
brad at geodynamics.org
Tue May 26 09:27:18 PDT 2009
Author: brad
Date: 2009-05-26 09:27:18 -0700 (Tue, 26 May 2009)
New Revision: 15055
Modified:
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
Log:
Added dimensioned coordinates to fault mesh.
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2009-05-26 15:21:42 UTC (rev 15054)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2009-05-26 16:27:18 UTC (rev 15055)
@@ -793,6 +793,41 @@
}
//faultSieveMesh->view("Parallel fault mesh");
+ // Update dimensioned coordinates if they exist.
+ if (sieveMesh->hasRealSection("coordinates_dimensioned")) {
+ const ALE::Obj<topology::Mesh::RealSection>& coordinatesDim =
+ sieveMesh->getRealSection("coordinates_dimensioned");
+ assert(!coordinatesDim.isNull());
+ const ALE::Obj<topology::Mesh::RealSection>& fCoordinatesDim =
+ faultSieveMesh->getRealSection("coordinates_dimensioned");
+ assert(!fCoordinatesDim.isNull());
+ const ALE::Obj<SieveMesh::label_sequence>& vertices =
+ sieveMesh->depthStratum(0);
+ const SieveMesh::label_sequence::iterator vBegin = vertices->begin();
+ const SieveMesh::label_sequence::iterator vEnd = vertices->end();
+
+ fCoordinatesDim->setChart(topology::Mesh::RealSection::chart_type(faultSieveMesh->heightStratum(0)->size(),
+ faultSieveMesh->getSieve()->getChart().max()));
+ for (SieveMesh::label_sequence::iterator v_iter = vBegin;
+ v_iter != vEnd;
+ ++v_iter) {
+ if (fRenumbering.find(*v_iter) == fRenumberingEnd)
+ continue;
+ fCoordinatesDim->setFiberDimension(fRenumbering[*v_iter],
+ coordinatesDim->getFiberDimension(*v_iter));
+ } // for
+ fCoordinatesDim->allocatePoint();
+ for(SieveMesh::label_sequence::iterator v_iter = vBegin;
+ v_iter != vEnd;
+ ++v_iter) {
+ if (fRenumbering.find(*v_iter) == fRenumberingEnd)
+ continue;
+ fCoordinatesDim->updatePoint(fRenumbering[*v_iter],
+ coordinatesDim->restrictPoint(*v_iter));
+ }
+ //faultSieveMesh->view("Parallel fault mesh");
+ } // if
+
// Create the parallel overlap
// Can I figure this out in a nicer way?
ALE::Obj<SieveSubMesh::send_overlap_type> sendParallelMeshOverlap =
More information about the CIG-COMMITS
mailing list