diff --git a/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h b/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h index 286694e9fcd39830094ce91517e11a35eb03211b..9ff025c409ce3d2a0ad71ed42063c82dafa68d04 100644 --- a/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h +++ b/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h @@ -157,7 +157,9 @@ class DistributedMeshSynchronizer< Functions::MeshFunction< Grid< MeshDimension, //send everything, recieve everything for( int i=0; i<this->getNeighborCount(); i++ ) { - TNL_MPI_PRINT( "Sending data... " << i << " sizes -> " << sendSizes[ i ] ); + TNL_MPI_PRINT( "Sending data... " << i << " sizes -> " + << sendSizes[ i ] << "sendDimensions -> " << sendDimensions[ i ] + << " upperOverlap -> " << this->distributedGrid->getUpperOverlap() ); if( neighbors[ i ] != -1 ) { TNL_MPI_PRINT( "Sending data to node " << neighbors[ i ] ); diff --git a/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_1D.cpp b/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_1D.cpp index 9f9fdcd39cfb629451d40fa9d92b8664b4869eb1..0587667e712a6465ca7f205f43acd538670f73a1 100644 --- a/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_1D.cpp +++ b/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_1D.cpp @@ -247,7 +247,7 @@ TEST_F(DistributedGridTest_1D, SynchronizePeriodicNeighborsWithoutMask ) // TODO: I do not know how to do it better with GTEST typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridptr); dof.setSize( gridptr->template getEntitiesCount< Cell >() ); @@ -259,14 +259,14 @@ TEST_F(DistributedGridTest_1D, SynchronizePeriodicNeighborsWithoutMask ) maskDofs.setValue( true ); //constFunctionEvaluator.evaluateAllEntities( meshFunctionPtr, constFunctionPtr ); meshFunctionPtr->getSynchronizer().setPeriodicBoundariesCopyDirection( Synchronizer::OverlapToBoundary ); - TNL_MPI_PRINT( ">>>>>>>>>>>>>> " << dof[ 1 ] << " : " << -rank - 1 ); + //TNL_MPI_PRINT( ">>>>>>>>>>>>>> " << dof[ 1 ] << " : " << -rank - 1 ); meshFunctionPtr->template synchronize<CommunicatorType>( true ); - TNL_MPI_PRINT( "#########" << dof[ 1 ] ); - /*if( rank == 0 ) + //TNL_MPI_PRINT( "#########" << dof[ 1 ] ); + if( rank == 0 ) EXPECT_EQ( dof[ 1 ], -nproc ) << "Left Overlap was filled by wrong process."; if( rank == nproc-1 ) - EXPECT_EQ( dof[ dof.getSize() - 2 ], -1 )<< "Right Overlap was filled by wrong process.";*/ + EXPECT_EQ( dof[ dof.getSize() - 2 ], -1 )<< "Right Overlap was filled by wrong process."; } #ifdef UNDEF @@ -276,7 +276,7 @@ TEST_F(DistributedGridTest_1D, SynchronizePeriodicNeighborsWithActiveMask ) // TODO: I do not know how to do it better with GTEST typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridptr); dof.setSize( gridptr->template getEntitiesCount< Cell >() ); @@ -301,7 +301,7 @@ TEST_F(DistributedGridTest_1D, SynchronizePeriodicNeighborsWithInactiveMaskOnLef // TODO: I do not know how to do it better with GTEST typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridptr); dof.setSize( gridptr->template getEntitiesCount< Cell >() ); @@ -328,7 +328,7 @@ TEST_F(DistributedGridTest_1D, SynchronizePeriodicNeighborsWithInactiveMask ) // TODO: I do not know how to do it better with GTEST typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridptr); dof.setSize( gridptr->template getEntitiesCount< Cell >() ); @@ -358,7 +358,7 @@ TEST_F(DistributedGridTest_1D, SynchronizePeriodicBoundariesLinearTest ) // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridptr); dof.setSize( gridptr->template getEntitiesCount< Cell >() ); diff --git a/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_2D.cpp b/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_2D.cpp index 94fb099533638b547d11eba55f18eb98c6e643c5..94057a755550c36b7d11d29d968088966d6e66fc 100644 --- a/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_2D.cpp +++ b/src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_2D.cpp @@ -533,7 +533,7 @@ TEST_F(DistributedGridTest_2D, SynchronizerNeighborPeriodicBoundariesWithoutMask // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridPtr); dof->setSize( gridPtr->template getEntitiesCount< Cell >() ); @@ -605,7 +605,7 @@ TEST_F(DistributedGridTest_2D, SynchronizerNeighborPeriodicBoundariesWithActiveM // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridPtr); dof->setSize( gridPtr->template getEntitiesCount< Cell >() ); @@ -680,7 +680,7 @@ TEST_F(DistributedGridTest_2D, SynchronizerNeighborPeriodicBoundariesWithInactiv // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridPtr); dof->setSize( gridPtr->template getEntitiesCount< Cell >() ); @@ -765,7 +765,7 @@ TEST_F(DistributedGridTest_2D, SynchronizerNeighborPeriodicBoundariesWithInActiv // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridPtr); dof->setSize( gridPtr->template getEntitiesCount< Cell >() ); @@ -850,7 +850,7 @@ TEST_F(DistributedGridTest_2D, SynchronizerNeighborPeriodicBoundariesWithInActiv // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridPtr); dof->setSize( gridPtr->template getEntitiesCount< Cell >() ); @@ -935,7 +935,7 @@ TEST_F(DistributedGridTest_2D, SynchronizerNeighborPeriodicBoundariesWithInActiv // of the periodic boundaries typename DistributedGridType::SubdomainOverlapsType lowerOverlap, upperOverlap; SubdomainOverlapsGetter< GridType, CommunicatorType >:: - getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1 ); + getOverlaps( distributedGrid, lowerOverlap, upperOverlap, 1, 1, 1 ); distributedGrid->setOverlaps( lowerOverlap, upperOverlap ); distributedGrid->setupGrid(*gridPtr); dof->setSize( gridPtr->template getEntitiesCount< Cell >() );