packages/MC/geometry/RTK_Cell.cc
//---------------------------------------------------------------------------//
/*!
 * \brief Check a shell for distance to boundary.
 */
\brief Check a shell for distance to boundary.
\ brief Check a shell for distance to boundary .
void RTK_Cell::check_shell(const Space_Vector &r,
                           const Space_Vector &omega,
                           int                 shell,
                           int                 face,
                           int                 next_region,
                           int                 next_face,
                           Geo_State_t        &state)
{
    using def::X; using def::Y; using def::Z;
    REQUIRE(shell >= 0 && shell < d_num_shells);
    dist_to_shell(r[X], r[Y], omega[X], omega[Y], d_r[shell], face);
    if (d_db > 0.0)
    {
        if (d_db < state.dist_to_next_region)
        {
            state.dist_to_next_region = d_db;
            state.next_region         = next_region;
            state.next_face           = next_face;
            state.exiting_face        = Geo_State_t::INTERNAL;
        }
    }
}
void RTK_Cell :: check_shell ( const Space_Vector & r , const Space_Vector & omega , int shell , int face , int next_region , int next_face , Geo_State_t & state ) { using def :: X ; using def :: Y ; using def :: Z ; REQUIRE ( shell >= 0 && shell < d_num_shells ) ; dist_to_shell ( r [ X ] , r [ Y ] , omega [ X ] , omega [ Y ] , d_r [ shell ] , face ) ; if ( d_db > 0.0 ) { if ( d_db < state . dist_to_next_region ) { state . dist_to_next_region = d_db ; state . next_region = next_region ; state . next_face = next_face ; state . exiting_face = Geo_State_t :: INTERNAL ; } } }
\brief Check a shell for distance to boundary.
\ brief Check a shell for distance to boundary .
// calculate the distance to the requested shell // check the distance to boundary //    a) if it intersects the shell, and //    b) if it is the smallest distance