class documentation
class Backend_JIT:
Constructor: Backend_JIT(field_type, distance_limit, length_scale, dc, ...)
Implements the Biot-Savart law for calculating the magnetic flux density (B-field) and vector potential (A-field). Backend: JIT.
Static Method | worker |
Applies the Biot-Savart law for calculating the magnetic flux density (B-field) or vector potential (A-field) for a single sampling volume point. |
Method | __init__ |
Initializes the class attributes. |
Method | get |
Calculates the field at every point of the sampling volume. |
Instance Variable | _current |
Undocumented |
Instance Variable | _dc |
Undocumented |
Instance Variable | _distance |
Undocumented |
Instance Variable | _field |
Undocumented |
Instance Variable | _length |
Undocumented |
Instance Variable | _progress |
Undocumented |
Instance Variable | _sampling |
Undocumented |
Instance Variable | _sampling |
Undocumented |
@staticmethod
@ConditionalDecorator( get_jit_enabled(), jit, nopython=True, parallel=True)
def worker(field_type: @ConditionalDecorator(
int
, distance_limit: float
, length_scale: float
, current_elements: np.ndarray
, sampling_volume_point: np.ndarray
) -> tuple[ int, int, np.ndarray] | None
:
¶
Applies the Biot-Savart law for calculating the magnetic flux density (B-field) or vector potential (A-field) for a single sampling volume point.
Parameters | |
fieldint | Field type |
distancefloat | Distance limit (mitigating divisions by zero) |
lengthfloat | Length scale (m) |
currentnp.ndarray | Ordered list of current elements (pairs: [element center, element direction]) |
samplingnp.ndarray | Sampling volume point |
Returns | |
tuple[ | (Total # of calculations, total # of skipped calculations, vector) |
def __init__(self, field_type:
int
, distance_limit: float
, length_scale: float
, dc: float
, current_elements: np.ndarray
, sampling_volume_points: np.ndarray
, sampling_volume_permeabilities: np.ndarray
, progress_callback: Callable
):
¶
Initializes the class attributes.
Parameters | |
fieldint | Field type |
distancefloat | Distance limit (mitigating divisions by zero) |
lengthfloat | Length scale (m) |
dc:float | Wire current (A) |
currentnp.ndarray | Ordered list of current elements (pairs: [element center, element direction]) |
samplingnp.ndarray | Ordered list of sampling volume points |
samplingnp.ndarray | Ordered list of sampling volume's relative permeabilities µ_r |
progressCallable | Progress callback |