Class SubcircuitSimulation
A subcircuit simulation that captures created behaviors in a local container.
Inherited Members
Namespace: SpiceSharp.Components.Subcircuits
Assembly: SpiceSharp.dll
Syntax
public class SubcircuitSimulation : SimulationWrapper, ISimulation, IStateful, IBehavioral, IParameterSetCollection, IParameterSet
Constructors
SubcircuitSimulation(string, ISimulation, ISubcircuitDefinition, IReadOnlyList<Bridge<string>>)
Initializes a new instance of the SubcircuitSimulation class.
Declaration
public SubcircuitSimulation(string name, ISimulation parent, ISubcircuitDefinition definition, IReadOnlyList<Bridge<string>> nodes)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the subcircuit. |
ISimulation | parent | The parent simulation. |
ISubcircuitDefinition | definition | The subcircuit definition. |
IReadOnlyList<Bridge<string>> | nodes | The node bridges. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Properties
Definition
Gets the subcircuit.
Declaration
protected ISubcircuitDefinition Definition { get; }
Property Value
Type | Description |
---|---|
ISubcircuitDefinition | The subcircuit. |
InstanceName
Gets the name of the subcircuit instance.
Declaration
public string InstanceName { get; }
Property Value
Type | Description |
---|---|
string | The name of the instance. |
Nodes
Gets a dictionary that maps internal nodes to nodes external to the subcircuit. Any node that isn't part of this map, is considered a local node.
Declaration
public IReadOnlyList<Bridge<string>> Nodes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Bridge<string>> | The node map. |
Methods
GetState<S>()
Gets the state of the specified type.
Declaration
public override S GetState<S>() where S : ISimulationState
Returns
Type | Description |
---|---|
S | The type, or |
Type Parameters
Name | Description |
---|---|
S | The simulation state type. |
Overrides
Exceptions
Type | Condition |
---|---|
TypeNotFoundException | Thrown if the simulation state is not defined on this instance. |