Loading src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h +3 −1 Original line number Diff line number Diff line Loading @@ -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 ] ); Loading src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_1D.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -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 >() ); Loading @@ -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 Loading @@ -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 >() ); Loading @@ -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 >() ); Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_2D.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading
src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h +3 −1 Original line number Diff line number Diff line Loading @@ -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 ] ); Loading
src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_1D.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -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 >() ); Loading @@ -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 Loading @@ -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 >() ); Loading @@ -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 >() ); Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading
src/UnitTests/Meshes/DistributedMeshes/DistributedGridTest_2D.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading Loading @@ -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 >() ); Loading