/// <summary> /// Removes a volumetric force from this. /// </summary> /// <param name="force">The volumetric force to be removed.</param> internal static void Remove(IVolumetricForce force) { if (volumetricForces.Contains(force)) { volumetricForces.Remove(force); } if (force is IUpdate && updateForces.Contains(force as IUpdate)) { updateForces.Remove(force as IUpdate); } }
/// <summary> /// Adds a volumetric force to this. /// </summary> /// <param name="volume">The volumetric force to be added.</param> internal static void AddForce(IVolumetricForce volume) { IVolumetricForce v = null; v = (from c in volumetricForces where c.ID == volume.ID select c).FirstOrDefault(); if (v == null) { if (volume is IUpdate) { updateForces.Add(volume as IUpdate); } volumetricForces.Add(volume); } }