/// <summary> /// Utility method that helps creating a Runge-Kutta scheme from the /// enum <see cref="RungeKuttaSchemes"/>. Allows for a simple /// instantiation of the correct scheme from a configuration string. /// </summary> /// <param name="scheme"></param> /// <returns> /// An instance of a Runge-Kutta scheme the selected /// <paramref name="scheme"/>. /// </returns> public static RungeKuttaScheme SchemeFactory(RungeKuttaSchemes scheme) { switch (scheme) { case RungeKuttaSchemes.ExplicitEuler: return(RungeKuttaScheme.ExplicitEuler); case RungeKuttaSchemes.Heun: return(RungeKuttaScheme.Heun); case RungeKuttaSchemes.Middlepoint: return(RungeKuttaScheme.Middlepoint); case RungeKuttaSchemes.RungeKutta1901: return(RungeKuttaScheme.RungeKutta1901); case RungeKuttaSchemes.ThreeOverEight: return(RungeKuttaScheme.ThreeOverEight); case RungeKuttaSchemes.TVD3: return(RungeKuttaScheme.TVD3); default: throw new NotImplementedException(); } }
/// <summary> /// another ctor. /// </summary> public RungeKutta(RungeKuttaSchemes scheme, SpatialOperator spatialOp, params DGField[] Fields) : this(scheme, spatialOp, new CoordinateMapping(Fields), null, null) { }
/// <summary> /// one more ctor. /// </summary> public RungeKutta(RungeKuttaSchemes schemeEnum, SpatialOperator spatialOp, CoordinateMapping Fieldsmap, CoordinateMapping Parameters, IList <TimeStepConstraint> timeStepConstraints = null, SubGrid sgrd = null) : this(SchemeFactory(schemeEnum), spatialOp, Fieldsmap, Parameters, timeStepConstraints, sgrd) { }