_vegetation module

Vegetation class for pyrockfall

This module defines the Vegetation class, which represents the canopy geometry above a slope. A vegetation is defined by:

  • Nodes: coordinates of the geometry (mandatory).

  • Elements: connectivity between nodes (optional; if omitted, sequential connectivity is assumed).

  • Drag: the drag coefficient that dissipates energy when block moves through vegetation.

The class supports stochastic perturbation of nodes, material assignment, combination of contiguous slopes, and efficient queries.

class pyrockfall._vegetation.Drag(name: str = '', coefficient: Distribution | SupportsToDistribution | Real | np.floating | np.integer | float | int = 0.0)[source]

Bases: object

property name: str

Name of the material.

property coefficient: Distribution
property numRandomVariables: int

Number of stochastic variables (always 1).

ppf(q: Sequence[ndarray] | ndarray) → ndarray[source]
rvs(num_samples: int) → ndarray[source]
class pyrockfall._vegetation.Vegetation(geometry: Geometry, drag: Drag | Sequence[Drag], identities: Sequence[int] | NDArray[integer] | None = None)[source]

Bases: object

property drag: List[Drag]
property dragTable: List[Drag]

Unique drag used.

Type:

list of Drag

property dragIdentities: ndarray

Drag IDs per element (indices into dragTable).

Type:

np.ndarray of shape (E,)