Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amdis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aland, Sebastian
amdis
Commits
ecba737f
Commit
ecba737f
authored
Aug 22, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some bugs in FETI-DP Stokes mode implementation.
parent
3acdc7cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
34 deletions
+21
-34
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.cc
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.cc
+0
-3
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.h
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.h
+14
-0
AMDiS/src/parallel/PetscSolverFeti.cc
AMDiS/src/parallel/PetscSolverFeti.cc
+2
-5
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
+5
-26
No files found.
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.cc
View file @
ecba737f
...
...
@@ -186,7 +186,6 @@ namespace AMDiS {
int
nRankCoarseRows
=
cMap
->
getRankDofs
();
int
nOverallCoarseRows
=
cMap
->
getOverallDofs
();
MSG
(
"COARSE MAT %d SIZE %d %d
\n
"
,
i
+
1
,
nOverallCoarseRows
,
nOverallCoarseRows
);
MatCreateAIJ
(
mpiCommGlobal
,
nRankCoarseRows
,
nRankCoarseRows
,
nOverallCoarseRows
,
nOverallCoarseRows
,
...
...
@@ -212,7 +211,6 @@ namespace AMDiS {
int
nColsRankMat
=
(
j
==
0
?
nRankInteriorRows
:
uniqueCoarseMap
[
j
-
1
]
->
getRankDofs
());
int
nColsOverallMat
=
(
j
==
0
?
nOverallInteriorRows
:
uniqueCoarseMap
[
j
-
1
]
->
getOverallDofs
());
MSG
(
"COARSE MAT %d %d SIZE %d %d
\n
"
,
i
,
j
,
nRowsOverallMat
,
nColsOverallMat
);
MatCreateAIJ
(
mpiCommGlobal
,
nRowsRankMat
,
nColsRankMat
,
nRowsOverallMat
,
nColsOverallMat
,
...
...
@@ -221,7 +219,6 @@ namespace AMDiS {
MSG
(
"REMOVE THIS!
\n
"
);
MatSetOption
(
mat
[
i
][
j
],
MAT_NEW_NONZERO_ALLOCATION_ERR
,
PETSC_FALSE
);
MSG
(
"COARSE MAT %d %d SIZE %d %d
\n
"
,
j
,
i
,
nRowsOverallMat
,
nColsOverallMat
);
MatCreateAIJ
(
mpiCommGlobal
,
nColsRankMat
,
nRowsRankMat
,
nColsOverallMat
,
nRowsOverallMat
,
...
...
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.h
View file @
ecba737f
...
...
@@ -167,6 +167,13 @@ namespace AMDiS {
return
vecRhs
[
coarseSpace
+
1
];
}
/// Get the RHS vector of the coarse space of a system component.
inline
Vec
&
getVecRhsCoarseByComponent
(
int
comp
)
{
int
vecIndex
=
componentIthCoarseMap
[
comp
]
+
1
;
return
vecRhs
[
vecIndex
];
}
/// Get the solution vector of the interior.
inline
Vec
&
getVecSolInterior
()
{
...
...
@@ -179,6 +186,13 @@ namespace AMDiS {
return
vecSol
[
coarseSpace
+
1
];
}
/// Get the solution vector of the coarse space of a system component.
inline
Vec
&
getVecSolCoarseByComponent
(
int
comp
)
{
int
vecIndex
=
componentIthCoarseMap
[
comp
]
+
1
;
return
vecSol
[
vecIndex
];
}
/** \brief
* Checks whether a given DOF index in some component is a coarse space DOF.
* Note (TODO): The specification of both, the component number and FE
...
...
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
ecba737f
...
...
@@ -530,13 +530,10 @@ namespace AMDiS {
for
(
DofContainer
::
iterator
it
=
allBoundaryDofs
.
begin
();
it
!=
allBoundaryDofs
.
end
();
++
it
)
if
(
meshDistributor
->
getDofMap
()[
feSpace
].
isRankDof
(
**
it
))
{
MSG
(
"INSERT INTERFACE RANK DOF %d
\n
"
,
**
it
);
if
(
meshDistributor
->
getDofMap
()[
feSpace
].
isRankDof
(
**
it
))
interfaceDofMap
[
feSpace
].
insertRankDof
(
**
it
);
}
else
{
MSG
(
"INSERT INTERFACE NON-RANK DOF %d
\n
"
,
**
it
);
else
interfaceDofMap
[
feSpace
].
insertNonRankDof
(
**
it
);
}
}
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
ecba737f
...
...
@@ -136,8 +136,6 @@ namespace AMDiS {
if
(
!
dofMat
)
continue
;
MSG
(
"=============== COMP %d %d =================
\n
"
,
rowComponent
,
colComponent
);
ParallelDofMapping
*
rowCoarseSpace
=
coarseSpaceMap
[
rowComponent
];
ParallelDofMapping
*
colCoarseSpace
=
coarseSpaceMap
[
colComponent
];
...
...
@@ -163,10 +161,6 @@ namespace AMDiS {
bool
isColCoarse
=
isCoarseSpace
(
colComponent
,
feSpaces
[
colComponent
],
col
(
*
icursor
));
if
(
colComponent
==
2
&&
col
(
*
icursor
)
==
19
)
{
MSG
(
"HERE WE TEST: %d %d
\n
"
,
isColCoarse
,
isRowCoarse
);
}
if
(
isColCoarse
)
{
if
(
isRowCoarse
)
{
cols
.
push_back
(
col
(
*
icursor
));
...
...
@@ -190,71 +184,56 @@ namespace AMDiS {
// === Set matrix values. ===
if
(
isRowCoarse
)
{
MSG
(
"A-GET MAT INDEX %d
\n
"
,
rowComponent
);
int
rowIndex
=
rowCoarseSpace
->
getMatIndex
(
rowComponent
,
*
cursor
);
MSG
(
"B-GET MAT INDEX %d
\n
"
,
colComponent
);
for
(
unsigned
int
i
=
0
;
i
<
cols
.
size
();
i
++
)
cols
[
i
]
=
colCoarseSpace
->
getMatIndex
(
colComponent
,
cols
[
i
]);
// matCoarseCoarse
//MSG("SET COARSE MAT COMP %d %d WITH %d entry\n", rowComponent, colComponent, cols.size());
MatSetValues
(
getMatCoarseByComponent
(
rowComponent
,
colComponent
),
1
,
&
rowIndex
,
cols
.
size
(),
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
if
(
subdomainLevel
==
0
)
{
MSG
(
"C0-GET MAT INDEX %d
\n
"
,
colComponent
);
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
]);
}
else
{
MSG
(
"C1-GET MAT INDEX %d
\n
"
,
colComponent
);
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
])
+
rStartInterior
;
}
// matCoarseInt
// MSG("SET COARSE-INT MAT COMP %d %d WITH %d entry\n", rowComponent, colComponent, cols.size());
MatSetValues
(
getMatCoarseInteriorByComponent
(
rowComponent
),
1
,
&
rowIndex
,
colsOther
.
size
(),
&
(
colsOther
[
0
]),
&
(
valuesOther
[
0
]),
ADD_VALUES
);
}
}
else
{
MSG
(
"D-GET MAT INDEX %d
\n
"
,
rowComponent
);
int
localRowIndex
=
(
subdomainLevel
==
0
?
interiorMap
->
getLocalMatIndex
(
rowComponent
,
*
cursor
)
:
interiorMap
->
getMatIndex
(
rowComponent
,
*
cursor
));
MSG
(
"E-GET MAT INDEX %d
\n
"
,
colComponent
);
for
(
unsigned
int
i
=
0
;
i
<
cols
.
size
();
i
++
)
{
if
(
subdomainLevel
==
0
)
cols
[
i
]
=
interiorMap
->
getLocalMatIndex
(
colComponent
,
cols
[
i
]);
else
cols
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
cols
[
i
]);
}
MSG
(
"DONE
\n
"
);
MatSetValues
(
getMatInterior
(),
1
,
&
localRowIndex
,
cols
.
size
(),
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
MSG
(
"F-GET MAT INDEX %d
\n
"
,
colComponent
);
int
globalRowIndex
=
interiorMap
->
getMatIndex
(
rowComponent
,
*
cursor
);
if
(
subdomainLevel
!=
0
)
globalRowIndex
+=
rStartInterior
;
MSG
(
"G-GET MAT INDEX %d
\n
"
,
colComponent
);
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
colCoarseSpace
->
getMatIndex
(
colComponent
,
colsOther
[
i
]);
// matIntCoarse
// MSG("SET INT-COARSE MAT COMP %d %d WITH %d entry\n", rowComponent, colComponent, cols.size());
MatSetValues
(
getMatInteriorCoarseByComponent
(
colComponent
),
1
,
&
globalRowIndex
,
colsOther
.
size
(),
&
(
colsOther
[
0
]),
&
(
valuesOther
[
0
]),
ADD_VALUES
);
...
...
@@ -293,7 +272,8 @@ namespace AMDiS {
// === Transfer values from DOF vector to the PETSc vector. ===
if
(
coarseSpaceMap
.
size
())
{
for
(
int
i
=
0
;
i
<
vec
->
getSize
();
i
++
)
setDofVector
(
getVecRhsInterior
(),
getVecRhsCoarse
(),
vec
->
getDOFVector
(
i
),
i
);
setDofVector
(
getVecRhsInterior
(),
getVecSolCoarseByComponent
(
i
),
vec
->
getDOFVector
(
i
),
i
);
}
else
{
for
(
int
i
=
0
;
i
<
vec
->
getSize
();
i
++
)
setDofVector
(
getVecRhsInterior
(),
vec
->
getDOFVector
(
i
),
i
);
...
...
@@ -499,7 +479,7 @@ namespace AMDiS {
blockComponents
);
int
nComponents
=
static_cast
<
int
>
(
blockComponents
.
size
());
TEST_EXIT
(
nComponents
>
0
)(
"No
is
block for block %d defined!
\n
"
,
i
);
TEST_EXIT
(
nComponents
>
0
)(
"No
IS
block for block %d defined!
\n
"
,
i
);
// Check if blocks are continous
for
(
int
j
=
0
;
j
<
nComponents
;
j
++
)
{
...
...
@@ -709,9 +689,8 @@ namespace AMDiS {
const
FiniteElemSpace
*
feSpace
=
vec
->
getFeSpace
();
PeriodicMap
&
perMap
=
meshDistributor
->
getPeriodicMap
();
ParallelDofMapping
*
rowCoarseSpace
=
NULL
;
if
(
coarseSpaceMap
.
size
())
rowCoarseSpace
=
coarseSpaceMap
[
nRowVec
];
ParallelDofMapping
*
rowCoarseSpace
=
(
coarseSpaceMap
.
size
()
?
coarseSpaceMap
[
nRowVec
]
:
NULL
);
// Traverse all used DOFs in the dof vector.
DOFVector
<
double
>::
Iterator
dofIt
(
vec
,
USED_DOFS
);
...
...
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