API Reference
IFEdd exports nothing — every name below is written qualified. See A sibling data dictionary for why.
Container
IFEdd.AbstractIFEDD — Type
AbstractIFEDD{T} <: IMASdd.DD{T}Supertype for any IFE top-level container. IFEdd's own dd{T} is the default concrete; every container baked by IFEdd.generate_user_dd subtypes it too.
Sits between IMASdd.DD and the concretes so that IFE code can accept any IFE container without naming one: f(dd::IFEdd.AbstractIFEDD) covers IFEdd.dd and every customized variant, while still excluding IMASdd.dd — which has no driver or build to operate on.
Unlike the per-IDS abstracts below, this one is declared here rather than derived from a _supertype marker: the container has no JSON schema. It is therefore absent from abstracts.json and cannot appear in slot_bindings — substituting the container into itself is not meaningful.
IFEdd.dd — Type
IFEdd.dd{T} <: IFEdd.AbstractIFEDD{T} <: IMASdd.DD{T}Top-level IFE data dictionary container: a sibling of IMASdd.dd under the shared abstract IMASdd.DD, not a subtype of it.
Embeds the IFE-owned IDS (summary, build, driver) alongside the IMASdd IDS that carry over unchanged (balance_of_plant, blanket, core_profiles, core_sources, costing, neutronics, pellets, requirements).
dd = IFEdd.dd() # Float64 element type
dd = IFEdd.dd{Float32}()Because it descends from IMASdd.DD, the whole IMASdd API applies unchanged.
Never write ::IFEdd.dd in a signature — it locks out customized containers built with IFEdd.generate_user_dd. Use IFEdd.AbstractIFEDD when the function touches IFE slots (driver, build, summary), or IMASdd.DD when it touches only slots shared with the tokamak container.
The IDS types themselves (IFEdd.summary, IFEdd.build, IFEdd.driver and their substructures) are generated from the JSON schemas and documented per field through IMASdd.info. See Data schema for the field listing.
Abstract types
IFE-specific:
IFEdd.AbstractIFESummary — Type
AbstractIFESummary{T} <: IMASdd.IDStop{T}Supertype for any concrete IFE summary IDS. IFEdd's own summary{T} is the default concrete. User packages substituting a custom summary IDS into dd.summary MUST declare their concrete type as <: IFEdd.AbstractIFESummary{T} so that dispatch written for ::IFEdd.AbstractIFESummary covers it.
The user concrete must additionally carry the standard housekeeping fields (_aux, _name, _filled, _frozen, _threads_lock, _in_expression, _parent) in the order produced by the default generator. The order is introspected from fieldnames(IFEdd.summary) minus payload fields by IFEdd.generate_user_dd.
IFEdd.AbstractIFESummaryTarget — Type
AbstractIFESummaryTarget{T} <: IMASdd.IDS{T}Nested abstract for the target sub-structure of any IFE summary IDS. IFEdd's default concrete is summary__target{T}, carrying target implosion physics scalars (gain, yield, ablation_pressure, etc.).
Enables dispatch on ::AbstractIFESummaryTarget for any user-baked summary whose target sub-IDS subtypes this. The container summary{T} still embeds the IFEdd concrete summary__target{T} by default; users substitute sub-IDS through slot_bindings.
IFEdd.AbstractIFEBuild — Type
AbstractIFEBuild{T} <: IMASdd.IDStop{T}Supertype for any concrete IFE build IDS. See AbstractIFESummary for the per-instance contract. IFEdd's default concrete is build{T}, which carries layer::IMASdd.IDSvector{build__layer{T}} and time-series fields.
IFEdd.AbstractIFEBuildLayer — Type
AbstractIFEBuildLayer{T} <: IMASdd.IDSvectorStaticElement{T}Element-type abstract for build.layer[:] — each concentric layer of the IFE chamber radial build. IFEdd's default concrete is build__layer{T}, carrying name, material, thickness, volume, etc. Parent is IDSvectorStaticElement because layers live inside an IDSvector{build__layer{T}} array.
A method written as f(layer::IFEdd.AbstractIFEBuildLayer) covers any user-defined layer concrete that subtypes this.
IFEdd.AbstractIFEBuildLayerOutline — Type
AbstractIFEBuildLayerOutline{T} <: IMASdd.IDS{T}Nested abstract for the outline sub-structure of a build layer — the 2-D poloidal cross-section (r, z) curve bounding the layer. IFEdd's default concrete is build__layer___outline{T} (note the ___ separator marking it as a sub-structure of an IDSvector element).
IFEdd.AbstractIFEDriver — Type
AbstractIFEDriver{T} <: IMASdd.IDStop{T}Supertype for any concrete IFE driver IDS. See AbstractIFESummary for the per-instance contract. IFEdd's default concrete is driver{T}, which carries beam::IMASdd.IDSvector{driver__beam{T}} and time-series fields.
IFEdd.AbstractIFEDriverBeam — Type
AbstractIFEDriverBeam{T} <: IMASdd.IDSvectorStaticElement{T}Element-type abstract for driver.beam[:] — each beam line of the IFE driver system. IFEdd's default concrete is driver__beam{T}, carrying identifier, energy, wavelength, intensity, power_launched, plus a nested efficiency substructure.
IFEdd.AbstractIFEDriverBeamEfficiency — Type
AbstractIFEDriverBeamEfficiency{T} <: IMASdd.IDS{T}Nested abstract for the efficiency sub-structure of a driver beam, carrying conversion (wall-plug → laser) and coupling (driver → target) fractions. IFEdd's default concrete is driver__beam___efficiency{T}.
Shared across IDSs:
IFEdd.AbstractIDSCode — Type
AbstractIDSCode{T} <: IMASdd.IDS{T}Cross-IDS abstract for <root>.code substructures (carries commit, description, name, library, output_flag, etc.). IFEdd's default concretes per host: summary__code, build__code, driver__code.
Dispatch over this abstract covers any future user concrete that subtypes AbstractIDSCode AND IFEdd's three defaults uniformly.
IFEdd.AbstractIDSCodeLibrary — Type
AbstractIDSCodeLibrary{T} <: IMASdd.IDSvectorStaticElement{T}Cross-IDS abstract for <root>.code.library[:] array elements. IFEdd's default concretes per host: summary__code__library, build__code__library, driver__code__library.
IFEdd.AbstractIDSProperties — Type
AbstractIDSProperties{T} <: IMASdd.IDS{T}Cross-IDS abstract for <root>.ids_properties substructures (carries comment, creation_date, homogeneous_time, nested plugins / provenance, etc.). IFEdd's default concretes per host: summary__ids_properties, build__ids_properties, driver__ids_properties.
IFEdd.AbstractIDSPropertiesPlugins — Type
AbstractIDSPropertiesPlugins{T} <: IMASdd.IDS{T}Cross-IDS abstract for <root>.ids_properties.plugins substructures (plugin infrastructure metadata, node array, infrastructure-get/put substructures). IFEdd's default concretes per host: summary__ids_properties__plugins, build__ids_properties__plugins, driver__ids_properties__plugins.
IFEdd.AbstractIDSPropertiesProvenance — Type
AbstractIDSPropertiesProvenance{T} <: IMASdd.IDS{T}Cross-IDS abstract for <root>.ids_properties.provenance substructures (provenance node list). IFEdd's default concretes per host: summary__ids_properties__provenance, build__ids_properties__provenance, driver__ids_properties__provenance.
Generator
IFEdd.generate_user_dd — Function
IFEdd.generate_user_dd(; output_dir, target_module, schema_extra_dir,
slot_bindings=Dict{Symbol,Symbol}(),
ifedd_default_schema_dir=nothing,
ifedd_abstracts_file=nothing,
verbose=false)
-> @NamedTuple{idstypes_file, dd_file, manifest_file, manifest, concretes}Generate a customized <target_module>.dd{T} struct and supporting IDS types into output_dir. The downstream user package is expected to include the generated files from its own src/<target_module>.jl.
Example
IFEdd.generate_user_dd(
output_dir = joinpath(@__DIR__, "..", "src"),
target_module = :MyIFEProject,
schema_extra_dir = joinpath(@__DIR__, "..", "data_dictionary",
"data_structures_extra"),
slot_bindings = Dict(:summary => :my_summary),
)This emits three files into output_dir:
MyIFEProject_idstypes.jl— user concrete IDS struct definitions (e.g.my_summary{T} <: IFEdd.AbstractIFESummary{T}).MyIFEProject_dd.jl—MyIFEProject.dd{T} <: IFEdd.AbstractIFEDD{T}container, embedding user concretes for overridden slots andIFEdd.X{T}/IMASdd.X{T}for the rest, plus an__init__()that registers user concretes'_all_infoentries.MyIFEProject_dd_manifest.json— provenance/hashes for freshness CI.
Requires GenerateDD to be loaded (using IFEdd, GenerateDD).
Errors are raised as IFEdd.GeneratorError(reason::Symbol, detail): :generatedd_not_loaded, :ifedd_not_locatable, :schema_dir_missing, :subdir_in_schema_dir, :malformed_json, :bad_supertype, :supertype_mismatch, :concrete_not_in_schemas, :ambiguous_binding, :user_name_shadows_ifedd_default, :output_dir_readonly, :pidlock_timeout.
The online documentation carries a worked, copy-pastable recipe, plus the slot_bindings forms for substituting IDS below the top level.
IFEdd.@bake_dd — Macro
IFEdd.@bake_dd <NAME> = (kwarg = val, ...)Bake a customized dd{T} and bind its type to <NAME> in the caller's current module. RHS is a NamedTuple of keyword arguments forwarded to IFEdd.generate_user_dd, with two relaxations:
output_diris optional (defaults to a fresh tempdir → ephemeral).target_moduleis set automatically to<NAME>.
Examples
REPL / script — ephemeral:
julia> using IFEdd
julia> IFEdd.@bake_dd dd_mine = (
schema_dir = "/path/to/data_structures_extra",
slot_bindings = Dict(:summary => :my_summary),
)
julia> d = dd_mine();
julia> d isa IFEdd.AbstractIFESummary{Float64}
trueInside a package module — persistent (source emitted into output_dir):
__precompile__(false) # GenerateDD cannot run during precompilation
module MyPkg
using IFEdd, GenerateDD
IFEdd.@bake_dd Custom = (
schema_dir = joinpath(@__DIR__, "schemas"),
output_dir = joinpath(@__DIR__, "gen"),
slot_bindings = Dict(:summary => :my_summary),
)
end
# MyPkg.Custom() now constructs a customized ddCaching
Ephemeral bakes are cached by manifest hash within the session, so re-running an identical @bake_dd returns the same concrete type (downstream method specializations stay valid). Different <NAME> → different cache key (so types are non-interchangeable).
World-age
<NAME> is assigned via global from inside a let block. Constructing <NAME>() in the same top-level expression hits a world-age error — use a separate statement, or Base.invokelatest(<NAME>). At REPL each prompt is its own world, so dd_mine() on the next line works.
Provenance accessors
IFEdd.bake_manifest(T) and IFEdd.bake_source(T) return the manifest dict and generated source paths for a baked type.
Provenance
IFEdd.bake_manifest — Function
IFEdd.bake_manifest(T::Type) -> Dict{String,Any}Provenance manifest for a type produced by @bake_dd. Throws ArgumentError if T did not come from @bake_dd.
IFEdd.bake_source — Function
IFEdd.bake_source(T::Type) -> @NamedTuple{idstypes, dd, manifest}Filesystem paths of the three generator outputs that back a @bake_dd type. Files persist for the session (ephemeral bakes drop them in a tempdir; persistent bakes leave them in output_dir).
Errors
IFEdd.GeneratorError — Type
GeneratorError <: ExceptionRaised by IFEdd.generate_user_dd and its helpers for any of the documented reason::Symbols. The detail field carries reason-specific context for the Base.showerror rendering.