picongpu.pypicongpu.species.operation.densityprofile.gaussian
This file is part of PIConGPU. Copyright 2024-2025 PIConGPU contributors Authors: Brian Edward Marre, Masoud Afshari, Julian Lenz License: GPLv3+
Classes
gaussian density profile |
Module Contents
- class picongpu.pypicongpu.species.operation.densityprofile.gaussian.Gaussian
Bases:
picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile
gaussian density profile
density= - for y < gasCenterFront; density * exp(gasFactor * (abs( (y - gasCenterFront) / gasSigmaFront))^gasPower) - for gasCenterFront >= y >= gasCenterRear; density - for gasCenterRear < y; density * exp(gasFactor * (abs( (y - gasCenterRear) / gasSigmaRear))^gasPower)
- gas_center_front
position of the front edge of the constant middle of the density profile, [m]
- gas_center_rear
position of the rear edge of the constant middle of the density profile, [m]
- gas_sigma_front
distance from gasCenterFront until the gas density decreases to its 1/e-th part, [m]
- gas_sigma_rear
distance from gasCenterRear until the gas density decreases to its 1/e-th part, [m]
- gas_factor
exponential scaling factor, see formula above
- gas_power
power-exponent in exponent of density function
- vacuum_cells_front
number of vacuum cells in front of foil for laser init
- density
particle number density in m^-3
- check() None
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | 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