Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
fc3bdbaa
Commit
fc3bdbaa
authored
Oct 10, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work in Dirichlet preconditioner for FETI-DP.
parent
489701e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
AMDiS/src/parallel/PetscSolverFeti.cc
AMDiS/src/parallel/PetscSolverFeti.cc
+20
-6
No files found.
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
fc3bdbaa
...
...
@@ -144,7 +144,15 @@ namespace AMDiS {
const
FiniteElemSpace
*
feSpace
=
dofMat
->
getRowFeSpace
();
std
::
set
<
DegreeOfFreedom
>&
dRows
=
dofMat
->
getDirichletRows
();
if
(
dirichletRows
.
count
(
feSpace
))
{
WARNING
(
"Implement test that for all components dirichlet rows are equal!
\n
"
);
// === Run test if Dirichlet rows are all the same in all components ===
// === of one FE space. ===
TEST_EXIT
(
dirichletRows
[
feSpace
].
size
()
==
dRows
.
size
())
(
"Wrong number of dirichlet rows!
\n
"
);
for
(
std
::
set
<
DegreeOfFreedom
>::
iterator
it0
=
dirichletRows
[
feSpace
].
begin
(),
it1
=
dRows
.
begin
();
it1
!=
dRows
.
end
();
++
it0
,
++
it1
)
{
TEST_EXIT
(
*
it0
==
*
it1
)(
"Wrong DOFs %d %d!
\n
"
,
*
it0
,
*
it1
);
}
}
else
{
dirichletRows
[
feSpace
]
=
dRows
;
}
...
...
@@ -673,8 +681,6 @@ namespace AMDiS {
VecAssemblyBegin
(
vec_scale_lagrange
);
VecAssemblyEnd
(
vec_scale_lagrange
);
VecView
(
vec_scale_lagrange
,
PETSC_VIEWER_STDOUT_WORLD
);
if
(
fetiPreconditioner
!=
FETI_NONE
||
stokesMode
)
{
MatDuplicate
(
mat_lagrange
,
MAT_COPY_VALUES
,
&
mat_lagrange_scaled
);
MatDiagonalScale
(
mat_lagrange_scaled
,
vec_scale_lagrange
,
PETSC_NULL
);
...
...
@@ -1592,7 +1598,7 @@ namespace AMDiS {
createFetiData
();
dirichletRows
.
clear
();
//
dirichletRows.clear();
// === Create matrices for the FETI-DP method. ===
...
...
@@ -1727,10 +1733,12 @@ namespace AMDiS {
// Traverse all rows.
for
(
cursor_type
cursor
=
begin
<
row
>
(
dofMat
->
getBaseMatrix
()),
cend
=
end
<
row
>
(
dofMat
->
getBaseMatrix
());
cursor
!=
cend
;
++
cursor
)
{
if
(
isPrimal
(
rowFeSpace
,
*
cursor
))
if
(
dirichletRows
[
rowFeSpace
].
count
(
*
cursor
))
continue
;
if
(
isPrimal
(
rowFeSpace
,
*
cursor
))
continue
;
switch
(
fetiPreconditioner
)
{
case
FETI_DIRICHLET
:
...
...
@@ -1742,6 +1750,9 @@ namespace AMDiS {
// Traverse all columns.
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
icursor
!=
icend
;
++
icursor
)
{
if
(
dirichletRows
[
colFeSpace
].
count
(
col
(
*
icursor
)))
continue
;
if
(
isPrimal
(
colFeSpace
,
col
(
*
icursor
)))
continue
;
...
...
@@ -1805,6 +1816,9 @@ namespace AMDiS {
// Traverse all columns.
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
icursor
!=
icend
;
++
icursor
)
{
if
(
dirichletRows
[
colFeSpace
].
count
(
col
(
*
icursor
)))
continue
;
if
(
!
isDual
(
colFeSpace
,
col
(
*
icursor
)))
continue
;
...
...
Write
Preview
Markdown
is supported
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