View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003962 | OpenFOAM | Bug | public | 2023-03-15 15:34 | 2024-07-10 16:33 |
Reporter | cgoessni | Assigned To | chris | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | amd64 | OS | CentOS | OS Version | 7 |
Product Version | dev | ||||
Summary | 0003962: meshToMesh constructor: wrong order of patchMap content? | ||||
Description | According to the documentation, the patchMap HashTable contains pairs of <srgPatchName> <tgtPatchName>. Could it be that the parsing inside meshToMesh constructor does reverse this order? Suggested patch attached. | ||||
Tags | No tags attached. | ||||
|
diff_meshToMesh_C.txt (656 bytes)
diff --git a/src/meshTools/meshToMesh/meshToMesh.C b/src/meshTools/meshToMesh/meshToMesh.C index 5a6745a..eef8cd5 100644 --- a/src/meshTools/meshToMesh/meshToMesh.C +++ b/src/meshTools/meshToMesh/meshToMesh.C @@ -107,8 +107,8 @@ Foam::meshToMesh::meshToMesh label i = 0; forAllConstIter(HashTable<word>, patchMap, iter) { - const word& tgtPatchName = iter.key(); - const word& srcPatchName = iter(); + const word& tgtPatchName = iter(); + const word& srcPatchName = iter.key(); const label srcPatchi = srcMesh_.boundaryMesh().findPatchID(srcPatchName); |
|
It is not clear what documentation you are referring to, nor how to reproduce the problem, or even what the problem is. Could you please provide a more complete bug-report? |
|
from https://doc.cfd.direct/openfoam/user-guide-v10/mapfields: "The first list is patchMap that specifies mapping of data between pairs of source and target patches that are geometrically coincident, as shown in Figure 5.16. The list contains each pair of names of source and target patch." However, if I map from source patch nameA to target patch nameB, i.e. patchMap (nameA nameB); it would complain that nameB does not exist in source mesh, suggesting that the code reads it in different order than the user guide would suggest. |
|
The documentation does not mention the order. The verb "contain" does not imply order by the sequence of what follows it. The example was taken from the cavity tutorial where the order is correct for the cases involved: "lid" is from target, "movingWall" from source. https://doc.cfd.direct/openfoam/user-guide-v10/cavity |
|
I have updated the documentation to make the ordering clear: https://doc.cfd.direct/openfoam/user-guide-v10/mapfields Cache takes 24 hours to update for the pages, so wait 24 hours before checking. |
|
Thank you for the update. Now it reads very clearly! |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-03-15 15:34 | cgoessni | New Issue | |
2023-03-15 15:34 | cgoessni | File Added: diff_meshToMesh_C.txt | |
2023-03-15 16:25 | henry | Note Added: 0012959 | |
2023-03-15 19:18 | cgoessni | Note Added: 0012960 | |
2023-05-22 17:55 | chris | Note Added: 0013020 | |
2023-05-22 18:08 | chris | Note Added: 0013021 | |
2023-05-30 12:24 | cgoessni | Note Added: 0013031 | |
2024-07-10 16:33 | will | Assigned To | => chris |
2024-07-10 16:33 | will | Status | new => resolved |
2024-07-10 16:33 | will | Resolution | open => fixed |