lib/field/field.cc
/**
 ********************************************************************************************************************************************
 * \brief   Function to create the wall slices for the sub-domains
 *
 *          The wall slices of the sub-domain are used for imposing the boundary conditions.
 *          Hence they are important only for the near-boundary sub-domains in parallel computations.
 *          Moreover, only the cell-centered (half-indexed) grid has points on the boundary.
 *          In this regard, SARAS uses a slightly unconventional approach where the boundary of the
 *          full-domain passes through the cell-centers of the boundary cells.
 *          This has two advantages: i) no-slip BC is strictly enforced for two face centered velocity
 *          components, while only no-penetration BC is enforced through averaging,
 *          ii) there will be equal number of staggered (half-indexed) and collocated (full-indexed)
 *          points in all the MPI sub-domains, such that geometric multigrid operations, as well as
 *          computations in the PDE solver are load-balanced.
 *
 *          The face-centered (full-indexed) grid points lie on either side of the domain boundaries.
 *          As a result the wall slices are defined only for those fields for which at least one
 *          of \ref field#xStag "xStag", \ref field#yStag "yStag" or \ref field#zStag "zStag" is false
 ********************************************************************************************************************************************
 */
\brief   Function to create the wall slices for the sub-domains
The wall slices of the sub-domain are used for imposing the boundary conditions.
Hence they are important only for the near-boundary sub-domains in parallel computations.
Moreover, only the cell-centered (half-indexed) grid has points on the boundary.
In this regard, SARAS uses a slightly unconventional approach where the boundary of the
full-domain passes through the cell-centers of the boundary cells.

The face-centered (full-indexed) grid points lie on either side of the domain boundaries.
\ brief Function to create the wall slices for the sub - domains The wall slices of the sub - domain are used for imposing the boundary conditions . Hence they are important only for the near - boundary sub - domains in parallel computations . Moreover only the cell - centered ( half - indexed ) grid has points on the boundary . In this regard SARAS uses a slightly unconventional approach where the boundary of the full - domain passes through the cell - centers of the boundary cells . The face - centered ( full - indexed ) grid points lie on either side of the domain boundaries .
void field::setWallSlices() {
    blitz::Array<blitz::TinyVector<int, 3>, 1> wlBound;
    blitz::Array<blitz::TinyVector<int, 3>, 1> wuBound;
    fWalls.resize(6);
    wlBound.resize(6);
    wuBound.resize(6);
    for (int i=0; i<6; i++) {
        wlBound(i) = F.lbound();
        wuBound(i) = F.ubound();
    }
    wlBound(0)(0) = wuBound(0)(0) = fBulk.lbound(0) - 1;
    wuBound(1)(0) = wlBound(1)(0) = fBulk.ubound(0) + 1;
    wlBound(2)(1) = wuBound(2)(1) = fBulk.lbound(1) - 1;
    wuBound(3)(1) = wlBound(3)(1) = fBulk.ubound(1) + 1;
    wlBound(4)(2) = wuBound(4)(2) = fBulk.lbound(2) - 1;
    wuBound(5)(2) = wlBound(5)(2) = fBulk.ubound(2) + 1;
    for (int i=0; i<6; i++) {
        fWalls(i) = blitz::RectDomain<3>(wlBound(i), wuBound(i));
    }
}
void field :: setWallSlices ( ) { blitz :: Array < blitz :: TinyVector < int , 3 > , 1 > wlBound ; blitz :: Array < blitz :: TinyVector < int , 3 > , 1 > wuBound ; fWalls . resize ( 6 ) ; wlBound . resize ( 6 ) ; wuBound . resize ( 6 ) ; for ( int i = 0 ; i < 6 ; i ++ ) { wlBound ( i ) = F . lbound ( ) ; wuBound ( i ) = F . ubound ( ) ; } wlBound ( 0 ) ( 0 ) = wuBound ( 0 ) ( 0 ) = fBulk . lbound ( 0 ) - 1 ; wuBound ( 1 ) ( 0 ) = wlBound ( 1 ) ( 0 ) = fBulk . ubound ( 0 ) + 1 ; wlBound ( 2 ) ( 1 ) = wuBound ( 2 ) ( 1 ) = fBulk . lbound ( 1 ) - 1 ; wuBound ( 3 ) ( 1 ) = wlBound ( 3 ) ( 1 ) = fBulk . ubound ( 1 ) + 1 ; wlBound ( 4 ) ( 2 ) = wuBound ( 4 ) ( 2 ) = fBulk . lbound ( 2 ) - 1 ; wuBound ( 5 ) ( 2 ) = wlBound ( 5 ) ( 2 ) = fBulk . ubound ( 2 ) + 1 ; for ( int i = 0 ; i < 6 ; i ++ ) { fWalls ( i ) = blitz :: RectDomain < 3 > ( wlBound ( i ) , wuBound ( i ) ) ; } }
\brief   Function to create the wall slices for the sub-domains
          The wall slices of the sub-domain are used for imposing the boundary conditions.
\ brief Function to create the wall slices for the sub - domains The wall slices of the sub - domain are used for imposing the boundary conditions .
// 6 slices are stored in fWalls corresponding to the 6 faces of the 3D box // Wall slices are the locations where the BC (both Neumann and Dirichlet) is imposed. // In the places where these slices are being used, they should be on the LHS of equation. // The bulk slice corresponds to the part of the fluid within which all variables are computed at each time step. // Correspondingly, the boundary conditions are imposed on the layer just outside the bulk // UPPER BOUNDS OF LEFT WALL // LOWER BOUNDS OF RIGHT WALL // UPPER BOUNDS OF FRONT WALL // LOWER BOUNDS OF BACK WALL // UPPER BOUNDS OF BOTTOM WALL // LOWER BOUNDS OF TOP WALL