diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C index 6f44ddae8f6d921c395f98405eb62ad4642214ed..8c63dcaf9f30488b15cbad56149759fe734eda61 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -425,14 +425,74 @@ void Foam::mergePolyMesh::merge() } // Add the zones if necessary - if - ( - pointZoneNames_.size() != pointZones().size() - || faceZoneNames_.size() != faceZones().size() - || cellZoneNames_.size() != cellZones().size() - ) + if (pointZoneNames_.size() > pointZones().size()) { + Info<< "Adding new pointZones. " << endl; + label nZones = pointZones().size(); + pointZones().setSize(pointZoneNames_.size()); + + for (label zoneI = nZones; zoneI < pointZoneNames_.size(); zoneI++) + { + pointZones().set + ( + zoneI, + new pointZone + ( + pointZoneNames_[zoneI], + labelList(), + zoneI, + pointZones() + ) + ); + } + } + if (cellZoneNames_.size() > cellZones().size()) + { + Info<< "Adding new cellZones. " << endl; + + label nZones = cellZones().size(); + + cellZones().setSize(cellZoneNames_.size()); + + for (label zoneI = nZones; zoneI < cellZoneNames_.size(); zoneI++) + { + cellZones().set + ( + zoneI, + new cellZone + ( + cellZoneNames_[zoneI], + labelList(), + zoneI, + cellZones() + ) + ); + } + } + if (faceZoneNames_.size() > faceZones().size()) + { + Info<< "Adding new faceZones. " << endl; + + label nZones = faceZones().size(); + + faceZones().setSize(faceZoneNames_.size()); + + for (label zoneI = nZones; zoneI < faceZoneNames_.size(); zoneI++) + { + faceZones().set + ( + zoneI, + new faceZone + ( + faceZoneNames_[zoneI], + labelList(), + boolList(), + zoneI, + faceZones() + ) + ); + } } // Change mesh. No inflation diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 1a47854895ee39e7cf2d5500930dea99384b48d5..5619897041ad54dd068f103092571a00994cd20c 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -853,7 +853,7 @@ int main(int argc, char *argv[]) // Read history if interactive # ifdef HAS_READLINE - if (!batch && !read_history(historyFile)) + if (!batch && !read_history(runTime.path()/historyFile)) { Info<< "Successfully read history from " << historyFile << endl; } diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSet.C b/applications/utilities/mesh/manipulation/topoSet/topoSet.C index cd2a96fc12e056bb63c171d6de5a4d048a088c71..29a5d0753387bcbad5acb8f888252cd4a0fffd01 100644 --- a/applications/utilities/mesh/manipulation/topoSet/topoSet.C +++ b/applications/utilities/mesh/manipulation/topoSet/topoSet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License