jaxdem.utils.randomState#
Utility functions to randomly initialize states.
Functions
|
Generate N non-overlap-checked particles uniformly in an axis-aligned box. |
- jaxdem.utils.randomState.random_state(*, N: int, dim: int, box_size: Array | ndarray | bool | number | bool | int | float | complex | None = None, box_anchor: Array | ndarray | bool | number | bool | int | float | complex | None = None, radius_range: Array | ndarray | bool | number | bool | int | float | complex | None = None, mass_range: Array | ndarray | bool | number | bool | int | float | complex | None = None, vel_range: Array | ndarray | bool | number | bool | int | float | complex | None = None, seed: int = 0) State [source][source]#
Generate N non-overlap-checked particles uniformly in an axis-aligned box.
- Parameters:
N – Number of particles.
dim – Spatial dimension (2 or 3).
box_size – Edge lengths of the domain.
box_anchor – Coordinate of the lower box corner.
radius_range – min and max values that the radius can take.
mass_range – min and max values that the radius can take.
vel_range – min and max values that the velocity components can take.
seed – Integer for reproducibility.
- Returns:
A fully-initialised State instance.
- Return type: