Beispiel #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="configuration">The configuration</param>
        /// <param name="maxOrder">Maximum integration order</param>
        protected IntegrationMethod(IntegrationParameters configuration, int maxOrder)
        {
            if (maxOrder < 1)
            {
                throw new CircuitException("Invalid order {0}".FormatString(maxOrder));
            }
            MaxOrder = maxOrder;

            // Allocate history of timesteps
            DeltaOld = new ArrayHistory <double>(maxOrder + 2);

            // Allocate history of solutions
            Solutions = new ArrayHistory <Vector <double> >(maxOrder + 1);

            // Create configuration if necessary
            Parameters.Add(configuration ?? new IntegrationParameters());
        }
Beispiel #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 public Trapezoidal(IntegrationParameters config)
     : base(config, 2)
 {
 }