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
794c6581
Commit
794c6581
authored
16 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
added some more global access methods
parent
6c994a32
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
+9
-3
9 additions, 3 deletions
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
+22
-10
22 additions, 10 deletions
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
with
31 additions
and
13 deletions
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
+
9
−
3
View file @
794c6581
...
...
@@ -106,6 +106,15 @@ public:
//- Global sum of localSizes
inline
label
size
()
const
;
//- Size of procI data
inline
label
localSize
(
const
label
procI
)
const
;
//- From local to global on procI
inline
label
toGlobal
(
const
label
procI
,
const
label
i
)
const
;
//- Is on processor procI
inline
bool
isLocal
(
const
label
procI
,
const
label
i
)
const
;
//- From global to local on procI
inline
label
toLocal
(
const
label
procI
,
const
label
i
)
const
;
...
...
@@ -115,9 +124,6 @@ public:
//- Start of procI data
inline
label
offset
(
const
label
procI
)
const
;
//- Size of procI data
inline
label
localSize
(
const
label
procI
)
const
;
// IOstream Operators
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
+
22
−
10
View file @
794c6581
...
...
@@ -63,22 +63,34 @@ inline Foam::label Foam::globalIndex::size() const
}
inline
Foam
::
label
Foam
::
globalIndex
::
toGlobal
(
const
label
procI
,
const
label
i
)
const
{
return
(
procI
==
0
?
i
:
i
+
offsets_
[
procI
-
1
]);
}
inline
Foam
::
label
Foam
::
globalIndex
::
toGlobal
(
const
label
i
)
const
{
return
(
Pstream
::
myProcNo
()
==
0
?
i
:
i
+
offsets_
[
Pstream
::
myProcNo
()
-
1
]
);
return
toGlobal
(
Pstream
::
myProcNo
(),
i
);
}
//- Is on local processor
inline
bool
Foam
::
globalIndex
::
isLocal
(
const
label
i
)
const
inline
bool
Foam
::
globalIndex
::
isLocal
(
const
label
procI
,
const
label
i
)
const
{
return
(
i
<
offsets_
[
Pstream
::
myProcNo
()])
&&
(
i
>=
(
Pstream
::
myProcNo
()
==
0
?
0
:
offsets_
[
Pstream
::
myProcNo
()
-
1
]));
(
i
<
offsets_
[
procI
])
&&
(
i
>=
(
procI
==
0
?
0
:
offsets_
[
procI
-
1
]));
}
inline
bool
Foam
::
globalIndex
::
isLocal
(
const
label
i
)
const
{
return
isLocal
(
Pstream
::
myProcNo
(),
i
);
}
...
...
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