mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
applyWallFunctionBoundaryConditions - use mvBak()
This commit is contained in:
@ -190,13 +190,12 @@ void replaceBoundaryType
|
|||||||
const_cast<word&>(IOdictionary::typeName) = oldTypeName;
|
const_cast<word&>(IOdictionary::typeName) = oldTypeName;
|
||||||
const_cast<word&>(dict.type()) = dict.headerClassName();
|
const_cast<word&>(dict.type()) = dict.headerClassName();
|
||||||
|
|
||||||
// Make a backup of the old field
|
// Make a backup of the old file
|
||||||
word backupName(dict.name() + ".old");
|
if (mvBak(dict.objectPath(), "old"))
|
||||||
Info<< " copying " << dict.name() << " to "
|
{
|
||||||
<< backupName << endl;
|
Info<< " Backup original file to "
|
||||||
IOdictionary dictOld = dict;
|
<< (dict.objectPath() + ".old") << endl;
|
||||||
dictOld.rename(backupName);
|
}
|
||||||
dictOld.regIOobject::write();
|
|
||||||
|
|
||||||
// Loop through boundary patches and update
|
// Loop through boundary patches and update
|
||||||
const polyBoundaryMesh& bMesh = mesh.boundaryMesh();
|
const polyBoundaryMesh& bMesh = mesh.boundaryMesh();
|
||||||
|
|||||||
@ -84,11 +84,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mv
|
if (mvBak(solutionDict.objectPath(), "old"))
|
||||||
(
|
{
|
||||||
solutionDict.objectPath(),
|
Info<< "Backup to "
|
||||||
solutionDict.objectPath() + ".old"
|
<< (solutionDict.objectPath() + ".old") << nl;
|
||||||
);
|
}
|
||||||
|
|
||||||
|
|
||||||
solutionDict.writeObject
|
solutionDict.writeObject
|
||||||
(
|
(
|
||||||
@ -97,8 +98,8 @@ int main(int argc, char *argv[])
|
|||||||
IOstream::UNCOMPRESSED
|
IOstream::UNCOMPRESSED
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Backup to " << (solutionDict.objectPath() + ".old") << nl
|
Info<< "Write to "
|
||||||
<< "Write to " << solutionDict.objectPath() << nl << endl;
|
<< solutionDict.objectPath() << nl << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user