def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument('--n-loads', type=int, default=16,
                        help='Number of loads to apply')
    parser.add_argument('--shape', type=int, default=200,
                        help='Number rows and columns')
    parser.add_argument('--spacing', type=int, default=5e3,
                        help='Spading between rows and columns (m)')
    parser.add_argument('--n-procs', type=int, default=1,
                        help='Number of processors to use')
    parser.add_argument('--plot', action='store_true', default=False,
                        help='Plot an image of the total deflection')

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_locs = get_random_load_locations(shape, args.n_loads)
    load_sizes = get_random_load_magnitudes(args.n_loads)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = FlexureComponent(grid, method='flexure')

    put_loads_on_grid(grid, load_locs, load_sizes)

    flex.update(n_procs=args.n_procs)

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=False,
                cmap='spectral', show=True) 
Exemplo n.º 2
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = FlexureComponent(grid, method='flexure')

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=False,
                show=True) 
Exemplo n.º 3
0
def main():
    (n_rows, n_cols) = (100, 100)
    (dy, dx) = (10e3, 10e3)

    grid = RasterModelGrid(n_rows, n_cols, dx)

    flex = FlexureComponent(grid, method='flexure')

    add_load_to_middle_of_grid(grid, 1e9)

    flex.update()

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=True,
                show=True)
def main():
    (n_rows, n_cols) = (100, 100)
    (dy, dx) = (10e3, 10e3)

    grid = RasterModelGrid(n_rows, n_cols, dx)

    flex = FlexureComponent(grid, method='flexure')

    add_load_to_middle_of_grid(grid, 1e9)

    flex.update()

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=True,
                show=True) 
Exemplo n.º 5
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = FlexureComponent(grid, method='flexure')

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.imshow('node',
                'lithosphere__elevation',
                symmetric_cbar=False,
                show=True)
def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument('--n-loads',
                        type=int,
                        default=16,
                        help='Number of loads to apply')
    parser.add_argument('--shape',
                        type=int,
                        default=200,
                        help='Number rows and columns')
    parser.add_argument('--spacing',
                        type=int,
                        default=5e3,
                        help='Spading between rows and columns (m)')
    parser.add_argument('--n-procs',
                        type=int,
                        default=1,
                        help='Number of processors to use')
    parser.add_argument('--plot',
                        action='store_true',
                        default=False,
                        help='Plot an image of the total deflection')

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_locs = get_random_load_locations(shape, args.n_loads)
    load_sizes = get_random_load_magnitudes(args.n_loads)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = FlexureComponent(grid, method='flexure')

    put_loads_on_grid(grid, load_locs, load_sizes)

    flex.update(n_procs=args.n_procs)

    if args.plot:
        grid.imshow('node',
                    'lithosphere__elevation',
                    symmetric_cbar=False,
                    cmap='spectral',
                    show=True)
Exemplo n.º 7
0
# In[5]:

loads = np.random.normal(1e9, 1e12, grid.number_of_nodes)
grid.at_node['lithosphere__overlying_pressure'][:] = loads


# In[6]:

grid.imshow('node', 'lithosphere__overlying_pressure', symmetric_cbar=True,
            cmap='spectral', show=True, shrink=.75)


# ## Update the component to solve for deflection
# If you have more than one processor on your machine you may want to use several of them.

# In[7]:

flex.update(n_procs=4)


# # Plot the output
# The name of the variable that holds elevations is called `lithosphere__elevation`.

# In[8]:

grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=True,
            cmap='spectral', show=True, shrink=.75)


# ### Click here for more <a href="https://github.com/landlab/landlab/wiki/Tutorials">Landlab tutorials</a>