View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004152 | OpenFOAM | Patch | public | 2024-09-17 12:43 | 2024-09-17 19:51 |
Reporter | tniemi | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | 12 | ||||
Summary | 0004152: Fix for mapped patches in case of a single face in a parallel case | ||||
Description | If a mapped boundary is decomposed in such a way that some processor has only one neighbour face and the default tree mapping method is used, the creation of the bounding box fails. This is quite rare, but can occur in realistic cases when large number of cores is used. I have attached a trivial example case and a minimal patch to handle such a case. | ||||
Steps To Reproduce | Run ./Allrun, the parallel version fails | ||||
Tags | No tags attached. | ||||
|
diff.patch (1,052 bytes)
diff --git a/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C index 8af798f460..c87645af9d 100644 --- a/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C @@ -184,6 +184,18 @@ void Foam::mappedPatchBase::calcMapping() const allNearest[alli].data = Foam::sqr(great); } } + else if (nbrPolyPatch().size() == 1) + { + const pointField nbrPoints(nbrPatchFaceCentres()); + + forAll(allPoints, alli) + { + const point& p = allPoints[alli]; + allNearest[alli].proci = Pstream::myProcNo(); + allNearest[alli].elementi = 0; + allNearest[alli].data = magSqr(nbrPoints[0] - p); + } + } else { const pointField nbrPoints(nbrPatchFaceCentres()); |
|
Thanks for the report and patch. Fixed in v12 and dev: https://github.com/OpenFOAM/OpenFOAM-12/commit/4bcbc284000f17e6b12d55a1e592e311626f6f32 https://github.com/OpenFOAM/OpenFOAM-dev/commit/ed4e43bad4ea7e255a053ada3ac4941bb32600e7 |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-09-17 12:43 | tniemi | New Issue | |
2024-09-17 12:43 | tniemi | File Added: treeBug.tar.gz | |
2024-09-17 12:43 | tniemi | File Added: diff.patch | |
2024-09-17 19:51 | will | Assigned To | => will |
2024-09-17 19:51 | will | Status | new => resolved |
2024-09-17 19:51 | will | Resolution | open => fixed |
2024-09-17 19:51 | will | Fixed in Version | => 12 |
2024-09-17 19:51 | will | Note Added: 0013414 |