/// <summary> /// Initializes a new instance of the <see cref="Frequency"/> class. /// </summary> /// <param name="context">The binding context.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="context"/> is <c>null</c>.</exception> public Frequency(IComponentBindingContext context) : base(context) { ModelParameters = context.ModelBehaviors.GetParameterSet <ModelParameters>(); Behavior = context.Behaviors.GetValue <IMosfetBiasingBehavior>(); _complex = context.GetState <IComplexSimulationState>(); Variables = new MosfetVariables <Complex>(context, _complex); _elements = new ElementSet <Complex>(_complex.Solver, Variables.GetMatrixLocations(_complex.Map)); }
/// <summary> /// Initializes a new instance of the <see cref="Frequency"/> class. /// </summary> /// <param name="context">The binding context.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="context"/> is <c>null</c>.</exception> public Frequency(IComponentBindingContext context) : base(context) { ModelParameters = context.ModelBehaviors.GetParameterSet <ModelParameters>(); Behavior = context.Behaviors.GetValue <IMosfetBiasingBehavior>(); _complex = context.GetState <IComplexSimulationState>(); Variables = new MosfetVariables <Complex>(Name, _complex, context.Nodes, !ModelParameters.DrainResistance.Equals(0.0) || !ModelParameters.SheetResistance.Equals(0.0) && Behavior.Parameters.DrainSquares > 0, !ModelParameters.SourceResistance.Equals(0.0) || !ModelParameters.SheetResistance.Equals(0.0) && Behavior.Parameters.SourceSquares > 0); _elements = new ElementSet <Complex>(_complex.Solver, Variables.GetMatrixLocations(_complex.Map)); }