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
404aa759
Commit
404aa759
authored
7 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: mirrorMesh: run parallel. Fixes
#587
.
Note that now mirrorMesh does not delete empty patches anymore.
parent
0430ad47
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
applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C
+8
-18
8 additions, 18 deletions
...ons/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C
with
8 additions
and
18 deletions
applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C
+
8
−
18
View file @
404aa759
...
@@ -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) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
This file is part of OpenFOAM.
This file is part of OpenFOAM.
...
@@ -242,10 +242,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
...
@@ -242,10 +242,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
}
}
// Mirror boundary faces patch by patch
// Mirror boundary faces patch by patch
labelList
newToOldPatch
(
boundary
().
size
(),
-
1
);
labelList
newPatchSizes
(
boundary
().
size
(),
0
);
labelList
newPatchSizes
(
boundary
().
size
(),
-
1
);
labelList
newPatchStarts
(
boundary
().
size
(),
-
1
);
labelList
newPatchStarts
(
boundary
().
size
(),
-
1
);
label
nNewPatches
=
0
;
forAll
(
boundaryMesh
(),
patchi
)
forAll
(
boundaryMesh
(),
patchi
)
{
{
...
@@ -253,7 +251,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
...
@@ -253,7 +251,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
const
label
curPatchStart
=
boundaryMesh
()[
patchi
].
start
();
const
label
curPatchStart
=
boundaryMesh
()[
patchi
].
start
();
const
boolList
&
curInserted
=
insertedBouFace
[
patchi
];
const
boolList
&
curInserted
=
insertedBouFace
[
patchi
];
newPatchStarts
[
nNewP
atch
es
]
=
nNewFaces
;
newPatchStarts
[
p
atch
i
]
=
nNewFaces
;
// Master side
// Master side
for
(
label
facei
=
0
;
facei
<
curPatchSize
;
facei
++
)
for
(
label
facei
=
0
;
facei
<
curPatchSize
;
facei
++
)
...
@@ -299,14 +297,10 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
...
@@ -299,14 +297,10 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
}
}
// If patch exists, grab the name and type of the original patch
// 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
[
patchi
]
=
nNewFaces
-
newPatchStarts
[
patchi
];
newPatchSizes
[
nNewPatches
]
=
nNewFaces
-
newPatchStarts
[
nNewPatches
];
nNewPatches
++
;
}
}
}
}
...
@@ -314,12 +308,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
...
@@ -314,12 +308,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
newFaces
.
setSize
(
nNewFaces
);
newFaces
.
setSize
(
nNewFaces
);
Info
<<
" New faces: "
<<
nNewFaces
<<
endl
;
Info
<<
" New faces: "
<<
nNewFaces
<<
endl
;
newToOldPatch
.
setSize
(
nNewPatches
);
newPatchSizes
.
setSize
(
nNewPatches
);
newPatchStarts
.
setSize
(
nNewPatches
);
Info
<<
"Mirroring patches. Old patches: "
<<
boundary
().
size
()
Info
<<
"Mirroring patches. Old patches: "
<<
boundary
().
size
()
<<
" New patches: "
<<
nNewPatches
<<
endl
;
<<
" New patches: "
<<
boundary
().
size
()
<<
endl
;
Info
<<
"Mirroring cells. Old cells: "
<<
oldCells
.
size
()
Info
<<
"Mirroring cells. Old cells: "
<<
oldCells
.
size
()
<<
" New cells: "
<<
2
*
oldCells
.
size
()
<<
endl
;
<<
" New cells: "
<<
2
*
oldCells
.
size
()
<<
endl
;
...
@@ -378,7 +368,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
...
@@ -378,7 +368,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
forAll
(
p
,
patchi
)
forAll
(
p
,
patchi
)
{
{
p
[
patchi
]
=
boundaryMesh
()[
newToOldPatch
[
patchi
]
]
.
clone
p
[
patchi
]
=
boundaryMesh
()[
patchi
].
clone
(
(
pMesh
.
boundaryMesh
(),
pMesh
.
boundaryMesh
(),
patchi
,
patchi
,
...
...
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