[cig-commits] r15085 - short/3D/PyLith/trunk/libsrc/meshio

brad at geodynamics.org brad at geodynamics.org
Fri May 29 11:45:02 PDT 2009


Author: brad
Date: 2009-05-29 11:45:01 -0700 (Fri, 29 May 2009)
New Revision: 15085

Modified:
   short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
Log:
Switched to creating dimensioned section using cloneSection().

Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc	2009-05-29 18:22:44 UTC (rev 15084)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc	2009-05-29 18:45:01 UTC (rev 15085)
@@ -221,17 +221,7 @@
     if (!_fields->hasField(fieldName.c_str())) {
       _fields->add(fieldName.c_str(), fieldIn.label());
       field_type& fieldOut = _fields->get(fieldName.c_str());
-      const ALE::Obj<typename mesh_type::RealSection>& sectionIn = fieldIn.section();
-      assert(!sectionIn.isNull());
-      const typename mesh_type::RealSection::chart_type chart = sectionIn->getChart();
-      const typename mesh_type::RealSection::chart_type::const_iterator chartBegin =
-	chart.begin();
-      const typename mesh_type::RealSection::chart_type::const_iterator chartEnd =
-	chart.end();
-      const int fiberDim = (chartBegin != chartEnd) ? 
-	sectionIn->getFiberDimension(*chartBegin) : 0;
-      fieldOut.newSection(chart, fiberDim);
-      fieldOut.allocate();
+      fieldOut.cloneSection(fieldIn);
       fieldOut.vectorFieldType(fieldIn.vectorFieldType());
       fieldOut.scale(fieldIn.scale());
     } // if



More information about the CIG-COMMITS mailing list