BUG: mergeMeshes: overwrite write to 0, not constant

This commit is contained in:
mattijs
2012-10-02 16:19:41 +01:00
parent 920b9734d7
commit 416940ed33

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -115,6 +115,7 @@ int main(int argc, char *argv[])
runTimeMaster runTimeMaster
) )
); );
const word oldInstance = masterMesh.pointsInstance();
Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl; Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl;
@ -139,7 +140,13 @@ int main(int argc, char *argv[])
masterMesh.addMesh(meshToAdd); masterMesh.addMesh(meshToAdd);
masterMesh.merge(); masterMesh.merge();
masterMesh.polyMesh::write();
if (overwrite)
{
masterMesh.setInstance(oldInstance);
}
masterMesh.write();
Info<< "\nEnd\n" << endl; Info<< "\nEnd\n" << endl;