BUG: mergePolyMesh: merging zones

This commit is contained in:
mattijs
2012-02-03 15:53:37 +00:00
parent b8acd2fb5a
commit cd01c8f1a2
3 changed files with 70 additions and 10 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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