My Project
|
Provides mesh quality information. More...
Public Member Functions | |
void | Update (TriangleNetMesh triangleNetMesh) |
int | Bandwidth () |
Determines the bandwidth of the coefficient matrix. | |
Provides mesh quality information.
Given a triangle abc with points A (ax, ay), B (bx, by), C (cx, cy).
The side lengths are given as a = sqrt((cx - bx)^2 + (cy - by)^2) – side BC opposite of A b = sqrt((cx - ax)^2 + (cy - ay)^2) – side CA opposite of B c = sqrt((ax - bx)^2 + (ay - by)^2) – side AB opposite of C
The angles are given as ang_a = acos((b^2 + c^2 - a^2) / (2 * b * c)) – angle at A ang_b = acos((c^2 + a^2 - b^2) / (2 * c * a)) – angle at B ang_c = acos((a^2 + b^2 - c^2) / (2 * a * b)) – angle at C
The semiperimeter is given as s = (a + b + c) / 2
The area is given as D = abs(ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) / 2 = sqrt(s * (s - a) * (s - b) * (s - c))
The inradius is given as r = D / s
The circumradius is given as R = a * b * c / (4 * D)
The altitudes are given as alt_a = 2 * D / a – altitude above side a alt_b = 2 * D / b – altitude above side b alt_c = 2 * D / c – altitude above side c
The aspect ratio may be given as the ratio of the longest to the shortest edge or, more commonly as the ratio of the circumradius to twice the inradius ar = R / (2 * r) = a * b * c / (8 * (s - a) * (s - b) * (s - c)) = a * b * c / ((b + c - a) * (c + a - b) * (a + b - c))
|
inline |
Determines the bandwidth of the coefficient matrix.
The quantity computed here is the "geometric" bandwidth determined by the finite element mesh alone.
If a single finite element variable is associated with each node of the mesh, and if the nodes and variables are numbered in the same way, then the geometric bandwidth is the same as the bandwidth of a typical finite element matrix.
The bandwidth M is defined in terms of the lower and upper bandwidths:
M = ML + 1 + MU
where
ML = maximum distance from any diagonal entry to a nonzero entry in the same row, but earlier column,
MU = maximum distance from any diagonal entry to a nonzero entry in the same row, but later column.
Because the finite element node adjacency relationship is symmetric, we are guaranteed that ML = MU.