Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
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
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
Sander, Oliver
dune-gfe
Commits
9fcf189d
Commit
9fcf189d
authored
10 years ago
by
Oliver Sander
Committed by
sander
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use better internal names for the global mappers
[[Imported from SVN: r9961]]
parent
dd55d805
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/parallel/matrixcommunicator.hh
+16
-16
16 additions, 16 deletions
dune/gfe/parallel/matrixcommunicator.hh
with
16 additions
and
16 deletions
dune/gfe/parallel/matrixcommunicator.hh
+
16
−
16
View file @
9fcf189d
...
...
@@ -9,7 +9,7 @@
#include
<dune/gfe/parallel/mpifunctions.hh>
template
<
typename
GUIndex
,
typename
GridView
,
typename
MatrixType
,
typename
LocalMapper1
,
typename
LocalMapper2
,
typename
Col
GUIndex
=
GUIndex
>
template
<
typename
RowGlobalMapper
,
typename
GridView
,
typename
MatrixType
,
typename
LocalMapper1
,
typename
LocalMapper2
,
typename
Col
umnGlobalMapper
=
RowGlobalMapper
>
class
MatrixCommunicator
{
struct
TransferMatrixTuple
{
...
...
@@ -45,9 +45,9 @@ class MatrixCommunicator {
}
public
:
MatrixCommunicator
(
const
GUIndex
&
rowIndex
,
const
GridView
&
gridView
,
const
LocalMapper1
&
localMapper1
,
const
LocalMapper2
&
localMapper2
,
const
int
&
root
)
:
guIndex1_
(
rowIndex
),
guIndex2_
(
rowIndex
),
MatrixCommunicator
(
const
RowGlobalMapper
&
rowGlobalMapper
,
const
GridView
&
gridView
,
const
LocalMapper1
&
localMapper1
,
const
LocalMapper2
&
localMapper2
,
const
int
&
root
)
:
rowGlobalMapper_
(
rowGlobalMapper
),
columnGlobalMapper_
(
rowGlobalMapper
),
localMapper1_
(
localMapper1
),
localMapper2_
(
localMapper2
),
communicator_
(
gridView
.
comm
()),
...
...
@@ -56,9 +56,9 @@ public:
setLocalToGlobal
(
gridView
);
}
MatrixCommunicator
(
const
GUIndex
&
rowIndex
,
const
ColGUIndex
&
colIndex
,
const
GridView
&
gridView
,
const
LocalMapper1
&
localMapper1
,
const
LocalMapper2
&
localMapper2
,
const
int
&
root
)
:
guIndex1_
(
rowIndex
),
guIndex2_
(
colIndex
),
MatrixCommunicator
(
const
RowGlobalMapper
&
rowGlobalMapper
,
const
ColumnGlobalMapper
&
columnGlobalMapper
,
const
GridView
&
gridView
,
const
LocalMapper1
&
localMapper1
,
const
LocalMapper2
&
localMapper2
,
const
int
&
root
)
:
rowGlobalMapper_
(
rowGlobalMapper
),
columnGlobalMapper_
(
columnGlobalMapper
),
localMapper1_
(
localMapper1
),
localMapper2_
(
localMapper2
),
communicator_
(
gridView
.
comm
()),
...
...
@@ -76,7 +76,7 @@ public:
// Create occupation pattern in matrix
Dune
::
MatrixIndexSet
occupationPattern
;
occupationPattern
.
resize
(
guIndex1_
.
size
(),
guIndex2
_
.
size
());
occupationPattern
.
resize
(
rowGlobalMapper_
.
size
(),
columnGlobalMapper
_
.
size
());
for
(
size_t
k
=
0
;
k
<
globalMatrixEntries
.
size
();
++
k
)
occupationPattern
.
add
(
globalMatrixEntries
[
k
].
row
,
globalMatrixEntries
[
k
].
col
);
...
...
@@ -128,14 +128,14 @@ private:
for
(
int
codim
=
0
;
codim
<=
GridView
::
dimension
;
codim
++
)
for
(
size_t
i
=
0
;
i
<
it
->
subEntities
(
codim
);
i
++
)
{
typename
GUIndex
::
Index
localIdx
;
typename
GUIndex
::
Index
globalIdx
;
typename
RowGlobalMapper
::
Index
localIdx
;
typename
RowGlobalMapper
::
Index
globalIdx
;
if
(
localMapper1_
.
contains
(
*
it
,
i
,
codim
,
localIdx
)
and
guIndex1
_
.
contains
(
*
it
,
i
,
codim
,
globalIdx
))
and
rowGlobalMapper
_
.
contains
(
*
it
,
i
,
codim
,
globalIdx
))
localToGlobal1_
[
localIdx
]
=
globalIdx
;
if
(
localMapper2_
.
contains
(
*
it
,
i
,
codim
,
localIdx
)
and
guIndex2
_
.
contains
(
*
it
,
i
,
codim
,
globalIdx
))
and
columnGlobalMapper
_
.
contains
(
*
it
,
i
,
codim
,
globalIdx
))
localToGlobal2_
[
localIdx
]
=
globalIdx
;
}
...
...
@@ -143,8 +143,8 @@ private:
}
// Mappers for the global numbering
const
GUIndex
&
guIndex1
_
;
const
Col
GUIndex
&
guIndex2
_
;
const
RowGlobalMapper
&
rowGlobalMapper
_
;
const
Col
umnGlobalMapper
&
columnGlobalMapper
_
;
// Mappers for the local numbering
const
LocalMapper1
&
localMapper1_
;
...
...
@@ -153,8 +153,8 @@ private:
const
typename
GridView
::
CollectiveCommunication
&
communicator_
;
int
root_rank
;
std
::
vector
<
typename
GUIndex
::
Index
>
localToGlobal1_
;
std
::
vector
<
typename
Col
GUIndex
::
Index
>
localToGlobal2_
;
std
::
vector
<
typename
RowGlobalMapper
::
Index
>
localToGlobal1_
;
std
::
vector
<
typename
Col
umnGlobalMapper
::
Index
>
localToGlobal2_
;
std
::
vector
<
TransferMatrixTuple
>
globalMatrixEntries
;
};
...
...
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