Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
913103ec
Commit
913103ec
authored
Aug 06, 2015
by
Henry Weller
Browse files
Rename circulators to be consistent with the standard OpenFOAM class naming convention
parent
65e8e227
Changes
8
Hide whitespace changes
Inline
Side-by-side
applications/test/Circulator/Test-Circulator.C
View file @
913103ec
...
...
@@ -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
"
c
irculator.H"
#include
"
c
onst
_c
irculator.H"
#include
"
C
irculator.H"
#include
"
C
onst
C
irculator.H"
using
namespace
Foam
;
...
...
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
face
f
(
identity
(
4
));
c
onst
_c
irculator
<
face
>
cStart
(
f
);
C
onst
C
irculator
<
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
;
c
irculator
<
face
>
cStart2
(
f
);
C
irculator
<
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
;
c
irculator
<
face
>
cZero
(
fZero
);
C
irculator
<
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
=
c
irculator
<
face
>
(
fZero
);
cZero
=
C
irculator
<
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
;
c
onst
_c
irculator
<
face
>
circForward
(
f
);
c
onst
_c
irculator
<
face
>
circBackward
(
f
);
C
onst
C
irculator
<
face
>
circForward
(
f
);
C
onst
C
irculator
<
face
>
circBackward
(
f
);
if
(
circForward
.
size
()
&&
circBackward
.
size
())
do
{
...
...
applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C
View file @
913103ec
...
...
@@ -27,7 +27,7 @@ License
#include
"vectorTools.H"
#include
"triangle.H"
#include
"tetrahedron.H"
#include
"
c
onst
_c
irculator.H"
#include
"
C
onst
C
irculator.H"
#include
"DelaunayMeshTools.H"
#include
"OBJstream.H"
...
...
@@ -183,8 +183,8 @@ void Foam::conformalVoronoiMesh::createEdgePointGroupByCirculating
const
List
<
sideVolumeType
>&
normalVolumeTypes
=
feMesh
.
normalVolumeTypes
();
c
onst
_c
irculator
<
labelList
>
circ
(
edNormalIs
);
c
onst
_c
irculator
<
labelList
>
circNormalDirs
(
feNormalDirections
);
C
onst
C
irculator
<
labelList
>
circ
(
edNormalIs
);
C
onst
C
irculator
<
labelList
>
circNormalDirs
(
feNormalDirections
);
Map
<
Foam
::
point
>
masterPoints
;
Map
<
vertexType
>
masterPointsTypes
;
...
...
applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C
View file @
913103ec
...
...
@@ -29,7 +29,7 @@ License
#include
"conformalVoronoiMesh.H"
#include
"cellShapeControl.H"
#include
"DelaunayMeshTools.H"
#include
"
c
onst
_c
irculator.H"
#include
"
C
onst
C
irculator.H"
#include
"backgroundMeshDecomposition.H"
#include
"autoPtr.H"
#include
"mapDistribute.H"
...
...
@@ -233,7 +233,7 @@ void Foam::featurePointConformer::createMasterAndSlavePoints
// Info<< nl << featPt << " " << pointEdgeTypes;
c
onst
_c
irculator
<
labelList
>
circ
(
featPtEdges
);
C
onst
C
irculator
<
labelList
>
circ
(
featPtEdges
);
// Loop around the edges of the feature point
if
(
circ
.
size
())
do
...
...
src/OpenFOAM/containers/Circulators/
c
irculator/
c
irculator.H
→
src/OpenFOAM/containers/Circulators/
C
irculator/
C
irculator.H
View file @
913103ec
...
...
@@ -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::
c
irculator
Foam::
C
irculator
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
c
irculator from the face
c
irculator<face> circ(f);
// Construct
C
irculator from the face
C
irculator<face> circ(f);
// First check that the
c
irculator has a size to iterate over.
// First check that the
C
irculator 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
c
irculatorI.H
C
irculatorI.H
\*---------------------------------------------------------------------------*/
#ifndef
c
irculator_H
#define
c
irculator_H
#ifndef
C
irculator_H
#define
C
irculator_H
#include
"CirculatorBase.H"
...
...
@@ -69,11 +69,11 @@ namespace Foam
/*---------------------------------------------------------------------------*\
Class
c
irculator Declaration
Class
C
irculator Declaration
\*---------------------------------------------------------------------------*/
template
<
class
ContainerType
>
class
c
irculator
class
C
irculator
:
public
CirculatorBase
{
...
...
@@ -122,20 +122,20 @@ public:
// Constructors
//- Construct null
inline
c
irculator
();
inline
C
irculator
();
//- Construct from a container.
inline
explicit
c
irculator
(
ContainerType
&
container
);
inline
explicit
C
irculator
(
ContainerType
&
container
);
//- Construct from two iterators
inline
c
irculator
(
const
iterator
&
begin
,
const
iterator
&
end
);
inline
C
irculator
(
const
iterator
&
begin
,
const
iterator
&
end
);
//- Construct as copy
inline
c
irculator
(
const
c
irculator
<
ContainerType
>&
);
inline
C
irculator
(
const
C
irculator
<
ContainerType
>&
);
//- Destructor
~
c
irculator
();
~
C
irculator
();
// 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
c
irculator.
// equivalent to the number of rotations of the
C
irculator.
inline
difference_type
nRotations
()
const
;
//- Dereference the next iterator and return
...
...
@@ -165,37 +165,37 @@ public:
// Member Operators
//- Assignment operator for
c
irculators that operate on the same
//- Assignment operator for
C
irculators that operate on the same
// container type
inline
void
operator
=
(
const
c
irculator
<
ContainerType
>&
);
inline
void
operator
=
(
const
C
irculator
<
ContainerType
>&
);
//- Prefix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end
inline
c
irculator
<
ContainerType
>&
operator
++
();
inline
C
irculator
<
ContainerType
>&
operator
++
();
//- Postfix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end
inline
c
irculator
<
ContainerType
>
operator
++
(
int
);
inline
C
irculator
<
ContainerType
>
operator
++
(
int
);
//- Prefix decrement. Decrements the iterator.
// Sets the iterator to the end of the container if it reaches
// the beginning
inline
c
irculator
<
ContainerType
>&
operator
--
();
inline
C
irculator
<
ContainerType
>&
operator
--
();
//- Postfix decrement. Decrements the iterator.
// Sets the iterator to the end of the container if it reaches
// the beginning
inline
c
irculator
<
ContainerType
>
operator
--
(
int
);
inline
C
irculator
<
ContainerType
>
operator
--
(
int
);
//- Check for equality of this iterator with another iterator that
// operate on the same container type
inline
bool
operator
==
(
const
c
irculator
<
ContainerType
>&
c
)
const
;
inline
bool
operator
==
(
const
C
irculator
<
ContainerType
>&
c
)
const
;
//- Check for inequality of this iterator with another iterator that
// operate on the same container type
inline
bool
operator
!=
(
const
c
irculator
<
ContainerType
>&
c
)
const
;
inline
bool
operator
!=
(
const
C
irculator
<
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
c
irculator
<
ContainerType
>&
c
const
C
irculator
<
ContainerType
>&
c
)
const
;
};
...
...
@@ -218,7 +218,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include
"
c
irculatorI.H"
#include
"
C
irculatorI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/OpenFOAM/containers/Circulators/
c
irculator/
c
irculatorI.H
→
src/OpenFOAM/containers/Circulators/
C
irculator/
C
irculatorI.H
View file @
913103ec
...
...
@@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::
c
irculator
()
Foam
::
C
irculator
<
ContainerType
>::
C
irculator
()
:
CirculatorBase
(),
begin_
(
0
),
...
...
@@ -37,7 +37,7 @@ Foam::circulator<ContainerType>::circulator()
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::
c
irculator
(
ContainerType
&
container
)
Foam
::
C
irculator
<
ContainerType
>::
C
irculator
(
ContainerType
&
container
)
:
CirculatorBase
(),
begin_
(
container
.
begin
()),
...
...
@@ -48,7 +48,7 @@ Foam::circulator<ContainerType>::circulator(ContainerType& container)
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::
c
irculator
Foam
::
C
irculator
<
ContainerType
>::
C
irculator
(
const
iterator
&
begin
,
const
iterator
&
end
...
...
@@ -63,9 +63,9 @@ Foam::circulator<ContainerType>::circulator
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::
c
irculator
Foam
::
C
irculator
<
ContainerType
>::
C
irculator
(
const
c
irculator
<
ContainerType
>&
rhs
const
C
irculator
<
ContainerType
>&
rhs
)
:
CirculatorBase
(),
...
...
@@ -79,22 +79,22 @@ Foam::circulator<ContainerType>::circulator
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::~
c
irculator
()
Foam
::
C
irculator
<
ContainerType
>::~
C
irculator
()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
size_type
Foam
::
c
irculator
<
ContainerType
>::
size
()
const
typename
Foam
::
C
irculator
<
ContainerType
>::
size_type
Foam
::
C
irculator
<
ContainerType
>::
size
()
const
{
return
end_
-
begin_
;
}
template
<
class
ContainerType
>
bool
Foam
::
c
irculator
<
ContainerType
>::
circulate
bool
Foam
::
C
irculator
<
ContainerType
>::
circulate
(
const
CirculatorBase
::
direction
dir
)
...
...
@@ -113,30 +113,30 @@ bool Foam::circulator<ContainerType>::circulate
template
<
class
ContainerType
>
void
Foam
::
c
irculator
<
ContainerType
>::
setFulcrumToIterator
()
void
Foam
::
C
irculator
<
ContainerType
>::
setFulcrumToIterator
()
{
fulcrum_
=
iter_
;
}
template
<
class
ContainerType
>
void
Foam
::
c
irculator
<
ContainerType
>::
setIteratorToFulcrum
()
void
Foam
::
C
irculator
<
ContainerType
>::
setIteratorToFulcrum
()
{
iter_
=
fulcrum_
;
}
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
difference_type
Foam
::
c
irculator
<
ContainerType
>::
nRotations
()
const
typename
Foam
::
C
irculator
<
ContainerType
>::
difference_type
Foam
::
C
irculator
<
ContainerType
>::
nRotations
()
const
{
return
(
iter_
-
fulcrum_
);
}
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
reference
Foam
::
c
irculator
<
ContainerType
>::
next
()
const
typename
Foam
::
C
irculator
<
ContainerType
>::
reference
Foam
::
C
irculator
<
ContainerType
>::
next
()
const
{
if
(
iter_
==
end_
-
1
)
{
...
...
@@ -148,8 +148,8 @@ Foam::circulator<ContainerType>::next() const
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
reference
Foam
::
c
irculator
<
ContainerType
>::
prev
()
const
typename
Foam
::
C
irculator
<
ContainerType
>::
reference
Foam
::
C
irculator
<
ContainerType
>::
prev
()
const
{
if
(
iter_
==
begin_
)
{
...
...
@@ -163,9 +163,9 @@ Foam::circulator<ContainerType>::prev() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template
<
class
ContainerType
>
void
Foam
::
c
irculator
<
ContainerType
>::
operator
=
void
Foam
::
C
irculator
<
ContainerType
>::
operator
=
(
const
c
irculator
<
ContainerType
>&
rhs
const
C
irculator
<
ContainerType
>&
rhs
)
{
// Check for assignment to self
...
...
@@ -173,8 +173,8 @@ void Foam::circulator<ContainerType>::operator=
{
FatalErrorIn
(
"Foam::
c
irculator<ContainerType>::operator="
"(const Foam::
c
irculator<ContainerType>&)"
"Foam::
C
irculator<ContainerType>::operator="
"(const Foam::
C
irculator<ContainerType>&)"
)
<<
"Attempted assignment to self"
<<
abort
(
FatalError
);
}
...
...
@@ -187,8 +187,8 @@ void Foam::circulator<ContainerType>::operator=
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>&
Foam
::
c
irculator
<
ContainerType
>::
operator
++
()
Foam
::
C
irculator
<
ContainerType
>&
Foam
::
C
irculator
<
ContainerType
>::
operator
++
()
{
++
iter_
;
if
(
iter_
==
end_
)
...
...
@@ -201,18 +201,18 @@ Foam::circulator<ContainerType>::operator++()
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::
operator
++
(
int
)
Foam
::
C
irculator
<
ContainerType
>
Foam
::
C
irculator
<
ContainerType
>::
operator
++
(
int
)
{
c
irculator
<
ContainerType
>
tmp
=
*
this
;
C
irculator
<
ContainerType
>
tmp
=
*
this
;
++
(
*
this
);
return
tmp
;
}
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>&
Foam
::
c
irculator
<
ContainerType
>::
operator
--
()
Foam
::
C
irculator
<
ContainerType
>&
Foam
::
C
irculator
<
ContainerType
>::
operator
--
()
{
if
(
iter_
==
begin_
)
{
...
...
@@ -225,19 +225,19 @@ Foam::circulator<ContainerType>::operator--()
template
<
class
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>
Foam
::
c
irculator
<
ContainerType
>::
operator
--
(
int
)
Foam
::
C
irculator
<
ContainerType
>
Foam
::
C
irculator
<
ContainerType
>::
operator
--
(
int
)
{
c
irculator
<
ContainerType
>
tmp
=
*
this
;
C
irculator
<
ContainerType
>
tmp
=
*
this
;
--
(
*
this
);
return
tmp
;
}
template
<
class
ContainerType
>
bool
Foam
::
c
irculator
<
ContainerType
>::
operator
==
bool
Foam
::
C
irculator
<
ContainerType
>::
operator
==
(
const
c
irculator
<
ContainerType
>&
c
const
C
irculator
<
ContainerType
>&
c
)
const
{
return
...
...
@@ -251,9 +251,9 @@ bool Foam::circulator<ContainerType>::operator==
template
<
class
ContainerType
>
bool
Foam
::
c
irculator
<
ContainerType
>::
operator
!=
bool
Foam
::
C
irculator
<
ContainerType
>::
operator
!=
(
const
c
irculator
<
ContainerType
>&
c
const
C
irculator
<
ContainerType
>&
c
)
const
{
return
!
(
*
this
==
c
);
...
...
@@ -261,26 +261,26 @@ bool Foam::circulator<ContainerType>::operator!=
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
reference
Foam
::
c
irculator
<
ContainerType
>::
operator
*
()
const
typename
Foam
::
C
irculator
<
ContainerType
>::
reference
Foam
::
C
irculator
<
ContainerType
>::
operator
*
()
const
{
return
*
iter_
;
}
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
reference
Foam
::
c
irculator
<
ContainerType
>::
operator
()()
const
typename
Foam
::
C
irculator
<
ContainerType
>::
reference
Foam
::
C
irculator
<
ContainerType
>::
operator
()()
const
{
return
operator
*
();
}
template
<
class
ContainerType
>
typename
Foam
::
c
irculator
<
ContainerType
>::
difference_type
Foam
::
c
irculator
<
ContainerType
>::
operator
-
typename
Foam
::
C
irculator
<
ContainerType
>::
difference_type
Foam
::
C
irculator
<
ContainerType
>::
operator
-
(
const
c
irculator
<
ContainerType
>&
c
const
C
irculator
<
ContainerType
>&
c
)
const
{
return
iter_
-
c
.
iter_
;
...
...
src/OpenFOAM/containers/Circulators/
c
onst
_c
irculator/
c
onst
_c
irculator.H
→
src/OpenFOAM/containers/Circulators/
C
onst
C
irculator/
C
onst
C
irculator.H
View file @
913103ec
...
...
@@ -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::
c
onst
_c
irculator
Foam::
C
onst
C
irculator
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
c
onst
_c
irculator<face> circ(f);
C
onst
C
irculator<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));
c
onst
_c
irculator<face> circClockwise(f);
c
onst
_c
irculator<face> circAnticlockwise(f);
C
onst
C
irculator<face> circClockwise(f);
C
onst
C
irculator<face> circAnticlockwise(f);
if (circClockwise.size() && circAnticlockwise.size()) do
{
...
...
@@ -69,12 +69,12 @@ Description
\endcode
SourceFiles
c
onst
_c
irculatorI.H
C
onst
C
irculatorI.H
\*---------------------------------------------------------------------------*/
#ifndef
c
onst
_c
irculator_H
#define
c
onst
_c
irculator_H
#ifndef
C
onst
C
irculator_H
#define
C
onst
C
irculator_H
#include
"CirculatorBase.H"
...
...
@@ -85,11 +85,11 @@ namespace Foam
/*---------------------------------------------------------------------------*\
Class
c
onst
_c
irculator Declaration
Class
C
onst
C
irculator Declaration
\*---------------------------------------------------------------------------*/
template
<
class
ContainerType
>
class
c
onst
_c
irculator
class
C
onst
C
irculator
:
public
CirculatorBase
{
...
...
@@ -138,24 +138,24 @@ public:
// Constructors
//- Construct null
inline
c
onst
_c
irculator
();
inline
C
onst
C
irculator
();
//- Construct from a container.
inline
explicit
c
onst
_c
irculator
(
const
ContainerType
&
container
);
inline
explicit
C
onst
C
irculator
(
const
ContainerType
&
container
);
//- Construct from two iterators
inline
c
onst
_c
irculator
inline
C
onst
C
irculator
(
const
const_iterator
&
begin
,
const
const_iterator
&
end
);
//- Construct as copy
inline
c
onst
_c
irculator
(
const
c
onst
_c
irculator
<
ContainerType
>&
);
inline
C
onst
C
irculator
(
const
C
onst
C
irculator
<
ContainerType
>&
);
//- Destructor
~
c
onst
_c
irculator
();
~
C
onst
C
irculator
();
// Member Functions
...
...
@@ -187,35 +187,35 @@ public:
//- Assignment operator for circulators that operate on the same
// container type
inline
void
operator
=
(
const
c
onst
_c
irculator
<
ContainerType
>&
);
inline
void
operator
=
(
const
C
onst
C
irculator
<
ContainerType
>&
);
//- Prefix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches
// the end
inline
c
onst
_c
irculator
<
ContainerType
>&
operator
++
();
inline
C
onst
C
irculator
<
ContainerType
>&
operator
++
();
//- Postfix increment. Increments the iterator.
// Sets the iterator to the beginning of the container if it reaches