[cig-commits] r19271 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio
brad at geodynamics.org
brad at geodynamics.org
Mon Dec 5 15:49:07 PST 2011
Author: brad
Date: 2011-12-05 15:49:06 -0800 (Mon, 05 Dec 2011)
New Revision: 19271
Modified:
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc
Log:
Small code cleanup (no change in behavior).
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc 2011-12-05 21:36:23 UTC (rev 19270)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc 2011-12-05 23:49:06 UTC (rev 19271)
@@ -198,12 +198,12 @@
assert(!section.isNull());
assert(!sieveMesh->getLabelStratum(labelName, 0).isNull());
- const int localFiberDim =
+ int fiberDimLocal =
(sieveMesh->getLabelStratum(labelName, 0)->size() > 0) ?
section->getFiberDimension(*sieveMesh->getLabelStratum(labelName, 0)->begin()) : 0;
int fiberDim = 0;
- MPI_Allreduce((void *) &localFiberDim, (void *) &fiberDim, 1,
- MPI_INT, MPI_MAX, field.mesh().comm());
+ MPI_Allreduce(&fiberDimLocal, &fiberDim, 1, MPI_INT, MPI_MAX,
+ field.mesh().comm());
assert(fiberDim > 0);
const int enforceDim =
(field.vectorFieldType() != topology::FieldBase::VECTOR) ? fiberDim : 3;
@@ -254,8 +254,8 @@
const ALE::Obj<SieveMesh>& sieveMesh = field.mesh().sieveMesh();
assert(!sieveMesh.isNull());
const int cellDepth = (sieveMesh->depth() == -1) ? -1 : 1;
- const int depth = (0 == label) ? cellDepth : labelId;
- const std::string labelName = (0 == label) ?
+ const int depth = (!label) ? cellDepth : labelId;
+ const std::string labelName = (!label) ?
((sieveMesh->hasLabel("censored depth")) ?
"censored depth" : "depth") : label;
assert(!sieveMesh->getFactory().isNull());
More information about the CIG-COMMITS
mailing list