packages/MC/geometry/Cartesian_Mesh.cc
//---------------------------------------------------------------------------//
/*!
 * \brief Locate position's ijk coordinates with upper edges being "inside".
 *
 * If the spatial coordinate's position is less than or equal to the first
 * element, the result is -1; if greater than the last element, the result is
 * N (number of cells).
 *
 * This allows for testing of being inside the mesh or on what outside portion
 * of the mesh it is but it does not give information about being on an edge or
 * not.
 */
\brief Locate position's ijk coordinates with upper edges being "inside".
If the spatial coordinate's position is less than or equal to the first
element, the result is -1; if greater than the last element, the result is
N (number of cells).

This allows for testing of being inside the mesh or on what outside portion
of the mesh it is but it does not give information about being on an edge or
not.
\ brief Locate position ' s ijk coordinates with upper edges being " inside " . If the spatial coordinate ' s position is less than or equal to the first element the result is - 1 ; if greater than the last element the result is N ( number of cells ) . This allows for testing of being inside the mesh or on what outside portion of the mesh it is but it does not give information about being on an edge or not .
void Cartesian_Mesh::find_upper(const Space_Vector& r, Dim_Vector& ijk) const
{
    using def::I; using def::J; using def::K;
    ijk[I] = find_upper(r[I], I);
    ijk[J] = find_upper(r[J], J);
    ijk[K] = find_upper(r[K], K);
}
void Cartesian_Mesh :: find_upper ( const Space_Vector & r , Dim_Vector & ijk ) const { using def :: I ; using def :: J ; using def :: K ; ijk [ I ] = find_upper ( r [ I ] , I ) ; ijk [ J ] = find_upper ( r [ J ] , J ) ; ijk [ K ] = find_upper ( r [ K ] , K ) ; }
\brief Locate position's ijk coordinates with upper edges being "inside".
\ brief Locate position ' s ijk coordinates with upper edges being " inside " .