diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C index 1b3bf6e19b..0c567ee312 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C @@ -62,6 +62,7 @@ namespace Foam }; } + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::hexRef8::reorder @@ -80,7 +81,7 @@ void Foam::hexRef8::reorder if (newI >= len) { - FatalErrorIn("hexRef8::reorder") << abort(FatalError); + FatalErrorIn("hexRef8::reorder(..)") << abort(FatalError); } if (newI >= 0) @@ -557,22 +558,11 @@ Foam::label Foam::hexRef8::getAnchorCell } // Problem. - - // Pick up points of the cell - const labelList cPoints(cellPoints(cellI)); - - Perr<< "cell:" << cellI << " points:" << endl; - forAll(cPoints, i) - { - label pointI = cPoints[i]; - - Perr<< " " << pointI << " coord:" << mesh_.points()[pointI] - << nl; - } + dumpCell(cellI); Perr<< "cell:" << cellI << " anchorPoints:" << cellAnchorPoints[cellI] << endl; - FatalErrorIn("hexRef8::getAnchorCell") + FatalErrorIn("hexRef8::getAnchorCell(..)") << "Could not find point " << pointI << " in the anchorPoints for cell " << cellI << endl << "Does your original mesh obey the 2:1 constraint and" @@ -690,9 +680,50 @@ Foam::label Foam::hexRef8::countAnchors } +void Foam::hexRef8::dumpCell(const label cellI) const +{ + OFstream str(mesh_.time().path()/"cell_" + Foam::name(cellI) + ".obj"); + Pout<< "hexRef8 : Dumping cell as obj to " << str.name() << endl; + + const cell& cFaces = mesh_.cells()[cellI]; + + Map