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
Backofen, Rainer
amdis
Commits
fc3bdbaa
Commit
fc3bdbaa
authored
Oct 10, 2012
by
Thomas Witkowski
Browse files
Work in Dirichlet preconditioner for FETI-DP.
parent
489701e5
Changes
1
Show whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
fc3bdbaa
...
@@ -144,7 +144,15 @@ namespace AMDiS {
...
@@ -144,7 +144,15 @@ namespace AMDiS {
const
FiniteElemSpace
*
feSpace
=
dofMat
->
getRowFeSpace
();
const
FiniteElemSpace
*
feSpace
=
dofMat
->
getRowFeSpace
();
std
::
set
<
DegreeOfFreedom
>&
dRows
=
dofMat
->
getDirichletRows
();
std
::
set
<
DegreeOfFreedom
>&
dRows
=
dofMat
->
getDirichletRows
();
if
(
dirichletRows
.
count
(
feSpace
))
{
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
{
}
else
{
dirichletRows
[
feSpace
]
=
dRows
;
dirichletRows
[
feSpace
]
=
dRows
;
}
}
...
@@ -673,8 +681,6 @@ namespace AMDiS {
...
@@ -673,8 +681,6 @@ namespace AMDiS {
VecAssemblyBegin
(
vec_scale_lagrange
);
VecAssemblyBegin
(
vec_scale_lagrange
);
VecAssemblyEnd
(
vec_scale_lagrange
);
VecAssemblyEnd
(
vec_scale_lagrange
);
VecView
(
vec_scale_lagrange
,
PETSC_VIEWER_STDOUT_WORLD
);
if
(
fetiPreconditioner
!=
FETI_NONE
||
stokesMode
)
{
if
(
fetiPreconditioner
!=
FETI_NONE
||
stokesMode
)
{
MatDuplicate
(
mat_lagrange
,
MAT_COPY_VALUES
,
&
mat_lagrange_scaled
);
MatDuplicate
(
mat_lagrange
,
MAT_COPY_VALUES
,
&
mat_lagrange_scaled
);
MatDiagonalScale
(
mat_lagrange_scaled
,
vec_scale_lagrange
,
PETSC_NULL
);
MatDiagonalScale
(
mat_lagrange_scaled
,
vec_scale_lagrange
,
PETSC_NULL
);
...
@@ -1592,7 +1598,7 @@ namespace AMDiS {
...
@@ -1592,7 +1598,7 @@ namespace AMDiS {
createFetiData
();
createFetiData
();
dirichletRows
.
clear
();
//
dirichletRows.clear();
// === Create matrices for the FETI-DP method. ===
// === Create matrices for the FETI-DP method. ===
...
@@ -1728,9 +1734,11 @@ namespace AMDiS {
...
@@ -1728,9 +1734,11 @@ namespace AMDiS {
for
(
cursor_type
cursor
=
begin
<
row
>
(
dofMat
->
getBaseMatrix
()),
for
(
cursor_type
cursor
=
begin
<
row
>
(
dofMat
->
getBaseMatrix
()),
cend
=
end
<
row
>
(
dofMat
->
getBaseMatrix
());
cursor
!=
cend
;
++
cursor
)
{
cend
=
end
<
row
>
(
dofMat
->
getBaseMatrix
());
cursor
!=
cend
;
++
cursor
)
{
if
(
isPrimal
(
rowFeSpace
,
*
cursor
))
if
(
dirichletRows
[
rowFeSpace
].
count
(
*
cursor
))
continue
;
continue
;
if
(
isPrimal
(
rowFeSpace
,
*
cursor
))
continue
;
switch
(
fetiPreconditioner
)
{
switch
(
fetiPreconditioner
)
{
case
FETI_DIRICHLET
:
case
FETI_DIRICHLET
:
...
@@ -1743,6 +1751,9 @@ namespace AMDiS {
...
@@ -1743,6 +1751,9 @@ namespace AMDiS {
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
icursor
!=
icend
;
++
icursor
)
{
icursor
!=
icend
;
++
icursor
)
{
if
(
dirichletRows
[
colFeSpace
].
count
(
col
(
*
icursor
)))
continue
;
if
(
isPrimal
(
colFeSpace
,
col
(
*
icursor
)))
if
(
isPrimal
(
colFeSpace
,
col
(
*
icursor
)))
continue
;
continue
;
...
@@ -1805,6 +1816,9 @@ namespace AMDiS {
...
@@ -1805,6 +1816,9 @@ namespace AMDiS {
// Traverse all columns.
// Traverse all columns.
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
icursor
!=
icend
;
++
icursor
)
{
icursor
!=
icend
;
++
icursor
)
{
if
(
dirichletRows
[
colFeSpace
].
count
(
col
(
*
icursor
)))
continue
;
if
(
!
isDual
(
colFeSpace
,
col
(
*
icursor
)))
if
(
!
isDual
(
colFeSpace
,
col
(
*
icursor
)))
continue
;
continue
;
...
...
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