STYLE: replace unused indirect{Cell,Face,Point}List typedefs

- provide shorter versions: pointIndList, pointUIndList, etc.
  and indirect versions of commonly used types:
     labelIndList, scalarIndList, vectorIndList
This commit is contained in:
Mark Olesen
2017-10-04 08:50:30 +02:00
parent 90c8c6d174
commit 44cfc93b82
24 changed files with 500 additions and 56 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,23 +22,33 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::indirectFaceList
Foam::cellIndList
Description
An IndirectList of cells.
Typedef
Foam::cellUIndList
Description
A UIndirectList of cells.
\*---------------------------------------------------------------------------*/
#ifndef indirectFaceList_H
#define indirectFaceList_H
#ifndef cellIndList_H
#define cellIndList_H
#include "face.H"
// Include all normal list typedefs as well
#include "cellList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<face> indirectFaceList;
typedef IndirectList<cell> cellIndList;
typedef UIndirectList<cell> cellUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -25,7 +25,25 @@ Typedef
Foam::cellList
Description
list of cells
A List of cells.
Typedef
Foam::cellUList
Description
A UList of cells.
Typedef
Foam::cellSubList
Description
A SubList of cells.
Typedef
Foam::cellListList
Description
A List of cellList.
\*---------------------------------------------------------------------------*/
@ -34,15 +52,8 @@ Description
#include "cell.H"
#include "List.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef List<cell> cellList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "SubList.H"
#include "cellListFwd.H"
#endif

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,24 +21,30 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::indirectCellList
Header
cellListFwd.H
Description
Forwards for various types of cell lists
\*---------------------------------------------------------------------------*/
#ifndef indirectCellList_H
#define indirectCellList_H
#ifndef cellListFwd_H
#define cellListFwd_H
#include "cell.H"
#include "IndirectList.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<cell> indirectCellList;
class cell;
typedef UList<cell> cellUList;
typedef List<cell> cellList;
typedef SubList<cell> cellSubList;
typedef List<cellList> cellListList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,23 +22,33 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::indirectPointList
Foam::edgeIndList
Description
An IndirectList of edges.
Typedef
Foam::edgeUIndList
Description
A UIndirectList of edges.
\*---------------------------------------------------------------------------*/
#ifndef indirectPointList_H
#define indirectPointList_H
#ifndef edgeIndList_H
#define edgeIndList_H
#include "point.H"
// Include all normal list typedefs as well
#include "edgeList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<point> indirectPointList;
typedef IndirectList<edge> edgeIndList;
typedef UIndirectList<edge> edgeUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,18 +24,42 @@ License
Typedef
Foam::edgeList
Description
A List of edges.
Typedef
Foam::edgeUList
Description
A UList of edges.
Typedef
Foam::edgeSubList
Description
A SubList of edges.
Typedef
Foam::edgeListList
Description
A List of edgeList.
\*---------------------------------------------------------------------------*/
#ifndef edgeList_H
#define edgeList_H
#include "edge.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef UList<edge> edgeUList;
typedef List<edge> edgeList;
typedef SubList<edge> edgeSubList;
typedef List<edgeList> edgeListList;
}

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::faceIndList
Description
An IndirectList of faces.
Typedef
Foam::faceUIndList
Description
A UIndirectList of faces.
\*---------------------------------------------------------------------------*/
#ifndef faceIndList_H
#define faceIndList_H
// Include all normal list typedefs as well
#include "faceList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<face> faceIndList;
typedef UIndirectList<face> faceUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -25,6 +25,25 @@ Typedef
Foam::faceList
Description
A List of faces.
Typedef
Foam::faceUList
Description
A UList of faces.
Typedef
Foam::faceSubList
Description
A SubList of faces.
Typedef
Foam::faceListList
Description
A List of faceList.
\*---------------------------------------------------------------------------*/
@ -36,8 +55,6 @@ Description
#include "SubList.H"
#include "faceListFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -21,10 +21,11 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::faceListFwd
Header
faceListFwd.H
Description
Forwards for various types of face lists
\*---------------------------------------------------------------------------*/
@ -39,6 +40,7 @@ Description
namespace Foam
{
class face;
typedef UList<face> faceUList;
typedef List<face> faceList;
typedef SubList<face> faceSubList;

View File

@ -33,7 +33,7 @@ Description
#include "face.H"
#include "PrimitivePatch.H"
#include "indirectFaceList.H"
#include "IndirectList.H"
#include "pointField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -25,7 +25,7 @@ Typedef
Foam::indirectPrimitivePatch
Description
Foam::indirectPrimitivePatch
A PrimitivePatch using an IndirectList for the faces.
\*---------------------------------------------------------------------------*/

View File

@ -25,7 +25,7 @@ Typedef
Foam::uindirectPrimitivePatch
Description
Foam::uindirectPrimitivePatch
A PrimitivePatch using a UIndirectList for the faces.
\*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::pointIndList
Description
An IndirectList of points.
Typedef
Foam::pointUIndList
Description
A UIndirectList of points.
\*---------------------------------------------------------------------------*/
#ifndef pointIndList_H
#define pointIndList_H
// Include all normal list typedefs as well
#include "pointList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<point> pointIndList;
typedef UIndirectList<point> pointUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -25,13 +25,25 @@ Typedef
Foam::pointList
Description
A List of points
A List of points.
Typedef
Foam::pointUList
Description
A UList of points.
Typedef
Foam::pointSubList
Description
A SubList of points.
Typedef
Foam::pointListList
Description
A List of labelList
A List of pointList.
\*---------------------------------------------------------------------------*/
@ -40,14 +52,15 @@ Description
#include "point.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Note: frequently used UList version is located in container itself
typedef UList<point> pointUList;
typedef List<point> pointList;
typedef SubList<point> pointSubList;
typedef List<pointList> pointListList;
}

