Commit 913103ec authored by Henry Weller's avatar Henry Weller
Browse files

Rename circulators to be consistent with the standard OpenFOAM class naming convention

parent 65e8e227
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -31,8 +31,8 @@ Description
#include "List.H"
#include "ListOps.H"
#include "face.H"
#include "circulator.H"
#include "const_circulator.H"
#include "Circulator.H"
#include "ConstCirculator.H"
using namespace Foam;
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
face f(identity(4));
const_circulator<face> cStart(f);
ConstCirculator<face> cStart(f);
if (cStart.size()) do
{
......@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
Info<< nl << nl << "Test non-const circulator" << nl << endl;
circulator<face> cStart2(f);
Circulator<face> cStart2(f);
Info<< "Face before : " << f << endl;
......@@ -138,7 +138,7 @@ int main(int argc, char *argv[])
Info<< nl << nl << "Zero face" << nl << endl;
face fZero;
circulator<face> cZero(fZero);
Circulator<face> cZero(fZero);
if (cZero.size()) do
{
......@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
fZero = face(identity(5));
// circulator was invalidated so reset
cZero = circulator<face>(fZero);
cZero = Circulator<face>(fZero);
do
{
......@@ -161,8 +161,8 @@ int main(int argc, char *argv[])
Info<< nl << nl << "Simultaneously go forwards/backwards over face " << f
<< nl << endl;
const_circulator<face> circForward(f);
const_circulator<face> circBackward(f);
ConstCirculator<face> circForward(f);
ConstCirculator<face> circBackward(f);
if (circForward.size() && circBackward.size()) do
{
......
......@@ -27,7 +27,7 @@ License
#include "vectorTools.H"
#include "triangle.H"
#include "tetrahedron.H"
#include "const_circulator.H"
#include "ConstCirculator.H"
#include "DelaunayMeshTools.H"
#include "OBJstream.H"
......@@ -183,8 +183,8 @@ void Foam::conformalVoronoiMesh::createEdgePointGroupByCirculating
const List<sideVolumeType>& normalVolumeTypes = feMesh.normalVolumeTypes();
const_circulator<labelList> circ(edNormalIs);
const_circulator<labelList> circNormalDirs(feNormalDirections);
ConstCirculator<labelList> circ(edNormalIs);
ConstCirculator<labelList> circNormalDirs(feNormalDirections);
Map<Foam::point> masterPoints;
Map<vertexType> masterPointsTypes;
......
......@@ -29,7 +29,7 @@ License
#include "conformalVoronoiMesh.H"
#include "cellShapeControl.H"
#include "DelaunayMeshTools.H"
#include "const_circulator.H"
#include "ConstCirculator.H"
#include "backgroundMeshDecomposition.H"
#include "autoPtr.H"
#include "mapDistribute.H"
......@@ -233,7 +233,7 @@ void Foam::featurePointConformer::createMasterAndSlavePoints
// Info<< nl << featPt << " " << pointEdgeTypes;
const_circulator<labelList> circ(featPtEdges);
ConstCirculator<labelList> circ(featPtEdges);
// Loop around the edges of the feature point
if (circ.size()) do
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::circulator
Foam::Circulator
Description
Walks over a container as if it were circular. The container must have the
......@@ -38,10 +38,10 @@ Description
\code
face f(identity(5));
// Construct circulator from the face
circulator<face> circ(f);
// Construct Circulator from the face
Circulator<face> circ(f);
// First check that the circulator has a size to iterate over.
// First check that the Circulator has a size to iterate over.
// Then circulate around the list starting and finishing at the fulcrum.
if (circ.size()) do
{
......@@ -53,12 +53,12 @@ Description
\endcode
SourceFiles
circulatorI.H
CirculatorI.H
\*---------------------------------------------------------------------------*/
#ifndef circulator_H
#define circulator_H
#ifndef Circulator_H
#define Circulator_H
#include "CirculatorBase.H"
......@@ -69,11 +69,11 @@ namespace Foam
/*---------------------------------------------------------------------------*\
Class circulator Declaration
Class Circulator Declaration
\*---------------------------------------------------------------------------*/
template<class ContainerType>
class circulator
class Circulator
:
public CirculatorBase
{
......@@ -122,20 +122,20 @@ public:
// Constructors
//- Construct null
inline circulator();
inline Circulator();
//- Construct from a container.
inline explicit circulator(ContainerType& container);
inline explicit Circulator(ContainerType& container);
//- Construct from two iterators
inline circulator(const iterator& begin, const iterator& end);
inline Circulator(const iterator& begin, const iterator& end);
//- Construct as copy
inline circulator(const circulator<ContainerType>&);
inline Circulator(const Circulator<ContainerType>&);
//- Destructor
~circulator();
~Circulator();
// Member Functions
......@@ -153,7 +153,7 @@ public:
inline void setIteratorToFulcrum();
//- Return the distance between the iterator and the fulcrum. This is
// equivalent to the number of rotations of the circulator.
// equivalent to the number of rotations of the Circulator.
inline difference_type nRotations() const;
//- Dereference the next iterator and return
......@@ -165,37 +165,37 @@ public:
// Member Operators
//- Assignment operator for circulators that operate on the same
//- Assignment operator for Circulators that operate on the same
// container type
inline void operator=(const circulator<ContainerType>&);
inline void operator=(const Circulator<ContainerType>&);
//- Prefix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end
inline circulator<ContainerType>& operator++();
inline Circulator<ContainerType>& operator++();
//- Postfix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end
inline circulator<ContainerType> operator++(int);
inline Circulator<ContainerType> operator++(int);
//- Prefix decrement. Decrements the iterator.
// Sets the iterator to the end of the container if it reaches
// the beginning
inline circulator<ContainerType>& operator--();
inline Circulator<ContainerType>& operator--();
//- Postfix decrement. Decrements the iterator.
// Sets the iterator to the end of the container if it reaches
// the beginning
inline circulator<ContainerType> operator--(int);
inline Circulator<ContainerType> operator--(int);
//- Check for equality of this iterator with another iterator that
// operate on the same container type
inline bool operator==(const circulator<ContainerType>& c) const;
inline bool operator==(const Circulator<ContainerType>& c) const;
//- Check for inequality of this iterator with another iterator that
// operate on the same container type
inline bool operator!=(const circulator<ContainerType>& c) const;
inline bool operator!=(const Circulator<ContainerType>& c) const;
//- Dereference the iterator and return
inline reference operator*() const;
......@@ -207,7 +207,7 @@ public:
// that operate on the same container type
inline difference_type operator-
(
const circulator<ContainerType>& c
const Circulator<ContainerType>& c
) const;
};
......@@ -218,7 +218,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "circulatorI.H"
#include "CirculatorI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ContainerType>
Foam::circulator<ContainerType>::circulator()
Foam::Circulator<ContainerType>::Circulator()
:
CirculatorBase(),
begin_(0),
......@@ -37,7 +37,7 @@ Foam::circulator<ContainerType>::circulator()
template<class ContainerType>
Foam::circulator<ContainerType>::circulator(ContainerType& container)
Foam::Circulator<ContainerType>::Circulator(ContainerType& container)
:
CirculatorBase(),
begin_(container.begin()),
......@@ -48,7 +48,7 @@ Foam::circulator<ContainerType>::circulator(ContainerType& container)
template<class ContainerType>
Foam::circulator<ContainerType>::circulator
Foam::Circulator<ContainerType>::Circulator
(
const iterator& begin,
const iterator& end
......@@ -63,9 +63,9 @@ Foam::circulator<ContainerType>::circulator
template<class ContainerType>
Foam::circulator<ContainerType>::circulator
Foam::Circulator<ContainerType>::Circulator
(
const circulator<ContainerType>& rhs
const Circulator<ContainerType>& rhs
)
:
CirculatorBase(),
......@@ -79,22 +79,22 @@ Foam::circulator<ContainerType>::circulator
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ContainerType>
Foam::circulator<ContainerType>::~circulator()
Foam::Circulator<ContainerType>::~Circulator()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ContainerType>
typename Foam::circulator<ContainerType>::size_type
Foam::circulator<ContainerType>::size() const
typename Foam::Circulator<ContainerType>::size_type
Foam::Circulator<ContainerType>::size() const
{
return end_ - begin_;
}
template<class ContainerType>
bool Foam::circulator<ContainerType>::circulate
bool Foam::Circulator<ContainerType>::circulate
(
const CirculatorBase::direction dir
)
......@@ -113,30 +113,30 @@ bool Foam::circulator<ContainerType>::circulate
template<class ContainerType>
void Foam::circulator<ContainerType>::setFulcrumToIterator()
void Foam::Circulator<ContainerType>::setFulcrumToIterator()
{
fulcrum_ = iter_;
}
template<class ContainerType>
void Foam::circulator<ContainerType>::setIteratorToFulcrum()
void Foam::Circulator<ContainerType>::setIteratorToFulcrum()
{
iter_ = fulcrum_;
}
template<class ContainerType>
typename Foam::circulator<ContainerType>::difference_type
Foam::circulator<ContainerType>::nRotations() const
typename Foam::Circulator<ContainerType>::difference_type
Foam::Circulator<ContainerType>::nRotations() const
{
return (iter_ - fulcrum_);
}
template<class ContainerType>
typename Foam::circulator<ContainerType>::reference
Foam::circulator<ContainerType>::next() const
typename Foam::Circulator<ContainerType>::reference
Foam::Circulator<ContainerType>::next() const
{
if (iter_ == end_ - 1)
{
......@@ -148,8 +148,8 @@ Foam::circulator<ContainerType>::next() const
template<class ContainerType>
typename Foam::circulator<ContainerType>::reference
Foam::circulator<ContainerType>::prev() const
typename Foam::Circulator<ContainerType>::reference
Foam::Circulator<ContainerType>::prev() const
{
if (iter_ == begin_)
{
......@@ -163,9 +163,9 @@ Foam::circulator<ContainerType>::prev() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class ContainerType>
void Foam::circulator<ContainerType>::operator=
void Foam::Circulator<ContainerType>::operator=
(
const circulator<ContainerType>& rhs
const Circulator<ContainerType>& rhs
)
{
// Check for assignment to self
......@@ -173,8 +173,8 @@ void Foam::circulator<ContainerType>::operator=
{
FatalErrorIn
(
"Foam::circulator<ContainerType>::operator="
"(const Foam::circulator<ContainerType>&)"
"Foam::Circulator<ContainerType>::operator="
"(const Foam::Circulator<ContainerType>&)"
) << "Attempted assignment to self"
<< abort(FatalError);
}
......@@ -187,8 +187,8 @@ void Foam::circulator<ContainerType>::operator=
template<class ContainerType>
Foam::circulator<ContainerType>&
Foam::circulator<ContainerType>::operator++()
Foam::Circulator<ContainerType>&
Foam::Circulator<ContainerType>::operator++()
{
++iter_;
if (iter_ == end_)
......@@ -201,18 +201,18 @@ Foam::circulator<ContainerType>::operator++()
template<class ContainerType>
Foam::circulator<ContainerType>
Foam::circulator<ContainerType>::operator++(int)
Foam::Circulator<ContainerType>
Foam::Circulator<ContainerType>::operator++(int)
{
circulator<ContainerType> tmp = *this;
Circulator<ContainerType> tmp = *this;
++(*this);
return tmp;
}
template<class ContainerType>
Foam::circulator<ContainerType>&
Foam::circulator<ContainerType>::operator--()
Foam::Circulator<ContainerType>&
Foam::Circulator<ContainerType>::operator--()
{
if (iter_ == begin_)
{
......@@ -225,19 +225,19 @@ Foam::circulator<ContainerType>::operator--()
template<class ContainerType>
Foam::circulator<ContainerType>
Foam::circulator<ContainerType>::operator--(int)
Foam::Circulator<ContainerType>
Foam::Circulator<ContainerType>::operator--(int)
{
circulator<ContainerType> tmp = *this;
Circulator<ContainerType> tmp = *this;
--(*this);
return tmp;
}
template<class ContainerType>
bool Foam::circulator<ContainerType>::operator==
bool Foam::Circulator<ContainerType>::operator==
(
const circulator<ContainerType>& c
const Circulator<ContainerType>& c
) const
{
return
......@@ -251,9 +251,9 @@ bool Foam::circulator<ContainerType>::operator==
template<class ContainerType>
bool Foam::circulator<ContainerType>::operator!=
bool Foam::Circulator<ContainerType>::operator!=
(
const circulator<ContainerType>& c
const Circulator<ContainerType>& c
) const
{
return !(*this == c);
......@@ -261,26 +261,26 @@ bool Foam::circulator<ContainerType>::operator!=
template<class ContainerType>
typename Foam::circulator<ContainerType>::reference
Foam::circulator<ContainerType>::operator*() const
typename Foam::Circulator<ContainerType>::reference
Foam::Circulator<ContainerType>::operator*() const
{
return *iter_;
}
template<class ContainerType>
typename Foam::circulator<ContainerType>::reference
Foam::circulator<ContainerType>::operator()() const
typename Foam::Circulator<ContainerType>::reference
Foam::Circulator<ContainerType>::operator()() const
{
return operator*();
}
template<class ContainerType>
typename Foam::circulator<ContainerType>::difference_type
Foam::circulator<ContainerType>::operator-
typename Foam::Circulator<ContainerType>::difference_type
Foam::Circulator<ContainerType>::operator-
(
const circulator<ContainerType>& c
const Circulator<ContainerType>& c
) const
{
return iter_ - c.iter_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::const_circulator
Foam::ConstCirculator
Description
Walks over a container as if it were circular. The container must have the
......@@ -39,7 +39,7 @@ Description
face f(identity(5));
// Construct circulator from the face
const_circulator<face> circ(f);
ConstCirculator<face> circ(f);
// First check that the circulator has a size to iterate over.
// Then circulate around the list starting and finishing at the fulcrum.
......@@ -53,8 +53,8 @@ Description
\code
face f(identity(5));
const_circulator<face> circClockwise(f);
const_circulator<face> circAnticlockwise(f);
ConstCirculator<face> circClockwise(f);
ConstCirculator<face> circAnticlockwise(f);
if (circClockwise.size() && circAnticlockwise.size()) do
{
......@@ -69,12 +69,12 @@ Description
\endcode
SourceFiles
const_circulatorI.H
ConstCirculatorI.H
\*---------------------------------------------------------------------------*/
#ifndef const_circulator_H
#define const_circulator_H
#ifndef ConstCirculator_H
#define ConstCirculator_H
#include "CirculatorBase.H"
......@@ -85,11 +85,11 @@ namespace Foam
/*---------------------------------------------------------------------------*\
Class const_circulator Declaration
Class ConstCirculator Declaration
\*---------------------------------------------------------------------------*/
template<class ContainerType>
class const_circulator
class ConstCirculator
:
public CirculatorBase
{
......@@ -138,24 +138,24 @@ public:
// Constructors
//- Construct null
inline const_circulator();
inline ConstCirculator();
//- Construct from a container.
inline explicit const_circulator(const ContainerType& container);
inline explicit ConstCirculator(const ContainerType& container);
//- Construct from two iterators
inline const_circulator
inline ConstCirculator
(
const const_iterator& begin,
const const_iterator& end
);
//- Construct as copy
inline const_circulator(const const_circulator<ContainerType>&);
inline ConstCirculator(const ConstCirculator<ContainerType>&);
//- Destructor
~const_circulator();
~ConstCirculator();
// Member Functions
......@@ -187,35 +187,35 @@ public:
//- Assignment operator for circulators that operate on the same
// container type
inline void operator=(const const_circulator<ContainerType>&);
inline void operator=(const ConstCirculator<ContainerType>&);
//- Prefix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end
inline const_circulator<ContainerType>& operator++();
inline ConstCirculator<ContainerType>& operator++();
//- Postfix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end