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
0ce09433
Commit
0ce09433
authored
16 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
face master
parent
1883e7cc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
+50
-2
50 additions, 2 deletions
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
+4
-1
4 additions, 1 deletion
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
with
54 additions
and
3 deletions
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
+
50
−
2
View file @
0ce09433
...
...
@@ -169,7 +169,7 @@ Foam::PackedList<1> Foam::syncTools::getMasterPoints(const polyMesh& mesh)
else
{
FatalErrorIn
(
"syncTools::getMasterPoints(const polyMesh&)"
)
<<
"Cannot handle patch "
<<
patches
[
patchI
].
name
()
<<
"Cannot handle
coupled
patch "
<<
patches
[
patchI
].
name
()
<<
" of type "
<<
patches
[
patchI
].
type
()
<<
abort
(
FatalError
);
}
...
...
@@ -290,7 +290,7 @@ Foam::PackedList<1> Foam::syncTools::getMasterEdges(const polyMesh& mesh)
else
{
FatalErrorIn
(
"syncTools::getMasterEdges(const polyMesh&)"
)
<<
"Cannot handle patch "
<<
patches
[
patchI
].
name
()
<<
"Cannot handle
coupled
patch "
<<
patches
[
patchI
].
name
()
<<
" of type "
<<
patches
[
patchI
].
type
()
<<
abort
(
FatalError
);
}
...
...
@@ -314,6 +314,54 @@ Foam::PackedList<1> Foam::syncTools::getMasterEdges(const polyMesh& mesh)
}
// Determines for every face whether it is coupled and if so sets only one.
Foam
::
PackedList
<
1
>
Foam
::
syncTools
::
getMasterFaces
(
const
polyMesh
&
mesh
)
{
PackedList
<
1
>
isMasterFace
(
mesh
.
nFaces
(),
1
);
const
polyBoundaryMesh
&
patches
=
mesh
.
boundaryMesh
();
forAll
(
patches
,
patchI
)
{
if
(
patches
[
patchI
].
coupled
())
{
if
(
Pstream
::
parRun
()
&&
isA
<
processorPolyPatch
>
(
patches
[
patchI
]))
{
const
processorPolyPatch
&
pp
=
refCast
<
const
processorPolyPatch
>
(
patches
[
patchI
]);
if
(
!
pp
.
owner
())
{
forAll
(
pp
,
i
)
{
isMasterFace
.
set
(
pp
.
start
()
+
i
,
0
);
}
}
}
else
if
(
isA
<
cyclicPolyPatch
>
(
patches
[
patchI
]))
{
const
cyclicPolyPatch
&
pp
=
refCast
<
const
cyclicPolyPatch
>
(
patches
[
patchI
]);
for
(
label
i
=
pp
.
size
()
/
2
;
i
<
pp
.
size
();
i
++
)
{
isMasterFace
.
set
(
pp
.
start
()
+
i
,
0
);
}
}
else
{
FatalErrorIn
(
"syncTools::getMasterFaces(const polyMesh&)"
)
<<
"Cannot handle coupled patch "
<<
patches
[
patchI
].
name
()
<<
" of type "
<<
patches
[
patchI
].
type
()
<<
abort
(
FatalError
);
}
}
}
return
isMasterFace
;
}
template
<>
void
Foam
::
syncTools
::
separateList
(
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
+
4
−
1
View file @
0ce09433
...
...
@@ -226,9 +226,12 @@ public:
//- Get per point whether is it master (of a coupled set of points)
static
PackedList
<
1
>
getMasterPoints
(
const
polyMesh
&
);
//- Get per edge whether is it master (of a coupled set of edge)
//- Get per edge whether is it master (of a coupled set of edge
s
)
static
PackedList
<
1
>
getMasterEdges
(
const
polyMesh
&
);
//- Get per face whether is it master (of a coupled set of faces)
static
PackedList
<
1
>
getMasterFaces
(
const
polyMesh
&
);
};
...
...
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