mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: remove reliance on the Xfer class (issue #639)
This class is largely a pre-C++11 holdover. It is now possible to simply use move construct/assignment directly. In a few rare cases (eg, polyMesh::resetPrimitives) it has been replaced by an autoPtr.
This commit is contained in:
@ -490,8 +490,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
|
||||
new mapDistribute
|
||||
(
|
||||
compacti,
|
||||
tgtSubMap.xfer(),
|
||||
tgtConstructMap.xfer()
|
||||
std::move(tgtSubMap),
|
||||
std::move(tgtConstructMap)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -454,17 +454,12 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap
|
||||
}
|
||||
}
|
||||
|
||||
autoPtr<mapDistribute> mapPtr
|
||||
return autoPtr<mapDistribute>::New
|
||||
(
|
||||
new mapDistribute
|
||||
(
|
||||
segmentI, // size after construction
|
||||
sendMap.xfer(),
|
||||
constructMap.xfer()
|
||||
)
|
||||
segmentI, // size after construction
|
||||
std::move(sendMap),
|
||||
std::move(constructMap)
|
||||
);
|
||||
|
||||
return mapPtr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -89,20 +89,20 @@ Foam::coordinateSystems::coordinateSystems(const IOobject& io)
|
||||
Foam::coordinateSystems::coordinateSystems
|
||||
(
|
||||
const IOobject& io,
|
||||
const PtrList<coordinateSystem>& lst
|
||||
const PtrList<coordinateSystem>& content
|
||||
)
|
||||
:
|
||||
IOPtrList<coordinateSystem>(io, lst)
|
||||
IOPtrList<coordinateSystem>(io, content)
|
||||
{}
|
||||
|
||||
|
||||
Foam::coordinateSystems::coordinateSystems
|
||||
(
|
||||
const IOobject& io,
|
||||
const Xfer<PtrList<coordinateSystem>>& lst
|
||||
PtrList<coordinateSystem>&& content
|
||||
)
|
||||
:
|
||||
IOPtrList<coordinateSystem>(io, lst)
|
||||
IOPtrList<coordinateSystem>(io, std::move(content))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -91,20 +91,20 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Read construct from IOobject
|
||||
explicit coordinateSystems(const IOobject&);
|
||||
explicit coordinateSystems(const IOobject& io);
|
||||
|
||||
//- Construct from IOobject and a PtrList
|
||||
coordinateSystems
|
||||
(
|
||||
const IOobject&,
|
||||
const PtrList<coordinateSystem>&
|
||||
const IOobject& io,
|
||||
const PtrList<coordinateSystem>& content
|
||||
);
|
||||
|
||||
//- Construct from IOobject and transferring the PtrList contents
|
||||
//- Construct from IOobject and transferring the PtrList content
|
||||
coordinateSystems
|
||||
(
|
||||
const IOobject&,
|
||||
const Xfer<PtrList<coordinateSystem>>&
|
||||
const IOobject& io,
|
||||
PtrList<coordinateSystem>&& content
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -55,11 +55,7 @@ Foam::wordHashSet Foam::edgeMesh::writeTypes()
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::edgeMesh::canReadType
|
||||
(
|
||||
const word& ext,
|
||||
const bool verbose
|
||||
)
|
||||
bool Foam::edgeMesh::canReadType(const word& ext, bool verbose)
|
||||
{
|
||||
return checkSupport
|
||||
(
|
||||
@ -71,11 +67,7 @@ bool Foam::edgeMesh::canReadType
|
||||
}
|
||||
|
||||
|
||||
bool Foam::edgeMesh::canWriteType
|
||||
(
|
||||
const word& ext,
|
||||
const bool verbose
|
||||
)
|
||||
bool Foam::edgeMesh::canWriteType(const word& ext, bool verbose)
|
||||
{
|
||||
return checkSupport
|
||||
(
|
||||
@ -87,11 +79,7 @@ bool Foam::edgeMesh::canWriteType
|
||||
}
|
||||
|
||||
|
||||
bool Foam::edgeMesh::canRead
|
||||
(
|
||||
const fileName& name,
|
||||
const bool verbose
|
||||
)
|
||||
bool Foam::edgeMesh::canRead(const fileName& name, bool verbose)
|
||||
{
|
||||
word ext = name.ext();
|
||||
if (ext == "gz")
|
||||
@ -119,52 +107,6 @@ void Foam::edgeMesh::calcPointEdges() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::edgeMesh::edgeMesh()
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
points_(0),
|
||||
edges_(0),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::edgeMesh::edgeMesh
|
||||
(
|
||||
const pointField& points,
|
||||
const edgeList& edges
|
||||
)
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
points_(points),
|
||||
edges_(edges),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::edgeMesh::edgeMesh
|
||||
(
|
||||
const Xfer<pointField>& pointLst,
|
||||
const Xfer<edgeList>& edgeLst
|
||||
)
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
points_(0),
|
||||
edges_(0),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{
|
||||
points_.transfer(pointLst());
|
||||
edges_.transfer(edgeLst());
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::edgeMesh::~edgeMesh()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::edgeMesh::clear()
|
||||
@ -175,29 +117,6 @@ void Foam::edgeMesh::clear()
|
||||
}
|
||||
|
||||
|
||||
void Foam::edgeMesh::reset
|
||||
(
|
||||
const Xfer<pointField>& pointLst,
|
||||
const Xfer<edgeList>& edgeLst
|
||||
)
|
||||
{
|
||||
// Take over new primitive data.
|
||||
// Optimized to avoid overwriting data at all
|
||||
if (notNull(pointLst))
|
||||
{
|
||||
points_.transfer(pointLst());
|
||||
}
|
||||
|
||||
if (notNull(edgeLst))
|
||||
{
|
||||
edges_.transfer(edgeLst());
|
||||
|
||||
// connectivity likely changed
|
||||
pointEdgesPtr_.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::edgeMesh::transfer(edgeMesh& mesh)
|
||||
{
|
||||
points_.transfer(mesh.points_);
|
||||
@ -206,12 +125,6 @@ void Foam::edgeMesh::transfer(edgeMesh& mesh)
|
||||
}
|
||||
|
||||
|
||||
Foam::Xfer<Foam::edgeMesh> Foam::edgeMesh::xfer()
|
||||
{
|
||||
return xferMove(*this);
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::edgeMesh::regions(labelList& edgeRegion) const
|
||||
{
|
||||
edgeRegion.setSize(edges_.size());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,12 +53,12 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
// Forward declarations
|
||||
|
||||
class edgeMesh;
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
class edgeMesh;
|
||||
Istream& operator>>(Istream& is, edgeMesh& em);
|
||||
Ostream& operator<<(Ostream& os, const edgeMesh& em);
|
||||
|
||||
@ -109,13 +109,13 @@ public:
|
||||
// Static
|
||||
|
||||
//- Can we read this file format?
|
||||
static bool canRead(const fileName& name, const bool verbose=false);
|
||||
static bool canRead(const fileName& name, bool verbose=false);
|
||||
|
||||
//- Can we read this file format?
|
||||
static bool canReadType(const word& ext, const bool verbose=false);
|
||||
static bool canReadType(const word& ext, bool verbose=false);
|
||||
|
||||
//- Can we write this file format type?
|
||||
static bool canWriteType(const word& ext, const bool verbose=false);
|
||||
static bool canWriteType(const word& ext, bool verbose=false);
|
||||
|
||||
static wordHashSet readTypes();
|
||||
static wordHashSet writeTypes();
|
||||
@ -124,20 +124,19 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
edgeMesh();
|
||||
inline edgeMesh();
|
||||
|
||||
//- Construct from components
|
||||
edgeMesh(const pointField& points, const edgeList& edges);
|
||||
//- Copy construct
|
||||
inline edgeMesh(const edgeMesh& em);
|
||||
|
||||
//- Construct by transferring components (points, edges).
|
||||
edgeMesh
|
||||
(
|
||||
const Xfer<pointField>& pointLst,
|
||||
const Xfer<edgeList>& edgeLst
|
||||
);
|
||||
//- Move construct
|
||||
inline edgeMesh(edgeMesh&& em);
|
||||
|
||||
//- Construct as copy
|
||||
edgeMesh(const edgeMesh& em);
|
||||
//- Copy construct from components
|
||||
inline edgeMesh(const pointField& points, const edgeList& edges);
|
||||
|
||||
//- Move construct from components
|
||||
inline edgeMesh(pointField&& pointLst, edgeList&& edgeLst);
|
||||
|
||||
//- Construct from file name (uses extension to determine type)
|
||||
edgeMesh(const fileName& name);
|
||||
@ -174,7 +173,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~edgeMesh();
|
||||
virtual ~edgeMesh() = default;
|
||||
|
||||
|
||||
// Member Function Selectors
|
||||
@ -199,10 +198,8 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Transfer the contents of the argument and annul the argument
|
||||
void transfer(edgeMesh&);
|
||||
void transfer(edgeMesh& mesh);
|
||||
|
||||
//- Transfer contents to the Xfer container
|
||||
Xfer<edgeMesh> xfer();
|
||||
|
||||
// Read
|
||||
|
||||
@ -234,14 +231,6 @@ public:
|
||||
//- Clear all storage
|
||||
virtual void clear();
|
||||
|
||||
//- Reset primitive data (points, edges)
|
||||
// Note, optimized to avoid overwriting data (with Xfer::null)
|
||||
virtual void reset
|
||||
(
|
||||
const Xfer<pointField>& points,
|
||||
const Xfer<edgeList>& edges
|
||||
);
|
||||
|
||||
//- Scale points. A non-positive factor is ignored
|
||||
virtual void scalePoints(const scalar scaleFactor);
|
||||
|
||||
@ -266,12 +255,17 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Copy assignment
|
||||
inline void operator=(const edgeMesh& rhs);
|
||||
|
||||
// Ostream Operator
|
||||
//- Move assignment
|
||||
inline void operator=(edgeMesh&& rhs);
|
||||
|
||||
friend Ostream& operator<<(Ostream& os, const edgeMesh& em);
|
||||
friend Istream& operator>>(Istream& is, edgeMesh& em);
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<<(Ostream& os, const edgeMesh& em);
|
||||
friend Istream& operator>>(Istream& is, edgeMesh& em);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,6 +39,15 @@ inline Foam::edgeList& Foam::edgeMesh::storedEdges()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::edgeMesh::edgeMesh()
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
points_(),
|
||||
edges_(),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::edgeMesh::edgeMesh(const edgeMesh& em)
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
@ -48,6 +57,40 @@ inline Foam::edgeMesh::edgeMesh(const edgeMesh& em)
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::edgeMesh::edgeMesh(edgeMesh&& em)
|
||||
:
|
||||
edgeMesh()
|
||||
{
|
||||
transfer(em);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::edgeMesh::edgeMesh
|
||||
(
|
||||
const pointField& points,
|
||||
const edgeList& edges
|
||||
)
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
points_(points),
|
||||
edges_(edges),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::edgeMesh::edgeMesh
|
||||
(
|
||||
pointField&& points,
|
||||
edgeList&& edges
|
||||
)
|
||||
:
|
||||
fileFormats::edgeMeshFormatsCore(),
|
||||
points_(std::move(points)),
|
||||
edges_(std::move(edges)),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::pointField& Foam::edgeMesh::points() const
|
||||
@ -68,13 +111,13 @@ inline const Foam::labelListList& Foam::edgeMesh::pointEdges() const
|
||||
{
|
||||
calcPointEdges();
|
||||
}
|
||||
return pointEdgesPtr_();
|
||||
return *pointEdgesPtr_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::edgeMesh::operator=(const edgeMesh& rhs)
|
||||
inline void Foam::edgeMesh::operator=(const edgeMesh& rhs)
|
||||
{
|
||||
points_ = rhs.points_;
|
||||
edges_ = rhs.edges_;
|
||||
@ -82,4 +125,10 @@ void Foam::edgeMesh::operator=(const edgeMesh& rhs)
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::edgeMesh::operator=(edgeMesh&& rhs)
|
||||
{
|
||||
transfer(rhs);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -91,13 +91,10 @@ Foam::scalar Foam::extendedEdgeMesh::cosNormalAngleTol_ =
|
||||
|
||||
Foam::label Foam::extendedEdgeMesh::convexStart_ = 0;
|
||||
|
||||
|
||||
Foam::label Foam::extendedEdgeMesh::externalStart_ = 0;
|
||||
|
||||
|
||||
Foam::label Foam::extendedEdgeMesh::nPointTypes = 4;
|
||||
|
||||
|
||||
Foam::label Foam::extendedEdgeMesh::nEdgeTypes = 5;
|
||||
|
||||
|
||||
@ -115,11 +112,7 @@ Foam::wordHashSet Foam::extendedEdgeMesh::writeTypes()
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::extendedEdgeMesh::canReadType
|
||||
(
|
||||
const word& ext,
|
||||
const bool verbose
|
||||
)
|
||||
bool Foam::extendedEdgeMesh::canReadType(const word& ext, bool verbose)
|
||||
{
|
||||
return edgeMeshFormatsCore::checkSupport
|
||||
(
|
||||
@ -131,11 +124,7 @@ bool Foam::extendedEdgeMesh::canReadType
|
||||
}
|
||||
|
||||
|
||||
bool Foam::extendedEdgeMesh::canWriteType
|
||||
(
|
||||
const word& ext,
|
||||
const bool verbose
|
||||
)
|
||||
bool Foam::extendedEdgeMesh::canWriteType(const word& ext, bool verbose)
|
||||
{
|
||||
return edgeMeshFormatsCore::checkSupport
|
||||
(
|
||||
@ -147,11 +136,7 @@ bool Foam::extendedEdgeMesh::canWriteType
|
||||
}
|
||||
|
||||
|
||||
bool Foam::extendedEdgeMesh::canRead
|
||||
(
|
||||
const fileName& name,
|
||||
const bool verbose
|
||||
)
|
||||
bool Foam::extendedEdgeMesh::canRead(const fileName& name, bool verbose)
|
||||
{
|
||||
word ext = name.ext();
|
||||
if (ext == "gz")
|
||||
@ -395,7 +380,7 @@ void Foam::extendedEdgeMesh::select
|
||||
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh()
|
||||
:
|
||||
edgeMesh(pointField(0), edgeList(0)),
|
||||
edgeMesh(pointField(), edgeList()),
|
||||
concaveStart_(0),
|
||||
mixedStart_(0),
|
||||
nonFeatureStart_(0),
|
||||
@ -417,6 +402,30 @@ Foam::extendedEdgeMesh::extendedEdgeMesh()
|
||||
{}
|
||||
|
||||
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh(class one::minus)
|
||||
:
|
||||
edgeMesh(pointField(), edgeList()),
|
||||
concaveStart_(-1),
|
||||
mixedStart_(-1),
|
||||
nonFeatureStart_(-1),
|
||||
internalStart_(-1),
|
||||
flatStart_(-1),
|
||||
openStart_(-1),
|
||||
multipleStart_(-1),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
{}
|
||||
|
||||
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh(const extendedEdgeMesh& fem)
|
||||
:
|
||||
edgeMesh(fem),
|
||||
@ -453,54 +462,24 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
const edgeList& edges
|
||||
)
|
||||
:
|
||||
edgeMesh(points, edges),
|
||||
concaveStart_(0),
|
||||
mixedStart_(0),
|
||||
nonFeatureStart_(0),
|
||||
internalStart_(0),
|
||||
flatStart_(0),
|
||||
openStart_(0),
|
||||
multipleStart_(0),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
{}
|
||||
extendedEdgeMesh()
|
||||
{
|
||||
this->storedPoints() = points;
|
||||
this->storedEdges() = edges;
|
||||
}
|
||||
|
||||
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
(
|
||||
const Xfer<pointField>& pointLst,
|
||||
const Xfer<edgeList>& edgeLst
|
||||
pointField&& points,
|
||||
edgeList&& edges
|
||||
)
|
||||
:
|
||||
edgeMesh(pointLst, edgeLst),
|
||||
concaveStart_(0),
|
||||
mixedStart_(0),
|
||||
nonFeatureStart_(0),
|
||||
internalStart_(0),
|
||||
flatStart_(0),
|
||||
openStart_(0),
|
||||
multipleStart_(0),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
{}
|
||||
extendedEdgeMesh()
|
||||
{
|
||||
this->storedPoints().transfer(points);
|
||||
this->storedEdges().transfer(edges);
|
||||
}
|
||||
|
||||
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
@ -509,25 +488,7 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
const boolList& surfBaffleRegions
|
||||
)
|
||||
:
|
||||
edgeMesh(pointField(0), edgeList(0)),
|
||||
concaveStart_(-1),
|
||||
mixedStart_(-1),
|
||||
nonFeatureStart_(-1),
|
||||
internalStart_(-1),
|
||||
flatStart_(-1),
|
||||
openStart_(-1),
|
||||
multipleStart_(-1),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
extendedEdgeMesh(one::minus())
|
||||
{
|
||||
// Extract and reorder the data from surfaceFeatures
|
||||
const triSurface& surf = sFeat.surface();
|
||||
@ -585,30 +546,12 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
(
|
||||
const PrimitivePatch<face, List, pointField, point>& surf,
|
||||
const labelList& featureEdges,
|
||||
const labelList& regionFeatureEdges,
|
||||
const labelList& featurePoints
|
||||
const labelUList& featureEdges,
|
||||
const labelUList& regionFeatureEdges,
|
||||
const labelUList& featurePoints
|
||||
)
|
||||
:
|
||||
edgeMesh(pointField(0), edgeList(0)),
|
||||
concaveStart_(-1),
|
||||
mixedStart_(-1),
|
||||
nonFeatureStart_(-1),
|
||||
internalStart_(-1),
|
||||
flatStart_(-1),
|
||||
openStart_(-1),
|
||||
multipleStart_(-1),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
extendedEdgeMesh(one::minus())
|
||||
{
|
||||
sortPointsAndEdges
|
||||
(
|
||||
@ -669,25 +612,7 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
const word& ext
|
||||
)
|
||||
:
|
||||
edgeMesh(pointField(0), edgeList(0)),
|
||||
concaveStart_(0),
|
||||
mixedStart_(0),
|
||||
nonFeatureStart_(0),
|
||||
internalStart_(0),
|
||||
flatStart_(0),
|
||||
openStart_(0),
|
||||
multipleStart_(0),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
extendedEdgeMesh()
|
||||
{
|
||||
read(name, ext);
|
||||
}
|
||||
@ -695,25 +620,7 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
|
||||
|
||||
Foam::extendedEdgeMesh::extendedEdgeMesh(const fileName& name)
|
||||
:
|
||||
edgeMesh(pointField(0), edgeList(0)),
|
||||
concaveStart_(0),
|
||||
mixedStart_(0),
|
||||
nonFeatureStart_(0),
|
||||
internalStart_(0),
|
||||
flatStart_(0),
|
||||
openStart_(0),
|
||||
multipleStart_(0),
|
||||
normals_(0),
|
||||
normalVolumeTypes_(0),
|
||||
edgeDirections_(0),
|
||||
normalDirections_(0),
|
||||
edgeNormals_(0),
|
||||
featurePointNormals_(0),
|
||||
featurePointEdges_(0),
|
||||
regionEdges_(0),
|
||||
pointTree_(),
|
||||
edgeTree_(),
|
||||
edgeTreesByType_()
|
||||
extendedEdgeMesh()
|
||||
{
|
||||
read(name);
|
||||
}
|
||||
@ -735,10 +642,8 @@ bool Foam::extendedEdgeMesh::read(const fileName& name)
|
||||
fileName unzipName = name.lessExt();
|
||||
return read(unzipName, unzipName.ext());
|
||||
}
|
||||
else
|
||||
{
|
||||
return read(name, ext);
|
||||
}
|
||||
|
||||
return read(name, ext);
|
||||
}
|
||||
|
||||
|
||||
@ -1098,12 +1003,8 @@ void Foam::extendedEdgeMesh::transfer(extendedEdgeMesh& mesh)
|
||||
pointTree_ = std::move(mesh.pointTree_);
|
||||
edgeTree_ = std::move(mesh.edgeTree_);
|
||||
edgeTreesByType_.transfer(mesh.edgeTreesByType_);
|
||||
}
|
||||
|
||||
|
||||
Foam::Xfer<Foam::extendedEdgeMesh> Foam::extendedEdgeMesh::xfer()
|
||||
{
|
||||
return xferMoveTo<extendedEdgeMesh, extendedEdgeMesh>(*this);
|
||||
mesh.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -1376,7 +1277,10 @@ void Foam::extendedEdgeMesh::add(const extendedEdgeMesh& fem)
|
||||
nonFeatureStart_ = newNonFeatureStart;
|
||||
|
||||
// Reset points and edges
|
||||
reset(xferMove(newPoints), newEdges.xfer());
|
||||
{
|
||||
edgeMesh newmesh(std::move(newPoints), std::move(newEdges));
|
||||
edgeMesh::transfer(newmesh);
|
||||
}
|
||||
|
||||
// Transfer
|
||||
internalStart_ = newInternalStart;
|
||||
@ -1489,7 +1393,10 @@ void Foam::extendedEdgeMesh::flipNormals()
|
||||
concaveStart_ = newConcaveStart;
|
||||
|
||||
// Reset points and edges
|
||||
reset(xferMove(newPoints), newEdges.xfer());
|
||||
{
|
||||
edgeMesh newmesh(std::move(newPoints), std::move(newEdges));
|
||||
edgeMesh::transfer(newmesh);
|
||||
}
|
||||
|
||||
// Transfer
|
||||
internalStart_ = newInternalStart;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,11 +67,10 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
|
||||
class surfaceFeatures;
|
||||
class searchableSurface;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
class extendedEdgeMesh;
|
||||
|
||||
Istream& operator>>(Istream&, extendedEdgeMesh&);
|
||||
@ -86,7 +85,6 @@ class extendedEdgeMesh
|
||||
:
|
||||
public edgeMesh
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -202,6 +200,12 @@ protected:
|
||||
mutable PtrList<indexedOctree<treeDataEdge>> edgeTreesByType_;
|
||||
|
||||
|
||||
// Protected Constructors
|
||||
|
||||
//- Construct null, initializing start indices with -1
|
||||
explicit extendedEdgeMesh(class one::minus);
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Classify the type of feature point. Requires valid stored member
|
||||
@ -233,9 +237,9 @@ protected:
|
||||
void sortPointsAndEdges
|
||||
(
|
||||
const Patch&,
|
||||
const labelList& featureEdges,
|
||||
const labelList& regionFeatureEdges,
|
||||
const labelList& feaurePoints
|
||||
const labelUList& featureEdges,
|
||||
const labelUList& regionFeatureEdges,
|
||||
const labelUList& feaurePoints
|
||||
);
|
||||
|
||||
public:
|
||||
@ -249,13 +253,13 @@ public:
|
||||
static label nEdgeTypes;
|
||||
|
||||
//- Can we read this file format?
|
||||
static bool canRead(const fileName& name, const bool verbose=false);
|
||||
static bool canRead(const fileName& name, bool verbose=false);
|
||||
|
||||
//- Can we read this file format?
|
||||
static bool canReadType(const word& ext, const bool verbose=false);
|
||||
static bool canReadType(const word& ext, bool verbose=false);
|
||||
|
||||
//- Can we write this file format type?
|
||||
static bool canWriteType(const word& ext, const bool verbose=false);
|
||||
static bool canWriteType(const word& ext, bool verbose=false);
|
||||
|
||||
static wordHashSet readTypes();
|
||||
static wordHashSet writeTypes();
|
||||
@ -278,15 +282,11 @@ public:
|
||||
//- Construct from Istream
|
||||
extendedEdgeMesh(Istream& is);
|
||||
|
||||
//- Construct from components
|
||||
//- Copy construct from components
|
||||
extendedEdgeMesh(const pointField& points, const edgeList& edges);
|
||||
|
||||
//- Construct by transferring components (points, edges)
|
||||
extendedEdgeMesh
|
||||
(
|
||||
const Xfer<pointField>& pointLst,
|
||||
const Xfer<edgeList>& edgeLst
|
||||
);
|
||||
//- Move construct from components
|
||||
extendedEdgeMesh(pointField&& points, edgeList&& edges);
|
||||
|
||||
//- Construct given a surface with selected edges,points
|
||||
// (surfaceFeatures)
|
||||
@ -301,9 +301,9 @@ public:
|
||||
extendedEdgeMesh
|
||||
(
|
||||
const PrimitivePatch<face, List, pointField, point>& surf,
|
||||
const labelList& featureEdges,
|
||||
const labelList& regionFeatureEdges,
|
||||
const labelList& featurePoints
|
||||
const labelUList& featureEdges,
|
||||
const labelUList& regionFeatureEdges,
|
||||
const labelUList& featurePoints
|
||||
);
|
||||
|
||||
//- Construct from all components
|
||||
@ -513,9 +513,6 @@ public:
|
||||
//- Transfer the contents of the argument and annul the argument
|
||||
void transfer(extendedEdgeMesh& mesh);
|
||||
|
||||
//- Transfer contents to the Xfer container
|
||||
Xfer<extendedEdgeMesh> xfer();
|
||||
|
||||
//- Clear all storage
|
||||
virtual void clear();
|
||||
|
||||
@ -613,10 +610,10 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<<(Ostream&, const extendedEdgeMesh&);
|
||||
friend Istream& operator>>(Istream&, extendedEdgeMesh&);
|
||||
friend Ostream& operator<<(Ostream&, const extendedEdgeMesh&);
|
||||
friend Istream& operator>>(Istream&, extendedEdgeMesh&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -234,10 +234,8 @@ Foam::extendedEdgeMesh::getPointStatus(label ptI) const
|
||||
{
|
||||
return MIXED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NONFEATURE;
|
||||
}
|
||||
|
||||
return NONFEATURE;
|
||||
}
|
||||
|
||||
|
||||
@ -260,10 +258,8 @@ Foam::extendedEdgeMesh::getEdgeStatus(label edgeI) const
|
||||
{
|
||||
return OPEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
return MULTIPLE;
|
||||
}
|
||||
|
||||
return MULTIPLE;
|
||||
}
|
||||
|
||||
|
||||
@ -276,13 +272,11 @@ inline Foam::PackedList<2> Foam::extendedEdgeMesh::edgeBaffles
|
||||
|
||||
DynamicList<label> edgeBaffles(eNormals.size());
|
||||
|
||||
forAll(eNormals, enI)
|
||||
for (const label normi : eNormals)
|
||||
{
|
||||
const label normI = eNormals[enI];
|
||||
|
||||
if (normalVolumeTypes_[normI])
|
||||
if (normalVolumeTypes_[normi])
|
||||
{
|
||||
edgeBaffles.append(normI);
|
||||
edgeBaffles.append(normi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -36,9 +36,9 @@ template<class Patch>
|
||||
void Foam::extendedEdgeMesh::sortPointsAndEdges
|
||||
(
|
||||
const Patch& surf,
|
||||
const labelList& featureEdges,
|
||||
const labelList& regionFeatureEdges,// subset of featureEdges: inter-region
|
||||
const labelList& featurePoints
|
||||
const labelUList& featureEdges,
|
||||
const labelUList& regionFeatureEdges,// subset of featureEdges: inter-region
|
||||
const labelUList& featurePoints
|
||||
)
|
||||
{
|
||||
const pointField& sFeatLocalPts(surf.localPoints());
|
||||
@ -361,7 +361,10 @@ void Foam::extendedEdgeMesh::sortPointsAndEdges
|
||||
|
||||
// Reinitialise the edgeMesh with sorted feature points and
|
||||
// renumbered edges
|
||||
reset(xferMove(pts), xferMove(eds));
|
||||
{
|
||||
edgeMesh newmesh(std::move(pts), std::move(eds));
|
||||
edgeMesh::transfer(newmesh);
|
||||
}
|
||||
|
||||
// Generate the featurePointNormals
|
||||
|
||||
|
||||
@ -121,9 +121,9 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
|
||||
(
|
||||
const IOobject& io,
|
||||
const PrimitivePatch<face, List, pointField, point>& surf,
|
||||
const labelList& featureEdges,
|
||||
const labelList& regionFeatureEdges,
|
||||
const labelList& featurePoints
|
||||
const labelUList& featureEdges,
|
||||
const labelUList& regionFeatureEdges,
|
||||
const labelUList& featurePoints
|
||||
)
|
||||
:
|
||||
regIOobject(io),
|
||||
@ -183,9 +183,6 @@ Foam::extendedFeatureEdgeMesh::~extendedFeatureEdgeMesh()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::extendedFeatureEdgeMesh::readData(Istream& is)
|
||||
@ -198,7 +195,6 @@ bool Foam::extendedFeatureEdgeMesh::readData(Istream& is)
|
||||
bool Foam::extendedFeatureEdgeMesh::writeData(Ostream& os) const
|
||||
{
|
||||
os << *this;
|
||||
|
||||
return os.good();
|
||||
}
|
||||
|
||||
@ -265,6 +261,6 @@ bool Foam::extendedFeatureEdgeMesh::writeData(Ostream& os) const
|
||||
//
|
||||
// return os;
|
||||
//}
|
||||
//
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -91,9 +91,9 @@ public:
|
||||
(
|
||||
const IOobject&,
|
||||
const PrimitivePatch<face, List, pointField, point>& surf,
|
||||
const labelList& featureEdges,
|
||||
const labelList& regionFeatureEdges,
|
||||
const labelList& featurePoints
|
||||
const labelUList& featureEdges,
|
||||
const labelUList& regionFeatureEdges,
|
||||
const labelUList& featurePoints
|
||||
);
|
||||
|
||||
//- Construct from all components
|
||||
|
||||
@ -125,16 +125,14 @@ inline Foam::vector Foam::extendedFeatureEdgeMesh::edgeDirection
|
||||
{
|
||||
return -edgeDirections()[edgeI];
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Requested ptI " << ptI << " is not a point on the requested "
|
||||
<< "edgeI " << edgeI << ". edgeI start and end: "
|
||||
<< e.start() << " " << e.end()
|
||||
<< exit(FatalError);
|
||||
|
||||
return Zero;
|
||||
}
|
||||
FatalErrorInFunction
|
||||
<< "Requested ptI " << ptI << " is not a point on the requested "
|
||||
<< "edgeI " << edgeI << ". edgeI start and end: "
|
||||
<< e.start() << " " << e.end()
|
||||
<< exit(FatalError);
|
||||
|
||||
return Zero;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -361,7 +361,10 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
|
||||
|
||||
// Reinitialise the edgeMesh with sorted feature points and
|
||||
// renumbered edges
|
||||
reset(xferMove(pts), xferMove(eds));
|
||||
{
|
||||
edgeMesh newmesh(std::move(pts), std::move(eds));
|
||||
edgeMesh::transfer(newmesh);
|
||||
}
|
||||
|
||||
// Generate the featurePointNormals
|
||||
|
||||
|
||||
@ -84,12 +84,12 @@ Foam::treeDataEdge::treeDataEdge
|
||||
const bool cacheBb,
|
||||
const edgeList& edges,
|
||||
const pointField& points,
|
||||
const Xfer<labelList>& edgeLabels
|
||||
labelList&& edgeLabels
|
||||
)
|
||||
:
|
||||
edges_(edges),
|
||||
points_(points),
|
||||
edgeLabels_(edgeLabels),
|
||||
edgeLabels_(std::move(edgeLabels)),
|
||||
cacheBb_(cacheBb)
|
||||
{
|
||||
update();
|
||||
|
||||
@ -159,7 +159,7 @@ public:
|
||||
const bool cacheBb,
|
||||
const edgeList& edges,
|
||||
const pointField& points,
|
||||
const Xfer<labelList>& edgeLabels
|
||||
labelList&& edgeLabels
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -86,11 +86,11 @@ Foam::treeDataFace::treeDataFace
|
||||
(
|
||||
const bool cacheBb,
|
||||
const primitiveMesh& mesh,
|
||||
const Xfer<labelList>& faceLabels
|
||||
labelList&& faceLabels
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
faceLabels_(faceLabels),
|
||||
faceLabels_(std::move(faceLabels)),
|
||||
isTreeFace_(mesh.nFaces(), 0),
|
||||
cacheBb_(cacheBb)
|
||||
{
|
||||
|
||||
@ -64,7 +64,6 @@ class treeDataFace
|
||||
static scalar tolSqr;
|
||||
|
||||
|
||||
|
||||
// Private data
|
||||
|
||||
const primitiveMesh& mesh_;
|
||||
@ -150,27 +149,28 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh, copying subset of faces
|
||||
//- Construct from mesh and subset of faces.
|
||||
treeDataFace
|
||||
(
|
||||
const bool cacheBb,
|
||||
const primitiveMesh&,
|
||||
const labelUList&
|
||||
const primitiveMesh& mesh,
|
||||
const labelUList& faceLabels
|
||||
);
|
||||
|
||||
//- Construct from mesh and subset of faces, transferring contents
|
||||
//- Construct from mesh, moving subset of faces
|
||||
treeDataFace
|
||||
(
|
||||
const bool cacheBb,
|
||||
const primitiveMesh&,
|
||||
const Xfer<labelList>&
|
||||
const primitiveMesh& mesh,
|
||||
labelList&& faceLabels
|
||||
);
|
||||
|
||||
//- Construct from mesh. Uses all faces in mesh.
|
||||
treeDataFace(const bool cacheBb, const primitiveMesh&);
|
||||
treeDataFace(const bool cacheBb, const primitiveMesh& mesh);
|
||||
|
||||
//- Construct from mesh. Uses all faces in patch.
|
||||
treeDataFace(const bool cacheBb, const polyPatch&);
|
||||
treeDataFace(const bool cacheBb, const polyPatch& patch);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -30,7 +30,7 @@ void Foam::mappedPatchBase::distribute(List<Type>& lst) const
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
{
|
||||
lst = AMI().interpolateToSource(Field<Type>(lst.xfer()));
|
||||
lst = AMI().interpolateToSource(Field<Type>(std::move(lst)));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -52,11 +52,7 @@ void Foam::mappedPatchBase::distribute
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
{
|
||||
lst = AMI().interpolateToSource
|
||||
(
|
||||
Field<Type>(lst.xfer()),
|
||||
cop
|
||||
);
|
||||
lst = AMI().interpolateToSource(Field<Type>(std::move(lst)), cop);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -87,7 +83,7 @@ void Foam::mappedPatchBase::reverseDistribute(List<Type>& lst) const
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
{
|
||||
lst = AMI().interpolateToTarget(Field<Type>(lst.xfer()));
|
||||
lst = AMI().interpolateToTarget(Field<Type>(std::move(lst)));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -110,11 +106,7 @@ void Foam::mappedPatchBase::reverseDistribute
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
{
|
||||
lst = AMI().interpolateToTarget
|
||||
(
|
||||
Field<Type>(lst.xfer()),
|
||||
cop
|
||||
);
|
||||
lst = AMI().interpolateToTarget(Field<Type>(std::move(lst)), cop);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@ -753,10 +753,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
||||
// (patches guaranteed to be in increasing order)
|
||||
mesh.resetPrimitives
|
||||
(
|
||||
Xfer<pointField>::null(),
|
||||
xferMove(newFaces),
|
||||
Xfer<labelList>::null(),
|
||||
Xfer<labelList>::null(),
|
||||
autoPtr<pointField>(), // <- null: leaves points untouched
|
||||
autoPtr<faceList>::New(std::move(newFaces)),
|
||||
autoPtr<labelList>(), // <- null: leaves owner untouched
|
||||
autoPtr<labelList>(), // <- null: leaves neighbour untouched
|
||||
patchSizes,
|
||||
patchStarts,
|
||||
true // boundary forms valid boundary mesh.
|
||||
|
||||
@ -669,7 +669,6 @@ bool Foam::searchableSurfaces::checkIntersection
|
||||
<< " locations."
|
||||
<< endl;
|
||||
|
||||
//vtkSetWriter<scalar> setWriter;
|
||||
if (setWriter.valid())
|
||||
{
|
||||
scalarField dist(mag(intersections));
|
||||
@ -677,8 +676,8 @@ bool Foam::searchableSurfaces::checkIntersection
|
||||
(
|
||||
names()[i] + '_' + names()[j],
|
||||
"xyz",
|
||||
intersections.xfer(),
|
||||
dist
|
||||
std::move(intersections),
|
||||
std::move(dist)
|
||||
);
|
||||
wordList valueSetNames(1, "edgeIndex");
|
||||
List<const scalarField*> valueSets
|
||||
|
||||
@ -262,10 +262,13 @@ Foam::autoPtr<Foam::triSurface> Foam::triSurfaceLoader::load
|
||||
|
||||
forAll(selected_, surfi)
|
||||
{
|
||||
List<labelledTri> addfaces;
|
||||
pointField addpoints;
|
||||
|
||||
triSurface addsurf(directory_/selected_[surfi]);
|
||||
|
||||
List<labelledTri> addfaces(addsurf.xferFaces());
|
||||
List<point> addpoints(addsurf.xferPoints());
|
||||
addsurf.swapFaces(addfaces);
|
||||
addsurf.swapPoints(addpoints);
|
||||
|
||||
// Offset the points for all additional surfaces
|
||||
if (surfi)
|
||||
|
||||
Reference in New Issue
Block a user