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
01c9bdb5
Commit
01c9bdb5
authored
13 years ago
by
Rebecca Neumann
Browse files
Options
Downloads
Patches
Plain Diff
make computation of bordercontribution faster by storing pointers to the RemoteIndexSet
[[Imported from SVN: r1480]]
parent
6bd8bb80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/novlpschwarz.hh
+34
-26
34 additions, 26 deletions
dune/istl/novlpschwarz.hh
with
34 additions
and
26 deletions
dune/istl/novlpschwarz.hh
+
34
−
26
View file @
01c9bdb5
...
@@ -79,6 +79,8 @@ namespace Dune {
...
@@ -79,6 +79,8 @@ namespace Dune {
typedef
typename
M
::
ConstColIterator
ColIterator
;
typedef
typename
M
::
ConstColIterator
ColIterator
;
typedef
typename
M
::
ConstRowIterator
RowIterator
;
typedef
typename
M
::
ConstRowIterator
RowIterator
;
typedef
std
::
multimap
<
int
,
int
>
MM
;
typedef
std
::
multimap
<
int
,
int
>
MM
;
typedef
std
::
multimap
<
int
,
std
::
pair
<
int
,
RILIterator
>
>
RIMap
;
typedef
typename
RIMap
::
iterator
RIMapit
;
enum
{
enum
{
//! \brief The solver category.
//! \brief The solver category.
...
@@ -148,42 +150,48 @@ namespace Dune {
...
@@ -148,42 +150,48 @@ namespace Dune {
for
(
MM
::
iterator
iter
=
bordercontribution
.
begin
();
for
(
MM
::
iterator
iter
=
bordercontribution
.
begin
();
iter
!=
bordercontribution
.
end
();
++
iter
)
iter
!=
bordercontribution
.
end
();
++
iter
)
bordercontribution
.
erase
(
iter
);
bordercontribution
.
erase
(
iter
);
for
(
RowIterator
i
=
_A_
.
begin
();
i
!=
_A_
.
end
();
++
i
)
{
std
::
map
<
int
,
int
>
owner
;
//key: local index i, value: process, that owns i
if
(
mask
[
i
.
index
()]
==
0
)
{
RIMap
rimap
;
std
::
set
<
int
>
neighbours
;
//processes have i as interior/border dof
int
iowner
;
//process which owns i
// for each local index make multimap rimap:
// key: local index i, data: pair of process that knows i and pointer to RI entry
for
(
RowIterator
i
=
_A_
.
begin
();
i
!=
_A_
.
end
();
++
i
)
if
(
mask
[
i
.
index
()]
==
0
)
for
(
RIIterator
remote
=
ri
.
begin
();
remote
!=
ri
.
end
();
++
remote
)
{
for
(
RIIterator
remote
=
ri
.
begin
();
remote
!=
ri
.
end
();
++
remote
)
{
RIL
&
ril
=
*
(
remote
->
second
.
first
);
RIL
&
ril
=
*
(
remote
->
second
.
first
);
for
(
RILIterator
rindex
=
ril
.
begin
();
rindex
!=
ril
.
end
();
++
rindex
)
{
for
(
RILIterator
rindex
=
ril
.
begin
();
rindex
!=
ril
.
end
();
++
rindex
)
if
(
rindex
->
attribute
()
!=
OwnerOverlapCopyAttributeSet
::
overlap
)
{
if
(
rindex
->
attribute
()
!=
OwnerOverlapCopyAttributeSet
::
overlap
)
if
(
rindex
->
localIndexPair
().
local
().
local
()
==
i
.
index
())
{
if
(
rindex
->
localIndexPair
().
local
().
local
()
==
i
.
index
())
{
neighbours
.
insert
(
remote
->
first
);
rimap
.
insert
(
std
::
make_pair
(
i
.
index
(),
std
::
pair
<
int
,
RILIterator
>
(
remote
->
first
,
rindex
)));
if
(
rindex
->
attribute
()
==
OwnerOverlapCopyAttributeSet
::
owner
)
if
(
rindex
->
attribute
()
==
OwnerOverlapCopyAttributeSet
::
owner
)
i
owner
=
remote
->
first
;
owner
.
insert
(
std
::
make_pair
(
i
.
index
(),
remote
->
first
))
;
}
}
}
}
}
}
int
iowner
=
0
;
for
(
RowIterator
i
=
_A_
.
begin
();
i
!=
_A_
.
end
();
++
i
)
{
if
(
mask
[
i
.
index
()]
==
0
)
{
std
::
map
<
int
,
int
>::
iterator
it
=
owner
.
find
(
i
.
index
());
iowner
=
it
->
second
;
std
::
pair
<
RIMapit
,
RIMapit
>
foundiit
=
rimap
.
equal_range
(
i
.
index
());
for
(
ColIterator
j
=
_A_
[
i
.
index
()].
begin
();
j
!=
_A_
[
i
.
index
()].
end
();
++
j
)
{
for
(
ColIterator
j
=
_A_
[
i
.
index
()].
begin
();
j
!=
_A_
[
i
.
index
()].
end
();
++
j
)
{
if
(
mask
[
j
.
index
()]
==
0
)
{
if
(
mask
[
j
.
index
()]
==
0
)
{
bool
flag
=
true
;
bool
flag
=
true
;
for
(
RIIterator
remote
=
ri
.
begin
();
remote
!=
ri
.
end
();
++
remote
)
for
(
RIMapit
foundi
=
foundiit
.
first
;
foundi
!=
foundiit
.
second
;
++
foundi
)
{
if
(
neighbours
.
find
(
remote
->
first
)
!=
neighbours
.
end
())
{
std
::
pair
<
RIMapit
,
RIMapit
>
foundjit
=
rimap
.
equal_range
(
j
.
index
());
RIL
&
ril
=
*
(
remote
->
second
.
first
);
for
(
RIMapit
foundj
=
foundjit
.
first
;
foundj
!=
foundjit
.
second
;
++
foundj
)
for
(
RILIterator
rindex
=
ril
.
begin
();
rindex
!=
ril
.
end
();
if
(
foundj
->
second
.
first
==
foundi
->
second
.
first
)
++
rindex
)
if
(
foundj
->
second
.
second
->
attribute
()
==
OwnerOverlapCopyAttributeSet
::
owner
if
(
rindex
->
attribute
()
!=
OwnerOverlapCopyAttributeSet
::
overlap
||
foundj
->
second
.
first
==
iowner
&&
rindex
->
localIndexPair
().
local
().
local
()
==
j
.
index
())
{
||
foundj
->
second
.
first
<
communication
.
communicator
().
rank
())
{
if
(
rindex
->
attribute
()
==
OwnerOverlapCopyAttributeSet
::
owner
flag
=
false
;
||
remote
->
first
==
iowner
continue
;
||
remote
->
first
<
communication
.
communicator
().
rank
())
{
flag
=
false
;
continue
;
}
}
}
if
(
flag
==
false
)
if
(
flag
==
false
)
continue
;
continue
;
}
}
// don´t contribute to Ax if
// don´t contribute to Ax if
// 1. the owner of j has i as interior/border dof
// 1. the owner of j has i as interior/border dof
// 2. iowner has j as interior/border dof
// 2. iowner has j as interior/border dof
...
...
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