Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
404aa759
Commit
404aa759
authored
Sep 18, 2017
by
mattijs
Browse files
ENH: mirrorMesh: run parallel. Fixes
#587
.
Note that now mirrorMesh does not delete empty patches anymore.
parent
0430ad47
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C
View file @
404aa759
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -242,10 +242,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
}
// Mirror boundary faces patch by patch
labelList
newToOldPatch
(
boundary
().
size
(),
-
1
);
labelList
newPatchSizes
(
boundary
().
size
(),
-
1
);
labelList
newPatchSizes
(
boundary
().
size
(),
0
);
labelList
newPatchStarts
(
boundary
().
size
(),
-
1
);
label
nNewPatches
=
0
;
forAll
(
boundaryMesh
(),
patchi
)
{
...
...
@@ -253,7 +251,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
const
label
curPatchStart
=
boundaryMesh
()[
patchi
].
start
();
const
boolList
&
curInserted
=
insertedBouFace
[
patchi
];
newPatchStarts
[
nNewP
atch
es
]
=
nNewFaces
;
newPatchStarts
[
p
atch
i
]
=
nNewFaces
;
// Master side
for
(
label
facei
=
0
;
facei
<
curPatchSize
;
facei
++
)
...
...
@@ -299,14 +297,10 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
}
// If patch exists, grab the name and type of the original patch
if
(
nNewFaces
>
newPatchStarts
[
nNewP
atch
es
])
if
(
nNewFaces
>
newPatchStarts
[
p
atch
i
])
{
newToOldPatch
[
nNewPatches
]
=
patchi
;
newPatchSizes
[
nNewPatches
]
=
nNewFaces
-
newPatchStarts
[
nNewPatches
];
nNewPatches
++
;
newPatchSizes
[
patchi
]
=
nNewFaces
-
newPatchStarts
[
patchi
];
}
}
...
...
@@ -314,12 +308,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
newFaces
.
setSize
(
nNewFaces
);
Info
<<
" New faces: "
<<
nNewFaces
<<
endl
;
newToOldPatch
.
setSize
(
nNewPatches
);
newPatchSizes
.
setSize
(
nNewPatches
);
newPatchStarts
.
setSize
(
nNewPatches
);
Info
<<
"Mirroring patches. Old patches: "
<<
boundary
().
size
()
<<
" New patches: "
<<
nNewPatches
<<
endl
;
<<
" New patches: "
<<
boundary
().
size
()
<<
endl
;
Info
<<
"Mirroring cells. Old cells: "
<<
oldCells
.
size
()
<<
" New cells: "
<<
2
*
oldCells
.
size
()
<<
endl
;
...
...
@@ -378,7 +368,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
forAll
(
p
,
patchi
)
{
p
[
patchi
]
=
boundaryMesh
()[
newToOldPatch
[
patchi
]
]
.
clone
p
[
patchi
]
=
boundaryMesh
()[
patchi
].
clone
(
pMesh
.
boundaryMesh
(),
patchi
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment