Class FlatSolverState<T, S>
A solver simulation state that maps the names of the variables such that they are identified as being internal if necessary.
Implements
Inherited Members
Namespace: SpiceSharp.Components.Subcircuits
Assembly: SpiceSharp.dll
Syntax
public class FlatSolverState<T, S> : SubcircuitSolverState<T, S>, ISolverSimulationState<T>, ISimulationState, IVariableFactory<IVariable<T>>, IVariableDictionary<IVariable<T>>, IReadOnlyDictionary<string, IVariable<T>>, IReadOnlyCollection<KeyValuePair<string, IVariable<T>>>, IEnumerable<KeyValuePair<string, IVariable<T>>>, IEnumerable where S : ISolverSimulationState<T>
Type Parameters
| Name | Description |
|---|---|
| T | The base value type. |
| S | The parent simulation state type. |
Constructors
FlatSolverState(string, S, IEnumerable<Bridge<string>>)
Initializes a new instance of the SubcircuitSolverState<T, S> class.
Declaration
protected FlatSolverState(string name, S parent, IEnumerable<Bridge<string>> nodes)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name. |
| S | parent | The parent. |
| IEnumerable<Bridge<string>> | nodes | The nodes. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Properties
Map
Gets the IVariableMap that maps variables to indices for the solver.
Declaration
public override IVariableMap Map { get; }
Property Value
| Type | Description |
|---|---|
| IVariableMap | The variable map. |
Overrides
Solution
Gets the solution to the solved equations.
Declaration
public override IVector<T> Solution { get; }
Property Value
| Type | Description |
|---|---|
| IVector<T> | The solution. |
Overrides
Solver
Gets the solver used to solve the system of equations.
Declaration
public override ISparsePivotingSolver<T> Solver { get; }
Property Value
| Type | Description |
|---|---|
| ISparsePivotingSolver<T> | The solver. |
Overrides
Methods
CreatePrivateVariable(string, IUnit)
Creates a variable that is private to whoever requested it. The factory will not shared this variable with anyone else, and the name is only used for display purposes.
Declaration
public override IVariable<T> CreatePrivateVariable(string name, IUnit unit)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the private variable. |
| IUnit | unit | The unit of the variable. |
Returns
| Type | Description |
|---|---|
| IVariable<T> | The private variable. |
Overrides
GetSharedVariable(string)
Gets a variable that can be shared with other behaviors by the factory. If another variable already exists with the same name, that is returned instead.
Declaration
public override IVariable<T> GetSharedVariable(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the shared variable. |
Returns
| Type | Description |
|---|---|
| IVariable<T> | The shared variable. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |