unit_tests/utilities/test_refinement.cpp
/* Check that the implementation handles bounding box limits that extend beyond
 * the problem domain.
 */
Check that the implementation handles bounding box limits that extend beyond
the problem domain.
Check that the implementation handles bounding box limits that extend beyond the problem domain .
TEST_F(NestRefineTest, bbox_limits)
{
    setup_refinement_inputs();
    std::stringstream ss;
    ss << "1 // Number of levels" << std::endl;
    ss << "1 // Number of boxes at this level" << std::endl;
    ss << "-60.0 -200.0 -10.0 35.0 200.0 60.0" << std::endl;
    create_mesh_instance<NestRefineMesh>();
    std::unique_ptr<amr_wind::CartBoxRefinement> box_refine(
        new amr_wind::CartBoxRefinement(sim()));
    box_refine->read_inputs(mesh(), ss);
    auto targets = box_refine->boxarray_vec();
    EXPECT_EQ(targets.size(), 1u);
    EXPECT_EQ(targets[0].size(), 1u);
    auto domain = mesh().Geom(0).Domain();
    auto bx = targets[0][0];
    EXPECT_EQ(bx.smallEnd(), domain.smallEnd());
    auto big_end = domain.bigEnd();
    EXPECT_EQ(bx.bigEnd(), big_end.diagShift(1));
}
TEST_F ( NestRefineTest , bbox_limits ) { setup_refinement_inputs ( ) ; std :: stringstream ss ; ss << " " << std :: endl ; ss << " " << std :: endl ; ss << " " << std :: endl ; create_mesh_instance < NestRefineMesh > ( ) ; std :: unique_ptr < amr_wind :: CartBoxRefinement > box_refine ( new amr_wind :: CartBoxRefinement ( sim ( ) ) ) ; box_refine -> read_inputs ( mesh ( ) , ss ) ; auto targets = box_refine -> boxarray_vec ( ) ; EXPECT_EQ ( targets . size ( ) , 1u ) ; EXPECT_EQ ( targets [ 0 ] . size ( ) , 1u ) ; auto domain = mesh ( ) . Geom ( 0 ) . Domain ( ) ; auto bx = targets [ 0 ] [ 0 ] ; EXPECT_EQ ( bx . smallEnd ( ) , domain . smallEnd ( ) ) ; auto big_end = domain . bigEnd ( ) ; EXPECT_EQ ( bx . bigEnd ( ) , big_end . diagShift ( 1 ) ) ; }
Check that the implementation handles bounding box limits that extend beyond
 the problem domain.
Check that the implementation handles bounding box limits that extend beyond the problem domain .
// Create the "input file"