Theoremresearch
Linear independence of analysis-suitable T-splines
Also called analysis-suitable T-spline independence theorem.
Li, Zheng, Sederberg, Hughes and Scott proved the blending functions of analysis-suitable T-splines linearly independent, which general T-splines need not be.
The blending functions of a T-spline are products of B-splines on local knot vectors, one for each control point. On a general T-mesh they can be linearly dependent: Buffa, Cho and Sangalli found a T-mesh with 40 functions that span a space of dimension 39. Li, Zheng, Sederberg, Hughes and Scott proved two results in 2012. First, the functions are independent if and only if the T-spline-to-NURBS matrix has full column rank. Second, on an analysis-suitable T-mesh they are always independent, for every choice of knot values. So analysis-suitable T-splines give a basis, as isogeometric analysis needs.
Statement
Let a bicubic T-spline be given in index space, as on the T-spline page: vertical lines with knot values , horizontal lines with values , the two outer lines on each side complete, and no value on more than four lines. Let be the blending functions of the anchors. Let , , and , , be the cubic B-splines on the global knot vectors and , and . Each is a combination
and is the T-spline-to-NURBS matrix.
Theorem 1 (Li, Zheng, Sederberg, Hughes and Scott). is unique, and are linearly independent if and only if has rank .
Theorem 18 (Li, Zheng, Sederberg, Hughes and Scott). If the T-mesh is analysis-suitable, then are linearly independent, for every choice of the knot values.
With positive weights , the rational functions are independent exactly when the are, because they differ by a positive common factor and a positive scaling of each function.
In plain words
Each control point of a T-spline has a smooth bump. A finite element method needs the bumps to be a basis: no bump may be a mix of the others, or the system of equations has no unique solution.
The first result says how to test this. Write every bump as a sum of the bumps of an ordinary grid, which are known to be a basis. Put the numbers in a table, one column per bump. The bumps are a basis exactly when no column is a mix of the other columns.
The second result says that one simple rule on the mesh is enough. If the short extensions of the T-shaped joints never meet, the bumps are always a basis, whatever the spacing of the lines.
Proof
Theorem 1. Each is a product of a cubic B-spline on five of the lines and one on five of the lines . Inserting into each factor the missing lines between its first and last line, by Boehm's rule, writes it as a combination of the global B-splines; this is the construction on the T-spline page, so exists. The global B-splines are linearly independent on , by the Curry-Schoenberg theorem, because no value has multiplicity above 4. The same holds for the , and the products of two independent families are independent: if , then for each fixed the coefficients of the vanish, and then each . So the coefficients of each are unique, and is unique.
For a vector ,
and by the independence of the products this is the zero function if and only if . So a nonzero with exists if and only if has a nonzero null vector, that is, if and only if .
A lemma for the rank. Call column of innocuous if some row has and for every other column . Removing an innocuous column, and the rows that become zero, does not change the nullity. Indeed, if , row gives , so . Hence the null vectors of are the null vectors of without column , with a 0 added at position , and zero rows do not affect a null space. So if repeated removal of innocuous columns ends with no column, has full column rank (Li and coauthors, Lemma 2 and Corollary 4).
Theorem 18 (outline of the published proof). Li and coauthors draw as a directed graph. Each column is a T-node, each row an N-node, and each nonzero entry an edge from the T-node to the N-node. The set of N-nodes that a T-node points to is its footprint; when the local knots are distinct, it is the rectangle of global B-splines whose middle knots lie inside the local knot vectors. Removing innocuous columns is pruning: a T-node that points to an N-node of valence 1 is removed. Pruning ends either with nothing or with a V2-subgraph, a set of T-nodes whose footprints cover each of their N-nodes at least twice. By the lemma above, a T-mesh without V2-subgraphs gives a matrix of full rank, for every choice of knots (Theorem 5), since the footprints depend only on the topology. The remaining step shows that an analysis-suitable T-mesh has no V2-subgraph. Suppose that it has one, and take its lowest, then leftmost, N-node . Then two T-nodes of the subgraph cover ; they lie to the north-east of (Lemma 17), they have the same leftmost and lowest knot lines, and they do not lie on one horizontal or one vertical line. Lemmas 15 and 16, which use the absence of L-junctions, I-junctions and isolated nodes (Lemma 8) and the structure of the mesh between the two T-nodes (Lemmas 11 to 14), show that two of their T-junction extensions then intersect. This contradicts Definition 7. We cite these lemmas and do not repeat their case analysis. Beirão da Veiga, Buffa, Cho and Sangalli give a second proof: an analysis-suitable T-mesh is dual-compatible, so every has a dual functional with , and applying to gives .
Consequences
- A basis and its dimension. On an analysis-suitable T-mesh the blending functions are a basis of their span, so the dimension of the T-spline space is the number of anchors. The mass matrix is then symmetric positive definite, and a Galerkin stiffness matrix of a coercive problem is nonsingular after the boundary conditions are imposed.
- Unique control points. A T-spline surface on an analysis-suitable T-mesh has exactly one set of control points. Refinement matrices, such as the one of local refinement, are then unique too.
- A practical test for any T-mesh. For a general T-mesh, compute and its rank in exact arithmetic, or prune its graph. In Bezier extraction the same matrix appears element by element.
- Together with partition of unity. Analysis-suitable T-splines also form a partition of unity, a cited result of Zhang and Li (2015) for every degree. With independence, they behave like B-splines in a finite element code.
Tightness
- General T-meshes can be dependent. For the T-mesh of Buffa, Cho and Sangalli, drawn as Figure 4 of Li and coauthors, is with rank 39, and the functions , , of three T-junctions satisfy . The mesh is not analysis-suitable. The tests rebuild it in index space and get the same rank and relation.
- Dependence can need special knots. For the same topology, Li and coauthors show by column reduction that the functions are dependent if and only if three consecutive knots are equal and three consecutive knots are equal, as in the example, where both are . The tests check that moving either triple knot apart gives rank 40. Theorem 18 is stronger: the topology alone gives independence.
- Analysis-suitable is sufficient, not necessary. A tensor mesh with one face split by a cross is not analysis-suitable, because its extensions touch at the centre, but its blending functions are independent for the knots of the tests. Theorem 18 gives no information on such meshes.
- Degree. The theorem above is bicubic. Beirão da Veiga, Buffa, Sangalli and Vázquez extend analysis-suitability and independence to every degree.
Code
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/t-spline-linear-independence/. The authors are listed in prov/8C8B3H.jsonl.
"""Linear independence of bicubic T-spline blending functions, checked exactly.
The T-mesh is in index space, as on the t-spline page: vertical lines 0..m
with knot values sv, horizontal lines 0..n with values tv, and sets of unit
edges h and v. The outer two lines on each side must be complete.
nurbs_matrix(mesh) builds the T-spline-to-NURBS matrix M column by column:
column A holds the coefficients of the blending function T_A in the tensor
B-splines on all index lines, found by Boehm insertion into the local knot
vectors of A. Theorem 1 of Li, Zheng, Sederberg, Hughes and Scott says that
the T_A are linearly independent if and only if M has full column rank;
rank and null_vector decide this exactly with Fraction.
"""
from fractions import Fraction
DIRS = {"R": (1, 0), "L": (-1, 0), "U": (0, 1), "D": (0, -1)}
OPP = {"R": "L", "L": "R", "U": "D", "D": "U"}
class TMesh:
def __init__(self, sv, tv):
self.sv, self.tv = list(sv), list(tv)
self.m, self.n = len(sv) - 1, len(tv) - 1
self.h, self.v = set(), set()
def copy(self):
o = TMesh(self.sv, self.tv)
o.h, o.v = set(self.h), set(self.v)
return o
def add_h(self, i0, i1, j):
self.h.update((i, j) for i in range(min(i0, i1), max(i0, i1)))
def add_v(self, i, j0, j1):
self.v.update((i, j) for j in range(min(j0, j1), max(j0, j1)))
def add_lines(self, cols, rows):
for i in cols:
self.add_v(i, 0, self.n)
for j in rows:
self.add_h(0, self.m, j)
def on_v(self, i, j):
return (i, j) in self.v or (i, j - 1) in self.v
def on_h(self, i, j):
return (i, j) in self.h or (i - 1, j) in self.h
def is_vertex(self, i, j):
return self.on_v(i, j) and self.on_h(i, j)
def has_edge(self, i, j, d):
return {"R": (i, j) in self.h, "L": (i - 1, j) in self.h, "U": (i, j) in self.v, "D": (i, j - 1) in self.v}[d]
def inside(self, i, j):
return 0 <= i <= self.m and 0 <= j <= self.n
def march(self, i, j, d, count):
"""The first count points from (i, j) in direction d that lie on perpendicular edges."""
di, dj = DIRS[d]
out = []
while len(out) < count:
i, j = i + di, j + dj
if not self.inside(i, j):
break
if (self.on_v(i, j) if d in "RL" else self.on_h(i, j)):
out.append((i, j))
return out
def anchors(self):
return [(i, j) for j in range(2, self.n - 1) for i in range(2, self.m - 1) if self.is_vertex(i, j)]
def local_index_vectors(self, i, j):
r = [p[0] for p in self.march(i, j, "R", 2)]
l = [p[0] for p in self.march(i, j, "L", 2)]
u = [p[1] for p in self.march(i, j, "U", 2)]
d = [p[1] for p in self.march(i, j, "D", 2)]
if min(len(r), len(l), len(u), len(d)) < 2:
raise ValueError("a ray left the mesh; complete the outer lines")
return (tuple(l[::-1] + [i] + r), tuple(d[::-1] + [j] + u))
def extensions(mesh):
"""T-junction extensions as closed segments (horizontal?, line, lo, hi)."""
out = []
for i in range(mesh.m + 1):
for j in range(mesh.n + 1):
if not mesh.is_vertex(i, j):
continue
for d in "RLUD":
di, dj = DIRS[d]
if mesh.inside(i + di, j + dj) and not mesh.has_edge(i, j, d) and mesh.has_edge(i, j, OPP[d]):
f = mesh.march(i, j, d, 2)[-1]
e = mesh.march(i, j, OPP[d], 1)[0]
if d in "RL":
out.append((True, j, min(f[0], e[0]), max(f[0], e[0])))
else:
out.append((False, i, min(f[1], e[1]), max(f[1], e[1])))
return out
def is_analysis_suitable(mesh):
"""Definition 7 of Li and coauthors: no horizontal extension meets a vertical one."""
ext = extensions(mesh)
hor = [x for x in ext if x[0]]
ver = [x for x in ext if not x[0]]
return not any(lo <= i <= hi and lo2 <= j <= hi2 for _, j, lo, hi in hor for _, i, lo2, hi2 in ver)
def insert_one(knots, x, values):
"""Boehm's rule for one cubic B-spline with index knots."""
tau = sorted(list(knots) + [x])
t = [values[k] for k in knots]
u = values[x]
c0 = Fraction(1) if u >= t[3] else (u - t[0]) / (t[3] - t[0])
c1 = Fraction(1) if u <= t[1] else (t[4] - u) / (t[4] - t[1])
return [(c0, tuple(tau[:5])), (c1, tuple(tau[1:]))]
def to_global(knots, values):
"""Coefficients of N[knots] in the B-splines on all index lines: {first index: coefficient}."""
funcs = {tuple(knots): Fraction(1)}
for x in range(knots[0] + 1, knots[-1]):
if x in knots:
continue
nxt = {}
for kn, c in funcs.items():
parts = insert_one(kn, x, values) if kn[0] < x < kn[-1] and x not in kn else [(1, kn)]
for c2, k2 in parts:
if c2:
nxt[k2] = nxt.get(k2, Fraction(0)) + c * c2
funcs = nxt
return {kn[0]: c for kn, c in funcs.items()}
def nurbs_matrix(mesh):
"""The anchors and the columns of M: column A is {(a, b): coefficient of B_a(s) B_b(t)}."""
anchors = mesh.anchors()
cols = []
for A in anchors:
s, t = mesh.local_index_vectors(*A)
ds, dt = to_global(s, mesh.sv), to_global(t, mesh.tv)
cols.append({(a, b): x * y for a, x in ds.items() for b, y in dt.items()})
return anchors, cols
def _echelon(cols):
keys = sorted({k for c in cols for k in c})
rows = [[c.get(k, Fraction(0)) for c in cols] for k in keys]
pivots, r = [], 0
for c in range(len(cols)):
piv = next((i for i in range(r, len(rows)) if rows[i][c] != 0), None)
if piv is None:
continue
rows[r], rows[piv] = rows[piv], rows[r]
p = rows[r][c]
rows[r] = [x / p for x in rows[r]]
for i in range(len(rows)):
if i != r and rows[i][c] != 0:
f = rows[i][c]
rows[i] = [x - f * y for x, y in zip(rows[i], rows[r])]
pivots.append(c)
r += 1
return rows[:r], pivots
def rank(cols):
return len(_echelon(cols)[1])
def null_vector(cols):
"""A nonzero delta with sum_A delta_A column_A = 0, or None if the rank is full."""
rows, pivots = _echelon(cols)
free = [c for c in range(len(cols)) if c not in pivots]
if not free:
return None
f = free[0]
delta = [Fraction(0)] * len(cols)
delta[f] = Fraction(1)
for row, c in zip(rows, pivots):
delta[c] = -row[f]
return delta
def bspline(knots, x, last):
"""Cubic B-spline on five knot values at x, by Cox-de Boor (closed at the last knot)."""
vals = [Fraction(int(a <= x < b or (a < b == last == x))) for a, b in zip(knots, knots[1:])]
for d in range(1, 4):
vals = [
((x - knots[k]) / (knots[k + d] - knots[k]) * vals[k] if knots[k + d] != knots[k] else 0)
+ ((knots[k + d + 1] - x) / (knots[k + d + 1] - knots[k + 1]) * vals[k + 1] if knots[k + d + 1] != knots[k + 1] else 0)
for k in range(len(vals) - 1)
]
return vals[0]
def blend(mesh, A, s, t):
si, ti = mesh.local_index_vectors(*A)
return bspline([mesh.sv[k] for k in si], s, mesh.sv[-1]) * bspline([mesh.tv[k] for k in ti], t, mesh.tv[-1])
test_t_spline_linear_independence.py 108 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/t-spline-linear-independence/. The authors are listed in prov/8C8B3H.jsonl.
import random
from fractions import Fraction as F
from t_spline_linear_independence import TMesh, blend, is_analysis_suitable, null_vector, nurbs_matrix, rank
HALF = F(1, 2)
def bcs_mesh(s=(HALF, HALF, HALF, F(2, 3)), t=(HALF, HALF, HALF)):
"""The T-mesh of Buffa, Cho and Sangalli (Figure 4 of Li and coauthors) in index space.
The drawn lines are the columns 2..9 and the rows 2..8; the columns 0, 1,
10, 11 and the rows 0, 1, 9, 10 repeat the end knots to make open knot
vectors. T1, T2 and T3 of the figure are the anchors (4, 5), (5, 6), (6, 6).
"""
sv = [F(0)] * 4 + list(s) + [F(1)] * 4
tv = [F(0)] * 4 + list(t) + [F(1)] * 4
T = TMesh(sv, tv)
T.add_lines([0, 1, 2, 3, 5, 8, 9, 10, 11], [0, 1, 2, 3, 5, 7, 8, 9, 10])
T.add_v(4, 0, 5) # the column s = 1/2 that ends at T1
T.add_h(0, 4, 4) # the row that ends at that column
T.add_v(6, 6, 10) # two columns that start on the row of T2 and T3
T.add_v(7, 6, 10)
T.add_h(5, 11, 6) # the row that starts at T2
return T
def cross_mesh(vals, insertion_edges=True):
"""A tensor mesh with one face split into four; with the two insertion edges it is analysis-suitable."""
T = TMesh(vals, vals)
lines = [0, 1, 2, 3, 5, 7, 9, 11, 12, 13, 14]
T.add_lines(lines, lines)
T.add_v(6, 5, 7)
T.add_h(3, 9, 6) if insertion_edges else T.add_h(5, 7, 6)
return T
def random_values(rng, interior):
xs = sorted(rng.sample(range(1, 1000), interior))
return [F(0)] * 4 + [F(x, 1000) for x in xs] + [F(1)] * 4
def points(rng, k):
return [(F(rng.randint(0, 100), 100), F(rng.randint(0, 100), 100)) for _ in range(k)]
def test_buffa_cho_sangalli_mesh_is_dependent():
T = bcs_mesh()
anchors, cols = nurbs_matrix(T)
assert len(anchors) == 40 and len({k for c in cols for k in c}) == 56
assert rank(cols) == 39
assert not is_analysis_suitable(T)
delta = null_vector(cols)
support = {anchors[i]: d for i, d in enumerate(delta) if d}
T1, T2, T3 = (4, 5), (5, 6), (6, 6)
assert set(support) == {T1, T2, T3}
assert support[T2] == -support[T1] and support[T3] == -support[T1] / 3
rng = random.Random(1)
for s, t in points(rng, 30):
assert blend(T, T1, s, t) == blend(T, T2, s, t) + blend(T, T3, s, t) / 3
def test_full_rank_is_equivalent_to_independence_on_samples():
"""Theorem 1: the rank of M equals the rank of the blending functions sampled at many points."""
rng = random.Random(2)
pts = points(rng, 120)
for T in (bcs_mesh(), bcs_mesh(s=(F(2, 5), HALF, F(3, 5), F(2, 3)))):
anchors, cols = nurbs_matrix(T)
sampled = [{p: blend(T, A, *p) for p in pts} for A in anchors]
assert rank(sampled) == rank(cols)
def test_same_topology_with_other_knots_is_independent():
"""Li and coauthors: the mesh is dependent only if s2 = s3 = s4 and t2 = t3 = t4."""
assert rank(nurbs_matrix(bcs_mesh(s=(F(2, 5), HALF, F(3, 5), F(2, 3))))[1]) == 40
assert rank(nurbs_matrix(bcs_mesh(t=(F(2, 5), HALF, F(3, 5))))[1]) == 40
assert rank(nurbs_matrix(bcs_mesh(s=(HALF, HALF, HALF, F(3, 4))))[1]) == 39
def test_analysis_suitable_meshes_are_independent_for_random_knots():
rng = random.Random(3)
for _ in range(6):
vals = random_values(rng, 7)
T = cross_mesh(vals)
assert is_analysis_suitable(T)
anchors, cols = nurbs_matrix(T)
assert len(anchors) == 56 and rank(cols) == 56
def test_analysis_suitable_is_sufficient_but_not_necessary():
T = cross_mesh([F(0)] * 4 + [F(k, 8) for k in range(1, 8)] + [F(1)] * 4, insertion_edges=False)
assert not is_analysis_suitable(T)
anchors, cols = nurbs_matrix(T)
assert rank(cols) == len(anchors)
def test_tensor_mesh_matrix_is_the_identity():
rng = random.Random(4)
vals = random_values(rng, 5)
T = TMesh(vals, vals)
T.add_lines(range(13), range(13))
anchors, cols = nurbs_matrix(T)
assert is_analysis_suitable(T)
for (i, j), c in zip(anchors, cols):
assert c == {(i - 2, j - 2): 1}
History
Sederberg and coauthors introduced T-splines in 2003. Buffa, Cho and Sangalli showed in 2010 that their blending functions can be linearly dependent, which ruled out general T-splines as a basis for analysis. Li, Zheng, Sederberg, Hughes and Scott replied with the rank criterion and with analysis-suitable T-splines, and proved them independent; the paper appeared in Computer Aided Geometric Design in 2012. In the same year Beirão da Veiga, Buffa, Cho and Sangalli proved that analysis-suitable T-splines are dual-compatible, and with Vázquez extended the theory to arbitrary degree in 2013. Zhang and Li proved partition of unity for arbitrary degree in 2015.
References
- Xin Li, Jianmin Zheng, Thomas W. Sederberg, Thomas J. R. Hughes and Michael A. Scott, On linear independence of T-spline blending functions, Computer Aided Geometric Design 29(1) (2012), 63 to 76, Section 4.1 (Theorem 1 and Figure 4, the 56 by 40 matrix of rank 39), Section 4.2 (column reduction, Lemma 2, Corollary 4, and the knot condition for the example), Section 5 (the directed graph, V2-subgraphs, Theorem 5), Section 6 (Definition 7, Lemmas 8 to 17, Theorem 18)
- A. Buffa, D. Cho and G. Sangalli, Linear independence of the T-spline blending functions associated with some particular T-meshes, Computer Methods in Applied Mechanics and Engineering 199(23-24) (2010), 1437 to 1445, the T-mesh with linearly dependent blending functions, and the relation between the three functions (general locator)
- L. Beirão da Veiga, A. Buffa, D. Cho and G. Sangalli, Analysis-suitable T-splines are dual-compatible, Computer Methods in Applied Mechanics and Engineering 249-252 (2012), 42 to 51, a second proof of linear independence, through dual functionals (general locator)
- L. Beirão da Veiga, A. Buffa, G. Sangalli and R. Vázquez, Analysis-suitable T-splines of arbitrary degree, definition, linear independence and approximation properties, Mathematical Models and Methods in Applied Sciences 23(11) (2013), 1979 to 2003, linear independence for every degree (general locator)
- Jingjing Zhang and Xin Li, On the linear independence and partition of unity of arbitrary degree analysis-suitable T-splines, Communications in Mathematics and Statistics 3(3) (2015), 353 to 364, linear independence and partition of unity for every degree (general locator)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 8C8B3H Edit this page History Report an error Markdown