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
cbcf61f6
Commit
cbcf61f6
authored
Aug 27, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge for debugging
parent
b81cf528
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
20 deletions
+68
-20
AMDiS/src/parallel/PetscSolverFeti.cc
AMDiS/src/parallel/PetscSolverFeti.cc
+60
-1
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
+8
-19
No files found.
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
cbcf61f6
...
...
@@ -275,7 +275,11 @@ namespace AMDiS {
it
!=
vertices
.
end
();
++
it
)
{
double
e
=
1e-8
;
if
(
meshLevel
==
0
)
{
primals
.
insert
(
**
it
);
WorldVector
<
double
>
c
;
feSpace
->
getMesh
()
->
getDofIndexCoords
(
*
it
,
feSpace
,
c
);
if
(
fabs
(
c
[
1
])
>
1
&&
fabs
(
c
[
1
])
<
19
)
primals
.
insert
(
**
it
);
}
else
{
WorldVector
<
double
>
c
;
feSpace
->
getMesh
()
->
getDofIndexCoords
(
*
it
,
feSpace
,
c
);
...
...
@@ -990,6 +994,61 @@ namespace AMDiS {
{
FUNCNAME
(
"PetscSolverFeti::dbgMatrix()"
);
#if (DEBUG != 0)
PetscInt
nRow
,
nCol
;
MatGetSize
(
subdomain
->
getMatInterior
(),
&
nRow
,
&
nCol
);
mpi
::
globalAdd
(
nRow
);
mpi
::
globalAdd
(
nCol
);
MatInfo
minfo
;
MatGetInfo
(
subdomain
->
getMatInterior
(),
MAT_GLOBAL_SUM
,
&
minfo
);
int
nnz
=
static_cast
<
int
>
(
minfo
.
nz_used
);
mpi
::
globalAdd
(
nnz
);
MSG
(
"Interior matrices [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
nnz
);
MatGetSize
(
subdomain
->
getMatCoarse
(),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Primal matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarseInterior
(),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarseInterior
(),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Primal-Interior matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatInteriorCoarse
(),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatInteriorCoarse
(),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interior-Primal matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
if
(
enableStokesMode
)
{
MatGetSize
(
subdomain
->
getMatCoarse
(
1
,
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(
1
,
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interface matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarseInterior
(
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarseInterior
(
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interface-Interior matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatInteriorCoarse
(
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatInteriorCoarse
(
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interior-Interface matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarse
(
1
,
0
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(
1
,
0
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interface-Primal matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarse
(
0
,
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(
0
,
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Primal-Interface matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
}
#endif
int
writeInteriorMatrix
=
-
1
;
Parameters
::
get
(
"parallel->debug->write interior matrix"
,
writeInteriorMatrix
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
cbcf61f6
...
...
@@ -106,9 +106,6 @@ namespace AMDiS {
vector
<
const
FiniteElemSpace
*>
feSpaces
=
AMDiS
::
getComponentFeSpaces
(
*
seqMat
);
int
nRowsRankInterior
=
interiorMap
->
getRankDofs
();
int
nRowsOverallInterior
=
interiorMap
->
getOverallDofs
();
// === Prepare traverse of sequentially created matrices. ===
using
mtl
::
tag
::
row
;
using
mtl
::
tag
::
nz
;
using
mtl
::
begin
;
using
mtl
::
end
;
...
...
@@ -174,25 +171,19 @@ namespace AMDiS {
// === Set matrix values. ===
if
(
isRowCoarse
)
{
int
rowIndex
=
rowCoarseSpace
->
getMatIndex
(
rowComponent
,
*
cursor
);
for
(
unsigned
int
i
=
0
;
i
<
cols
.
size
();
i
++
)
cols
[
i
]
=
colCoarseSpace
->
getMatIndex
(
colComponent
,
cols
[
i
]);
int
rowIndex
=
rowCoarseSpace
->
getMatIndex
(
rowComponent
,
*
cursor
);
MatSetValues
(
getMatCoarseByComponent
(
rowComponent
,
colComponent
),
1
,
&
rowIndex
,
cols
.
size
(),
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
if
(
subdomainLevel
==
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
]);
}
else
{
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
])
+
rStartInterior
;
}
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
])
+
rStartInterior
;
MatSetValues
(
getMatCoarseInteriorByComponent
(
rowComponent
),
1
,
&
rowIndex
,
colsOther
.
size
(),
...
...
@@ -215,11 +206,9 @@ namespace AMDiS {
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
int
globalRowIndex
=
interiorMap
->
getMatIndex
(
rowComponent
,
*
cursor
);
if
(
subdomainLevel
!=
0
)
globalRowIndex
+=
rStartInterior
;
int
globalRowIndex
=
interiorMap
->
getMatIndex
(
rowComponent
,
*
cursor
)
+
rStartInterior
;
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
colCoarseSpace
->
getMatIndex
(
colComponent
,
colsOther
[
i
]);
...
...
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