Commit 1f0eda53 authored by Thomas Witkowski's avatar Thomas Witkowski

Fixed problem in FETI-DP code for PDEs with multiple components.

parent 0e6691d8
......@@ -578,8 +578,8 @@ namespace AMDiS {
MatCreateShell(PETSC_COMM_WORLD,
nRankLagrange, nRankLagrange,
nOverallLagrange, nOverallLagrange,
nRankLagrange * nComponents, nRankLagrange * nComponents,
nOverallLagrange * nComponents, nOverallLagrange * nComponents,
&petscFetiData, &mat_feti);
MatShellSetOperation(mat_feti, MATOP_MULT, (void(*)(void))petscMultMatFeti);
......@@ -607,7 +607,8 @@ namespace AMDiS {
petscFetiPreconData.mat_interior_bound = &mat_interior_bound;
petscFetiPreconData.mat_bound_interior = &mat_bound_interior;
petscFetiPreconData.ksp_interior = &ksp_interior;
petscFetiPreconData.nInterior = nRankB - duals.size();
petscFetiPreconData.nLocalInterior = nLocalInterior;
petscFetiPreconData.nLocalBound = nLocalBound;
VecDuplicate(f_b, &(petscFetiPreconData.tmp_vec_b));
......@@ -615,7 +616,6 @@ namespace AMDiS {
MatGetVecs(mat_bound_bound, PETSC_NULL, &(petscFetiPreconData.tmp_vec_bound1));
MatGetVecs(mat_interior_interior, PETSC_NULL, &(petscFetiPreconData.tmp_vec_interior));
KSPGetPC(ksp_feti, &precon_feti);
PCSetType(precon_feti, PCSHELL);
PCShellSetContext(precon_feti, static_cast<void*>(&petscFetiPreconData));
......@@ -1116,9 +1116,9 @@ namespace AMDiS {
int nRankNest = (nRankB + nRankPrimals) * nComponents + nRankLagrange;
int nOverallNest = (nOverallB + nOverallPrimals) * nComponents + nOverallLagrange;
int rStartNest = (rStartB + rStartPrimals) * nComponents + rStartLagrange;
int nRankNest = (nRankB + nRankPrimals + nRankLagrange) * nComponents;
int nOverallNest = (nOverallB + nOverallPrimals + nOverallLagrange) * nComponents;
int rStartNest = (rStartB + rStartPrimals + rStartLagrange) * nComponents;
{
// === Test some matrix sizes. ===
......
......@@ -104,7 +104,9 @@ namespace AMDiS {
Vec tmp_vec_interior;
int nInterior;
int nLocalInterior;
int nLocalBound;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment