src/Utilities/integrateThroughMeshAlongSegment.cc
//------------------------------------------------------------------------------
// Find the index of the cell boundary just left or right (1-D) of the given
// coordinate.
//------------------------------------------------------------------------------
Find the index of the cell boundary just left or right (1-D) of the given
coordinate.
Find the index of the cell boundary just left or right ( 1 - D ) of the given coordinate .
inline
unsigned
leftCellBoundary(const double xi,
                 const double xmin,
                 const double xmax,
                 const unsigned ncells) {
  return unsigned(max(0.0, min(1.0, (xi - xmin)/(xmax - xmin)))*ncells);
}
inline unsigned leftCellBoundary ( const double xi , const double xmin , const double xmax , const unsigned ncells ) { return unsigned ( max ( 0.0 , min ( 1.0 , ( xi - xmin ) / ( xmax - xmin ) ) ) * ncells ) ; }
Find the index of the cell boundary just left or right (1-D) of the given
coordinate.
Find the index of the cell boundary just left or right ( 1 - D ) of the given coordinate .