def generate_unblocked():
    invalid_positions = [(5, y) for y in range(10) if y != 5]
    verticies, edges = gg.generate_grid(0, 10, 0, 10,
                                        gg.make_predicate(invalid_positions))
    starts = [(0, 0)]
    goals = [(10, 10)]
    #gg.plot_grid(verticies, edges)
    return (verticies, edges, starts, goals)
Ejemplo n.º 2
0
def generate():
    invalid_positions = [(6, y) for y in range(11) if y != 4
                         ] + [(4, y) for y in range(11) if y != 6]
    verticies, edges = gg.generate_grid(0, 10, 0, 10,
                                        gg.make_predicate(invalid_positions))
    starts = [(0, 0), (10, 10)]
    goals = [(10, 10), (0, 0)]
    gg.plot_grid(verticies, edges)
    return (verticies, edges, starts, goals)
Ejemplo n.º 3
0
def generate_unblocked():
    invalid_positions = [(6, y) for y in range(3, 12) if y != 5 ] + \
                        [(x, 10) for x in range(5)] + \
                        [(x, 4) for x in range(5)] + [(4, 3), (6, 3), (7, 4) , (8, 4), (7, 6) , (8, 6)]
    verticies, edges = gg.generate_grid(0, 15, 0, 11,
                                        gg.make_predicate(invalid_positions))
    starts = [(1, 11)]
    goals = [(14, 1)]
    gg.plot_grid(verticies, edges, start=starts, goal=goals)
    return (verticies, edges, starts, goals)
Ejemplo n.º 4
0
from bout_runners.bout_runners import PBS_runner
from post_processing_MMS import perform_MMS_test
from grid_generator import generate_grid

# Generate the grids
# Specify the grid dimensions
grid_numbers = [8, 16, 32]
# Make an append able list
grid_files = []
for grid_number in grid_numbers:
    file_name = 'grid_file_' + str(grid_number)
    # Generate the grids
    generate_grid(nx        = grid_number,\
                  ny        = grid_number,\
                  nz        = grid_number,\
                  inp_path  = 'MMS'      ,\
                  file_name = file_name)
    # Append the grid_files list
    grid_files.append(file_name + '.nc')

my_runs = PBS_runner(\
            # Specify the numbers used for the BOUT runs

            nproc                 = 4,\
            BOUT_nodes            = 1,\
            BOUT_ppn              = 4,\
            BOUT_walltime         = '0:15:00',\
            BOUT_queue            = None,\
            BOUT_mail             = None,\
            # Specify the numbers used for the post processing
#!/usr/bin/env python

"""Driver which runs 3D_diffusion using grid files."""

from bout_runners.bout_runners import basic_runner
from grid_generator import generate_grid

# Generate a grid
generate_grid(file_name = "3D_diffusion_grid",\
              inp_path  = "data")

my_runs = basic_runner(\
            grid_file = "3D_diffusion_grid.nc",\
            # Copy the grid file
            cpy_grid = True,\
            # Set the flag in 3D_diffusion that a grid file will be
            # used
            additional = ('flags', 'use_grid', 'true')\
            )

my_runs.execute_runs()
from bout_runners.bout_runners import PBS_runner
from post_processing_MMS import perform_MMS_test
from grid_generator import  generate_grid

# Generate the grids
# Specify the grid dimensions
grid_numbers = [8, 16, 32]
# Make an append able list
grid_files = []
for grid_number in grid_numbers:
    file_name = 'grid_file_' + str(grid_number)
    # Generate the grids
    generate_grid(nx        = grid_number,\
                  ny        = grid_number,\
                  nz        = grid_number,\
                  inp_path  = 'MMS'      ,\
                  file_name = file_name)
    # Append the grid_files list
    grid_files.append(file_name + '.nc')

my_runs = PBS_runner(\
            # Specify the numbers used for the BOUT runs
            nproc                 = 4,\
            BOUT_nodes            = 1,\
            BOUT_ppn              = 4,\
            BOUT_walltime         = '0:15:00',\
            BOUT_queue            = None,\
            BOUT_mail             = None,\
            # Specify the numbers used for the post processing
            post_process_nproc    = 1,\
Ejemplo n.º 7
0
#!/usr/bin/env python
"""Driver which runs 3D_diffusion using grid files."""

from bout_runners.bout_runners import basic_runner
from grid_generator import generate_grid

# Generate a grid
generate_grid(file_name = "3D_diffusion_grid",\
              inp_path  = "data")

my_runs = basic_runner(\
            grid_file = "3D_diffusion_grid.nc",\
            # Copy the grid file

            cpy_grid = True,\
            # Set the flag in 3D_diffusion that a grid file will be
            # used


            additional = ('flags', 'use_grid', 'true')\
            )

my_runs.execute_runs()