packages/MC/geometry/Mesh_Geometry.cc
//---------------------------------------------------------------------------//
/*!
 * \brief Initialize particle
 *
 * This finds the closest ijk coords on each axis to the location. A particle
 * can be born "outside" and have ijk extents that are outside [0,N) .
 */
\brief Initialize particle
This finds the closest ijk coords on each axis to the location. A particle
can be born "outside" and have ijk extents that are outside [0,N) .
\ brief Initialize particle This finds the closest ijk coords on each axis to the location . A particle can be born " outside " and have ijk extents that are outside [ 0 N ) .
void Mesh_Geometry::initialize(
        const Space_Vector& r,
        const Space_Vector& direction,
        Geo_State_t       & state) const
{
    using profugus::soft_equiv;
    using def::I; using def::J; using def::K;
    state.d_r = r;
    state.d_dir = direction;
    vector_normalize(state.d_dir);
    update_state(state);
    state.exiting_face    = Geo_State_t::NONE;
    state.reflecting_face = Geo_State_t::NONE;
    ENSURE(state.ijk[I] >= -1 && state.ijk[I] <= d_mesh.num_cells_along(I));
    ENSURE(state.ijk[J] >= -1 && state.ijk[J] <= d_mesh.num_cells_along(J));
    ENSURE(state.ijk[K] >= -1 && state.ijk[K] <= d_mesh.num_cells_along(K));
}
void Mesh_Geometry :: initialize ( const Space_Vector & r , const Space_Vector & direction , Geo_State_t & state ) const { using profugus :: soft_equiv ; using def :: I ; using def :: J ; using def :: K ; state . d_r = r ; state . d_dir = direction ; vector_normalize ( state . d_dir ) ; update_state ( state ) ; state . exiting_face = Geo_State_t :: NONE ; state . reflecting_face = Geo_State_t :: NONE ; ENSURE ( state . ijk [ I ] >= -1 && state . ijk [ I ] <= d_mesh . num_cells_along ( I ) ) ; ENSURE ( state . ijk [ J ] >= -1 && state . ijk [ J ] <= d_mesh . num_cells_along ( J ) ) ; ENSURE ( state . ijk [ K ] >= -1 && state . ijk [ K ] <= d_mesh . num_cells_along ( K ) ) ; }
\brief Initialize particle
 This finds the closest ijk coords on each axis to the location.
\ brief Initialize particle This finds the closest ijk coords on each axis to the location .
// Set struct attributes