/// <summary> /// Setup and solve the System, No evaluation of RHS, this is done in <see cref="FinishTimeStep"/> /// </summary> /// <param name="dt">TimestepSize</param> public override void Advect(double dt) { if (!divUzero) { this.divU.Clear(); // Compute Divergence locally, // the values at the singularities might spoil accuracy in the other cells, // if a flux formulation is used this.divU.Divergence(1.0, this.Velocity); } MeanVelocity.Clear(); MeanVelocity.AccLaidBack(1.0, Velocity); var OldLevelSet = LevelSet.CloneAs(); myBDFTimestepper.Perform(dt); OldLevelSet.Acc(-1.0, LevelSet); }
/// <summary> /// Setup and solve the System, No evaluation of RHS, this is done in <see cref="FinishTimeStep"/> /// </summary> /// <param name="dt">TimestepSize</param> public void Advect(double dt) { // Construct the Extension Velocity VectorExtension.Clear(); for (int d = 0; d < D; d++) { VelocityExtender[d].ConstructExtension(new List <DGField> { Velocity[d] }, this.nearfield); } VectorExtension.CheckForNanOrInf(true, true, true); // Advect with that Extension Velocity this.divU.Clear(); // Compute Divergence locally, // the values at the singularities might spoil accuracy in the other cells, // if a flux formulation is used this.divU.Divergence(1.0, this.VectorExtension, subGrid?.VolumeMask); MeanVelocity.Clear(); MeanVelocity.AccLaidBack(1.0, VectorExtension, subGrid?.VolumeMask); myBDFTimestepper.Perform(dt); }