Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
08496314
Commit
08496314
authored
8 years ago
by
Andrew Heather
Browse files
Options
Downloads
Patches
Plain Diff
BUG: meshToMesh - corrected indexing of cutting patches. Fixes
#376
parent
3eb706a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sampling/meshToMesh/meshToMesh.C
+25
-11
25 additions, 11 deletions
src/sampling/meshToMesh/meshToMesh.C
with
25 additions
and
11 deletions
src/sampling/meshToMesh/meshToMesh.C
+
25
−
11
View file @
08496314
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015
-2017
OpenCFD Ltd.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
This file is part of OpenFOAM.
This file is part of OpenFOAM.
...
@@ -758,6 +758,28 @@ void Foam::meshToMesh::constructFromCuttingPatches
...
@@ -758,6 +758,28 @@ void Foam::meshToMesh::constructFromCuttingPatches
const
wordList
&
cuttingPatches
const
wordList
&
cuttingPatches
)
)
{
{
const
polyBoundaryMesh
&
srcBm
=
srcRegion_
.
boundaryMesh
();
const
polyBoundaryMesh
&
tgtBm
=
tgtRegion_
.
boundaryMesh
();
// set IDs of cutting patches
cuttingPatches_
.
setSize
(
cuttingPatches
.
size
());
forAll
(
cuttingPatches_
,
i
)
{
const
word
&
patchName
=
cuttingPatches
[
i
];
label
cuttingPatchi
=
srcBm
.
findPatchID
(
patchName
);
if
(
cuttingPatchi
==
-
1
)
{
FatalErrorInFunction
<<
"Unable to find patch '"
<<
patchName
<<
"' in mesh '"
<<
srcRegion_
.
name
()
<<
"'. "
<<
" Available patches include:"
<<
srcBm
.
names
()
<<
exit
(
FatalError
);
}
cuttingPatches_
[
i
]
=
cuttingPatchi
;
}
DynamicList
<
label
>
srcIDs
(
patchMap
.
size
());
DynamicList
<
label
>
srcIDs
(
patchMap
.
size
());
DynamicList
<
label
>
tgtIDs
(
patchMap
.
size
());
DynamicList
<
label
>
tgtIDs
(
patchMap
.
size
());
...
@@ -766,14 +788,14 @@ void Foam::meshToMesh::constructFromCuttingPatches
...
@@ -766,14 +788,14 @@ void Foam::meshToMesh::constructFromCuttingPatches
const
word
&
tgtPatchName
=
iter
.
key
();
const
word
&
tgtPatchName
=
iter
.
key
();
const
word
&
srcPatchName
=
iter
();
const
word
&
srcPatchName
=
iter
();
const
polyPatch
&
srcPatch
=
src
Region_
.
boundaryMesh
()
[
srcPatchName
];
const
polyPatch
&
srcPatch
=
src
Bm
[
srcPatchName
];
// We want to map all the global patches, including constraint
// We want to map all the global patches, including constraint
// patches (since they might have mappable properties, e.g.
// patches (since they might have mappable properties, e.g.
// jumpCyclic). We'll fix the value afterwards.
// jumpCyclic). We'll fix the value afterwards.
if
(
!
isA
<
processorPolyPatch
>
(
srcPatch
))
if
(
!
isA
<
processorPolyPatch
>
(
srcPatch
))
{
{
const
polyPatch
&
tgtPatch
=
tgt
Region_
.
boundaryMesh
()
[
tgtPatchName
];
const
polyPatch
&
tgtPatch
=
tgt
Bm
[
tgtPatchName
];
srcIDs
.
append
(
srcPatch
.
index
());
srcIDs
.
append
(
srcPatch
.
index
());
tgtIDs
.
append
(
tgtPatch
.
index
());
tgtIDs
.
append
(
tgtPatch
.
index
());
...
@@ -788,14 +810,6 @@ void Foam::meshToMesh::constructFromCuttingPatches
...
@@ -788,14 +810,6 @@ void Foam::meshToMesh::constructFromCuttingPatches
// calculate patch addressing and weights
// calculate patch addressing and weights
calculatePatchAMIs
(
AMIMethodName
);
calculatePatchAMIs
(
AMIMethodName
);
// set IDs of cutting patches on target mesh
cuttingPatches_
.
setSize
(
cuttingPatches
.
size
());
forAll
(
cuttingPatches_
,
i
)
{
const
word
&
patchName
=
cuttingPatches
[
i
];
cuttingPatches_
[
i
]
=
tgtRegion_
.
boundaryMesh
().
findPatchID
(
patchName
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment