Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

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

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

parent 12f100b7
This diff is collapsed.
...@@ -46,6 +46,7 @@ private: ...@@ -46,6 +46,7 @@ private:
// Specific Topology Converters // Specific Topology Converters
class HexahedronToHexahedron64; class HexahedronToHexahedron64;
class Hexahedron64ToHexahedron;
// Point comparator // Point comparator
class PointComparison; class PointComparison;
......
...@@ -62,5 +62,18 @@ int main(int argc, char* argv[]) ...@@ -62,5 +62,18 @@ int main(int argc, char* argv[])
assert(i == hex64Grid->getTopology()->getArray()->getValueCopy<unsigned int>(i)); 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; 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