Commit 27c6fb8d authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed zero-initialization in SubdomainOverlapsGetter for DistributedGrid

parent 2fffec6f
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ getOverlaps( const DistributedMeshType* distributedMesh,
             IndexType subdomainOverlapSize,
             const SubdomainOverlapsType& periodicBoundariesOverlapSize )
{
   // initialize to 0
   lower = upper = 0;

   if( ! MPI::isDistributed() )
      return;
   TNL_ASSERT_TRUE( distributedMesh != NULL, "" );
@@ -70,6 +73,9 @@ getOverlaps( const DistributedMeshType* distributedMesh,
             const SubdomainOverlapsType& lowerPeriodicBoundariesOverlapSize,
             const SubdomainOverlapsType& upperPeriodicBoundariesOverlapSize )
{
   // initialize to 0
   lower = upper = 0;

   if( MPI::GetSize() == 1 )
      return;
   TNL_ASSERT_TRUE( distributedMesh != NULL, "" );
@@ -101,6 +107,9 @@ getOverlaps( const DistributedMeshType* distributedMesh,
             const SubdomainOverlapsType& lowerPeriodicBoundariesOverlapSize,
             const SubdomainOverlapsType& upperPeriodicBoundariesOverlapSize )
{
   // initialize to 0
   lower = upper = 0;

   if( MPI::GetSize() == 1 )
      return;
   TNL_ASSERT_TRUE( distributedMesh != NULL, "" );
@@ -143,6 +152,9 @@ getOverlaps( const DistributedMeshType* distributedMesh,
             const SubdomainOverlapsType& lowerPeriodicBoundariesOverlapSize,
             const SubdomainOverlapsType& upperPeriodicBoundariesOverlapSize )
{
   // initialize to 0
   lower = upper = 0;

   if( MPI::GetSize() == 1 )
      return;
   TNL_ASSERT_TRUE( distributedMesh != NULL, "" );