lib/field/field.cc
/**
 ********************************************************************************************************************************************
 * \brief   Function to create the bulk slice and its offset views
 *
 *          The bulk and wall slices of the field differentiates the domain into the bulk of the fluid and the walls of the domain.
 *          The bulk slice is used in two places - i) to set wall slices - walls are considered to be the points just outside bulk,
 *                                                ii) the limits of all iterative solvers are set to bulk limits.
 *
 ********************************************************************************************************************************************
 */
\brief   Function to create the bulk slice and its offset views
The bulk and wall slices of the field differentiates the domain into the bulk of the fluid and the walls of the domain.
The bulk slice is used in two places - i) to set wall slices - walls are considered to be the points just outside bulk,
ii) the limits of all iterative solvers are set to bulk limits.
\ brief Function to create the bulk slice and its offset views The bulk and wall slices of the field differentiates the domain into the bulk of the fluid and the walls of the domain . The bulk slice is used in two places - i ) to set wall slices - walls are considered to be the points just outside bulk ii ) the limits of all iterative solvers are set to bulk limits .
void field::setBulkSlice() {
    blitz::TinyVector<int, 3> blBound;
    blitz::TinyVector<int, 3> buBound;
    blBound = gridData.collocCoreDomain.lbound();
    buBound = gridData.collocCoreDomain.ubound();
    if (xStag) {
        blBound(0) = gridData.staggrCoreDomain.lbound()(0);
        buBound(0) = gridData.staggrCoreDomain.ubound()(0);
    }
    if (yStag) {
        blBound(1) = gridData.staggrCoreDomain.lbound()(1);
        buBound(1) = gridData.staggrCoreDomain.ubound()(1);
    }
    if (zStag) {
        blBound(2) = gridData.staggrCoreDomain.lbound()(2);
        buBound(2) = gridData.staggrCoreDomain.ubound()(2);
    }
    if (xStag and gridData.rankData.xRank == 0 and not gridData.inputParams.xPer) blBound(0) += 1;
    if (xStag and gridData.rankData.xRank == gridData.rankData.npX - 1 and not gridData.inputParams.xPer) buBound(0) -= 1;
    if (yStag and gridData.rankData.yRank == 0 and not gridData.inputParams.yPer) blBound(1) += 1;
    if (yStag and gridData.rankData.yRank == gridData.rankData.npY - 1 and not gridData.inputParams.yPer) buBound(1) -= 1;
    if (zStag) {
        if (not gridData.inputParams.zPer) {
            blBound(2) += 1;
            buBound(2) -= 1;
        }
    }
#ifdef PLANAR
    blBound(1) = 0;
    buBound(1) = 0;
#endif
    fBulk = blitz::RectDomain<3>(blBound, buBound);
}
void field :: setBulkSlice ( ) { blitz :: TinyVector < int , 3 > blBound ; blitz :: TinyVector < int , 3 > buBound ; blBound = gridData . collocCoreDomain . lbound ( ) ; buBound = gridData . collocCoreDomain . ubound ( ) ; if ( xStag ) { blBound ( 0 ) = gridData . staggrCoreDomain . lbound ( ) ( 0 ) ; buBound ( 0 ) = gridData . staggrCoreDomain . ubound ( ) ( 0 ) ; } if ( yStag ) { blBound ( 1 ) = gridData . staggrCoreDomain . lbound ( ) ( 1 ) ; buBound ( 1 ) = gridData . staggrCoreDomain . ubound ( ) ( 1 ) ; } if ( zStag ) { blBound ( 2 ) = gridData . staggrCoreDomain . lbound ( ) ( 2 ) ; buBound ( 2 ) = gridData . staggrCoreDomain . ubound ( ) ( 2 ) ; } if ( xStag and gridData . rankData . xRank == 0 and not gridData . inputParams . xPer ) blBound ( 0 ) += 1 ; if ( xStag and gridData . rankData . xRank == gridData . rankData . npX - 1 and not gridData . inputParams . xPer ) buBound ( 0 ) -= 1 ; if ( yStag and gridData . rankData . yRank == 0 and not gridData . inputParams . yPer ) blBound ( 1 ) += 1 ; if ( yStag and gridData . rankData . yRank == gridData . rankData . npY - 1 and not gridData . inputParams . yPer ) buBound ( 1 ) -= 1 ; if ( zStag ) { if ( not gridData . inputParams . zPer ) { blBound ( 2 ) += 1 ; buBound ( 2 ) -= 1 ; } } #ifdef PLANAR blBound ( 1 ) = 0 ; buBound ( 1 ) = 0 ; #endif fBulk = blitz :: RectDomain < 3 > ( blBound , buBound ) ; }
\brief   Function to create the bulk slice and its offset views
          The bulk and wall slices of the field differentiates the domain into the bulk of the fluid and the walls of the domain.
\ brief Function to create the bulk slice and its offset views The bulk and wall slices of the field differentiates the domain into the bulk of the fluid and the walls of the domain .
// Bulk and core slices are different only for the boundary sub-domains. // That difference in limits is imposed in the following lines. // Only in the interior sub-domains, are the bulk and core slices identical. // However, in periodic problems, bulk and core slices are identical for all sub-domains.