-
IntersectAreaOfPoly.cpp double IntersectAreaOfPoly(vector& polygon1, vector& polygon2) /* Input: arbitrary polygon points, counterclockwise Output: Area of intersection of two polygons */ // HDU 3060 acm question
-
GaussElimination.cpp void GaussElimination(vector<vector >& A, vector& b, vector& x) // Solving Ax = b by Gaussian Elimination /* Input: vector<vector >& A vector& b vector& x solve result save in x; */
-
function [x, r, i] = GMRES ( A, b, x0, tol, maxit ) % solve Ax = b; % Input: % x0 Initial value % tol Precision % maxit The maximum number of iterations
% Output:
% x Solution
% r
% i The number of iterations
- GaussTriangleNumericalIntegration.m function [weight, gausspoints] = GaussTriangleNumericalIntegration(precision) % Calculate numerical integration on Triangle % Input: % precision integration precision
% Output: % weight integration weight % gausspoints integration points
-
TestForGauTriNumInt.m % Just for test GaussTriangleNumericalIntegration % If change triangle points exact integration need change
-
ConjugateGradient.m function [x,n] = ConjugateGradient(A, b, x0, epsa) % solve Ax = b; % Input: % A Matrix % b Vector % x0 Initial value % epsa Precision % Output: % x approximate solution % b the maximum number of iterations
-
ChangeP1toP2Mesh.m function [p,t] = ChangeP1toP2Mesh(p,t) % % Input: p: nodes % t: index of node % Each triangle is described by three points.
% Output: p: nodes % t: index of node % Each triangle is described by six points.
-
Tri2Edge.m function edges = Tri2Edge(p,t) % Input: p: nodes % t: index of node % Each triangle is described by three points. % Output: edges: return the element edge numbers.
-
TestforChangeP1toP2Mesh.m % Just for test ChangeP1toP2Mesh