Commit 6f00851b authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Finished implementation of the distributed grids subdomains overlaps setup.

parent e737221c
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -529,5 +529,15 @@ template<> class MPITypeResolver<long double>
}//namespace Communicators
} // namespace TNL


#define TNL_MPI_PRINT( message )                                                                                         \
for( int j = 0; j < TNL::Communicators::MpiCommunicator::GetSize( TNL::Communicators::MpiCommunicator::AllGroup ); j++ ) \
   {                                                                                                                     \
      if( j == TNL::Communicators::MpiCommunicator::GetRank( TNL::Communicators::MpiCommunicator::AllGroup ) )           \
      {                                                                                                                  \
         std::cerr << "Node " << j << " of "                                                                             \
                   << TNL::Communicators::MpiCommunicator::GetSize( TNL::Communicators::MpiCommunicator::AllGroup )      \
                   << " : " << message << std::endl;                                                                     \
      }                                                                                                                  \
      TNL::Communicators::MpiCommunicator::Barrier( Communicator::AllGroup );                                            \
   }
+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ SET( headers CudaBadAlloc.h
             CudaSupportMissing.h
             MICBadAlloc.h
             MICSupportMissing.h
             MPISupportMissing.h )
             MPISupportMissing.h
             UnsupportedDimension.h )

INSTALL( FILES ${headers} DESTINATION ${TNL_TARGET_INCLUDE_DIRECTORY}/Exceptions )
+34 −0
Original line number Diff line number Diff line
/***************************************************************************
                          UnsupportedDimension.h  -  description
                             -------------------
    begin                : Aug 14, 2018
    copyright            : (C) 2018 by Tomas Oberhuber et al.
    email                : tomas.oberhuber@fjfi.cvut.cz
 ***************************************************************************/

/* See Copyright Notice in tnl/Copyright */

// Implemented by: Jakub Klinkovsky

#pragma once

namespace TNL {
namespace Exceptions {

struct UnsupportedDimension
{
   UnsupportedDimension( int Dimension )
   : Dimension( Dimension )
   {
   }
   
   const char* what() const throw()
   {
      return "This dimension is not supported (yet).";
   }
   
   int Dimension;
};

} // namespace Exceptions
} // namespace TNL
+2 −2
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ class DistributedMesh< Grid< 1, RealType, Device, Index > > : public Distributed
      bool setup( const Config::ParameterContainer& parameters,
                  const String& prefix );
      
      template< typename CommunicatorType >
      /*template< typename CommunicatorType >
      void setGlobalGrid( const GridType &globalGrid,
                          const SubdomainOverlapsType& lower,
                          const SubdomainOverlapsType& upper );
                          const SubdomainOverlapsType& upper );*/
       
      void setupGrid( GridType& grid );
       
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ setup( const Config::ParameterContainer& parameters,
   return true;
}      

template< typename RealType, typename Device, typename Index >     
/*template< typename RealType, typename Device, typename Index >     
   template< typename CommunicatorType>
void
DistributedMesh< Grid< 1, RealType, Device, Index > >::
@@ -117,7 +117,7 @@ setGlobalGrid( const GridType& globalGrid,
       else
           this->localGridSize.x() += 2*this->overlap.x();
   }  
} 
}*/ 

template< typename RealType, typename Device, typename Index >     
void
Loading