Commit 68d4ee41 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Add Hexahedron_64() to Hexahedron() Topology Conversion.

parent 12f100b7
This diff is collapsed.
......@@ -46,6 +46,7 @@ private:
// Specific Topology Converters
class HexahedronToHexahedron64;
class Hexahedron64ToHexahedron;
// Point comparator
class PointComparison;
......
......@@ -62,5 +62,18 @@ int main(int argc, char* argv[])
assert(i == hex64Grid->getTopology()->getArray()->getValueCopy<unsigned int>(i));
}
/*
* Hexahedron_64 to Hexahedron
*/
boost::shared_ptr<XdmfGrid> newHexGrid = converter->convert(hex64Grid, XdmfTopologyType::Hexahedron());
assert(newHexGrid->getGeometry()->getGeometryType() == XdmfGeometryType::XYZ());
assert(newHexGrid->getGeometry()->getNumberPoints() == 64);
for(unsigned int i=0; i<192; ++i)
{
assert(fabs(expectedPoints[i] - newHexGrid->getGeometry()->getArray()->getValueCopy<double>(i)) < epsilon);
}
assert(newHexGrid->getTopology()->getTopologyType() == XdmfTopologyType::Hexahedron());
assert(newHexGrid->getTopology()->getNumberElements() == 27);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment