Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
4eb5e673
Commit
4eb5e673
authored
Dec 30, 2010
by
mattijs
Browse files
ENH: mapDistribute: allow -1 as global element
parent
041f7c4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C
View file @
4eb5e673
...
...
@@ -307,7 +307,7 @@ Foam::mapDistribute::mapDistribute
{
label
globalIndex
=
elements
[
i
];
if
(
!
globalNumbering
.
isLocal
(
globalIndex
))
if
(
globalIndex
!=
-
1
&&
!
globalNumbering
.
isLocal
(
globalIndex
))
{
label
procI
=
globalNumbering
.
whichProcID
(
globalIndex
);
nNonLocal
[
procI
]
++
;
...
...
@@ -329,7 +329,7 @@ Foam::mapDistribute::mapDistribute
{
label
globalIndex
=
elements
[
i
];
if
(
!
globalNumbering
.
isLocal
(
globalIndex
))
if
(
globalIndex
!=
-
1
&&
!
globalNumbering
.
isLocal
(
globalIndex
))
{
label
procI
=
globalNumbering
.
whichProcID
(
globalIndex
);
label
index
=
globalNumbering
.
toLocal
(
procI
,
globalIndex
);
...
...
@@ -452,7 +452,7 @@ Foam::mapDistribute::mapDistribute
{
label
globalIndex
=
cCells
[
i
];
if
(
!
globalNumbering
.
isLocal
(
globalIndex
))
if
(
globalIndex
!=
-
1
&&
!
globalNumbering
.
isLocal
(
globalIndex
))
{
label
procI
=
globalNumbering
.
whichProcID
(
globalIndex
);
nNonLocal
[
procI
]
++
;
...
...
@@ -482,7 +482,7 @@ Foam::mapDistribute::mapDistribute
{
label
globalIndex
=
cCells
[
i
];
if
(
!
globalNumbering
.
isLocal
(
globalIndex
))
if
(
globalIndex
!=
-
1
&&
!
globalNumbering
.
isLocal
(
globalIndex
))
{
label
procI
=
globalNumbering
.
whichProcID
(
globalIndex
);
label
index
=
globalNumbering
.
toLocal
(
procI
,
globalIndex
);
...
...
@@ -603,6 +603,10 @@ Foam::label Foam::mapDistribute::renumber
const
label
globalI
)
{
if
(
globalI
==
-
1
)
{
return
globalI
;
}
if
(
globalNumbering
.
isLocal
(
globalI
))
{
return
globalNumbering
.
toLocal
(
globalI
);
...
...
src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H
View file @
4eb5e673
...
...
@@ -123,7 +123,7 @@ public:
);
//- Construct from list of (possibly) remote elements in globalIndex
// numbering. Determines compact numbering (see above) and
// numbering
(or -1)
. Determines compact numbering (see above) and
// distribute map to get data into this ordering and renumbers the
// elements to be in compact numbering.
mapDistribute
...
...
@@ -133,7 +133,7 @@ public:
List
<
Map
<
label
>
>&
compactMap
);
//- Special variant that works with the in
t
o sorted into bins
//- Special variant that works with the in
f
o sorted into bins
// according to local indices. E.g. think cellCells where
// cellCells[localCellI] is a list of global cells
mapDistribute
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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