Commit ed89165b authored by Reuther, Sebastian's avatar Reuther, Sebastian
Browse files

adapted constant normal extension algorithm of reinit for parallel use

parent b227d4cf
......@@ -112,6 +112,9 @@ void HL_SignedDistTraverse::initializeBoundary()
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
// In parallel AMDiS synchronize the bound_DOF DOFVector with the max-assigner and the sD_DOF DOFVector with the min-assigner
if (velExt)
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVectorSameWay(*bound_DOF, velExt->getAllDOFVectorsForSynchronization(), max_assigner());
else
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVector(*bound_DOF, max_assigner());
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVector(*sD_DOF, min_to_zero_assigner());
#endif
......@@ -131,6 +134,9 @@ void HL_SignedDistTraverse::HL_updateIteration()
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
// Update sDOld_DOF on interior domain boundaries
if (velExt)
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVectorSameWay(*sDOld_DOF, velExt->getAllDOFVectorsForSynchronization(), min_to_zero_assigner());
else
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVector(*sDOld_DOF, min_to_zero_assigner());
#endif
......@@ -160,6 +166,9 @@ void HL_SignedDistTraverse::HL_updateIteration()
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
// Update sD_DOF on interior domain boundaries
if (velExt)
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVectorSameWay(*sD_DOF, velExt->getAllDOFVectorsForSynchronization(), min_to_zero_assigner());
else
AMDiS::Parallel::MeshDistributor::globalMeshDistributor->synchVector(*sD_DOF, min_to_zero_assigner());
#endif
......
......@@ -231,6 +231,18 @@ public:
/// Swaps two vertices in the permutation.
void swapVertices(int i1, int i2);
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
std::vector<DOFVector<double> *> getAllDOFVectorsForSynchronization() {
std::vector<DOFVector<double> *> ret;
ret.reserve(velDOF.size() + origVelDOF.size());
for ( std::vector<DOFVector<double>*>::iterator it = velDOF.begin() ; it != velDOF.end() ; ++it )
ret.push_back(*it);
for ( std::vector<DOFVector<double>*>::iterator it = origVelDOF.begin() ; it != origVelDOF.end() ; ++it )
ret.push_back(*it);
return ret;
}
#endif
protected:
/// Original velocity vector.
std::vector<DOFVector<double> *> origVelDOF;
......
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