mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: createPatch: late adding patchfields. Fixes #3410
Thanks to Alexey Matveichev
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
Copyright (C) 2016-2025 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -1476,14 +1476,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
++runTime;
|
++runTime;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
forAll(meshes, meshi)
|
|
||||||
{
|
|
||||||
fvMesh& mesh = meshes[meshi];
|
|
||||||
|
|
||||||
mesh.setInstance(oldInstances[meshi]);
|
forAll(meshes, meshi)
|
||||||
}
|
{
|
||||||
|
fvMesh& mesh = meshes[meshi];
|
||||||
|
mesh.setInstance(overwrite ? oldInstances[meshi] : runTime.timeName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// More precision (for points data)
|
// More precision (for points data)
|
||||||
@ -1493,6 +1490,21 @@ int main(int argc, char *argv[])
|
|||||||
forAll(meshes, meshi)
|
forAll(meshes, meshi)
|
||||||
{
|
{
|
||||||
fvMesh& mesh = meshes[meshi];
|
fvMesh& mesh = meshes[meshi];
|
||||||
|
|
||||||
|
// Override bcs with explicitly provided info. Done late so there
|
||||||
|
// are already patch faces
|
||||||
|
forAll(patchInfoDicts[meshi], sourcei)
|
||||||
|
{
|
||||||
|
const dictionary& patchDict = patchInfoDicts[meshi][sourcei];
|
||||||
|
const word& patchName = patchNames[meshi][sourcei];
|
||||||
|
const label patchID = mesh.boundary().findPatchID(patchName);
|
||||||
|
if (patchID != -1 && patchDict.found("patchFields"))
|
||||||
|
{
|
||||||
|
const dictionary& pfd = patchDict.subDict("patchFields");
|
||||||
|
fvMeshTools::setPatchFields(mesh, patchID, pfd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "\n\nWriting repatched mesh " << mesh.name()
|
Info<< "\n\nWriting repatched mesh " << mesh.name()
|
||||||
<< " to " << runTime.timeName() << nl << endl;
|
<< " to " << runTime.timeName() << nl << endl;
|
||||||
mesh.clearOut(); // remove meshPhi
|
mesh.clearOut(); // remove meshPhi
|
||||||
|
|||||||
Reference in New Issue
Block a user