[cig-commits] r12927 - in short/3D/PyLith/trunk: libsrc/topology pylith/topology
brad at geodynamics.org
brad at geodynamics.org
Sat Sep 20 21:12:58 PDT 2008
Author: brad
Date: 2008-09-20 21:12:58 -0700 (Sat, 20 Sep 2008)
New Revision: 12927
Modified:
short/3D/PyLith/trunk/libsrc/topology/RefineUniform.cc
short/3D/PyLith/trunk/pylith/topology/RefineUniform.py
Log:
Started fixing setting groups in refined mesh. Not complete.
Modified: short/3D/PyLith/trunk/libsrc/topology/RefineUniform.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/RefineUniform.cc 2008-09-21 02:44:18 UTC (rev 12926)
+++ short/3D/PyLith/trunk/libsrc/topology/RefineUniform.cc 2008-09-21 04:12:58 UTC (rev 12927)
@@ -86,11 +86,18 @@
(*newMesh)->getIntSection(*name);
const Mesh::int_section_type::chart_type& chart = group->getChart();
- group->setChart(Mesh::int_section_type::chart_type(numNewCells,
+ newGroup->setChart(Mesh::int_section_type::chart_type(numNewCells,
numNewCells + numNewVertices));
- for(int p = chart.min(); p < chart.max(); ++p) {
+ const Mesh::int_section_type::chart_type& newChart = newGroup->getChart();
+
+
+ // MATT I think this is wrong. The labels of vertices is
+ // different in the refined mesh.
+
+ const int chartMax = chart.max();
+ for(int p=chart.min(), pNew=newChart.min(); p < chartMax; ++p, ++pNew) {
if (group->getFiberDimension(p))
- newGroup->setFiberDimension(p, 1);
+ newGroup->setFiberDimension(pNew, 1);
} // for
const std::map<edge_type, point_type>::const_iterator edge2VertexEnd =
edge2vertex.end();
@@ -106,7 +113,6 @@
} // for
newGroup->allocatePoint();
- const int chartMax = chart.max();
for(int p = chart.min(); p < chartMax; ++p)
if (group->getFiberDimension(p))
newGroup->updatePoint(p, group->restrictPoint(p));
Modified: short/3D/PyLith/trunk/pylith/topology/RefineUniform.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/RefineUniform.py 2008-09-21 02:44:18 UTC (rev 12926)
+++ short/3D/PyLith/trunk/pylith/topology/RefineUniform.py 2008-09-21 04:12:58 UTC (rev 12927)
@@ -67,6 +67,7 @@
self._setupLogging()
logEvent = "%srefine" % self._loggingPrefix
self._logger.eventBegin(logEvent)
+ self._info.log("Refining mesh.")
self._createCppHandle()
More information about the cig-commits
mailing list