protected void OnConvergenceResult(ConvergenceValues convergenceValues) { if (convergenceResult != null) { convergenceResult.Invoke(this, convergenceValues); } }
public void NonLinearScheme_convergenceResult(object sender, ConvergenceValues e) { Application.Current.Dispatcher.Invoke(new Action(() => { LogTool.Text = "Load Step " + e.LoadStep + "-Iteration " + e.Iteration + " : Convergence State: " + e.ConvergenceResult + " with residual " + e.ResidualNorm; if (e.LoadStep > LoadStepNumber) { ChartValues.Clear(); } //ChartValues.Add(new ConvergenceValues //{ // Iteration = e.Iteration, // ResidualNorm = e.ResidualNorm //}); LoadStepNumber = e.LoadStep; })); SetAxisLimits(e.Iteration); if (ChartValues.Count > 50) { ChartValues.RemoveAt(0); } }