Commit 2834193c authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: remove "originalVersion" face handling

- an old pre-OpenFOAM transitional feature (prior to 2004)
  for named faces.
parent 9ee870e0
......@@ -32,9 +32,6 @@ License
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
const Foam::IOstreamOption::versionNumber
Foam::IOstreamOption::originalVersion(0,5);
const Foam::IOstreamOption::versionNumber
Foam::IOstreamOption::currentVersion(2,0);
......
......@@ -187,9 +187,6 @@ public:
//- Stream format names (ascii, binary)
static const Enum<streamFormat> formatNames;
//- The original version number
static const versionNumber originalVersion;
//- The current version number
static const versionNumber currentVersion;
......
......@@ -60,14 +60,12 @@ SourceFiles
namespace Foam
{
// Forward declarations
// Forward Declarations
class face;
class triFace;
template<class T, int SizeMin> class DynamicList;
inline Istream& operator>>(Istream& is, face& f);
/*---------------------------------------------------------------------------*\
Class face Declaration
\*---------------------------------------------------------------------------*/
......@@ -138,15 +136,15 @@ public:
EDGE // Close to edge
};
// Static data members
// Static Data Members
static const char* const typeName;
// Constructors
//- Construct null
inline face();
//- Default construct
face() = default;
//- Construct given size, with invalid point labels (-1)
inline explicit face(const label sz);
......@@ -174,7 +172,7 @@ public:
// Member Functions
//- Collapse face by removing duplicate point labels
// return the collapsed size
// \return the collapsed size
label collapse();
//- Flip the face in-place.
......@@ -363,7 +361,7 @@ public:
//- Split into triangles using existing points.
// Result in triFaces[triI..triI+nTri].
// Splits intelligently to maximize triangle quality.
// Returns number of faces created.
// \Return number of faces created.
label triangles
(
const UList<point>& points,
......@@ -373,7 +371,7 @@ public:
//- Split into triangles using existing points.
// Append to DynamicList.
// Returns number of faces created.
// \Return number of faces created.
template<int SizeMin>
label triangles
(
......@@ -412,11 +410,6 @@ public:
//- Return true if the faces have the same vertices
static bool sameVertices(const face& a, const face& b);
// Istream Operator
friend Istream& operator>>(Istream& is, face& f);
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2017-2018 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -28,14 +28,12 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Edge to the right of face vertex i
inline Foam::label Foam::face::right(const label i) const
{
return i;
}
// Edge to the left of face vertex i
inline Foam::label Foam::face::left(const label i) const
{
return rcIndex(i);
......@@ -44,10 +42,6 @@ inline Foam::label Foam::face::left(const label i) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline Foam::face::face()
{}
inline Foam::face::face(const label sz)
:
labelList(sz, -1)
......@@ -80,9 +74,9 @@ inline Foam::face::face(labelList&& list)
inline Foam::face::face(Istream& is)
{
is >> *this;
}
:
labelList(is)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
......@@ -178,31 +172,4 @@ inline bool Foam::operator!=(const face& a, const face& b)
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
inline Foam::Istream& Foam::operator>>(Istream& is, face& f)
{
if (is.version() == IOstreamOption::originalVersion)
{
// Read starting (
is.readBegin("face");
// Read the 'name' token for the face
token t(is);
// Read labels
is >> static_cast<labelList&>(f);
// Read end)
is.readEnd("face");
}
else
{
is >> static_cast<labelList&>(f);
}
is.check(FUNCTION_NAME);
return is;
}
// ************************************************************************* //
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