Commit 4d7caa34 authored by Max Lyon's avatar Max Lyon

add method to get cell type and to get a string for the cell type

parent 2b4c35e9
......@@ -2669,7 +2669,14 @@ HexExtractor::CellType HexExtractor::computeCellType(CellHandle ch)
else if (sign == ORI_BELOW)
return Flipped;
else
return Proper;
return Proper;
}
HexExtractor::CellType HexExtractor::getCellType(CellHandle ch)
{
if (!cellTypesComputed)
computeCellTypes();
return cellTypes[ch];
}
void HexExtractor::randomizeParametrization(double offsetSize, double keepBoundary)
......@@ -4018,8 +4025,8 @@ void HexExtractor::calculateEdgeSingularity(EdgeHandle eh)
std::cout << "accumulated tran fun " << std::endl << accTranFun << std::endl;
for (auto vh : vertices)
{
std::cout << "face 1: " << parameter(inputMesh.incident_cell(transitionFace), vh) << (isCellFlipped(inputMesh.incident_cell(transitionFace)) ? " inverted" : " not inverted") << std::endl;
std::cout << "face 2: " << parameter(currentCell, vh) << (isCellFlipped(currentCell) ? " inverted" : " not inverted") << std::endl;
std::cout << "face 1: " << parameter(inputMesh.incident_cell(transitionFace), vh) << " Cell is " << to_string(getCellType(inputMesh.incident_cell(transitionFace))) << std::endl;
std::cout << "face 2: " << parameter(currentCell, vh) << " Cell is " << to_string(getCellType(currentCell)) << std::endl;
}
......
......@@ -60,6 +60,21 @@ private:
Degenerate
};
std::string to_string(CellType type)
{
switch (type)
{
case NotComputed:
return "NotComputed";
case Proper:
return "Proper";
case Flipped:
return "Flipped";
case Degenerate:
return "Degenerate";
}
}
public:
HexExtractor();
......@@ -373,6 +388,7 @@ private:
void computeCellTypes();
CellType computeCellType(CellHandle ch);
CellType getCellType(CellHandle ch);
void randomizeParametrization(double offsetSize, double keepBoundary = false);
......
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