Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
integration-cfmesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
integration-cfmesh
Commits
82d09444
Commit
82d09444
authored
Jun 28, 2018
by
Mark Olesen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Final content for 1806 release Closes
#4
See merge request
!4
parents
3bc78e5b
288f05e0
Changes
49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
598 additions
and
730 deletions
+598
-730
Allwclean
Allwclean
+6
-5
Allwmake
Allwmake
+1
-5
executables/cartesianMesh/cartesianMesh.C
executables/cartesianMesh/cartesianMesh.C
+2
-5
executables/pMesh/pMesh.C
executables/pMesh/pMesh.C
+2
-3
executables/tetMesh/tetMesh.C
executables/tetMesh/tetMesh.C
+3
-6
meshLibrary/utilities/boundaryLayers/boundaryLayers/boundaryLayersCreateVertices.C
...ndaryLayers/boundaryLayers/boundaryLayersCreateVertices.C
+2
-2
meshLibrary/utilities/boundaryLayers/extrudeLayer/extrudeLayerI.H
...ary/utilities/boundaryLayers/extrudeLayer/extrudeLayerI.H
+2
-2
meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C
...ryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C
+4
-4
meshLibrary/utilities/containers/DynList/DynList.C
meshLibrary/utilities/containers/DynList/DynList.C
+34
-23
meshLibrary/utilities/containers/DynList/DynList.H
meshLibrary/utilities/containers/DynList/DynList.H
+117
-118
meshLibrary/utilities/containers/DynList/DynListI.H
meshLibrary/utilities/containers/DynList/DynListI.H
+310
-421
meshLibrary/utilities/containers/FRWGraph/FRWGraph.H
meshLibrary/utilities/containers/FRWGraph/FRWGraph.H
+0
-1
meshLibrary/utilities/containers/FRWGraph/FRWGraphI.H
meshLibrary/utilities/containers/FRWGraph/FRWGraphI.H
+0
-11
meshLibrary/utilities/containers/LongList/LongList.H
meshLibrary/utilities/containers/LongList/LongList.H
+0
-1
meshLibrary/utilities/containers/LongList/LongListI.H
meshLibrary/utilities/containers/LongList/LongListI.H
+0
-7
meshLibrary/utilities/containers/VRWGraph/VRWGraph.H
meshLibrary/utilities/containers/VRWGraph/VRWGraph.H
+0
-1
meshLibrary/utilities/containers/VRWGraph/VRWGraphI.H
meshLibrary/utilities/containers/VRWGraph/VRWGraphI.H
+0
-10
meshLibrary/utilities/containers/graphRow/graphConstRow.H
meshLibrary/utilities/containers/graphRow/graphConstRow.H
+0
-1
meshLibrary/utilities/containers/graphRow/graphConstRowI.H
meshLibrary/utilities/containers/graphRow/graphConstRowI.H
+0
-10
meshLibrary/utilities/containers/graphRow/graphRow.H
meshLibrary/utilities/containers/graphRow/graphRow.H
+0
-1
meshLibrary/utilities/containers/graphRow/graphRowI.H
meshLibrary/utilities/containers/graphRow/graphRowI.H
+0
-7
meshLibrary/utilities/containers/subGraph/subGraph.H
meshLibrary/utilities/containers/subGraph/subGraph.H
+0
-1
meshLibrary/utilities/containers/subGraph/subGraphI.H
meshLibrary/utilities/containers/subGraph/subGraphI.H
+0
-11
meshLibrary/utilities/decomposeCells/decomposeCellsPyramids.C
...Library/utilities/decomposeCells/decomposeCellsPyramids.C
+1
-1
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenCellsI.H
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenCellsI.H
+1
-1
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenFaces.C
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenFaces.C
+4
-6
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenFacesI.H
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenFacesI.H
+1
-1
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenPointsI.H
...Library/utilities/meshes/polyMeshGen/polyMeshGenPointsI.H
+1
-1
meshLibrary/utilities/meshes/polyMeshGenAddressing/polyMeshGenAddressingParallelAddressing.C
...shGenAddressing/polyMeshGenAddressingParallelAddressing.C
+2
-2
meshLibrary/utilities/meshes/primitives/meshSubsets/meshSubset.H
...rary/utilities/meshes/primitives/meshSubsets/meshSubset.H
+1
-1
meshLibrary/utilities/meshes/primitives/meshSubsets/meshSubsetI.H
...ary/utilities/meshes/primitives/meshSubsets/meshSubsetI.H
+1
-1
meshLibrary/utilities/meshes/triSurf/triSurfFacets.C
meshLibrary/utilities/meshes/triSurf/triSurfFacets.C
+4
-6
meshLibrary/utilities/meshes/triSurf/triSurfFacetsI.H
meshLibrary/utilities/meshes/triSurf/triSurfFacetsI.H
+1
-1
meshLibrary/utilities/meshes/triSurf/triSurfFeatureEdgesI.H
meshLibrary/utilities/meshes/triSurf/triSurfFeatureEdgesI.H
+1
-1
meshLibrary/utilities/meshes/triSurf/triSurfPointsI.H
meshLibrary/utilities/meshes/triSurf/triSurfPointsI.H
+1
-1
meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingParallelAddressing.C
...OctreeAddressing/meshOctreeAddressingParallelAddressing.C
+1
-1
meshLibrary/utilities/smoothers/geometry/meshOptimizer/meshOptimizerOptimizePointParallel.C
...ometry/meshOptimizer/meshOptimizerOptimizePointParallel.C
+1
-1
meshLibrary/utilities/smoothers/geometry/meshSurfaceOptimizer/meshSurfaceOptimizerOptimizePointParallel.C
...faceOptimizer/meshSurfaceOptimizerOptimizePointParallel.C
+1
-1
meshLibrary/utilities/smoothers/topology/checkIrregularSurfaceConnections/checkIrregularSurfaceConnectionsFunctions.C
...ceConnections/checkIrregularSurfaceConnectionsFunctions.C
+2
-2
meshLibrary/utilities/surfaceTools/meshSurfaceEngine/meshSurfaceEngineParallelAddressing.C
...s/meshSurfaceEngine/meshSurfaceEngineParallelAddressing.C
+2
-2
meshLibrary/utilities/surfaceTools/meshSurfaceMapper2D/meshSurfaceMapper2DMapVertices.C
...ools/meshSurfaceMapper2D/meshSurfaceMapper2DMapVertices.C
+1
-1
meshLibrary/voronoiMesh/voronoiMeshExtractor/voronoiMeshExtractorAddressing.C
...esh/voronoiMeshExtractor/voronoiMeshExtractorAddressing.C
+1
-1
tutorials/pMesh/bunnyPoly/Allrun-parallel
tutorials/pMesh/bunnyPoly/Allrun-parallel
+19
-0
tutorials/pMesh/bunnyPoly/system/decomposeParDict.6
tutorials/pMesh/bunnyPoly/system/decomposeParDict.6
+20
-0
utilities/importSurfaceAsSubset/importSurfaceAsSubset.C
utilities/importSurfaceAsSubset/importSurfaceAsSubset.C
+1
-3
utilities/preparePar/Make/options
utilities/preparePar/Make/options
+3
-8
utilities/preparePar/preparePar.C
utilities/preparePar/preparePar.C
+44
-27
utilities/scaleSurfaceMesh/scaleSurfaceMesh.C
utilities/scaleSurfaceMesh/scaleSurfaceMesh.C
+0
-1
utilities/surfaceFeatureEdges/surfaceFeatureEdges.C
utilities/surfaceFeatureEdges/surfaceFeatureEdges.C
+0
-3
No files found.
Allwclean
View file @
82d09444
#!/bin/sh
# Compile mesh library
wclean libso meshLibrary
cd
${
0
%/*
}
||
exit
1
# Run from this directory
# Compile executables
wclean all executables
#------------------------------------------------------------------------------
# Compile utilities
wclean libso meshLibrary
wclean all executables
wclean all utilities
#------------------------------------------------------------------------------
Allwmake
View file @
82d09444
#!/bin/sh
cd
${
0
%/*
}
||
exit
1
# Run from this directory
# Parse arguments for library compilation
if
[
-f
$WM_PROJECT_DIR
/wmake/scripts/AllwmakeParseArguments
]
...
...
@@ -13,13 +14,8 @@ echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
echo
"
${
WM_OPTIONS
}
, with
${
WM_MPLIB
}
${
FOAM_MPI
}
"
echo
# Compile mesh library
wmake libso meshLibrary
# Compile executables
wmake all executables
# Compile utilities
wmake all utilities
# Some summary information
...
...
executables/cartesianMesh/cartesianMesh.C
View file @
82d09444
...
...
@@ -36,8 +36,6 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int
main
(
int
argc
,
char
*
argv
[])
{
#include "setRootCase.H"
...
...
@@ -45,11 +43,10 @@ int main(int argc, char *argv[])
Module
::
cartesianMeshGenerator
cmg
(
runTime
);
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s
\n
"
<<
"ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
" s"
<<
endl
;
cmg
.
writeMesh
();
runTime
.
printExecutionTime
(
Info
);
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
...
...
executables/pMesh/pMesh.C
View file @
82d09444
...
...
@@ -46,11 +46,10 @@ int main(int argc, char *argv[])
Module
::
voronoiMeshGenerator
pmg
(
runTime
);
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s
\n
"
<<
"ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
endl
;
pmg
.
writeMesh
();
runTime
.
printExecutionTime
(
Info
);
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
...
...
executables/tetMesh/tetMesh.C
View file @
82d09444
...
...
@@ -36,23 +36,20 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int
main
(
int
argc
,
char
*
argv
[])
{
#include "setRootCase.H"
#include "createTime.H"
//
t
etrahedral mesher cannot be run in parallel yet
//
T
etrahedral mesher cannot be run in parallel yet
argList
::
noParallel
();
Module
::
tetMeshGenerator
tmg
(
runTime
);
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s
\n
"
<<
"ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
endl
;
tmg
.
writeMesh
();
runTime
.
printExecutionTime
(
Info
);
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
...
...
meshLibrary/utilities/boundaryLayers/boundaryLayers/boundaryLayersCreateVertices.C
View file @
82d09444
...
...
@@ -210,7 +210,7 @@ Foam::point Foam::Module::boundaryLayers::createNewVertex
bool
found
(
true
);
forAll
(
otherPatches
,
opI
)
{
if
(
!
pPatches
.
contains
(
bpJ
,
otherPatches
[
opI
]))
if
(
!
pPatches
.
found
(
bpJ
,
otherPatches
[
opI
]))
{
found
=
false
;
break
;
...
...
@@ -940,7 +940,7 @@ void Foam::Module::boundaryLayers::createNewEdgeVerticesParallel
bool
found
(
true
);
forAll
(
otherPatches
,
opI
)
{
if
(
!
pPatches
.
contains
(
bpJ
,
otherPatches
[
opI
]))
if
(
!
pPatches
.
found
(
bpJ
,
otherPatches
[
opI
]))
{
found
=
false
;
break
;
...
...
meshLibrary/utilities/boundaryLayers/extrudeLayer/extrudeLayerI.H
View file @
82d09444
...
...
@@ -122,7 +122,7 @@ Foam::Module::extrudeLayer::addressingCalculator::faceSharingEdge
continue
;
}
if
(
pointExtruded_
.
contains
(
nextI
,
currFaceI
))
if
(
pointExtruded_
.
found
(
nextI
,
currFaceI
))
{
if
(
otherFace
!=
-
1
)
{
...
...
@@ -152,7 +152,7 @@ inline void Foam::Module::extrudeLayer::addressingCalculator::facesSharingEdge
{
const
label
currFaceI
=
pointExtruded_
(
start
,
pfI
);
if
(
pointExtruded_
.
contains
(
end
,
currFaceI
))
if
(
pointExtruded_
.
found
(
end
,
currFaceI
))
{
edgeFaces
.
append
(
currFaceI
);
}
...
...
meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C
View file @
82d09444
...
...
@@ -487,7 +487,7 @@ void Foam::Module::refineBoundaryLayers::sortFacePoints
{
const
label
nfI
=
facesFromFace_
(
faceI
,
i
);
if
((
numSplitsI
==
1
)
&&
newFaces_
.
contains
(
nfI
,
f
.
nextLabel
(
pos
)))
if
((
numSplitsI
==
1
)
&&
newFaces_
.
found
(
nfI
,
f
.
nextLabel
(
pos
)))
{
numSplitsI
=
i
+
1
;
break
;
...
...
@@ -584,7 +584,7 @@ void Foam::Module::refineBoundaryLayers::sortFacePoints
{
const
label
nfI
=
facesFromFace_
(
faceI
,
j
);
if
((
numSplitsJ
==
1
)
&&
newFaces_
.
contains
(
nfI
,
f
.
prevLabel
(
pos
)))
if
((
numSplitsJ
==
1
)
&&
newFaces_
.
found
(
nfI
,
f
.
prevLabel
(
pos
)))
{
numSplitsJ
=
j
+
1
;
break
;
...
...
@@ -735,7 +735,7 @@ void Foam::Module::refineBoundaryLayers::sortFaceFaces
{
const
label
nfI
=
facesFromFace_
(
faceI
,
i
);
if
((
numSplitsI
==
1
)
&&
newFaces_
.
contains
(
nfI
,
f
.
nextLabel
(
pos
)))
if
((
numSplitsI
==
1
)
&&
newFaces_
.
found
(
nfI
,
f
.
nextLabel
(
pos
)))
{
numSplitsI
=
i
+
1
;
break
;
...
...
@@ -789,7 +789,7 @@ void Foam::Module::refineBoundaryLayers::sortFaceFaces
{
const
label
nfI
=
facesFromFace_
(
faceI
,
j
);
if
((
numSplitsJ
==
1
)
&&
newFaces_
.
contains
(
nfI
,
f
.
prevLabel
(
pos
)))
if
((
numSplitsJ
==
1
)
&&
newFaces_
.
found
(
nfI
,
f
.
prevLabel
(
pos
)))
{
numSplitsJ
=
j
+
1
;
break
;
...
...
meshLibrary/utilities/containers/DynList/DynList.C
View file @
82d09444
...
...
@@ -2,9 +2,12 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd |
Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C)
Creative Fields,
Ltd.
\\ / A nd |
Copyright (C) 2014-2017 Creative Fields, Ltd.
\\/ M anipulation | Copyright (C)
2018 OpenCFD
Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
License
This file is part of OpenFOAM.
...
...
@@ -27,45 +30,53 @@ License
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template
<
class
T
,
Foam
::
label
staticSize
>
Foam
::
Module
::
DynList
<
T
,
staticSize
>::
DynList
(
Istream
&
)
template
<
class
T
,
int
SizeMin
>
Foam
::
Module
::
DynList
<
T
,
SizeMin
>::
DynList
(
Istream
&
is
)
:
dataPtr_
(
nullptr
),
nAllocated_
(
0
),
staticData
_
(),
nextFree
_
(
0
)
UList
<
T
>
(
),
shortList_
(
),
heapList
_
(),
capacity
_
(
0
)
{
NotImplemented
;
is
>>
*
this
;
}
template
<
class
T
,
Foam
::
label
staticSize
>
template
<
class
T
,
int
SizeMin
>
Foam
::
Ostream
&
Foam
::
Module
::
operator
<<
(
Foam
::
Ostream
&
os
,
const
Foam
::
Module
::
DynList
<
T
,
staticSize
>&
DL
Ostream
&
os
,
const
Foam
::
Module
::
DynList
<
T
,
SizeMin
>&
list
)
{
UList
<
T
>
helper
(
DL
.
dataPtr_
,
DL
.
nextFree_
);
os
<<
helper
;
os
<<
static_cast
<
const
UList
<
T
>&>
(
list
);
return
os
;
}
template
<
class
T
,
Foam
::
label
staticSize
>
template
<
class
T
,
int
SizeMin
>
Foam
::
Istream
&
Foam
::
Module
::
operator
>>
(
Foam
::
Istream
&
is
,
Foam
::
Module
::
DynList
<
T
,
staticSize
>&
DL
Istream
&
is
,
Foam
::
Module
::
DynList
<
T
,
SizeMin
>&
list
)
{
NotImplemented
;
list
.
clearStorage
();
List
<
T
>
input
(
is
);
const
label
newLen
=
input
.
size
();
if
(
newLen
<=
SizeMin
)
{
list
.
shortList_
=
input
;
}
else
{
list
.
heapList_
.
transfer
(
input
);
}
UList
<
T
>
helper
(
DL
.
dataPtr_
,
DL
.
nextFree_
);
//is >> static_cast<List<T>&>(DL);
is
>>
helper
;
DL
.
nextFree_
=
helper
.
size
();
list
.
setSize
(
newLen
);
return
is
;
}
...
...
meshLibrary/utilities/containers/DynList/DynList.H
View file @
82d09444
...
...
@@ -2,9 +2,12 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd |
Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C)
Creative Fields,
Ltd.
\\ / A nd |
Copyright (C) 2014-2017 Creative Fields, Ltd.
\\/ M anipulation | Copyright (C)
2018 OpenCFD
Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
License
This file is part of OpenFOAM.
...
...
@@ -25,12 +28,8 @@ Class
Foam::Module::DynList
Description
A dynamic list is a 1-D vector of objects of type T which resizes
itself as necessary to accept the new objects. Internal storage
is a compact array and the list can be shrunk to compact storage.
The increase of list size is controlled by three template parameters,
which allows the list storage to either increase by the given increment
or the given multiplier and divider(allowing non-integer multiples).
Similar to DynamicList but uses a small fixed list internally to
improve multi-thread performance.
SourceFiles
DynListI.H
...
...
@@ -41,7 +40,9 @@ SourceFiles
#ifndef DynList_H
#define DynList_H
#include "UList.H"
#include "List.H"
#include "FixedList.H"
#include <type_traits>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -50,22 +51,22 @@ namespace Foam
namespace
Module
{
// Forward declaration
of template friend
// Forward declaration
s
template
<
class
T
,
label
staticSize
>
class
DynList
;
template
<
class
T
,
int
SizeMin
>
class
DynList
;
template
<
class
T
,
label
staticSize
>
template
<
class
T
,
int
SizeMin
>
Ostream
&
operator
<<
(
Ostream
&
,
const
DynList
<
T
,
staticSize
>&
Ostream
&
is
,
const
DynList
<
T
,
SizeMin
>&
list
);
template
<
class
T
,
label
staticSize
>
template
<
class
T
,
int
SizeMin
>
Istream
&
operator
>>
(
Istream
&
,
DynList
<
T
,
staticSize
>&
Istream
&
is
,
DynList
<
T
,
SizeMin
>&
list
);
...
...
@@ -73,42 +74,30 @@ Istream& operator>>
Class DynList Declaration
\*---------------------------------------------------------------------------*/
template
<
class
T
,
Foam
::
label
staticSize
=
16
>
template
<
class
T
,
int
SizeMin
=
16
>
class
DynList
:
public
UList
<
T
>
{
// Private data
//
//- pointer to the data
T
*
dataPtr_
;
//- size of the allocated data
label
nAllocated_
;
//- statically allocated data (used for short lists)
T
staticData_
[
staticSize
];
//- Number of next free element
label
nextFree_
;
static_assert
(
SizeMin
>
0
,
"Invalid min size parameter"
);
// Private data
// Private member functions
//- Statically allocated list (used for short lists)
FixedList
<
T
,
SizeMin
>
shortList_
;
//-
access to the data pointer
inline
T
*
data
()
;
//-
List allocated from heap (for longer lists)
List
<
T
>
heapList_
;
//-
const access to the data pointer
inline
const
T
*
data
()
const
;
//-
The capacity (allocated size) of the underlying list.
label
capacity_
;
//- allocate list size
inline
void
allocateSize
(
const
label
);
//- check if index is inside the scope (used for debugging only)
inline
void
checkIndex
(
const
label
)
const
;
// Private Member Functions
//-
check if nAllocated_ is greater or equal to nextFree_
//-
Verify that size() is within capacity()
inline
void
checkAllocation
()
const
;
public:
// Constructors
...
...
@@ -117,9 +106,11 @@ public:
inline
DynList
();
//- Construct given size
explicit
inline
DynList
(
const
label
);
// This is inconsistent with DynamicList, which sets the reserve size.
explicit
inline
DynList
(
const
label
nElem
);
//- Construct given integer size
// This is inconsistent with DynamicList, which sets the reserve size.
#if WM_LABEL_SIZE == 64
explicit
inline
DynList
(
const
int32_t
nElem
)
:
...
...
@@ -127,123 +118,131 @@ public:
{}
#endif
//- Construct
from given size and defualt value
explicit
inline
DynList
(
const
label
,
const
T
&
);
//- Construct
with given size and value for all elements.
inline
DynList
(
const
label
nElem
,
const
T
&
val
);
//- Construct
from UList. nextFree_ set to size().
explicit
inline
DynList
(
const
UList
<
T
>&
);
//- Construct
with given size initializing all elements to zero
inline
DynList
(
const
label
nElem
,
const
zero
);
//- Construct from other ListType
template
<
class
ListType
>
inline
DynList
(
const
ListType
&
);
//- Copy construct
inline
DynList
(
const
DynList
<
T
,
SizeMin
>&
list
);
//- Copy constructor
inline
DynList
(
const
DynList
<
T
,
staticSize
>&
);
//- Construct from UList. Size set to UList size.
// Also constructs from DynList with different sizing parameters.
explicit
inline
DynList
(
const
UList
<
T
>&
list
);
//- Construct from Istream. nextFree_ set to size().
explicit
DynList
(
Istream
&
);
//- Construct from other ListType
template
<
class
ListType
>
inline
DynList
(
const
ListType
&
list
);
//- Destructor
inline
~
DynList
(
);
//- Construct from Istream. Size set to size of list read.
explicit
DynList
(
Istream
&
is
);
// Member Functions
// Access
// Access
//- Size of the active part of the list.
//- Direct over-ride of list size member function
inline
label
size
()
const
;
//- Normal lower capacity limit - the SizeMin template parameter
inline
label
min_size
()
const
;
//- Number of bytes used by the active part of the list
//- Direct over-ride of list byteSize member function
inline
label
byteSize
()
const
;
//- Size of the underlying storage.
inline
label
capacity
()
const
;
// Edit
// Edit
//- Reset size of List.
void
setSize
(
const
label
);
//- Alter the size of the underlying storage.
// The addressed size will be truncated if needed to fit, but will
// remain otherwise untouched.
// Use this or reserve() in combination with append().
inline
void
setCapacity
(
const
label
nElem
);
//- Clear the list, i.e. set next free to zero.
// Allocated size does not change
void
clear
();
//- Alter addressable list size.
// New space will be allocated if required.
// Use this to resize the list prior to using the operator[] for
// setting values (as per List usage).
inline
void
setSize
(
const
label
nElem
);
//- Shrink the List<T> to the number of elements used
void
shrink
(
);
//- Alter addressable list size and fill new space with constant.
inline
void
setSize
(
const
label
nElem
,
const
T
&
val
);
//- Alter addressable list size.
// New space will be allocated if required.
// Use this to resize the list prior to using the operator[] for
// setting values (as per List usage).
inline
void
resize
(
const
label
nElem
);
// Member Operators
//- Alter addressable list size and fill new space with constant.
inline
void
resize
(
const
label
nElem
,
const
T
&
val
);
//- Append an element at the end of the list
inline
void
append
(
const
T
&
e
);
//- Reserve allocation space for at least this size.
// Never shrinks the allocated size, use setCapacity() for that.
inline
void
reserve
(
const
label
nElem
);
//-
Append an element at the end of the list if it is not yet
//
- present in the list (takes linear time)
inline
void
appendIfNotIn
(
const
T
&
e
);
//-
Clear the addressed list, i.e. set the size to zero.
//
Allocated size does not change
inline
void
clear
(
);
//-
Find and return location of element in list
inline
label
find
(
const
T
&
val
)
const
;
//-
Clear the list and delete storage.
inline
void
clearStorage
()
;
//- Check if the element is in the list
inline
bool
found
(
const
T
&
e
)
const
;
//- Expand the addressable size to fit the allocated capacity.
// Returns the previous addressable size.
inline
label
expandStorage
();
//- return a const reference to the first element
inline
const
T
&
first
()
const
;
//- Shrink the allocated space to the number of elements used.
// Returns a reference to the DynList.
inline
DynList
<
T
,
SizeMin
>&
shrink
();
//- return a const reference to the last element
inline
const
T
&
last
()
const
;
//- Return and remove the last element
inline
T
remove
();
// Member Operators
//-
Return and remove the elemen
t
inline
T
removeElement
(
const
label
i
);
//-
Append an element at the end of the lis
t
inline
void
append
(
const
T
&
val
);
//- return a reference to the element. Resize the list if necessary
inline
T
&
newElmt
(
const
label
);
//- Append an element at the end of the list if it is not yet
//- present in the list (takes linear time)
inline
void
appendIfNotIn
(
const
T
&
val
);
//- Return non-const access to an element,
//- resizing the list if necessary
inline
T
&
operator
()(
const
label
);
//- Remove and return the last element. Fatal on an empty list.
inline
T
remove
();
//- return access to an element
inline
const
T
&
operator
[](
const
label
)
const
;
inline
T
&
operator
[](
const
label
);
//- Remove and return the specified element. Fatal on an empty list.
// The place of the removed element is swapped with the last one
// in the list, which changes the ordering.
inline
T
removeElement
(
const
label
i
);
//- return forward and reverse circular indices
inline
label
fcIndex
(
const
label
index
)
const
;
inline
label
rcIndex
(
const
label
index
)
const
;
//- Return non-const access to an element, resizing list if necessary
inline
T
&
newElmt
(
const
label
i
);
//- return forward and reverse circular elements
inline
const
T
&
fcValue
(
const
label
index
)
const
;
inline
const
T
&
rcValue
(
const
label
index
)
const
;
//- Return non-const access to an element, resizing list if necessary
inline
T
&
operator
()(
const
label
i
);
//- Assignment of all entries to the given value
inline
void
operator
=
(
const
T
&
);
//- Assignment of all
addressed
entries to the given value
inline
void
operator
=
(
const
T
&
val
);
//- Copy
of another
list
inline
void
operator
=
(
const
DynList
<
T
,
staticSize
>&
);
//- Copy list
inline
void
operator
=
(
const
DynList
<
T
,
SizeMin
>&
list
);
//- Compare the list with the another one
inline
bool
operator
==
(
const
DynList
<
T
,
staticSize
>&
)
const
;
inline
bool
operator
!=
(
const
DynList
<
T
,
staticSize
>&
)
const
;
// //- Copy of another list
// inline void operator=(const UList<T>& list);
// IOstream operators
// Write DynList to Ostream.
friend
Ostream
&
operator
<<
<
T
,
staticSize
>
//
-
Write DynList to Ostream.
friend
Ostream
&
operator
<<
<
T
,
SizeMin
>
(
Ostream
&
,
const
DynList
<
T
,
staticSize
>&
Ostream
&
os
,
const
DynList
<
T
,
SizeMin
>&
list
);
//- Read from Istream, discarding contents of existing DynList.
friend
Istream
&
operator
>>
<
T
,
staticSize
>
friend
Istream
&
operator
>>
<
T
,
SizeMin
>
(
Istream
&
,
DynList
<
T
,
staticSize
>&
Istream
&
is
,
DynList
<
T
,
SizeMin
>&
list
);