Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Core Modules
dune-istl
Commits
64405c0d
Commit
64405c0d
authored
16 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Test the new functionality. [[Imported from SVN: r981]]
parent
e3794fd9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/test/indicestest.cc
+30
-6
30 additions, 6 deletions
istl/test/indicestest.cc
with
30 additions
and
6 deletions
istl/test/indicestest.cc
+
30
−
6
View file @
64405c0d
...
...
@@ -327,7 +327,6 @@ void testIndicesBuffered(MPI_Comm comm)
RemoteIndices
accuIndices
(
distIndexSet
,
globalIndexSet
,
comm
);
accuIndices
.
rebuild
<
true
>
();
// std::cout << accuIndices<<std::endl<<std::flush;
RemoteIndices
overlapIndices
(
distIndexSet
,
distIndexSet
,
comm
);
overlapIndices
.
rebuild
<
false
>
();
...
...
@@ -514,12 +513,23 @@ void testRedistributeIndicesBuffered(MPI_Comm comm)
Array
array
,
redistributedArray
;
std
::
vector
<
int
>
neighbours
;
// Set up the indexsets.
{
int
start
=
std
::
max
(
rank
*
nx
-
1
,
0
);
int
end
=
std
::
min
((
rank
+
1
)
*
nx
+
1
,
Nx
);
int
nb
=
0
;
if
(
start
>
0
)
++
nb
;
if
(
end
<
Nx
)
++
nb
;
neighbours
.
resize
(
nb
);
nb
=
0
;
if
(
start
>
0
)
neighbours
[
nb
++
]
=
rank
-
1
;
if
(
end
<
Nx
)
neighbours
[
nb
++
]
=
rank
+
1
;
sendIndexSet
.
beginResize
();
...
...
@@ -575,9 +585,21 @@ void testRedistributeIndicesBuffered(MPI_Comm comm)
RemoteIndices
redistributeIndices
(
sendIndexSet
,
receiveIndexSet
,
comm
);
RemoteIndices
overlapIndices
(
receiveIndexSet
,
receiveIndexSet
,
comm
);
RemoteIndices
sendIndices
(
sendIndexSet
,
sendIndexSet
,
comm
,
neighbours
);
RemoteIndices
sendIndices1
(
sendIndexSet
,
sendIndexSet
,
comm
);
overlapIndices
.
rebuild
<
false
>
();
redistributeIndices
.
rebuild
<
true
>
();
sendIndices
.
rebuild
<
true
>
();
sendIndices1
.
rebuild
<
true
>
();
if
(
rank
==
0
)
std
::
cout
<<
sendIndices
<<
std
::
endl
<<
sendIndices1
<<
std
::
endl
;
assert
(
sendIndices
==
sendIndices1
);
std
::
cout
<<
redistributeIndices
<<
std
::
endl
;
Interface
<
ParallelIndexSet
>
redistributeInterface
,
overlapInterface
;
EnumItem
<
GridFlags
,
owner
>
fowner
;
...
...
@@ -667,13 +689,15 @@ int main(int argc, char **argv)
while
(
size
>
1
&&
wait
)
;
#endif
testIndices
(
comm
);
testIndicesBuffered
(
comm
);
//
testIndices(comm);
//
testIndicesBuffered(comm);
if
(
rank
==
0
)
std
::
cout
<<
std
::
endl
<<
"Redistributing!"
<<
std
::
endl
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
<<
"Redistributing bla!"
<<
std
::
endl
<<
std
::
endl
;
MPI_Barrier
(
comm
);
testRedistributeIndices
(
comm
);
//
testRedistributeIndices(comm);
testRedistributeIndicesBuffered
(
comm
);
MPI_Comm_free
(
&
comm
);
MPI_Finalize
();
...
...
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