From a9938f46becf54f22bea83ec5fedba3d51166f73 Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Wed, 25 May 2011 09:25:44 +0000 Subject: [PATCH] Update checker partitioner for 3D. --- AMDiS/src/parallel/CheckerPartitioner.cc | 4 +++- AMDiS/src/parallel/PetscSolverFeti.cc | 16 +++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AMDiS/src/parallel/CheckerPartitioner.cc b/AMDiS/src/parallel/CheckerPartitioner.cc index f4db8517..7ba10fea 100644 --- a/AMDiS/src/parallel/CheckerPartitioner.cc +++ b/AMDiS/src/parallel/CheckerPartitioner.cc @@ -23,12 +23,14 @@ namespace AMDiS { int mpiRank = mpiComm->Get_rank(); int mpiSize = mpiComm->Get_size(); + int nElementsPerBlock = (mesh->getDim() == 2 ? 2 : 6); + TraverseStack stack; ElInfo *elInfo = stack.traverseFirst(mesh, 0, Mesh::CALL_EL_LEVEL); while (elInfo) { Element *el = elInfo->getElement(); int elIndex = el->getIndex(); - int elInRank = elIndex / 2; + int elInRank = elIndex / nElementsPerBlock; TEST_EXIT_DBG(elInRank < mpiSize)("Should not happen!\n"); elementInRank[elIndex] = (elInRank == mpiRank); diff --git a/AMDiS/src/parallel/PetscSolverFeti.cc b/AMDiS/src/parallel/PetscSolverFeti.cc index ce106fcc..23203776 100644 --- a/AMDiS/src/parallel/PetscSolverFeti.cc +++ b/AMDiS/src/parallel/PetscSolverFeti.cc @@ -130,9 +130,6 @@ namespace AMDiS { { FUNCNAME("PetscSolverFeti::updateDofData()"); - TEST_EXIT(meshDistributor->getMesh()->getDim() == 2) - ("Works for 2D problems only!"); - TEST_EXIT(meshDistributor->getFeSpace()->getBasisFcts()->getDegree() == 1) ("Works for linear basis functions only!\n"); @@ -189,8 +186,8 @@ namespace AMDiS { it != globalPrimalIndex.end(); ++it) it->second += rStartPrimals; - MSG_DBG("nRankPrimals = %d nOverallPrimals = %d\n", - nRankPrimals, nOverallPrimals); + MSG("nRankPrimals = %d nOverallPrimals = %d\n", + nRankPrimals, nOverallPrimals); // === Communicate primal's global index from ranks that own the === @@ -335,8 +332,8 @@ namespace AMDiS { int nOverallDuals = nRankDuals; mpi::globalAdd(nOverallDuals); - MSG_DBG("nRankDuals = %d nOverallDuals = %d\n", - nRankDuals, nOverallDuals); + MSG("nRankDuals = %d nOverallDuals = %d\n", + nRankDuals, nOverallDuals); } @@ -370,8 +367,8 @@ namespace AMDiS { if (meshDistributor->getIsRankDof(*it)) dofFirstLagrange[*it] += rStartLagrange; - MSG_DBG("nRankLagrange = %d nOverallLagrange = %d\n", - nRankLagrange, nOverallLagrange); + MSG("nRankLagrange = %d nOverallLagrange = %d\n", + nRankLagrange, nOverallLagrange); // === Communicate dofFirstLagrange to all other ranks. === @@ -1272,6 +1269,7 @@ namespace AMDiS { // === Solve with FETI-DP operator. === + MSG("START FETI SOLVE!\n"); KSPSolve(ksp_feti, vec_rhs, vec_rhs); -- GitLab