diff --git a/AMDiS/src/parallel/MeshDistributor.cc b/AMDiS/src/parallel/MeshDistributor.cc index c84d4e233d87f79797a9d63393a6219a49a873c3..88aff70416ddf6fda13a912d1557f27639211afe 100644 --- a/AMDiS/src/parallel/MeshDistributor.cc +++ b/AMDiS/src/parallel/MeshDistributor.cc @@ -1686,8 +1686,6 @@ namespace AMDiS { vector<const FiniteElemSpace*>& dofMapSpaces = dofMaps[i]->getFeSpaces(); dofMaps[i]->clear(); - if (hasPeriodicBoundary) - dofMaps[i]->setComputeMatIndex(true); for (int j = 0; j < static_cast<int>(dofMapSpaces.size()); j++) updateLocalGlobalNumbering(*(dofMaps[i]), dofMapSpaces[j]); diff --git a/AMDiS/src/parallel/ParallelDofMapping.cc b/AMDiS/src/parallel/ParallelDofMapping.cc index 1b2540afc8c31ad78c853182a4ca00bfd5753485..4a39b2d0568eb21d3f2c0358424064efaa07b5fa 100644 --- a/AMDiS/src/parallel/ParallelDofMapping.cc +++ b/AMDiS/src/parallel/ParallelDofMapping.cc @@ -208,12 +208,13 @@ namespace AMDiS { } - ParallelDofMapping::ParallelDofMapping(DofMappingMode mode) + ParallelDofMapping::ParallelDofMapping(DofMappingMode mode, + bool matIndexFromGlobal) : meshLevel(0), levelData(NULL), dofComm(NULL), globalMapping(true), - needMatIndexFromGlobal(true), + needMatIndexFromGlobal(matIndexFromGlobal), nRankDofs(1), nLocalDofs(1), nOverallDofs(1), diff --git a/AMDiS/src/parallel/ParallelDofMapping.h b/AMDiS/src/parallel/ParallelDofMapping.h index 45e2e9027c8e37b55e9fbffe4d851765a3afe081..0bb64f7e49bb49fd3751d4b0db7cc406ca8ffa81 100644 --- a/AMDiS/src/parallel/ParallelDofMapping.h +++ b/AMDiS/src/parallel/ParallelDofMapping.h @@ -643,10 +643,13 @@ namespace AMDiS { /** \brief * Constructur for parallel DOF mapping. * - * \param[in] mode Defines if DOF mapping is defined either per - * component or per FE space. + * \param[in] mode Defines if DOF mapping is defined either per + * component or per FE space. + * \param[in] matIndexGlobal If true, the mat index is defined on global + * DOF indices, otherwise on local ones. */ - ParallelDofMapping(DofMappingMode mode); + ParallelDofMapping(DofMappingMode mode, + bool matIndexFromGlobal = false); /** \brief * Initialize the parallel DOF mapping. @@ -694,19 +697,11 @@ namespace AMDiS { return *dofComm; } - /// Changes the computation of matrix indices based of either local or - /// global DOF indices, see \ref needMatIndexFromGlobal - void setComputeMatIndex(bool global) - { - needMatIndexFromGlobal = global; - } - inline bool isMatIndexFromGlobal() { return needMatIndexFromGlobal; } - /// Access the DOF mapping for a given component number. inline ComponentDofMap& operator[](int compNumber) { diff --git a/AMDiS/src/parallel/PetscSolver.cc b/AMDiS/src/parallel/PetscSolver.cc index bbb2f45c2d1866f6bd430ac2299f465d9776a34c..e8f0300ad817e4b03f21dc8004dd1ef95fd05e90 100644 --- a/AMDiS/src/parallel/PetscSolver.cc +++ b/AMDiS/src/parallel/PetscSolver.cc @@ -22,8 +22,8 @@ namespace AMDiS { PetscSolver::PetscSolver() : ParallelCoarseSpaceMatVec(), - dofMap(FESPACE_WISE), - dofMapSd(FESPACE_WISE), + dofMap(FESPACE_WISE, true), + dofMapSd(FESPACE_WISE, true), kspPrefix(""), removeRhsNullspace(false), hasConstantNullspace(false), diff --git a/AMDiS/src/parallel/PetscSolverFeti.cc b/AMDiS/src/parallel/PetscSolverFeti.cc index e91404ccc92c6dc9b2c055146d60d0f066c421bb..58dbf068b38737e4485676bc5a7237362458d18b 100644 --- a/AMDiS/src/parallel/PetscSolverFeti.cc +++ b/AMDiS/src/parallel/PetscSolverFeti.cc @@ -1286,12 +1286,11 @@ namespace AMDiS { massMapping = massMatrixSolver->getDofMapping(); } else { massMapping = - new ParallelDofMapping(COMPONENT_WISE); + new ParallelDofMapping(COMPONENT_WISE, true); massMapping->init(meshDistributor->getMeshLevelData(), pressureFeSpace, pressureFeSpace); massMapping->setDofComm(meshDistributor->getDofComm()); massMapping->setMpiComm(meshDistributor->getMeshLevelData().getMpiComm(0), 0); - massMapping->setComputeMatIndex(true); } (*massMapping)[0] = interfaceDofMap[pressureComponent]; massMapping->update();