diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index 615f14e61b..5caa3e0703 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -178,21 +178,82 @@ int main(int argc, char *argv[]) label trianglei = 0; - // Copy triangles1 into trianglesAll - forAll(surface1, facei) + + + // Determine map for both regions + label nNewPatches = 0; + labelList patch1Map(surface1.patches().size()); + labelList patch2Map(surface2.patches().size()); + + if (mergeRegions) { - facesAll[trianglei++] = surface1[facei]; + HashTable