Show / Hide Table of Contents

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.

Inheritance
object
SubcircuitSolverState<T, S>
FlatSolverState<T, S>
Biasing.FlatSimulationState
Frequency.FlatSimulationState
Implements
ISolverSimulationState<T>
ISimulationState
IVariableFactory<IVariable<T>>
IVariableDictionary<IVariable<T>>
IReadOnlyDictionary<string, IVariable<T>>
IReadOnlyCollection<KeyValuePair<string, IVariable<T>>>
IEnumerable<KeyValuePair<string, IVariable<T>>>
IEnumerable
Inherited Members
SubcircuitSolverState<T, S>.Name
SubcircuitSolverState<T, S>.Parent
SubcircuitSolverState<T, S>.Solver
SubcircuitSolverState<T, S>.Solution
SubcircuitSolverState<T, S>.Map
SubcircuitSolverState<T, S>.GetSharedVariable(string)
SubcircuitSolverState<T, S>.CreatePrivateVariable(string, IUnit)
SubcircuitSolverState<T, S>.Comparer
SubcircuitSolverState<T, S>.Add(string, IVariable<T>)
SubcircuitSolverState<T, S>.ContainsKey(string)
SubcircuitSolverState<T, S>.TryGetValue(string, out IVariable<T>)
SubcircuitSolverState<T, S>.this[string]
SubcircuitSolverState<T, S>.Keys
SubcircuitSolverState<T, S>.Values
SubcircuitSolverState<T, S>.Count
SubcircuitSolverState<T, S>.GetEnumerator()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 name or parent is null.

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
SubcircuitSolverState<T, S>.Map

Solution

Gets the solution to the solved equations.

Declaration
public override IVector<T> Solution { get; }
Property Value
Type Description
IVector<T>

The solution.

Overrides
SubcircuitSolverState<T, S>.Solution

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
SubcircuitSolverState<T, S>.Solver

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
SubcircuitSolverState<T, S>.CreatePrivateVariable(string, IUnit)

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
SubcircuitSolverState<T, S>.GetSharedVariable(string)
Exceptions
Type Condition
ArgumentNullException

Thrown if name is null.

Implements

ISolverSimulationState<T>
ISimulationState
IVariableFactory<V>
IVariableDictionary<V>
IReadOnlyDictionary<TKey, TValue>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

Utility.ThrowIfNull<T>(T, string)
Utility.ThrowIfEmpty<T>(IEnumerable<T>, string)

See Also

ISolverSimulationState<T>
In this article
Back to top Generated by DocFX