Class FrequencySimulation.ComplexSimulationState
A simulation state using complex numbers.
Inheritance
Implements
Inherited Members
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
protected class FrequencySimulation.ComplexSimulationState : VariableDictionary<IVariable<Complex>>, IComplexSimulationState, ISolverSimulationState<Complex>, ISimulationState, IVariableFactory<IVariable<Complex>>, IVariableDictionary<IVariable<Complex>>, IReadOnlyDictionary<string, IVariable<Complex>>, IReadOnlyCollection<KeyValuePair<string, IVariable<Complex>>>, IEnumerable<KeyValuePair<string, IVariable<Complex>>>, IEnumerable
Constructors
ComplexSimulationState(ISparsePivotingSolver<Complex>, IEqualityComparer<string>)
Initializes a new instance of the FrequencySimulation.ComplexSimulationState class.
Declaration
public ComplexSimulationState(ISparsePivotingSolver<Complex> solver, IEqualityComparer<string> comparer)
Parameters
Type | Name | Description |
---|---|---|
ISparsePivotingSolver<Complex> | solver | The solver. |
IEqualityComparer<string> | comparer | The comparer. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Properties
Laplace
Gets or sets the current laplace variable.
Declaration
public Complex Laplace { get; set; }
Property Value
Type | Description |
---|---|
Complex | The laplace. |
Map
Gets the IVariableMap that maps variables to indices for the solver.
Declaration
public IVariableMap Map { get; }
Property Value
Type | Description |
---|---|
IVariableMap | The variable map. |
Solution
Gets the solution to the solved equations.
Declaration
public IVector<Complex> Solution { get; }
Property Value
Type | Description |
---|---|
IVector<Complex> | The solution. |
Solver
Gets the solver used to solve the system of equations.
Declaration
public ISparsePivotingSolver<Complex> Solver { get; }
Property Value
Type | Description |
---|---|
ISparsePivotingSolver<Complex> | The 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 IVariable<Complex> 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<Complex> | The private variable. |
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 IVariable<Complex> GetSharedVariable(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the shared variable. |
Returns
Type | Description |
---|---|
IVariable<Complex> | The shared variable. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Setup()
Set up the simulation state for the simulation.
Declaration
public void Setup()