BUG: foamyHexMesh: Reference to temporary. Some code cleanup.

This commit is contained in:
laurence
2013-07-30 14:21:15 +01:00
parent 1269eb2e97
commit d0be901c63
2 changed files with 24 additions and 53 deletions

View File

@ -25,17 +25,6 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Triangulation>
inline const Foam::Time& Foam::DelaunayMesh<Triangulation>::time() const
{
@ -70,23 +59,6 @@ void Foam::DelaunayMesh<Triangulation>::timeCheck
}
template<class Triangulation>
inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const
{
label id = vertexCount_++;
if (id == labelMax)
{
WarningIn
(
"Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const"
) << "Vertex counter has overflowed." << endl;
}
return id;
}
template<class Triangulation>
inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewCellIndex() const
{
@ -105,16 +77,26 @@ inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewCellIndex() const
template<class Triangulation>
Foam::label Foam::DelaunayMesh<Triangulation>::cellCount() const
inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const
{
return cellCount_;
label id = vertexCount_++;
if (id == labelMax)
{
WarningIn
(
"Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const"
) << "Vertex counter has overflowed." << endl;
}
return id;
}
template<class Triangulation>
void Foam::DelaunayMesh<Triangulation>::resetCellCount()
Foam::label Foam::DelaunayMesh<Triangulation>::cellCount() const
{
cellCount_ = 0;
return cellCount_;
}
@ -125,6 +107,13 @@ Foam::label Foam::DelaunayMesh<Triangulation>::vertexCount() const
}
template<class Triangulation>
void Foam::DelaunayMesh<Triangulation>::resetCellCount()
{
cellCount_ = 0;
}
template<class Triangulation>
void Foam::DelaunayMesh<Triangulation>::resetVertexCount()
{
@ -132,22 +121,4 @@ void Foam::DelaunayMesh<Triangulation>::resetVertexCount()
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -1135,7 +1135,7 @@ void Foam::conformalVoronoiMesh::move()
&& pointToBeRetained[vB->index()] == true
)
{
Foam::point pt(0.5*(dVA + dVB));
const Foam::point pt(0.5*(dVA + dVB));
if (internalPointIsInside(pt))
{
@ -1271,7 +1271,7 @@ void Foam::conformalVoronoiMesh::move()
)
)
{
const Foam::point& newPt = 0.5*(dVA + dVB);
const Foam::point newPt(0.5*(dVA + dVB));
if (positionOnThisProc(newPt))
{
@ -1315,7 +1315,7 @@ void Foam::conformalVoronoiMesh::move()
&& pointToBeRetained[vB->index()] == true
)
{
Foam::point pt(0.5*(dVA + dVB));
const Foam::point pt(0.5*(dVA + dVB));
if (internalPointIsInside(pt))
{