Commit a9938f46 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Update checker partitioner for 3D.

parent e633aa27
...@@ -23,12 +23,14 @@ namespace AMDiS { ...@@ -23,12 +23,14 @@ namespace AMDiS {
int mpiRank = mpiComm->Get_rank(); int mpiRank = mpiComm->Get_rank();
int mpiSize = mpiComm->Get_size(); int mpiSize = mpiComm->Get_size();
int nElementsPerBlock = (mesh->getDim() == 2 ? 2 : 6);
TraverseStack stack; TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, 0, Mesh::CALL_EL_LEVEL); ElInfo *elInfo = stack.traverseFirst(mesh, 0, Mesh::CALL_EL_LEVEL);
while (elInfo) { while (elInfo) {
Element *el = elInfo->getElement(); Element *el = elInfo->getElement();
int elIndex = el->getIndex(); int elIndex = el->getIndex();
int elInRank = elIndex / 2; int elInRank = elIndex / nElementsPerBlock;
TEST_EXIT_DBG(elInRank < mpiSize)("Should not happen!\n"); TEST_EXIT_DBG(elInRank < mpiSize)("Should not happen!\n");
elementInRank[elIndex] = (elInRank == mpiRank); elementInRank[elIndex] = (elInRank == mpiRank);
......
...@@ -130,9 +130,6 @@ namespace AMDiS { ...@@ -130,9 +130,6 @@ namespace AMDiS {
{ {
FUNCNAME("PetscSolverFeti::updateDofData()"); FUNCNAME("PetscSolverFeti::updateDofData()");
TEST_EXIT(meshDistributor->getMesh()->getDim() == 2)
("Works for 2D problems only!");
TEST_EXIT(meshDistributor->getFeSpace()->getBasisFcts()->getDegree() == 1) TEST_EXIT(meshDistributor->getFeSpace()->getBasisFcts()->getDegree() == 1)
("Works for linear basis functions only!\n"); ("Works for linear basis functions only!\n");
...@@ -189,8 +186,8 @@ namespace AMDiS { ...@@ -189,8 +186,8 @@ namespace AMDiS {
it != globalPrimalIndex.end(); ++it) it != globalPrimalIndex.end(); ++it)
it->second += rStartPrimals; it->second += rStartPrimals;
MSG_DBG("nRankPrimals = %d nOverallPrimals = %d\n", MSG("nRankPrimals = %d nOverallPrimals = %d\n",
nRankPrimals, nOverallPrimals); nRankPrimals, nOverallPrimals);
// === Communicate primal's global index from ranks that own the === // === Communicate primal's global index from ranks that own the ===
...@@ -335,8 +332,8 @@ namespace AMDiS { ...@@ -335,8 +332,8 @@ namespace AMDiS {
int nOverallDuals = nRankDuals; int nOverallDuals = nRankDuals;
mpi::globalAdd(nOverallDuals); mpi::globalAdd(nOverallDuals);
MSG_DBG("nRankDuals = %d nOverallDuals = %d\n", MSG("nRankDuals = %d nOverallDuals = %d\n",
nRankDuals, nOverallDuals); nRankDuals, nOverallDuals);
} }
...@@ -370,8 +367,8 @@ namespace AMDiS { ...@@ -370,8 +367,8 @@ namespace AMDiS {
if (meshDistributor->getIsRankDof(*it)) if (meshDistributor->getIsRankDof(*it))
dofFirstLagrange[*it] += rStartLagrange; dofFirstLagrange[*it] += rStartLagrange;
MSG_DBG("nRankLagrange = %d nOverallLagrange = %d\n", MSG("nRankLagrange = %d nOverallLagrange = %d\n",
nRankLagrange, nOverallLagrange); nRankLagrange, nOverallLagrange);
// === Communicate dofFirstLagrange to all other ranks. === // === Communicate dofFirstLagrange to all other ranks. ===
...@@ -1272,6 +1269,7 @@ namespace AMDiS { ...@@ -1272,6 +1269,7 @@ namespace AMDiS {
// === Solve with FETI-DP operator. === // === Solve with FETI-DP operator. ===
MSG("START FETI SOLVE!\n");
KSPSolve(ksp_feti, vec_rhs, vec_rhs); KSPSolve(ksp_feti, vec_rhs, vec_rhs);
......
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