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
0ce09433
Commit
0ce09433
authored
Sep 12, 2008
by
mattijs
Browse files
face master
parent
1883e7cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
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
(
...
...
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
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
&
);
};
...
...
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