Commit 96b24c46 authored by Mark Olesen's avatar Mark Olesen
Browse files

meshReader - remove old LEAVE_UNUSED_POINTS code

parent 91cb6d29
......@@ -30,9 +30,6 @@ Description
#include "meshReader.H"
// for transition - in case someone really relied on the old behaviour
#undef LEAVE_UNUSED_POINTS
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::meshReader::calcPointCells() const
......@@ -46,7 +43,7 @@ void Foam::meshReader::calcPointCells() const
<< abort(FatalError);
}
label nPoints = points().size();
label nPoints = points_.size();
pointCellsPtr_ = new labelListList(nPoints);
labelListList& ptCells = *pointCellsPtr_;
......@@ -132,19 +129,15 @@ void Foam::meshReader::calcPointCells() const
// report unused points
if (nPoints > pointI)
{
#ifdef LEAVE_UNUSED_POINTS
FatalErrorIn("meshReader::calcPointCells() const")
<< "mesh has " << (nPoints - pointI)
<< " points that were declared but not used" << endl;
#else
Info<< "removing " << (nPoints - pointI) << " unused points" << endl;
nPoints = pointI;
// adjust points and truncate
inplaceReorder(oldToNew, points());
points().setSize(nPoints);
// adjust points and truncate - bend const-ness
pointField& adjustedPoints = const_cast<pointField&>(points_);
inplaceReorder(oldToNew, adjustedPoints);
adjustedPoints.setSize(nPoints);
// adjust pointCells and truncate
inplaceReorder(oldToNew, ptCells);
......@@ -162,7 +155,6 @@ void Foam::meshReader::calcPointCells() const
inplaceRenumber(oldToNew, faces[i]);
}
}
#endif
}
}
......
......@@ -142,7 +142,7 @@ Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh
"constant",
registry
),
points(),
points_,
meshFaces_,
cellPolys_
)
......
......@@ -291,13 +291,6 @@ protected:
//- Subclasses are required to supply this information
virtual bool readGeometry(const scalar scaleFactor = 1.0) = 0;
//- Return mesh points
pointField& points() const
{
return const_cast<pointField&>(points_);
}
public:
// Static Members
......
Supports Markdown
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