/// <summary> /// Adds a boundary condition, represented by a general <see cref="IBoundaryAndInitialData"/>-object. /// </summary> /// <param name="EdgeTagName">Name of the boundary condition</param> /// <param name="fieldname">Name of the field for which the boundary condition is valid</param> /// <param name="data"> /// General provider of initial/boundary data; In order to support full functionality (job management, etc.), /// the object must be serializeable. /// </param> public void AddBoundaryValue(string EdgeTagName, string fieldname, IBoundaryAndInitialData data) { if (!this.BoundaryValues.ContainsKey(EdgeTagName)) { this.BoundaryValues.Add(EdgeTagName, new BoundaryValueCollection()); } if (this.BoundaryValues[EdgeTagName].Evaluators.ContainsKey(fieldname)) { throw new ArgumentException(string.Format("Boundary condition for field '{0}' and edge tag name '{1}' already specified.", EdgeTagName, fieldname)); } this.BoundaryValues[EdgeTagName].Values.Add(fieldname, data); }
/// <summary> /// Adds an initial value to <see cref="InitialValues"/> /// </summary> /// <param name="fieldname">Name of the field for which the boundary condition is valid</param> /// <param name="value">Function of the boundary condition</param> public void AddInitialValue(string fieldname, IBoundaryAndInitialData value) { InitialValues.Add(fieldname, value); }