From 602a62d31f4a4e0b5e0b1590eda0cd92dbd18d67 Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Wed, 13 Jun 2012 13:36:17 +0000
Subject: [PATCH] Fixed some small problems with using FETI-DP without a
 preconditioner.

---
 AMDiS/src/parallel/MeshDistributor.cc | 2 +-
 AMDiS/src/parallel/MeshPartitioner.cc | 8 ++++++--
 AMDiS/src/parallel/PetscSolverFeti.cc | 4 ++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/AMDiS/src/parallel/MeshDistributor.cc b/AMDiS/src/parallel/MeshDistributor.cc
index 4d9047df..175c4cd5 100644
--- a/AMDiS/src/parallel/MeshDistributor.cc
+++ b/AMDiS/src/parallel/MeshDistributor.cc
@@ -1682,7 +1682,7 @@ namespace AMDiS {
     MSG("|  number of FE spaces:      %d\n", feSpaces.size());
 
     for (unsigned int i = 0; i < feSpaces.size(); i++) {
-      MSG("|  FE space = %d:\n", i);
+      MSG("|  FE space = %d  (pointer adr %p):\n", i, feSpaces[i]);
       MSG("|      nRankDofs    = %d\n", dofMap[feSpaces[i]].nRankDofs);
       MSG("|      nOverallDofs = %d\n", dofMap[feSpaces[i]].nOverallDofs);
       MSG("|      rStartDofs   = %d\n", dofMap[feSpaces[i]].rStartDofs);
diff --git a/AMDiS/src/parallel/MeshPartitioner.cc b/AMDiS/src/parallel/MeshPartitioner.cc
index 7b2dc4e3..a873e0bc 100644
--- a/AMDiS/src/parallel/MeshPartitioner.cc
+++ b/AMDiS/src/parallel/MeshPartitioner.cc
@@ -48,14 +48,18 @@ namespace AMDiS {
 	if (elInfo->getNeighbour(i) && elInfo->getBoundary(i) == INTERIOR) 
 	  elNeighbours[elIndex].push_back(elInfo->getNeighbour(i)->getIndex());
 
-
       // === Create initial partitioning. ===
-
+      
       if (!boxPartitioning) {
 	// In standard mode assign to each macro element an arbitrary but unique
 	// rank number.
 	
 	int elInRank = std::min(elIndex / elPerRank, mpiSize - 1);
+//  	int elInRank = 0;
+//  	if (elIndex <= 11 || elIndex >= 28)
+//  	  elInRank = 0;
+//  	else
+//  	  elInRank = 1;
 
 	elementInRank[elIndex] = (elInRank == mpiRank);
 	partitionMap[elIndex] = elInRank;	
diff --git a/AMDiS/src/parallel/PetscSolverFeti.cc b/AMDiS/src/parallel/PetscSolverFeti.cc
index 66010054..5db9773f 100644
--- a/AMDiS/src/parallel/PetscSolverFeti.cc
+++ b/AMDiS/src/parallel/PetscSolverFeti.cc
@@ -305,7 +305,7 @@ namespace AMDiS {
       localDofMap.setComputeMatIndex(true);
     }
 
-    if (fetiPreconditioner == FETI_DIRICHLET) {
+    if (fetiPreconditioner != FETI_NONE) {
       TEST_EXIT(meshLevel == 0)
 	("Dirichlet preconditioner not yet implemented for multilevel FETI-DP\n");
 
@@ -333,7 +333,7 @@ namespace AMDiS {
     dualDofMap.clear();
     lagrangeMap.clear();
     localDofMap.clear();
-    if (fetiPreconditioner == FETI_DIRICHLET)
+    if (fetiPreconditioner != FETI_NONE)
       interiorDofMap.clear();
 
     primalDofMap.setDofComm(meshDistributor->getDofComm());
-- 
GitLab