picongpu.pypicongpu.movingwindow
This file is part of the PIConGPU. Copyright 2024-2024 PIConGPU contributors Authors: Brian Edward Marre License: GPLv3+
Classes
Class to be inherited from for rendering context generation |
Module Contents
- class picongpu.pypicongpu.movingwindow.MovingWindow
Bases:
picongpu.pypicongpu.rendering.RenderedObject
,pydantic.BaseModel
Class to be inherited from for rendering context generation
Every object that intends to generate a rendering context (typically as a dict) must inherit from this class and implement _get_serialized().
It is expected that _get_serialized() fully encodes the internal state, i.e. two equal (==) objects also return an equal result for _get_serialized().
For external usage, the method get_rendering_context() is provided. It passes _get_serialized() through, checking its result against a predefined json schema. If this schema is not fullfilled/not available, an error is raised.
- move_point: float
point a light ray reaches in y from the left border until we begin sliding the simulation window with the speed of light
in multiples of the simulation window size
- @attention if moving window is active, one gpu in y direction is reserved for initializing new spaces,
thereby reducing the simulation window size according
- stop_iteration: int | None
iteration, at which to stop moving the simulation window
- check() None
- __hash__()
custom hash function for indexing in dicts
- get_rendering_context() dict | None
get rendering context representation of this object
delegates work to _get_serialized and invokes checks performed by check_context_for_type(). :raise ValidationError: on schema violation :raise RuntimeError: on schema not found :return: self as rendering context
- static check_context_for_type(type_to_check: type, context: dict | None) None
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found