Skip to content

Commit 69485cc

Browse files
committed
fix generating Polygons with per-element data
1 parent 67fa6c2 commit 69485cc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

module/develop/Gendat/Gendat.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ inline Scalar computeData(Scalar x, Scalar y, Scalar z, DataMode mode, Scalar sc
179179
return 0.;
180180
}
181181

182-
void setDataCells(Scalar *d, const GridInterface *grid, DataMode mode, Scalar scale, AnimDataMode anim, Index time)
182+
void setDataCells(Scalar *d, const ElementInterface *grid, DataMode mode, Scalar scale, AnimDataMode anim, Index time)
183183
{
184184
Index numElem = grid->getNumElements();
185185
for (Index idx = 0; idx < numElem; ++idx) {
@@ -521,7 +521,8 @@ void Gendat::block(Reader::Token &token, Index bx, Index by, Index bz, vistle::I
521521

522522
const int dtime = time < 0 ? 0 : time;
523523
if (elementData) {
524-
const GridInterface *grid = geoOut->getInterface<GridInterface>();
524+
const ElementInterface *grid = geoOut->getInterface<ElementInterface>();
525+
assert(grid);
525526
if (scalar) {
526527
setDataCells(scalar->x().data(), grid, (DataMode)m_dataModeScalar->getValue(),
527528
m_dataScaleScalar->getValue(), (AnimDataMode)m_animData->getValue(), dtime);

0 commit comments

Comments
 (0)