src/solvers/hydro/hydro.cc
/**
 ********************************************************************************************************************************************
 * \brief   Function to enable/disable periodic data transfer as per the problem
 *
 *          The function checks the xPer, yPer and zPer flags in the parser class
 *          and enables/disables MPI data transfer at boundaries accordingly
 *          By default, the MPI neighbours at boundaries are set for periodic data-transfer.
 *          This has to be disabled if the problem has non-periodic boundaries.
 *
 ********************************************************************************************************************************************
 */
\brief   Function to enable/disable periodic data transfer as per the problem
The function checks the xPer, yPer and zPer flags in the parser class
and enables/disables MPI data transfer at boundaries accordingly
By default, the MPI neighbours at boundaries are set for periodic data-transfer.
This has to be disabled if the problem has non-periodic boundaries.
\ brief Function to enable / disable periodic data transfer as per the problem The function checks the xPer yPer and zPer flags in the parser class and enables / disables MPI data transfer at boundaries accordingly By default the MPI neighbours at boundaries are set for periodic data - transfer . This has to be disabled if the problem has non - periodic boundaries .
void hydro::checkPeriodic() {
    if (not inputParams.xPer) {
        if (mpiData.rank == 0) {
            std::cout << "Using non-periodic boundary conditions along X Direction" << std::endl;
            std::cout << std::endl;
        }
        if (mpiData.xRank == 0)             mpiData.faceRanks(0) = MPI_PROC_NULL;
        if (mpiData.xRank == mpiData.npX-1) mpiData.faceRanks(1) = MPI_PROC_NULL;
    }
#ifdef PLANAR
     are by default non-periodic for 2D simulations
    if (mpiData.yRank == 0)             mpiData.faceRanks(2) = MPI_PROC_NULL;
    if (mpiData.yRank == mpiData.npY-1) mpiData.faceRanks(3) = MPI_PROC_NULL;
#else
    if (not inputParams.yPer) {
        if (mpiData.rank == 0) {
            std::cout << "Using non-periodic boundary conditions along Y Direction" << std::endl;
            std::cout << std::endl;
        }
        if (mpiData.yRank == 0)             mpiData.faceRanks(2) = MPI_PROC_NULL;
        if (mpiData.yRank == mpiData.npY-1) mpiData.faceRanks(3) = MPI_PROC_NULL;
    }
#endif
    if (not inputParams.zPer) {
        if (mpiData.rank == 0) {
            std::cout << "Using non-periodic boundary conditions along Z Direction" << std::endl;
            std::cout << std::endl;
        }
    }
}
void hydro :: checkPeriodic ( ) { if ( not inputParams . xPer ) { if ( mpiData . rank == 0 ) { std :: cout << " " << std :: endl ; std :: cout << std :: endl ; } if ( mpiData . xRank == 0 ) mpiData . faceRanks ( 0 ) = MPI_PROC_NULL ; if ( mpiData . xRank == mpiData . npX - 1 ) mpiData . faceRanks ( 1 ) = MPI_PROC_NULL ; } #ifdef PLANAR if ( mpiData . yRank == 0 ) mpiData . faceRanks ( 2 ) = MPI_PROC_NULL ; if ( mpiData . yRank == mpiData . npY - 1 ) mpiData . faceRanks ( 3 ) = MPI_PROC_NULL ; #else if ( not inputParams . yPer ) { if ( mpiData . rank == 0 ) { std :: cout << " " << std :: endl ; std :: cout << std :: endl ; } if ( mpiData . yRank == 0 ) mpiData . faceRanks ( 2 ) = MPI_PROC_NULL ; if ( mpiData . yRank == mpiData . npY - 1 ) mpiData . faceRanks ( 3 ) = MPI_PROC_NULL ; } #endif if ( not inputParams . zPer ) { if ( mpiData . rank == 0 ) { std :: cout << " " << std :: endl ; std :: cout << std :: endl ; } } }
\brief   Function to enable/disable periodic data transfer as per the problem
          The function checks the xPer, yPer and zPer flags in the parser class
          and enables/disables MPI data transfer at boundaries accordingly
          By default, the MPI neighbours at boundaries are set for periodic data-transfer.
\ brief Function to enable / disable periodic data transfer as per the problem The function checks the xPer yPer and zPer flags in the parser class and enables / disables MPI data transfer at boundaries accordingly By default the MPI neighbours at boundaries are set for periodic data - transfer .
// Disable periodic data transfer by setting neighbouring ranks of boundary sub-domains to NULL // Left and right walls // Front and rear walls // Front and rear walls are by default non-periodic for 2D simulations // Inform user about BC along top and bottom walls