Skip to content
GitLab
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
3f5fab8e
Commit
3f5fab8e
authored
Jun 29, 2012
by
Thomas Witkowski
Browse files
Added possibility to analyze matrices from FETI-DP.
parent
64e91ba5
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
3f5fab8e
...
...
@@ -1099,6 +1099,40 @@ namespace AMDiS {
}
void
PetscSolverFeti
::
dbgMatrix
()
{
FUNCNAME
(
"PetscSolverFeti::dbgMatrix()"
);
#if (DEBUG != 0)
int
writeInteriorMatrix
=
-
1
;
Parameters
::
get
(
"parallel->debug->write interior matrix"
,
writeInteriorMatrix
);
if
(
writeInteriorMatrix
>=
0
&&
writeInteriorMatrix
==
MPI
::
COMM_WORLD
.
Get_rank
())
{
PetscViewer
petscView
;
PetscViewerBinaryOpen
(
PETSC_COMM_SELF
,
"interior.mat"
,
FILE_MODE_WRITE
,
&
petscView
);
MatView
(
subdomain
->
getMatIntInt
(),
petscView
);
PetscViewerDestroy
(
&
petscView
);
}
int
writeCoarseMatrix
=
0
;
Parameters
::
get
(
"parallel->debug->write coarse matrix"
,
writeCoarseMatrix
);
if
(
writeCoarseMatrix
>
0
)
{
PetscViewer
petscView
;
PetscViewerBinaryOpen
(
PETSC_COMM_WORLD
,
"coarse.mat"
,
FILE_MODE_WRITE
,
&
petscView
);
MatView
(
subdomain
->
getMatCoarseCoarse
(),
petscView
);
PetscViewerDestroy
(
&
petscView
);
}
#endif
}
void
PetscSolverFeti
::
recoverSolution
(
Vec
&
vec_sol_b
,
Vec
&
vec_sol_primal
,
SystemVector
&
vec
)
...
...
@@ -1412,6 +1446,11 @@ namespace AMDiS {
// === Create PETSc solver for the FETI-DP operator. ===
createFetiKsp
(
feSpaces
);
// === If required, run debug tests. ===
dbgMatrix
();
}
...
...
AMDiS/src/parallel/PetscSolverFeti.h
View file @
3f5fab8e
...
...
@@ -135,6 +135,10 @@ namespace AMDiS {
/// Destroys FETI-DP operator, \ref ksp_feti
void
destroyFetiKsp
();
/// In debug modes, this function runs some debug tests on the FETI
/// matrices. In optimized mode, nothing is done here.
void
dbgMatrix
();
/** \brief
* Recovers AMDiS solution vector from PETSc's solution vectors of the
* FETI-DP system. First, the B variables can locally be copied to the
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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