mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: PDRsetFields fails with non-orthogonal outer region (fixes #1907)
- first sort the cells into their ijk bins, and restrict testing for face orientation to those faces with an owner or neighbour that has an ijk bin. ENH: ensure polyMesh from PDRblockMesh is marked as AUTO_WRITE - the particular polyMesh constructor inherits the writeOpt, which makes is dependent on the caller and thus somewhat fragile for the top level caller.
This commit is contained in:
@ -328,14 +328,19 @@ Foam::autoPtr<Foam::polyMesh> Foam::PDRblock::mesh(const IOobject& io) const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IOobject iomesh(io);
|
||||
iomesh.writeOpt() = IOobject::AUTO_WRITE;
|
||||
|
||||
auto meshPtr = autoPtr<polyMesh>::New
|
||||
(
|
||||
io,
|
||||
iomesh,
|
||||
std::move(pts),
|
||||
std::move(faces),
|
||||
std::move(own),
|
||||
std::move(nei)
|
||||
);
|
||||
polyMesh& pmesh = *meshPtr;
|
||||
|
||||
PtrList<polyPatch> patches(patches_.size());
|
||||
|
||||
@ -355,7 +360,7 @@ Foam::autoPtr<Foam::polyMesh> Foam::PDRblock::mesh(const IOobject& io) const
|
||||
bentry.size_,
|
||||
startFace,
|
||||
patchi, // index
|
||||
meshPtr->boundaryMesh()
|
||||
pmesh.boundaryMesh()
|
||||
)
|
||||
);
|
||||
|
||||
@ -365,7 +370,7 @@ Foam::autoPtr<Foam::polyMesh> Foam::PDRblock::mesh(const IOobject& io) const
|
||||
++patchi;
|
||||
}
|
||||
|
||||
meshPtr->addPatches(patches);
|
||||
pmesh.addPatches(patches);
|
||||
|
||||
return meshPtr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user