mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
made container constructors explicit
This commit is contained in:
@ -163,10 +163,13 @@ int main(int argc, char *argv[])
|
|||||||
// Addressing on faces only in mesh vertices.
|
// Addressing on faces only in mesh vertices.
|
||||||
primitiveFacePatch fPatch
|
primitiveFacePatch fPatch
|
||||||
(
|
(
|
||||||
UIndirectList<face>
|
faceList
|
||||||
(
|
(
|
||||||
mesh.faces(),
|
UIndirectList<face>
|
||||||
faces
|
(
|
||||||
|
mesh.faces(),
|
||||||
|
faces
|
||||||
|
)
|
||||||
),
|
),
|
||||||
mesh.points()
|
mesh.points()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -109,17 +109,17 @@ public:
|
|||||||
//- Null constructor.
|
//- Null constructor.
|
||||||
inline FixedList();
|
inline FixedList();
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from C-array.
|
||||||
inline FixedList(const T v[Size]);
|
explicit inline FixedList(const T v[Size]);
|
||||||
|
|
||||||
//- Construct from value
|
//- Construct from value
|
||||||
inline FixedList(const T&);
|
explicit inline FixedList(const T&);
|
||||||
|
|
||||||
//- Construct from UList.
|
//- Construct from UList.
|
||||||
inline FixedList(const UList<T>&);
|
explicit inline FixedList(const UList<T>&);
|
||||||
|
|
||||||
//- Construct from SLList.
|
//- Construct from SLList.
|
||||||
inline FixedList(const SLList<T>&);
|
explicit inline FixedList(const SLList<T>&);
|
||||||
|
|
||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
inline FixedList(const FixedList<T, Size>&);
|
inline FixedList(const FixedList<T, Size>&);
|
||||||
|
|||||||
@ -123,22 +123,22 @@ public:
|
|||||||
|
|
||||||
//- Construct as copy of FixedList<T, Size>
|
//- Construct as copy of FixedList<T, Size>
|
||||||
template<unsigned Size>
|
template<unsigned Size>
|
||||||
List(const FixedList<T, Size>&);
|
explicit List(const FixedList<T, Size>&);
|
||||||
|
|
||||||
//- Construct as copy of PtrList<T>
|
//- Construct as copy of PtrList<T>
|
||||||
List(const PtrList<T>&);
|
explicit List(const PtrList<T>&);
|
||||||
|
|
||||||
//- Construct as copy of SLList<T>
|
//- Construct as copy of SLList<T>
|
||||||
List(const SLList<T>&);
|
explicit List(const SLList<T>&);
|
||||||
|
|
||||||
//- Construct as copy of IndirectList<T>
|
//- Construct as copy of IndirectList<T>
|
||||||
List(const IndirectList<T>&);
|
explicit List(const IndirectList<T>&);
|
||||||
|
|
||||||
//- Construct as copy of UIndirectList<T>
|
//- Construct as copy of UIndirectList<T>
|
||||||
List(const UIndirectList<T>&);
|
explicit List(const UIndirectList<T>&);
|
||||||
|
|
||||||
//- Construct as copy of BiIndirectList<T>
|
//- Construct as copy of BiIndirectList<T>
|
||||||
List(const BiIndirectList<T>&);
|
explicit List(const BiIndirectList<T>&);
|
||||||
|
|
||||||
//- Construct from Istream.
|
//- Construct from Istream.
|
||||||
List(Istream&);
|
List(Istream&);
|
||||||
|
|||||||
@ -162,7 +162,7 @@ public:
|
|||||||
inline PackedList();
|
inline PackedList();
|
||||||
|
|
||||||
//- Construct with given size, initializes list to 0.
|
//- Construct with given size, initializes list to 0.
|
||||||
inline PackedList(const label size);
|
explicit inline PackedList(const label size);
|
||||||
|
|
||||||
//- Construct with given size and value for all elements.
|
//- Construct with given size and value for all elements.
|
||||||
PackedList(const label size, const unsigned val);
|
PackedList(const label size, const unsigned val);
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
inline PackedList(const Xfer< PackedList<nBits> >&);
|
inline PackedList(const Xfer< PackedList<nBits> >&);
|
||||||
|
|
||||||
//- Construct from a list of labels
|
//- Construct from a list of labels
|
||||||
PackedList(const UList<label>&);
|
explicit PackedList(const UList<label>&);
|
||||||
|
|
||||||
//- Clone
|
//- Clone
|
||||||
inline autoPtr< PackedList<nBits> > clone() const;
|
inline autoPtr< PackedList<nBits> > clone() const;
|
||||||
|
|||||||
@ -136,7 +136,7 @@ public:
|
|||||||
PtrList(PtrList<T>&, bool reUse);
|
PtrList(PtrList<T>&, bool reUse);
|
||||||
|
|
||||||
//- Construct as copy of SLPtrList<T>
|
//- Construct as copy of SLPtrList<T>
|
||||||
PtrList(const SLPtrList<T>&);
|
explicit PtrList(const SLPtrList<T>&);
|
||||||
|
|
||||||
//- Construct from Istream using given Istream constructor class
|
//- Construct from Istream using given Istream constructor class
|
||||||
template<class INew>
|
template<class INew>
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "tetCell.H"
|
#include "tetCell.H"
|
||||||
@ -44,7 +42,7 @@ Foam::cellShape Foam::tetCell::tetCellShape() const
|
|||||||
|
|
||||||
const cellModel& tet = *tetModelPtr_;
|
const cellModel& tet = *tetModelPtr_;
|
||||||
|
|
||||||
return cellShape(tet, *this);
|
return cellShape(tet, labelList(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -124,7 +124,7 @@ Foam::List<Foam::labelPair> Foam::mapDistribute::schedule
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Processors involved in my schedule
|
// Processors involved in my schedule
|
||||||
return UIndirectList<labelPair>(allComms, mySchedule);
|
return List<labelPair>(UIndirectList<labelPair>(allComms, mySchedule));
|
||||||
|
|
||||||
|
|
||||||
//if (debug)
|
//if (debug)
|
||||||
|
|||||||
@ -1761,10 +1761,13 @@ void Foam::faceCoupleInfo::subDivisionMatch
|
|||||||
writeOBJ
|
writeOBJ
|
||||||
(
|
(
|
||||||
"errorEdges.obj",
|
"errorEdges.obj",
|
||||||
UIndirectList<edge>
|
edgeList
|
||||||
(
|
(
|
||||||
cutFaces().edges(),
|
UIndirectList<edge>
|
||||||
cutFaces().pointEdges()[cutPointI]
|
(
|
||||||
|
cutFaces().edges(),
|
||||||
|
cutFaces().pointEdges()[cutPointI]
|
||||||
|
)
|
||||||
),
|
),
|
||||||
cutFaces().localPoints(),
|
cutFaces().localPoints(),
|
||||||
false
|
false
|
||||||
|
|||||||
@ -110,7 +110,7 @@ Foam::labelListList Foam::addPatchCellLayer::calcGlobalEdgeFaces
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Extract pp part
|
// Extract pp part
|
||||||
return UIndirectList<labelList>(globalEdgeFaces, meshEdges);
|
return labelListList(UIndirectList<labelList>(globalEdgeFaces, meshEdges));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -313,14 +313,10 @@ Foam::polyMesh* Foam::blockMesh::createTopology(IOdictionary& dict)
|
|||||||
Info<< "Creating topology mesh" << endl;
|
Info<< "Creating topology mesh" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PtrList<cellShape> tmpBlockShapes(blocks.size());
|
cellShapeList tmpBlockShapes(blocks.size());
|
||||||
forAll(blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
tmpBlockShapes.set
|
tmpBlockShapes[blockI] = cellShape(blocks[blockI].blockShape());
|
||||||
(
|
|
||||||
blockI,
|
|
||||||
new cellShape(blocks[blockI].blockShape())
|
|
||||||
);
|
|
||||||
|
|
||||||
if (tmpBlockShapes[blockI].mag(blockPointField_) < 0.0)
|
if (tmpBlockShapes[blockI].mag(blockPointField_) < 0.0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -85,7 +85,8 @@ const Foam::label edgesArray[12][2] =
|
|||||||
|
|
||||||
const Foam::edgeList Foam::treeBoundBox::edges
|
const Foam::edgeList Foam::treeBoundBox::edges
|
||||||
(
|
(
|
||||||
initListList<edge, label, 12, 2>(edgesArray)
|
//initListList<edge, label, 12, 2>(edgesArray)
|
||||||
|
calcEdges(edgesArray)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -97,6 +98,18 @@ const Foam::FixedList<Foam::vector, 6> Foam::treeBoundBox::faceNormals
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::edgeList Foam::treeBoundBox::calcEdges(const label edgesArray[12][2])
|
||||||
|
{
|
||||||
|
edgeList edges(12);
|
||||||
|
forAll(edges, edgeI)
|
||||||
|
{
|
||||||
|
edges[edgeI][0] = edgesArray[edgeI][0];
|
||||||
|
edges[edgeI][1] = edgesArray[edgeI][1];
|
||||||
|
}
|
||||||
|
return edges;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::FixedList<Foam::vector, 6> Foam::treeBoundBox::calcFaceNormals()
|
Foam::FixedList<Foam::vector, 6> Foam::treeBoundBox::calcFaceNormals()
|
||||||
{
|
{
|
||||||
FixedList<vector, 6> normals;
|
FixedList<vector, 6> normals;
|
||||||
|
|||||||
@ -80,6 +80,9 @@ class treeBoundBox
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
//- To initialise edges.
|
||||||
|
static edgeList calcEdges(const label[12][2]);
|
||||||
|
|
||||||
//- To initialise faceNormals.
|
//- To initialise faceNormals.
|
||||||
static FixedList<vector, 6> calcFaceNormals();
|
static FixedList<vector, 6> calcFaceNormals();
|
||||||
|
|
||||||
|
|||||||
@ -464,7 +464,10 @@ void Foam::searchableSurfaceCollection::getRegion
|
|||||||
labelList surfRegion;
|
labelList surfRegion;
|
||||||
subGeom_[surfI].getRegion
|
subGeom_[surfI].getRegion
|
||||||
(
|
(
|
||||||
UIndirectList<pointIndexHit>(info, indices),
|
List<pointIndexHit>
|
||||||
|
(
|
||||||
|
UIndirectList<pointIndexHit>(info, indices)
|
||||||
|
),
|
||||||
surfRegion
|
surfRegion
|
||||||
);
|
);
|
||||||
forAll(indices, i)
|
forAll(indices, i)
|
||||||
@ -528,7 +531,10 @@ void Foam::searchableSurfaceCollection::getNormal
|
|||||||
vectorField surfNormal;
|
vectorField surfNormal;
|
||||||
subGeom_[surfI].getNormal
|
subGeom_[surfI].getNormal
|
||||||
(
|
(
|
||||||
UIndirectList<pointIndexHit>(info, indices),
|
List<pointIndexHit>
|
||||||
|
(
|
||||||
|
UIndirectList<pointIndexHit>(info, indices)
|
||||||
|
),
|
||||||
surfNormal
|
surfNormal
|
||||||
);
|
);
|
||||||
forAll(indices, i)
|
forAll(indices, i)
|
||||||
|
|||||||
@ -212,7 +212,7 @@ void Foam::sampledSets::combineSampledSets
|
|||||||
(
|
(
|
||||||
samplePts.name(),
|
samplePts.name(),
|
||||||
samplePts.axis(),
|
samplePts.axis(),
|
||||||
UIndirectList<point>(allPts, indexSets[seti]),
|
List<point>(UIndirectList<point>(allPts, indexSets[seti])),
|
||||||
refPt
|
refPt
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -49,7 +49,10 @@ Foam::reactingMixture<ThermoType>::reactingMixture
|
|||||||
),
|
),
|
||||||
PtrList<Reaction<ThermoType> >
|
PtrList<Reaction<ThermoType> >
|
||||||
(
|
(
|
||||||
autoPtr<chemistryReader<ThermoType> >::operator()().reactions(),
|
PtrList<Reaction<ThermoType> >
|
||||||
|
(
|
||||||
|
autoPtr<chemistryReader<ThermoType> >::operator()().reactions()
|
||||||
|
),
|
||||||
this->species_
|
this->species_
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user