[cig-commits] r19848 - short/3D/PyLith/trunk/libsrc/pylith/meshio
brad at geodynamics.org
brad at geodynamics.org
Thu Mar 22 08:17:51 PDT 2012
Author: brad
Date: 2012-03-22 08:17:51 -0700 (Thu, 22 Mar 2012)
New Revision: 19848
Modified:
short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc
short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc
Log:
Fixed bug in creation of interpolation section. Create section if it doesn't exist.
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc 2012-03-22 14:43:22 UTC (rev 19847)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc 2012-03-22 15:17:51 UTC (rev 19848)
@@ -248,7 +248,7 @@
throw std::logic_error("Unknown field type");
} // switch
- if (0 == _fields)
+ if (!_fields)
_fields = new topology::Fields<field_type>(fieldIn.mesh());
if (!_fields->hasField(fieldName.c_str())) {
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc 2012-03-22 14:43:22 UTC (rev 19847)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc 2012-03-22 15:17:51 UTC (rev 19848)
@@ -255,7 +255,7 @@
topology::Field<topology::Mesh>& fieldInterp =
_fields->get("buffer (interpolated)");
- if (vertices->size()*fiberDim != fieldInterp.sectionSize()) {
+ if (fieldInterp.section().isNull() || vertices->size()*fiberDim != fieldInterp.sectionSize()) {
fieldInterp.newSection(vertices, fiberDim);
fieldInterp.label(field.label());
fieldInterp.allocate();
More information about the CIG-COMMITS
mailing list