:py:mod:`wolfhece.lagrangian.particles` ======================================= .. py:module:: wolfhece.lagrangian.particles .. autoapi-nested-parse:: Author: HECE - University of Liege, 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 --------------- .. py:class:: Particles(x0: numpy.ndarray = None, y0: numpy.ndarray = None, dir: Union[str, pathlib.Path] = None, verbose: bool = False) .. py:property:: color :type: tuple[float] .. py:property:: linewidth :type: float .. py:property:: dir :type: pathlib.Path .. py:property:: filename :type: str .. py:method:: copy_prop_from(other: Particles) -> None Copy the properties from another Particles object. .. py:method:: serialize() -> dict Serialize the object. .. py:method:: deserialize(data: dict) -> None Deserialize the object. .. py:method:: save(f: str) -> str Save the particles to file. .. py:method:: load(f: Union[str, pathlib.Path]) -> None Load the particles from file. .. py:method:: update(uv_field: tuple[wolfhece.lagrangian.velocity_field.Velocity_Field, wolfhece.lagrangian.velocity_field.Velocity_Field, float, float], curtime: float, dt: float, scheme: Union[Literal[Euler_expl, RK22, RK4, RK45], int]) -> None Update the position of the particles. .. py:method:: _check_alive(inside_array: numpy.ndarray, origx: float = 0.0, origy: float = 0.0, dx: float = 1.0, dy: float = 1.0) -> None Check if the particles are still alive. .. py:method:: get_alive(inside_array: numpy.ndarray, header: tuple[float] = (0.0, 0.0, 1.0, 1.0, 1, 1)) -> tuple[numpy.ndarray] Return the alive particles. .. py:method:: plot_mpl(ax: matplotlib.pyplot.Axes) -> None Plot the particles using matplotlib. .. py:method:: plot(alpha: float = 1.0) Plot the particles.