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 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation | 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> template<class Face>
void Foam::MeshedSurface<Face>::transfer void Foam::MeshedSurface<Face>::transfer
( (

View File

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

View File

@ -53,7 +53,7 @@ namespace Detail
class MeshedSurfaceIOAllocator class MeshedSurfaceIOAllocator
{ {
// Private data // Private Data
//- Points //- Points
pointIOField points_; pointIOField points_;