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
fa1b1451
Commit
fa1b1451
authored
16 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
added localSize for procI
parent
75945b50
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/globalMeshData/globalIndex.H
+28
-17
28 additions, 17 deletions
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
+10
-4
10 additions, 4 deletions
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
with
38 additions
and
21 deletions
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
+
28
−
17
View file @
fa1b1451
...
...
@@ -83,30 +83,41 @@ public:
////- Start of procI+1 data
//inline const labelList& offsets() const;
//- Start of procI data
inline
label
offset
(
const
label
procI
)
const
;
//- my local size
inline
label
localSize
()
const
;
//- Global sum of localSizes
inline
label
size
()
const
;
// Queries relating to my processor
//- From local to global
inline
label
toGlobal
(
const
label
i
)
const
;
//- my local size
inline
label
localSize
(
)
const
;
//- Is on local processor
inline
bool
isLoc
al
(
const
label
i
)
const
;
//- From local to global
inline
label
toGlob
al
(
const
label
i
)
const
;
//- From global to
local
on
proc
I
inline
label
toLocal
(
const
label
procI
,
const
label
i
)
const
;
//- Is on
local proc
essor
inline
bool
isLocal
(
const
label
i
)
const
;
//- From global to local on current processor.
// FatalError if not on local processor.
inline
label
toLocal
(
const
label
i
)
const
;
//- From global to local on current processor.
// FatalError if not on local processor.
inline
label
toLocal
(
const
label
i
)
const
;
// Global queries
//- Global sum of localSizes
inline
label
size
()
const
;
//- From global to local on procI
inline
label
toLocal
(
const
label
procI
,
const
label
i
)
const
;
//- Which processor does global come from? Binary search.
inline
label
whichProcID
(
const
label
i
)
const
;
//- Start of procI data
inline
label
offset
(
const
label
procI
)
const
;
//- Size of procI data
inline
label
localSize
(
const
label
procI
)
const
;
//- Which processor does global come from?
inline
label
whichProcID
(
const
label
i
)
const
;
// IOstream Operators
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
+
10
−
4
View file @
fa1b1451
...
...
@@ -40,17 +40,23 @@ inline Foam::label Foam::globalIndex::offset(const label procI) const
}
inline
Foam
::
label
Foam
::
globalIndex
::
localSize
()
const
inline
Foam
::
label
Foam
::
globalIndex
::
localSize
(
const
label
procI
)
const
{
return
(
Pstream
::
myProcNo
()
==
0
?
offsets_
[
Pstream
::
myProcNo
()
]
:
offsets_
[
Pstream
::
myProcNo
()]
-
offsets_
[
Pstream
::
myProcNo
()
-
1
]
procI
==
0
?
offsets_
[
procI
]
:
offsets_
[
procI
]
-
offsets_
[
procI
-
1
]
);
}
inline
Foam
::
label
Foam
::
globalIndex
::
localSize
()
const
{
return
localSize
(
Pstream
::
myProcNo
());
}
inline
Foam
::
label
Foam
::
globalIndex
::
size
()
const
{
return
offsets_
[
Pstream
::
nProcs
()
-
1
];
...
...
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