Skip to content

Commit bce80d8

Browse files
committed
Mapped values are now stored with FMT_ITEM if applicable.
1 parent ecf7512 commit bce80d8

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

FECore/FECorePlot.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ bool FEPlotParameter::SetFilter(const char* sz)
102102
}
103103

104104
SetVarType(PLT_FLOAT);
105+
106+
FEMappedValue* mapval = dynamic_cast<FEMappedValue*>(p.valuator());
107+
if (mapval)
108+
{
109+
FEDomainMap* map = dynamic_cast<FEDomainMap*>(mapval->dataMap()); assert(map);
110+
if (map->StorageFormat() == FMT_ITEM) SetStorageFormat(FMT_ITEM);
111+
}
105112
}
106113
break;
107114
case FE_PARAM_VEC3D_MAPPED:
@@ -315,6 +322,19 @@ bool FEPlotParameter::Save(FEDomain& dom, FEDataStream& a)
315322

316323
return true;
317324
}
325+
else if (map->StorageFormat() == FMT_ITEM)
326+
{
327+
assert(StorageFormat() == FMT_ITEM);
328+
// loop over all elements
329+
int NE = dom.Elements();
330+
for (int i = 0; i < NE; ++i)
331+
{
332+
a << map->get<double>(i);
333+
}
334+
335+
return true;
336+
}
337+
318338
}
319339

320340
writeNodalProjectedElementValues<double>(sd, a, mapDouble);

0 commit comments

Comments
 (0)