View Issue Details

IDProjectCategoryView StatusLast Update
0003962OpenFOAMBugpublic2023-03-15 19:18
Reportercgoessni Assigned To 
Status newResolutionopen 
Platformamd64OSCentOSOS Version7
Product Versiondev 
Summary0003962: meshToMesh constructor: wrong order of patchMap content?
DescriptionAccording 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.
TagsNo tags attached.



2023-03-15 15:34


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 =
diff_meshToMesh_C.txt (656 bytes)   


2023-03-15 16:25

manager   ~0012959

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?


2023-03-15 19:18

reporter   ~0012960


"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.

Issue History

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