fdtdx.SimulationConfig
Bases: TreeClass
Configuration settings for FDTD simulations.
This class contains all the parameters needed to configure and run an FDTD simulation, including spatial and temporal discretization, hardware backend, and gradient computation settings.
Attributes: |
|
---|
courant_number
property
courant_number: float
Calculate the Courant number for the simulation.
The Courant number is a dimensionless quantity that determines stability of the FDTD simulation. It represents the ratio of the physical propagation speed to the numerical propagation speed.
Returns: |
|
---|
invertible_optimization
property
invertible_optimization: bool
Check if invertible optimization is enabled.
Invertible optimization uses time-reversibility of Maxwell's equations to compute gradients with reduced memory requirements compared to checkpointing-based methods.
Returns: |
|
---|
max_travel_distance
property
max_travel_distance: float
Calculate the maximum distance light can travel during the simulation.
This represents the theoretical maximum distance that light could travel through the simulation volume, useful for determining if the simulation time is sufficient for light to traverse the entire domain.
Returns: |
|
---|
only_forward
property
only_forward: bool
Check if the simulation is forward-only (no gradient computation).
Forward-only simulations don't compute gradients and are used when only the forward propagation of electromagnetic fields is needed, without optimization.
Returns: |
|
---|
time_step_duration
property
time_step_duration: float
Calculate the duration of a single time step.
The time step duration is determined by the Courant condition to ensure numerical stability. It depends on the spatial resolution and the speed of light.
Returns: |
|
---|
time_steps_total
property
time_steps_total: int
Calculate the total number of time steps for the simulation.
Determines how many discrete time steps are needed to simulate the specified total simulation time, based on the time step duration.
Returns: |
|
---|