diff --git a/applications/utilities/preProcessing/mapFields/Make/files b/applications/utilities/preProcessing/mapFields/Make/files index a779c1591c..4503a5fa98 100644 --- a/applications/utilities/preProcessing/mapFields/Make/files +++ b/applications/utilities/preProcessing/mapFields/Make/files @@ -1,4 +1,5 @@ mapLagrangian.C +mapMeshes.C mapFields.C EXE = $(FOAM_APPBIN)/mapFields diff --git a/applications/utilities/preProcessing/mapFields/MapConsistentVolFields.H b/applications/utilities/preProcessing/mapFields/MapConsistentVolFields.H index 8dcaffa00f..8f6c36d72b 100644 --- a/applications/utilities/preProcessing/mapFields/MapConsistentVolFields.H +++ b/applications/utilities/preProcessing/mapFields/MapConsistentVolFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,13 +35,12 @@ License namespace Foam { -template +template void MapConsistentVolFields ( const IOobjectList& objects, const meshToMesh0& meshToMesh0Interp, - const meshToMesh0::order& mapOrder, - const CombineOp& cop + const meshToMesh0::order& mapOrder ) { typedef GeometricField fieldType; @@ -78,12 +77,11 @@ void MapConsistentVolFields ); // Interpolate field - meshToMesh0Interp.interpolate + meshToMesh0Interp.interpolate ( fieldTarget, fieldSource, - mapOrder, - cop + mapOrder ); // Write field @@ -100,8 +98,7 @@ void MapConsistentVolFields meshToMesh0Interp.interpolate ( fieldSource, - mapOrder, - cop + mapOrder ) ); diff --git a/applications/utilities/preProcessing/mapFields/MapVolFields.H b/applications/utilities/preProcessing/mapFields/MapVolFields.H index a570b36faa..61b5448a55 100644 --- a/applications/utilities/preProcessing/mapFields/MapVolFields.H +++ b/applications/utilities/preProcessing/mapFields/MapVolFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,13 +35,12 @@ License namespace Foam { -template +template void MapVolFields ( const IOobjectList& objects, const meshToMesh0& meshToMesh0Interp, - const meshToMesh0::order& mapOrder, - const CombineOp& cop + const meshToMesh0::order& mapOrder ) { typedef GeometricField fieldType; @@ -81,8 +80,7 @@ void MapVolFields ( fieldTarget, fieldSource, - mapOrder, - cop + mapOrder ); // Write field diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index 83d9aa7ca9..7971b6031b 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,148 +33,11 @@ Description \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "fvMesh.H" -#include "surfaceMesh.H" +#include "mapMeshes.H" #include "decompositionMethod.H" -#include "meshToMesh0.H" -#include "processorFvPatch.H" -#include "MapMeshes.H" using namespace Foam; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -void mapConsistentMesh -( - const fvMesh& meshSource, - const fvMesh& meshTarget, - const meshToMesh0::order& mapOrder, - const bool subtract -) -{ - if (subtract) - { - MapConsistentMesh - ( - meshSource, - meshTarget, - mapOrder - ); - } - else - { - MapConsistentMesh - ( - meshSource, - meshTarget, - mapOrder - ); - } -} - - -void mapSubMesh -( - const fvMesh& meshSource, - const fvMesh& meshTarget, - const HashTable& patchMap, - const wordList& cuttingPatches, - const meshToMesh0::order& mapOrder, - const bool subtract -) -{ - if (subtract) - { - MapSubMesh - ( - meshSource, - meshTarget, - patchMap, - cuttingPatches, - mapOrder - ); - } - else - { - MapSubMesh - ( - meshSource, - meshTarget, - patchMap, - cuttingPatches, - mapOrder - ); - } -} - - -void mapConsistentSubMesh -( - const fvMesh& meshSource, - const fvMesh& meshTarget, - const meshToMesh0::order& mapOrder, - const bool subtract -) -{ - if (subtract) - { - MapConsistentSubMesh - ( - meshSource, - meshTarget, - mapOrder - ); - } - else - { - MapConsistentSubMesh - ( - meshSource, - meshTarget, - mapOrder - ); - } -} - - -wordList addProcessorPatches -( - const fvMesh& meshTarget, - const wordList& cuttingPatches -) -{ - // Add the processor patches to the cutting list - HashTable