wolfgpu.cli
Author: HECE - University of Liege, Stéphane Champailler, Pierre Archambeau Date: 2024
Copyright (c) 2024 University of Liege. All rights reserved.
This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.
Module Contents
- class wolfgpu.cli.Scenario(*args, **kwds)[source]
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- wolfgpu.cli.bounding_polygon_xy(wa: wolfhece.wolf_array.WolfArray)[source]
- wolfgpu.cli.mask_border(wa: wolfhece.wolf_array.WolfArray)[source]
Set a new mask applying only to a one cell around the matrix. It is usefule because SUXY is not smart enough to handle borders which are on the very border of matrices.
- wolfgpu.cli.force_cli_params_in_wolf_model(cli_args: argparse.Namespace, m: wolfhece.mesh2d.wolf2dprev.prev_sim2D)[source]
- wolfgpu.cli.force_params_in_gpu(cli_args: argparse.Namespace, gpu: wolfgpu.glsimulation.GLSimulation)[source]
- wolfgpu.cli.print_sim_params(sim: wolfgpu.glsimulation.GLSimulation, runner: wolfgpu.SimulationRunner.SimulationRunner, manning: numpy.array, active: numpy.array, h: numpy.array)[source]