packages/MC/geometry/RTK_Cell.cc
//---------------------------------------------------------------------------//
/*!
 * \brief Single shell constructor.
 */
\brief Single shell constructor.
\ brief Single shell constructor .
RTK_Cell::RTK_Cell(int    fuel_id,
                   double r,
                   int    mod_id,
                   double pitch,
                   double height,
                   int    segments)
    : d_mod_id(mod_id)
    , d_r(1, r)
    , d_ids(1, fuel_id)
    , d_z(height)
    , d_num_shells(d_r.size())
    , d_num_regions(d_num_shells + 1)
    , d_segments(segments)
    , d_seg_faces(d_segments / 2)
    , d_num_int_faces(d_seg_faces + d_num_shells)
    , d_mod_region(d_num_regions - 1)
    , d_num_cells(d_num_regions * d_segments)
    , d_vessel(false)
{
    REQUIRE(d_r[0] > 0.0);
    REQUIRE(d_z > 0.0);
    REQUIRE(d_segments == 1 || d_segments == 4);
    REQUIRE(d_mod_region == 1);
    d_xy[0] = pitch;
    d_xy[1] = pitch;
    d_extent[0][LO] = -d_xy[0] * 0.5;
    d_extent[0][HI] =  d_xy[0] * 0.5;
    d_extent[1][LO] = -d_xy[1] * 0.5;
    d_extent[1][HI] =  d_xy[1] * 0.5;
    ENSURE(d_r[0] <= d_extent[0][HI]);
    ENSURE(d_r[0] <= d_extent[1][HI]);
}
RTK_Cell :: RTK_Cell ( int fuel_id , double r , int mod_id , double pitch , double height , int segments ) : d_mod_id ( mod_id ) , d_r ( 1 , r ) , d_ids ( 1 , fuel_id ) , d_z ( height ) , d_num_shells ( d_r . size ( ) ) , d_num_regions ( d_num_shells + 1 ) , d_segments ( segments ) , d_seg_faces ( d_segments / 2 ) , d_num_int_faces ( d_seg_faces + d_num_shells ) , d_mod_region ( d_num_regions - 1 ) , d_num_cells ( d_num_regions * d_segments ) , d_vessel ( false ) { REQUIRE ( d_r [ 0 ] > 0.0 ) ; REQUIRE ( d_z > 0.0 ) ; REQUIRE ( d_segments == 1 || d_segments == 4 ) ; REQUIRE ( d_mod_region == 1 ) ; d_xy [ 0 ] = pitch ; d_xy [ 1 ] = pitch ; d_extent [ 0 ] [ LO ] = - d_xy [ 0 ] * 0.5 ; d_extent [ 0 ] [ HI ] = d_xy [ 0 ] * 0.5 ; d_extent [ 1 ] [ LO ] = - d_xy [ 1 ] * 0.5 ; d_extent [ 1 ] [ HI ] = d_xy [ 1 ] * 0.5 ; ENSURE ( d_r [ 0 ] <= d_extent [ 0 ] [ HI ] ) ; ENSURE ( d_r [ 0 ] <= d_extent [ 1 ] [ HI ] ) ; }
\brief Single shell constructor.
\ brief Single shell constructor .
// square cell