ENH: add transfer for simple MeshedSurface components

This commit is contained in:
Mark Olesen
2019-03-18 18:17:22 +01:00
committed by Andrew Heather
parent a828af280d
commit 0a03ed43bb
3 changed files with 22 additions and 4 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -1107,6 +1107,21 @@ void Foam::MeshedSurface<Face>::swap
}
template<class Face>
void Foam::MeshedSurface<Face>::transfer
(
pointField& pointLst,
List<Face>& faceLst
)
{
ParentType::clearOut(); // Topology changes
this->storedPoints().transfer(pointLst);
this->storedFaces().transfer(faceLst);
this->storedZones().clear();
}
template<class Face>
void Foam::MeshedSurface<Face>::transfer
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -482,6 +482,9 @@ public:
//- Swap contents
void swap(MeshedSurface<Face>& surf);
//- Transfer the components
void transfer(pointField& pointLst, List<Face>& faceLst);
//- Transfer the contents of the argument and annul the argument
void transfer(MeshedSurface<Face>& surf);

View File

@ -53,7 +53,7 @@ namespace Detail
class MeshedSurfaceIOAllocator
{
// Private data
// Private Data
//- Points
pointIOField points_;
@ -139,7 +139,7 @@ public:
}
// Storage Management
// Storage Management
//- Clear primitive data (points, faces)
void clear();