Source code for reslumen.core.simulation

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Benjamin Vial
# License: MIT

from __future__ import annotations

from dataclasses import dataclass
from typing import Optional

from reslumen.geometry.shapes import Shape
from reslumen.materials.material import Material


@dataclass(slots=True)
[docs] class Simulation: """ High-level simulation container. Parameters ---------- wavelength : float Vacuum wavelength in meters. geometry : Shape Simulation geometry. material : Material Background material. """
[docs] wavelength: float
[docs] geometry: Shape
[docs] material: Material
[docs] name: Optional[str] = None
[docs] def run(self) -> None: """Run the simulation.""" # Dummy implementation print(f"Running simulation at λ={self.wavelength:.2e} m")