From 30bea84facb2cc6190abd767b81c806ff2dd24ea Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sat, 25 May 2019 17:40:39 +0100 Subject: [PATCH] C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers Replaced all uses of complex Xfer class with C++11 "move" constructors and assignment operators. Removed the now redundant Xfer class. This substantial changes improves consistency between OpenFOAM and the C++11 STL containers and algorithms, reduces memory allocation and copy overhead when returning containers from functions and simplifies maintenance of the core libraries significantly. --- .../chemFoam/createSingleCellMesh.H | 8 +- ...terfaceCompositionPhaseChangePhaseSystem.C | 6 +- ...terfaceCompositionPhaseChangePhaseSystem.H | 4 +- .../MomentumTransferPhaseSystem.C | 30 +-- .../MomentumTransferPhaseSystem.H | 16 +- .../PhaseTransferPhaseSystem.C | 6 +- .../PhaseTransferPhaseSystem.H | 4 +- .../PopulationBalancePhaseSystem.C | 6 +- .../PopulationBalancePhaseSystem.H | 4 +- .../ThermalPhaseChangePhaseSystem.C | 4 +- .../ThermalPhaseChangePhaseSystem.H | 4 +- .../phaseSystems/phaseSystem/phaseSystem.C | 6 +- .../phaseSystems/phaseSystem/phaseSystem.H | 16 +- .../test/DynamicList/Test-DynamicList.C | 8 +- applications/test/HashTable/Test-hashTable.C | 6 +- .../test/HashTable2/Test-HashTable2.C | 4 +- .../test/IndirectList/Test-IndirectList.C | 4 +- applications/test/List/Test-List.C | 6 +- applications/test/ListHashTable/Make/files | 3 + .../Make/options | 0 .../Test-ListHashTable.C} | 10 +- applications/test/PtrList/Test-PtrList.C | 6 +- applications/test/StaticHashTable/Make/files | 3 - .../test/dictionary/Test-dictionary.C | 4 +- applications/test/mesh/Test-mesh.C | 4 +- applications/test/parallel/Test-parallel.C | 4 +- .../test/primitivePatch/Test-PrimitivePatch.C | 6 +- applications/test/xfer/Make/files | 3 - applications/test/xfer/Make/options | 0 applications/test/xfer/Test-xferList.C | 135 ------------ .../refinementLevel/refinementLevel.C | 8 +- .../Optional/ccm26ToFoam/ccm26ToFoam.C | 10 +- .../mesh/conversion/ansysToFoam/ansysToFoam.L | 6 +- .../mesh/conversion/cfx4ToFoam/cfx4ToFoam.C | 4 +- .../fluent3DMeshToFoam/fluent3DMeshToFoam.L | 10 +- .../fluentMeshToFoam/fluentMeshToFoam.L | 4 +- .../conversion/gambitToFoam/gambitToFoam.L | 4 +- .../mesh/conversion/gmshToFoam/gmshToFoam.C | 4 +- .../ideasUnvToFoam/ideasUnvToFoam.C | 12 +- .../mesh/conversion/kivaToFoam/readKivaGrid.H | 2 +- .../mesh/conversion/mshToFoam/mshToFoam.C | 4 +- .../netgenNeutralToFoam/netgenNeutralToFoam.C | 4 +- .../conversion/plot3dToFoam/plot3dToFoam.C | 4 +- .../mesh/conversion/sammToFoam/writeMesh.C | 10 +- .../mesh/conversion/star3ToFoam/writeMesh.C | 10 +- .../conversion/tetgenToFoam/tetgenToFoam.C | 6 +- .../vtkUnstructuredToFoam.C | 4 +- .../mesh/generation/blockMesh/blockMesh.C | 4 +- .../extrudeMesh/extrudedMesh/extrudedMesh.H | 6 +- .../extrudedMesh/extrudedMeshTemplates.C | 15 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 10 +- .../generation/extrude2DMesh/extrude2DMesh.C | 10 +- .../patchToPoly2DMesh/patchToPoly2DMesh.C | 4 +- .../DelaunayMesh/DelaunayMeshIO.C | 10 +- .../DelaunayMesh/DistributedDelaunayMesh.C | 8 +- .../backgroundMeshDecomposition.C | 12 +- .../conformalVoronoiMeshCalcDualMesh.C | 12 +- .../conformalVoronoiMeshConformToSurface.C | 4 +- .../conformalVoronoiMeshI.H | 4 +- .../conformalVoronoiMeshIO.C | 18 +- .../autoDensity/autoDensity.C | 4 +- .../initialPointsMethod/pointFile/pointFile.C | 4 +- .../foamyHexMeshBackgroundMesh.C | 4 +- .../foamyMesh/foamyQuadMesh/foamyQuadMesh.C | 10 +- .../foamyQuadMesh/shortEdgeFilter2D.C | 10 +- .../generation/snappyHexMesh/snappyHexMesh.C | 12 +- .../manipulation/mirrorMesh/mirrorFvMesh.C | 8 +- .../manipulation/renumberMesh/renumberMesh.C | 8 +- .../decomposePar/domainDecomposition.C | 14 +- .../reconstructParMesh/reconstructParMesh.C | 8 +- .../redistributePar/loadOrCreateMesh.C | 10 +- .../steadyParticleTracksTemplates.C | 6 +- .../surfaceMeshConvertTesting.C | 4 +- .../surfaceMeshImport/surfaceMeshImport.C | 4 +- .../surfaceMeshTriangulate.C | 12 +- src/OSspecific/POSIX/POSIX.C | 5 +- src/OpenFOAM/Make/files | 2 +- .../algorithms/indexedOctree/treeDataCell.C | 6 +- .../algorithms/indexedOctree/treeDataCell.H | 6 +- .../Dictionaries/Dictionary/Dictionary.C | 9 +- .../Dictionaries/Dictionary/Dictionary.H | 7 +- .../DictionaryBase/DictionaryBase.C | 13 +- .../DictionaryBase/DictionaryBase.H | 7 +- .../PtrDictionary/PtrDictionary.C | 9 +- .../PtrDictionary/PtrDictionary.H | 7 +- .../PtrListDictionary/PtrListDictionary.C | 9 +- .../PtrListDictionary/PtrListDictionary.H | 7 +- .../HashTables/HashPtrTable/HashPtrTable.C | 31 ++- .../HashTables/HashPtrTable/HashPtrTable.H | 9 +- .../containers/HashTables/HashSet/HashSet.C | 32 ++- .../containers/HashTables/HashSet/HashSet.H | 26 +-- .../HashTables/HashTable/HashTable.C | 24 ++- .../HashTables/HashTable/HashTable.H | 13 +- .../HashTables/HashTable/HashTableI.H | 10 +- .../ListHashTable.C} | 105 ++++++---- .../ListHashTable.H} | 114 +++++----- .../ListHashTableCore.C} | 6 +- .../ListHashTableI.H} | 95 ++++----- .../ListHashTableIO.C} | 42 ++-- src/OpenFOAM/containers/HashTables/Map/Map.H | 29 ++- .../containers/HashTables/PtrMap/PtrMap.H | 23 ++- .../containers/Identifiers/Keyed/Keyed.H | 6 +- .../containers/Identifiers/Keyed/KeyedI.H | 6 +- .../LinkedLists/accessTypes/ILList/ILList.C | 19 +- .../LinkedLists/accessTypes/ILList/ILList.H | 10 +- .../LinkedLists/accessTypes/LList/LList.C | 18 +- .../LinkedLists/accessTypes/LList/LList.H | 10 +- .../accessTypes/LPtrList/LPtrList.C | 18 +- .../accessTypes/LPtrList/LPtrList.H | 12 +- .../LinkedLists/accessTypes/UILList/UILList.C | 16 +- .../LinkedLists/accessTypes/UILList/UILList.H | 11 +- .../linkTypes/DLListBase/DLListBase.H | 3 +- .../Lists/BiIndirectList/BiIndirectList.H | 11 +- .../Lists/BiIndirectList/BiIndirectListI.H | 32 +-- src/OpenFOAM/containers/Lists/BinSum/BinSum.H | 3 +- .../Lists/CompactListList/CompactListList.C | 8 +- .../Lists/CompactListList/CompactListList.H | 14 +- .../Lists/CompactListList/CompactListListI.H | 20 +- .../Lists/Distribution/Distribution.C | 36 +++- .../Lists/Distribution/Distribution.H | 13 +- .../Lists/DynamicList/DynamicList.H | 28 ++- .../Lists/DynamicList/DynamicListI.H | 73 +++++-- .../Lists/IndirectList/IndirectList.H | 14 +- .../Lists/IndirectList/IndirectListI.H | 19 +- src/OpenFOAM/containers/Lists/List/List.C | 20 +- src/OpenFOAM/containers/Lists/List/List.H | 21 +- src/OpenFOAM/containers/Lists/List/ListI.H | 9 +- .../Lists/PackedList/PackedBoolList.C | 6 +- .../Lists/PackedList/PackedBoolList.H | 14 +- .../Lists/PackedList/PackedBoolListI.H | 22 +- .../containers/Lists/PackedList/PackedList.C | 11 +- .../containers/Lists/PackedList/PackedList.H | 18 +- .../containers/Lists/PackedList/PackedListI.H | 13 +- .../containers/Lists/PtrList/PtrList.C | 17 +- .../containers/Lists/PtrList/PtrList.H | 12 +- .../containers/Lists/PtrList/PtrListI.H | 9 +- .../Lists/SortableList/SortableList.C | 29 ++- .../Lists/SortableList/SortableList.H | 17 +- .../containers/Lists/UPtrList/UPtrList.C | 7 - .../containers/Lists/UPtrList/UPtrList.H | 6 - .../containers/Lists/UPtrList/UPtrListI.H | 9 +- .../IOobjects/CompactIOField/CompactIOField.C | 113 ++++++---- .../IOobjects/CompactIOField/CompactIOField.H | 29 +-- .../IOobjects/CompactIOList/CompactIOList.C | 48 ++++- .../IOobjects/CompactIOList/CompactIOList.H | 11 +- .../IOobjects/CompactIOList/ListCompactIO.C | 31 +++ .../IOobjects/CompactIOList/ListCompactIO.H | 8 + .../IOobjects/GlobalIOField/GlobalIOField.C | 46 ++++- .../IOobjects/GlobalIOField/GlobalIOField.H | 14 +- .../db/IOobjects/GlobalIOList/GlobalIOList.C | 35 +++- .../db/IOobjects/GlobalIOList/GlobalIOList.H | 11 +- src/OpenFOAM/db/IOobjects/IOField/IOField.C | 63 +++++- src/OpenFOAM/db/IOobjects/IOField/IOField.H | 13 +- src/OpenFOAM/db/IOobjects/IOList/IOList.C | 39 +++- src/OpenFOAM/db/IOobjects/IOList/IOList.H | 14 +- src/OpenFOAM/db/IOobjects/IOMap/IOMap.C | 31 ++- src/OpenFOAM/db/IOobjects/IOMap/IOMap.H | 16 +- .../db/IOobjects/IOPtrList/IOPtrList.C | 25 ++- .../db/IOobjects/IOPtrList/IOPtrList.H | 10 +- .../db/IOobjects/IOdictionary/IOdictionary.C | 28 ++- .../db/IOobjects/IOdictionary/IOdictionary.H | 14 +- .../IOobjects/IOdictionary/baseIOdictionary.C | 32 ++- .../IOobjects/IOdictionary/baseIOdictionary.H | 11 +- .../IOdictionary/localIOdictionary.C | 19 +- .../IOdictionary/localIOdictionary.H | 10 +- .../IOdictionary/unwatchedIOdictionary.C | 21 +- .../IOdictionary/unwatchedIOdictionary.H | 13 +- .../decomposedBlockData/decomposedBlockData.C | 5 +- .../decomposedBlockData/decomposedBlockData.H | 4 +- src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H | 8 +- src/OpenFOAM/db/dictionary/dictionary.C | 63 ++++-- src/OpenFOAM/db/dictionary/dictionary.H | 33 ++- .../primitiveEntry/primitiveEntry.C | 6 +- .../primitiveEntry/primitiveEntry.H | 6 +- .../writeObjectsBase/writeObjectsBase.C | 4 +- .../DimensionedField/DimensionedField.C | 47 +++-- .../DimensionedField/DimensionedField.H | 14 +- .../FieldFields/FieldField/FieldField.C | 24 ++- .../FieldFields/FieldField/FieldField.H | 8 +- .../fields/Fields/DynamicField/DynamicField.H | 27 +-- .../Fields/DynamicField/DynamicFieldI.H | 59 ++++-- src/OpenFOAM/fields/Fields/Field/Field.C | 126 ++++++----- src/OpenFOAM/fields/Fields/Field/Field.H | 30 +-- .../GeometricField/GeometricBoundaryField.C | 32 ++- .../GeometricField/GeometricField.C | 52 ++++- .../GeometricField/GeometricField.H | 28 ++- .../pointPatchField/pointPatchField.H | 3 +- .../hostCollatedFileOperation.C | 5 +- .../masterUncollatedFileOperation.C | 4 +- src/OpenFOAM/memory/Xfer/Xfer.H | 195 ------------------ src/OpenFOAM/memory/Xfer/XferI.H | 169 --------------- src/OpenFOAM/meshes/meshShapes/cell/cell.H | 10 +- src/OpenFOAM/meshes/meshShapes/cell/cellI.H | 20 +- src/OpenFOAM/meshes/meshShapes/face/face.C | 4 +- src/OpenFOAM/meshes/meshShapes/face/face.H | 10 +- src/OpenFOAM/meshes/meshShapes/face/faceI.H | 15 +- .../polyMesh/globalMeshData/globalIndex.H | 6 +- .../polyMesh/globalMeshData/globalIndexI.H | 6 +- .../polyMesh/globalMeshData/globalMeshData.C | 12 +- .../polyMesh/globalMeshData/globalPoints.C | 6 +- .../mapDistribute/IOmapDistribute.C | 9 +- .../mapDistribute/IOmapDistribute.H | 6 +- .../mapPolyMesh/mapDistribute/mapDistribute.C | 49 ++--- .../mapPolyMesh/mapDistribute/mapDistribute.H | 30 ++- .../mapDistribute/mapDistributeBase.C | 32 ++- .../mapDistribute/mapDistributeBase.H | 21 +- .../mapDistribute/mapDistributeLagrangian.H | 8 +- .../mapDistribute/mapDistributePolyMesh.C | 114 +++++----- .../mapDistribute/mapDistributePolyMesh.H | 48 ++--- .../polyBoundaryMesh/polyBoundaryMesh.C | 4 +- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 45 ++-- src/OpenFOAM/meshes/polyMesh/polyMesh.H | 35 ++-- .../meshes/polyMesh/polyMeshFromShapeMesh.C | 10 +- .../polyMeshTetDecomposition.C | 2 +- .../meshes/polyMesh/zones/cellZone/cellZone.C | 34 ++- .../meshes/polyMesh/zones/cellZone/cellZone.H | 15 +- .../meshes/polyMesh/zones/faceZone/faceZone.C | 34 ++- .../meshes/polyMesh/zones/faceZone/faceZone.H | 25 ++- .../polyMesh/zones/pointZone/pointZone.C | 23 ++- .../polyMesh/zones/pointZone/pointZone.H | 15 +- .../meshes/polyMesh/zones/zone/zone.C | 36 +++- .../meshes/polyMesh/zones/zone/zone.H | 23 ++- .../PrimitivePatch/PrimitivePatch.C | 81 +++++++- .../PrimitivePatch/PrimitivePatch.H | 29 ++- .../meshes/primitiveMesh/primitiveMesh.C | 6 +- .../meshes/primitiveMesh/primitiveMesh.H | 5 +- .../primitives/nullObject/nullObject.H | 6 +- .../primitives/nullObject/nullObjectI.H | 8 +- .../primitives/strings/fileName/fileName.C | 10 +- .../primitives/strings/fileName/fileName.H | 6 +- .../primitives/strings/fileName/fileNameI.H | 10 +- .../primitives/strings/lists/hashedWordList.C | 13 +- .../primitives/strings/lists/hashedWordList.H | 20 +- .../primitives/strings/string/string.H | 9 + .../primitives/strings/string/stringI.H | 30 ++- .../epsilonWallFunctionFvPatchScalarField.C | 2 +- .../omegaWallFunctionFvPatchScalarField.C | 2 +- src/conversion/meshReader/meshReader.C | 8 +- src/conversion/polyDualMesh/polyDualMesh.C | 25 ++- .../dynamicFvMesh/dynamicFvMesh.C | 28 +-- .../dynamicFvMesh/dynamicFvMesh.H | 14 +- .../extrudePatchMesh/extrudePatchMesh.C | 18 +- .../fvMeshDistribute/fvMeshDistribute.C | 48 ++--- src/dynamicMesh/fvMeshSubset/fvMeshSubset.C | 14 +- src/dynamicMesh/polyMeshAdder/polyMeshAdder.C | 18 +- .../polyTopoChange/hexRef8/hexRef8.C | 2 +- .../polyTopoChange/polyTopoChange.C | 26 +-- src/fileFormats/starcd/STARCDCore.C | 6 +- .../processor/processorFvPatchField.C | 10 +- src/finiteVolume/fvMesh/fvMesh.C | 30 ++- src/finiteVolume/fvMesh/fvMesh.H | 16 +- .../singleCellFvMesh/singleCellFvMesh.C | 30 +-- .../volFieldValue/volFieldValueTemplates.C | 4 +- src/functionObjects/field/pressure/pressure.C | 8 +- .../field/streamLine/streamLine.C | 6 +- src/functionObjects/forces/forces/forces.C | 4 +- .../basic/InteractionLists/InteractionLists.C | 12 +- .../blockMesh/blockMesh/blockMeshTopology.C | 6 +- .../medialAxisMeshMover.C | 5 +- .../meshRefinement/meshRefinement.C | 2 +- .../AMIInterpolation/AMIInterpolation.C | 6 +- .../AMIInterpolationParallelOps.C | 6 +- .../coordinateSystems/coordinateSystems.C | 6 +- .../coordinateSystems/coordinateSystems.H | 4 +- src/meshTools/edgeMesh/edgeMesh.C | 29 +-- src/meshTools/edgeMesh/edgeMesh.H | 19 +- src/meshTools/edgeMesh/edgeMeshI.H | 19 +- .../extendedEdgeMesh/extendedEdgeMesh.C | 40 +++- .../extendedEdgeMesh/extendedEdgeMesh.H | 12 +- .../extendedEdgeMeshTemplates.C | 4 +- .../extendedFeatureEdgeMeshTemplates.C | 4 +- src/meshTools/indexedOctree/treeDataEdge.C | 6 +- src/meshTools/indexedOctree/treeDataEdge.H | 4 +- src/meshTools/indexedOctree/treeDataFace.C | 4 +- src/meshTools/indexedOctree/treeDataFace.H | 4 +- .../mappedPatchBaseTemplates.C | 10 +- src/meshTools/meshSearch/meshSearch.C | 4 +- .../polyMeshZipUpCells/polyMeshZipUpCells.C | 10 +- src/meshTools/regionSplit/regionSplit.C | 6 +- .../searchableSurfaces/searchableSurfaces.C | 4 +- .../intersectedSurface/intersectedSurface.C | 4 +- .../decompositionMethods/Make/options | 2 +- .../decompositionMethod/decompositionMethod.C | 8 +- .../manualDecomp/manualDecomp.C | 4 +- .../multiLevelDecomp/multiLevelDecomp.C | 6 +- .../distributedTriSurfaceMesh.C | 20 +- .../radiationModels/viewFactor/viewFactor.C | 4 +- .../manualRenumber/manualRenumber.C | 4 +- .../rigidBodyMotion/rigidBodyMotion.H | 4 +- .../rigidBodyMeshMotion/rigidBodyMeshMotion.H | 3 + .../rigidBodyMeshMotionSolver.H | 3 + .../cellVolumeWeight/cellVolumeWeightMethod.C | 8 +- .../meshToMeshMethod/meshToMeshMethod.C | 4 +- src/sampling/meshToMesh/meshToMesh.C | 12 +- .../meshToMesh/meshToMeshParallelOps.C | 6 +- .../sampledSurface/isoSurface/isoSurface.C | 12 +- .../isoSurface/sampledIsoSurface.C | 6 +- src/surfMesh/MeshedSurface/MeshedSurface.C | 114 ++++------ src/surfMesh/MeshedSurface/MeshedSurface.H | 37 ++-- .../MeshedSurface/MeshedSurfaceZones.C | 6 +- .../MeshedSurfaceIOAllocator.C | 42 ++-- .../MeshedSurfaceIOAllocator.H | 28 ++- .../UnsortedMeshedSurface.C | 94 ++++----- .../UnsortedMeshedSurface.H | 33 ++- src/surfMesh/surfMesh/surfMesh.C | 46 ++--- src/surfMesh/surfMesh/surfMesh.H | 15 +- .../surfZone/surfZone/surfZoneIOList.C | 6 +- .../surfZone/surfZone/surfZoneIOList.H | 4 +- .../surfaceFormats/nas/NASsurfaceFormat.C | 4 +- .../surfaceFormats/obj/OBJsurfaceFormat.C | 4 +- .../surfaceFormats/off/OFFsurfaceFormat.C | 4 +- .../surfaceFormats/ofs/OFSsurfaceFormat.C | 20 +- .../starcd/STARCDsurfaceFormat.C | 4 +- .../surfaceFormats/stl/STLsurfaceFormat.C | 8 +- .../surfaceFormats/surfaceFormatsCore.C | 4 +- .../surfaceFormats/tri/TRIsurfaceFormat.C | 6 +- .../surfaceFormats/vtk/VTKsurfaceFormat.C | 6 +- .../triSurface/interfaces/AC3D/readAC.C | 4 +- .../triSurface/interfaces/NAS/readNAS.C | 4 +- .../triSurface/interfaces/OBJ/readOBJ.C | 4 +- .../triSurface/interfaces/VTK/readVTK.C | 6 +- src/triSurface/triSurface/triSurface.C | 26 ++- src/triSurface/triSurface/triSurface.H | 10 +- 323 files changed, 3238 insertions(+), 2500 deletions(-) create mode 100644 applications/test/ListHashTable/Make/files rename applications/test/{StaticHashTable => ListHashTable}/Make/options (100%) rename applications/test/{StaticHashTable/Test-staticHashTable.C => ListHashTable/Test-ListHashTable.C} (95%) delete mode 100644 applications/test/StaticHashTable/Make/files delete mode 100644 applications/test/xfer/Make/files delete mode 100644 applications/test/xfer/Make/options delete mode 100644 applications/test/xfer/Test-xferList.C rename src/OpenFOAM/containers/HashTables/{StaticHashTable/StaticHashTable.C => ListHashTable/ListHashTable.C} (81%) rename src/OpenFOAM/containers/HashTables/{StaticHashTable/StaticHashTable.H => ListHashTable/ListHashTable.H} (76%) rename src/OpenFOAM/containers/HashTables/{StaticHashTable/StaticHashTableCore.C => ListHashTable/ListHashTableCore.C} (90%) rename src/OpenFOAM/containers/HashTables/{StaticHashTable/StaticHashTableI.H => ListHashTable/ListHashTableI.H} (69%) rename src/OpenFOAM/containers/HashTables/{StaticHashTable/StaticHashTableIO.C => ListHashTable/ListHashTableIO.C} (79%) delete mode 100644 src/OpenFOAM/memory/Xfer/Xfer.H delete mode 100644 src/OpenFOAM/memory/Xfer/XferI.H diff --git a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H index 9b9d0f376b..4968bc4281 100644 --- a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H +++ b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H @@ -25,10 +25,10 @@ fvMesh mesh runTime, IOobject::READ_IF_PRESENT ), - xferMove>(points), - faces.xfer(), - owner.xfer(), - neighbour.xfer() + move(points), + move(faces), + move(owner), + move(neighbour) ); List patches(1); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 2b5791b24c..9c341110a4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -261,7 +261,7 @@ Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdt template -Foam::Xfer> +Foam::PtrList Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdts() const { PtrList dmdts(BasePhaseSystem::dmdts()); @@ -302,7 +302,7 @@ Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdts() const } } - return dmdts.xfer(); + return dmdts; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H index 57eef2d6f0..dc04cb8a79 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,7 +133,7 @@ public: virtual tmp dmdt(const phasePairKey& key) const; //- Return the mass transfer rates for each phase - virtual Xfer> dmdts() const; + virtual PtrList dmdts() const; //- Return the mass transfer matrices virtual autoPtr massTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index 42b6acb8eb..218748124e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -451,7 +451,7 @@ Foam::MomentumTransferPhaseSystem::momentumTransferf() template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::AFfs() const { PtrList AFfs(this->phaseModels_.size()); @@ -485,12 +485,12 @@ Foam::MomentumTransferPhaseSystem::AFfs() const this->fillFields("AFf", dimDensity/dimTime, AFfs); } - return AFfs.xfer(); + return AFfs; } template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::phiFs ( const PtrList& rAUs @@ -626,12 +626,12 @@ Foam::MomentumTransferPhaseSystem::phiFs this->fillFields("phiF", dimForce/dimDensity/dimVelocity, phiFs); } - return phiFs.xfer(); + return phiFs; } template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::phiFfs ( const PtrList& rAUfs @@ -789,12 +789,12 @@ Foam::MomentumTransferPhaseSystem::phiFfs this->fillFields("phiFf", dimForce/dimDensity/dimVelocity, phiFfs); } - return phiFfs.xfer(); + return phiFfs; } template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::phiKdPhis ( const PtrList& rAUs @@ -831,12 +831,12 @@ Foam::MomentumTransferPhaseSystem::phiKdPhis ); } - return phiKdPhis.xfer(); + return phiKdPhis; } template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::phiKdPhifs ( const PtrList& rAUfs @@ -873,12 +873,12 @@ Foam::MomentumTransferPhaseSystem::phiKdPhifs ); } - return phiKdPhifs.xfer(); + return phiKdPhifs; } template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::KdUByAs ( const PtrList& rAUs @@ -909,12 +909,12 @@ Foam::MomentumTransferPhaseSystem::KdUByAs this->fillFields("KdUByA", dimVelocity, KdUByAs); } - return KdUByAs.xfer(); + return KdUByAs; } template -Foam::Xfer> +Foam::PtrList Foam::MomentumTransferPhaseSystem::ddtCorrByAs ( const PtrList& rAUs, @@ -1009,7 +1009,7 @@ Foam::MomentumTransferPhaseSystem::ddtCorrByAs } } - return ddtCorrByAs.xfer(); + return ddtCorrByAs; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H index 3191199c96..aa64f1de70 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -212,19 +212,19 @@ public: //- Return implicit force coefficients on the faces, for the face-based // algorithm. - virtual Xfer> AFfs() const; + virtual PtrList AFfs() const; //- Return the explicit force fluxes for the cell-based algorithm, that // do not depend on phase mass/volume fluxes, and can therefore be // evaluated outside the corrector loop. This includes things like // lift, turbulent dispersion, and wall lubrication. - virtual Xfer> phiFs + virtual PtrList phiFs ( const PtrList& rAUs ); //- As phiFs, but for the face-based algorithm - virtual Xfer> phiFfs + virtual PtrList phiFfs ( const PtrList& rAUfs ); @@ -232,13 +232,13 @@ public: //- Return the explicit drag force fluxes for the cell-based algorithm. // These depend on phase mass/volume fluxes, and must therefore be // evaluated inside the corrector loop. - virtual Xfer> phiKdPhis + virtual PtrList phiKdPhis ( const PtrList& rAUs ) const; //- As phiKdPhis, but for the face-based algorithm - virtual Xfer> phiKdPhifs + virtual PtrList phiKdPhifs ( const PtrList& rAUfs ) const; @@ -247,7 +247,7 @@ public: // algorithm. This is the cell-equivalent of phiKdPhis. These depend on // phase velocities, and must therefore be evaluated inside the // corrector loop. - virtual Xfer> KdUByAs + virtual PtrList KdUByAs ( const PtrList& rAUs ) const; @@ -268,7 +268,7 @@ public: //- Return the flux corrections for the cell-based algorithm. These // depend on phase mass/volume fluxes, and must therefore be evaluated // inside the corrector loop. - virtual Xfer> ddtCorrByAs + virtual PtrList ddtCorrByAs ( const PtrList& rAUs, const bool includeVirtualMass = false diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C index 724565c327..c4073c98c5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ Foam::PhaseTransferPhaseSystem::dmdt template -Foam::Xfer> +Foam::PtrList Foam::PhaseTransferPhaseSystem::dmdts() const { PtrList dmdts(BasePhaseSystem::dmdts()); @@ -116,7 +116,7 @@ Foam::PhaseTransferPhaseSystem::dmdts() const this->addField(pair.phase2(), "dmdt", - rDmdt, dmdts); } - return dmdts.xfer(); + return dmdts; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H index 2bc2e7fda1..e161a9868c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,7 +105,7 @@ public: virtual tmp dmdt(const phasePairKey& key) const; //- Return the mass transfer rates for each phase - virtual Xfer> dmdts() const; + virtual PtrList dmdts() const; //- Return the mass transfer matrices virtual autoPtr massTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C index d1a273097d..4ef7f2f1d7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -148,7 +148,7 @@ Foam::PopulationBalancePhaseSystem::dmdt template -Foam::Xfer> +Foam::PtrList Foam::PopulationBalancePhaseSystem::dmdts() const { PtrList dmdts(BasePhaseSystem::dmdts()); @@ -162,7 +162,7 @@ Foam::PopulationBalancePhaseSystem::dmdts() const this->addField(pair.phase2(), "dmdt", - pDmdt, dmdts); } - return dmdts.xfer(); + return dmdts; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H index 1432bd08b4..a761b8c562 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,7 +96,7 @@ public: virtual tmp dmdt(const phasePairKey& key) const; //- Return the mass transfer rates for each phase - virtual Xfer> dmdts() const; + virtual PtrList dmdts() const; //- Return the mass transfer matrices virtual autoPtr massTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 74c43092df..ffeba45d14 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -188,7 +188,7 @@ Foam::ThermalPhaseChangePhaseSystem::dmdt template -Foam::Xfer> +Foam::PtrList Foam::ThermalPhaseChangePhaseSystem::dmdts() const { PtrList dmdts(BasePhaseSystem::dmdts()); @@ -211,7 +211,7 @@ Foam::ThermalPhaseChangePhaseSystem::dmdts() const this->addField(pair.phase2(), "dmdt", - wDmdt, dmdts); } - return dmdts.xfer(); + return dmdts; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H index 4b4d863d8c..47cfe694fd 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,7 +121,7 @@ public: virtual tmp dmdt(const phasePairKey& key) const; //- Return the mass transfer rates for each phase - virtual Xfer> dmdts() const; + virtual PtrList dmdts() const; //- Return the heat transfer matrices virtual autoPtr heatTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index 399d41e612..873b8c9778 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -342,11 +342,11 @@ Foam::tmp Foam::phaseSystem::dmdt } -Foam::Xfer> Foam::phaseSystem::dmdts() const +Foam::PtrList Foam::phaseSystem::dmdts() const { PtrList dmdts(this->phaseModels_.size()); - return dmdts.xfer(); + return dmdts; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H index a1ad7f7f5b..4239a08d78 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H @@ -441,7 +441,7 @@ public: virtual tmp dmdt(const phasePairKey& key) const; //- Return the mass transfer rates for each phase - virtual Xfer> dmdts() const; + virtual PtrList dmdts() const; // Transfers @@ -456,34 +456,34 @@ public: //- Return the implicit force coefficients for the face-based // algorithm - virtual Xfer> AFfs() const = 0; + virtual PtrList AFfs() const = 0; //- Return the force fluxes for the cell-based algorithm - virtual Xfer> phiFs + virtual PtrList phiFs ( const PtrList& rAUs ) = 0; //- Return the force fluxes for the face-based algorithm - virtual Xfer> phiFfs + virtual PtrList phiFfs ( const PtrList& rAUfs ) = 0; //- Return the force fluxes for the cell-based algorithm - virtual Xfer> phiKdPhis + virtual PtrList phiKdPhis ( const PtrList& rAUs ) const = 0; //- Return the force fluxes for the face-based algorithm - virtual Xfer> phiKdPhifs + virtual PtrList phiKdPhifs ( const PtrList& rAUfs ) const = 0; //- Return the explicit part of the drag force - virtual Xfer> KdUByAs + virtual PtrList KdUByAs ( const PtrList& rAUs ) const = 0; @@ -501,7 +501,7 @@ public: ) = 0; //- Return the flux corrections for the cell-based algorithm - virtual Xfer> ddtCorrByAs + virtual PtrList ddtCorrByAs ( const PtrList& rAUs, const bool includeVirtualMass = false diff --git a/applications/test/DynamicList/Test-DynamicList.C b/applications/test/DynamicList/Test-DynamicList.C index 91ae148908..6f0d3cab57 100644 --- a/applications/test/DynamicList/Test-DynamicList.C +++ b/applications/test/DynamicList/Test-DynamicList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,13 +173,13 @@ int main(int argc, char *argv[]) printInfo("dlC", dlC, true); - List