View File

@ -37,13 +37,19 @@ Typedef
Foam::labelPairList
Description
List of labelPairs
List of labelPairs.
Typedef
Foam::labelPairUList
Description
UList of labelPairs
UList of labelPairs.
Typedef
Foam::labelPairSubList
Description
A SubList of labelPairs.
\*---------------------------------------------------------------------------*/
@ -51,6 +57,7 @@ Description
#define labelPair_H
#include "List.H"
#include "SubList.H"
#include "Pair.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,6 +68,7 @@ namespace Foam
typedef Pair<labelPair> labelPairPair;
typedef List<labelPair> labelPairList;
typedef UList<labelPair> labelPairUList;
typedef SubList<labelPair> labelPairSubList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::scalarIndList
Description
An IndirectList of scalars.
Typedef
Foam::scalarUIndList
Description
A UIndirectList of scalars.
\*---------------------------------------------------------------------------*/
#ifndef scalarIndList_H
#define scalarIndList_H
// Include all normal list typedefs as well
#include "scalarList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<scalar> scalarIndList;
typedef UIndirectList<scalar> scalarUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -21,9 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Specialisation of List\<T\> for scalar.
\*---------------------------------------------------------------------------*/
#include "scalarList.H"

View File

@ -33,6 +33,18 @@ Typedef
Description
A List of scalars.
Typedef
Foam::scalarSubList
Description
A SubList of scalars.
Typedef
Foam::scalarListList
Description
A List of scalarList.
\*---------------------------------------------------------------------------*/
#ifndef scalarList_H
@ -40,14 +52,15 @@ Description
#include "scalar.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef UList<scalar> scalarUList;
typedef List<scalar> scalarList;
typedef SubList<scalar> scalarSubList;
typedef List<scalarList> scalarListList;
}

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::vectorIndList
Description
An IndirectList of vectors.
Typedef
Foam::vectorUIndList
Description
A UIndirectList of vectors.
\*---------------------------------------------------------------------------*/
#ifndef vectorIndList_H
#define vectorIndList_H
// Include all normal list typedefs as well
#include "vectorList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<vector> vectorIndList;
typedef UIndirectList<vector> vectorUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -33,6 +33,18 @@ Typedef
Description
A List of vectors.
Typedef
Foam::vectorSubList
Description
A SubList of vectors.
Typedef
Foam::vectorListList
Description
A List of vectorList.
\*---------------------------------------------------------------------------*/
#ifndef vectorList_H
@ -40,14 +52,16 @@ Description
#include "vector.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef UList<vector> vectorUList;
typedef List<vector> vectorList;
typedef SubList<vector> vectorSubList;
typedef List<vectorList> vectorListList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::labelIndList
Description
A IndirectList of labels.
Typedef
Foam::labelUIndList
Description
An UIndirectList of labels.
\*---------------------------------------------------------------------------*/
#ifndef labelIndList_H
#define labelIndList_H
// Include all normal list typedefs as well
#include "labelList.H"
#include "IndirectList.H"
#include "UIndirectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IndirectList<label> labelIndList;
typedef UIndirectList<label> labelUIndList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,19 +25,25 @@ Typedef
Foam::labelList
Description
A List of labels
A List of labels.
Typedef
Foam::labelSubList
Description
A SubList of labels.
Typedef
Foam::labelListList
Description
A List of labelList
A List of labelList.
Typedef
Foam::labelListListList
Description
A List of labelListList
A List of labelListList.
\*---------------------------------------------------------------------------*/
@ -46,14 +52,16 @@ Description
#include "label.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Note: frequently used UList version is located in container itself
// Note: frequently used labelUList is defined in UList itself
typedef List<label> labelList;
typedef SubList<label> labelSubList;
typedef List<labelList> labelListList;
typedef List<labelListList> labelListListList;
}

View File

@ -33,6 +33,12 @@ Typedef
Description
A List of fileNames.
Typedef
Foam::fileNameSubList
Description
A SubList of fileNames.
\*---------------------------------------------------------------------------*/
#ifndef fileNameList_H
@ -40,14 +46,15 @@ Description
#include "fileName.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef UList<fileName> fileNameUList;
typedef List<fileName> fileNameList;
typedef SubList<fileName> fileNameSubList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -33,6 +33,12 @@ Typedef
Description
A List of strings.
Typedef
Foam::stringSubList
Description
A SubList of strings.
\*---------------------------------------------------------------------------*/
#ifndef stringList_H
@ -40,14 +46,15 @@ Description
#include "string.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef UList<string> stringUList;
typedef List<string> stringList;
typedef SubList<string> stringSubList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -33,6 +33,12 @@ Typedef
Description
A List of words.
Typedef
Foam::wordSubList
Description
A SubList of words.
\*---------------------------------------------------------------------------*/
#ifndef wordList_H
@ -40,14 +46,15 @@ Description
#include "word.H"
#include "List.H"
#include "SubList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef UList<word> wordUList;
typedef List<word> wordList;
typedef SubList<word> wordSubList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //