packages/MC/geometry/Mesh_Geometry.cc
//---------------------------------------------------------------------------//
/*!
 * \brief Return the outward normal at the location dictated by the state.
 */
\brief Return the outward normal at the location dictated by the state.
\ brief Return the outward normal at the location dictated by the state .
def::Space_Vector Mesh_Geometry::normal(const Geo_State_t& state) const
{
    if( state.exiting_face == Geo_State_t::MINUS_X )
    {
        return {-1.0, 0.0, 0.0};
    }
    else if( state.exiting_face == Geo_State_t::PLUS_X )
    {
        return {1.0, 0.0, 0.0};
    }
    else if( state.exiting_face == Geo_State_t::MINUS_Y )
    {
        return {0.0, -1.0, 0.0};
    }
    else if( state.exiting_face == Geo_State_t::PLUS_Y )
    {
        return {0.0, 1.0, 0.0};
    }
    else if( state.exiting_face == Geo_State_t::MINUS_Z )
    {
        return {0.0, 0.0, -1.0};
    }
    else if( state.exiting_face == Geo_State_t::PLUS_Z )
    {
        return {0.0, 0.0, 1.0};
    }
    return {0.0, 0.0, 0.0};
}
def :: Space_Vector Mesh_Geometry :: normal ( const Geo_State_t & state ) const { if ( state . exiting_face == Geo_State_t :: MINUS_X ) { return { -1.0 , 0.0 , 0.0 } ; } else if ( state . exiting_face == Geo_State_t :: PLUS_X ) { return { 1.0 , 0.0 , 0.0 } ; } else if ( state . exiting_face == Geo_State_t :: MINUS_Y ) { return { 0.0 , -1.0 , 0.0 } ; } else if ( state . exiting_face == Geo_State_t :: PLUS_Y ) { return { 0.0 , 1.0 , 0.0 } ; } else if ( state . exiting_face == Geo_State_t :: MINUS_Z ) { return { 0.0 , 0.0 , -1.0 } ; } else if ( state . exiting_face == Geo_State_t :: PLUS_Z ) { return { 0.0 , 0.0 , 1.0 } ; } return { 0.0 , 0.0 , 0.0 } ; }
\brief Return the outward normal at the location dictated by the state.
\ brief Return the outward normal at the location dictated by the state .
// Choose normal based on exiting face // We weren't on a boundary