Exemplo n.º 1
0
def test_initless_boundary_infos():
    from dune.xt.grid import (
        AllDirichletBoundaryInfo,
        AllNeumannBoundaryInfo,
        AllReflectingBoundaryInfo,
    )
    from dune.xt.grid import make_cube_grid
    from grid_provider_cube import init_args as grid_init_args
    for args in grid_init_args:
        grid = make_cube_grid(*args)
        AllDirichletBoundaryInfo(grid)
        AllNeumannBoundaryInfo(grid)
        AllReflectingBoundaryInfo(grid)
Exemplo n.º 2
0
def test_normalbased_boundary_inf():
    from dune.xt.grid import NormalBasedBoundaryInfo
    from dune.xt.grid import make_cube_grid, NoBoundary
    from grid_provider_cube import init_args as grid_init_args
    for args in grid_init_args:
        grid = make_cube_grid(*args)
        NormalBasedBoundaryInfo(grid_provider=grid,
                                default_boundary_type=NoBoundary(),
                                tolerance=1e-10,
                                logging_prefix='')
        NormalBasedBoundaryInfo(grid_provider=grid,
                                default_boundary_type=NoBoundary(),
                                tolerance=1e-10)
        NormalBasedBoundaryInfo(grid_provider=grid,
                                default_boundary_type=NoBoundary())
Exemplo n.º 3
0
def test_walk():
    for args in init_args:
        grid = make_cube_grid(*args)
        walker = Walker(grid)
        walker.walk()
Exemplo n.º 4
0
def test_center_unit_outer_normal():
    grid = make_cube_grid(Dim(2), Cube(), [0, 0], [1, 1], [2, 2])
    call_on_each_intersection(
        grid,
        lambda intersection: print(intersection.center_unit_outer_normal))
Exemplo n.º 5
0
def test_index_in_outside():
    grid = make_cube_grid(Dim(2), Cube(), [0, 0], [1, 1], [2, 2])
    call_on_each_intersection(
        grid, lambda intersection: print(intersection.index_in_outside))
Exemplo n.º 6
0
def test_neighbor():
    grid = make_cube_grid(Dim(2), Cube(), [0, 0], [1, 1], [2, 2])
    call_on_each_intersection(
        grid, lambda intersection: print(intersection.neighbor))
Exemplo n.º 7
0
def test_boundary_segment_index():
    grid = make_cube_grid(Dim(2), Cube(), [0, 0], [1, 1], [2, 2])
    call_on_each_intersection(
        grid, lambda intersection: intersection.boundary and print(
            intersection.boundary_segment_index))
Exemplo n.º 8
0
def test_boundary():
    grid = make_cube_grid(Dim(2), Cube(), [0, 0], [1, 1], [2, 2])
    call_on_each_intersection(
        grid, lambda intersection: print(intersection.boundary))
Exemplo n.º 9
0
def test_init():
    for args in init_args:
        grid = make_cube_grid(*args)