doc updates

cell_data
Jan Petykiewicz 2 years ago
parent dac0813cc9
commit fcd02d3dcf

@ -14,7 +14,7 @@ the coordinates of the boundary points along each axis).
## Installation ## Installation
Requirements: Requirements:
* python 3 (written and tested with 3.5) * python 3 (written and tested with 3.9)
* numpy * numpy
* [float_raster](https://mpxd.net/code/jan/float_raster) * [float_raster](https://mpxd.net/code/jan/float_raster)
* matplotlib (optional, used for visualization functions) * matplotlib (optional, used for visualization functions)

@ -9,6 +9,12 @@ from float_raster import raster
from . import GridError from . import GridError
# NOTE: Maybe it would make sense to create a GridDrawer class
# which would hold both the `Grid` itself and `cell_data`
# and could be used to call multiple `draw_*` methods
# without having to pass `cell_data` again each time?
eps_callable_t = Callable[[numpy.ndarray, numpy.ndarray, numpy.ndarray], numpy.ndarray] eps_callable_t = Callable[[numpy.ndarray, numpy.ndarray, numpy.ndarray], numpy.ndarray]
@ -28,7 +34,7 @@ def draw_polygons(self,
surface_normal: Axis normal to the plane we're drawing on. Integer in `range(3)`. surface_normal: Axis normal to the plane we're drawing on. Integer in `range(3)`.
center: 3-element ndarray or list specifying an offset applied to all the polygons center: 3-element ndarray or list specifying an offset applied to all the polygons
polygons: List of Nx2 or Nx3 ndarrays, each specifying the vertices of a polygon polygons: List of Nx2 or Nx3 ndarrays, each specifying the vertices of a polygon
(non-closed, clockwise). If Nx3, the surface_normal coordinate is ignored. Each (non-closed, clockwise). If Nx3, the `surface_normal` coordinate is ignored. Each
polygon must have at least 3 vertices. polygon must have at least 3 vertices.
thickness: Thickness of the layer to draw thickness: Thickness of the layer to draw
eps: Value to draw with ('epsilon'). Can be scalar, callable, or a list eps: Value to draw with ('epsilon'). Can be scalar, callable, or a list
@ -219,7 +225,7 @@ def draw_slab(self,
Args: Args:
cell_data: Cell data to modify (e.g. created by `Grid.allocate()`) cell_data: Cell data to modify (e.g. created by `Grid.allocate()`)
surface_normal: Axis normal to the plane we're drawing on. Integer in `range(3)`. surface_normal: Axis normal to the plane we're drawing on. Integer in `range(3)`.
center: Surface_normal coordinate at the center of the slab center: `surface_normal` coordinate value at the center of the slab
thickness: Thickness of the layer to draw thickness: Thickness of the layer to draw
eps: Value to draw with ('epsilon'). See `draw_polygons()` for details. eps: Value to draw with ('epsilon'). See `draw_polygons()` for details.
""" """

Loading…
Cancel
Save