View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004009 | OpenFOAM | Bug | public | 2023-08-19 04:02 | 2023-08-19 08:24 |
Reporter | handrake0724 | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | unable to reproduce | ||
Product Version | dev | ||||
Summary | 0004009: unnecessary statements in polyBFacePatches in fvMesh.C | ||||
Description | offsets variable related statements in polyBFacePatches member function as follows: 988 forAll(boundary(), patchi) 989 { 990 forAll(boundary()[patchi], patchFacei) 991 { 992 const label polyBFacei = 993 ( 994 polyFacesBfPtr_ 995 ? (*polyFacesBfPtr_)[patchi][patchFacei] 996 : boundary()[patchi].start() + patchFacei 997 ) 998 - nInternalFaces(); 999 patches[offsets[polyBFacei]] = patchi; 1000 patchFaces[offsets[polyBFacei]] = patchFacei; 1001 offsets[polyBFacei] ++; 1002 } 1003 } 1004 1005 // Restore the offsets by removing the count 1006 for 1007 ( 1008 label polyBFacei = nPolyBFaces - 1; 1009 polyBFacei >= 0; 1010 -- polyBFacei 1011 ) 1012 { 1013 offsets[polyBFacei + 1] = offsets[polyBFacei]; 1014 } 1015 offsets[0] = 0; statement at line 1001 updates offsets but does not affect anything. block from line 1006 to line 1015 restores offsets value to the offsets value at line 979 It might be any reason which I could not figure out but I think the line 1001 and line 1006 to 1015 can be removed. | ||||
Tags | No tags attached. | ||||
|
patch.diff (901 bytes)
diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 6091c97d0d..709c5db828 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -998,22 +998,9 @@ Foam::fvMesh::polyBFacePatches() const - nInternalFaces(); patches[offsets[polyBFacei]] = patchi; patchFaces[offsets[polyBFacei]] = patchFacei; - offsets[polyBFacei] ++; } } - // Restore the offsets by removing the count - for - ( - label polyBFacei = nPolyBFaces - 1; - polyBFacei >= 0; - -- polyBFacei - ) - { - offsets[polyBFacei + 1] = offsets[polyBFacei]; - } - offsets[0] = 0; - // List-lists polyBFacePatchesPtr_ = new UCompactListList<label>(offsets, patches); |
|
It is not clear how to reproduce the problem, no case is provided, and it would take us some time to check through the change and validate for which we will need maintenance funding: https://openfoam.org/maintenance/ |
|
Pending funding |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-08-19 04:02 | handrake0724 | New Issue | |
2023-08-19 04:02 | handrake0724 | File Added: patch.diff | |
2023-08-19 08:22 | henry | Note Added: 0013102 | |
2023-08-19 08:24 | henry | Assigned To | => henry |
2023-08-19 08:24 | henry | Status | new => closed |
2023-08-19 08:24 | henry | Resolution | open => unable to reproduce |
2023-08-19 08:24 | henry | Note Added: 0013103 |