Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aland, Sebastian
amdis
Commits
4e83eefc
Commit
4e83eefc
authored
Mar 15, 2012
by
Thomas Witkowski
Browse files
FETI-DP Dirichlet precondition works now again.
parent
c149a509
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
4e83eefc
...
...
@@ -88,8 +88,9 @@ namespace AMDiS {
VecGetArray
(
data
->
tmp_vec_b
,
&
local_b
);
VecGetArray
(
data
->
tmp_vec_duals0
,
&
local_duals
);
for
(
int
i
=
nLocalB
-
nLocalDuals
,
j
=
0
;
i
<
nLocalB
;
i
++
,
j
++
)
local_duals
[
j
]
=
local_b
[
i
];
for
(
map
<
int
,
int
>::
iterator
it
=
data
->
localToDualMap
.
begin
();
it
!=
data
->
localToDualMap
.
end
();
++
it
)
local_duals
[
it
->
second
]
=
local_b
[
it
->
first
];
VecRestoreArray
(
data
->
tmp_vec_b
,
&
local_b
);
VecRestoreArray
(
data
->
tmp_vec_duals0
,
&
local_duals
);
...
...
@@ -111,8 +112,9 @@ namespace AMDiS {
VecGetArray
(
data
->
tmp_vec_b
,
&
local_b
);
VecGetArray
(
data
->
tmp_vec_duals0
,
&
local_duals
);
for
(
int
i
=
nLocalB
-
nLocalDuals
,
j
=
0
;
i
<
nLocalB
;
i
++
,
j
++
)
local_b
[
i
]
=
local_duals
[
j
];
for
(
map
<
int
,
int
>::
iterator
it
=
data
->
localToDualMap
.
begin
();
it
!=
data
->
localToDualMap
.
end
();
++
it
)
local_b
[
it
->
first
]
=
local_duals
[
it
->
second
];
VecRestoreArray
(
data
->
tmp_vec_b
,
&
local_b
);
VecRestoreArray
(
data
->
tmp_vec_duals0
,
&
local_duals
);
...
...
@@ -674,7 +676,19 @@ namespace AMDiS {
&
(
fetiDirichletPreconData
.
tmp_vec_duals1
));
MatGetVecs
(
mat_interior_interior
,
PETSC_NULL
,
&
(
fetiDirichletPreconData
.
tmp_vec_interior
));
for
(
unsigned
int
i
=
0
;
i
<
feSpaces
.
size
();
i
++
)
{
map
<
DegreeOfFreedom
,
MultiIndex
>
&
dualMap
=
dualDofMap
[
feSpaces
[
i
]].
getMap
();
for
(
map
<
DegreeOfFreedom
,
MultiIndex
>::
iterator
it
=
dualMap
.
begin
();
it
!=
dualMap
.
end
();
++
it
)
{
DegreeOfFreedom
d
=
it
->
first
;
int
matIndexLocal
=
localDofMap
.
getLocalMatIndex
(
i
,
d
);
int
matIndexDual
=
dualDofMap
.
getLocalMatIndex
(
i
,
d
);
fetiDirichletPreconData
.
localToDualMap
[
matIndexLocal
]
=
matIndexDual
;
}
}
KSPGetPC
(
ksp_feti
,
&
precon_feti
);
PCSetType
(
precon_feti
,
PCSHELL
);
PCShellSetContext
(
precon_feti
,
static_cast
<
void
*>
(
&
fetiDirichletPreconData
));
...
...
AMDiS/src/parallel/PetscSolverFetiStructs.h
View file @
4e83eefc
...
...
@@ -23,8 +23,12 @@
#ifndef AMDIS_PETSC_SOLVER_FETI_STRUCTS_H
#define AMDIS_PETSC_SOLVER_FETI_STRUCTS_H
#include <map>
namespace
AMDiS
{
using
namespace
std
;
class
PetscSolverFeti
;
/** \brief
...
...
@@ -92,7 +96,9 @@ namespace AMDiS {
Vec
tmp_vec_duals0
,
tmp_vec_duals1
;
/// Temporal vector on the interior variables.
Vec
tmp_vec_interior
;
Vec
tmp_vec_interior
;
map
<
int
,
int
>
localToDualMap
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment