config
¶
Base model for the concern-grouped configuration of a simulation.
gsim.fdtd, gsim.tcad and gsim.thermal configure a simulation
through a few concern objects (geometry, domain, materials, solver,
...). Each is a validated pydantic model that can be set one attribute
at a time or several at once by calling it.
A concern can be mutated in place at any time, so a Simulation that
keeps a mesh or a solve compares snapshots of its inputs
(:func:fingerprint) rather than watching assignments.
Classes:
-
Concern–A Simulation attribute that validates whatever replaces it.
-
MutableModel–Validated model that supports concise batch updates.
-
NamedModels–Insertion-ordered collection of models with a unique
name. -
Same–Snapshot of an object compared by identity.
Functions:
-
component_digest–The drawn polygons of a component, so an edit in place is seen.
-
fingerprint–A comparable snapshot of a configuration value.
Concern
¶
Concern(kind: type[T])
A Simulation attribute that validates whatever replaces it.
A model concern takes a model, a mapping of its fields, or None for its defaults; a collection takes the collection or a list of items.
MutableModel
¶
Bases: BaseModel
Validated model that supports concise batch updates.
NamedModels
¶
Insertion-ordered collection of models with a unique name.
-
API Reference
gsim
Methods:
Same
¶
Same(value: Any)
Snapshot of an object compared by identity.
Holds the object, so its address cannot be reused by another one that would then compare equal.
component_digest
¶
The drawn polygons of a component, so an edit in place is seen.