public MainWindow() { InitializeComponent(); TriangleNetHandler = new TriangleNetHandler(); points = new List <Point>(); _pointHandler = TriangleNetHandler; }
public ErrorSolver(FEMContext fEMContext, TriangleNetHandler triangleNetHandler, List <CustomPoint> points, Equation equation) { Points = points; Equation = equation; TriangleNetHandler = triangleNetHandler; CurrentFEMContext = fEMContext; CalculateAreas(CurrentFEMContext); CalculateLength(CurrentFEMContext); }
private void FormationMatrix(TriangleNetHandler triangleNetHandler, List <Point> points, Canvas canvas, Equation equation) { ///////////FEM var dataInitializer = new DataInitializer(TriangleNetHandler, points, equation); var femContext = dataInitializer.GetInitialData(); fem = new FEMSolver.FEMSolver(femContext); var errorSolver = new ErrorSolver(femContext, TriangleNetHandler, points, equation); var errorsContext = new ErrorContext { ErrorL2 = errorSolver.NormaErrorL2(Functions.U, femContext), ErrorW2 = errorSolver.NormaErrorW2(Functions.U, Functions.DU, femContext), NormL2 = errorSolver.NormaL2(femContext), NormW2 = errorSolver.NormaW2(femContext), pL2 = errorSolver.PL2(), pW2 = errorSolver.PW2(), pAitkenL2 = errorSolver.PAitkenL2(), pAitkenW2 = errorSolver.PAitkenW2(), TrianglesNumber = femContext.Data.NT.Length }; errorContextForGrid.Add(errorsContext); ErrorGrid.ItemsSource = from v in errorContextForGrid select new { v.TrianglesNumber, v.NormL2, v.NormW2, v.ErrorL2, v.ErrorW2, v.pL2, v.pW2, v.pAitkenL2, v.pAitkenW2 }; // DrawInMatlab(x1, x2, z); }