cs0410045/lwls.tex
1: \section{The LWLS framework}
2: \label{sec:lwls}
3: 
4: The FEMWARP method can be generalized as follows.  One produces, using
5: some method, a family of weights $w_{ij}$ for each ordered pair of nodes
6: $(i,j)$ such that $j$ is a neighbor of $i$ and such that
7: $i$ is interior.  Denote by $N(i)$ the set
8: of neighbors of $i$, and let the coordinates of
9: node $i$ be $(x_i,y_i)$ in 2D or $(x_i,y_i,z_i)$
10: in 3D.  We want these weights
11: to express interior nodes  as affine
12: combinations of their neighbors, which imposes the following constraints
13: on the $w_{ij}$'s: For each $i$ indexing an interior node,
14: \begin{eqnarray*}
15: \sum_{j\in N(i)}w_{ij}&=&1, \\
16: \sum_{j\in N(i)}w_{ij}x_j&=& x_i, \\
17: \sum_{j\in N(i)}w_{ij}y_j&=& y_i, 
18: \end{eqnarray*}
19: and in three dimensions, there is a fourth equation for 
20: $z$-coordinates. Let $[A_I,A_B]$ be $m\times(m+b)$
21: matrix with $1$'s on the diagonal and
22: $-w_{ij}$ in position $(i,j)$ whenever $j\in N(i)$.
23: The above three equations may be rewritten in terms
24: of $A_I$ and $A_B$ as follows:
25: \begin{eqnarray*}
26: A_Ie_I+A_Be_B&=&\bz, \\
27: A_Ix_I+A_Bx_B&=&\bz, \\
28: A_Iy_I+A_By_B&=&\bz,
29: \end{eqnarray*}
30: where $e_I$ and $e_B$ are vectors of all 1's whose length is equal
31: to the number of interior and boundary nodes respectively, $x_I$
32: and $x_B$ are the vectors of $x$-coordinates of mesh nodes in the
33: interior and boundary respectively, and similar for $y_B$ and
34: $y_I$.
35: 
36: Once these weights are derived, then, as in FEMWARP, the
37: user-supplied deformation may be applied to the boundary nodes
38: yielding deformed boundary coordinates $(\hat x_B,\hat y_B)$ in two
39: dimensions. 
40: Finally, the new position of the interior nodes is computed via
41: $$A_I[\hat x_I,\hat y_I] = -A_B[\hat x_B,\hat y_B].$$
42: We will say that any method following this framework is a
43: {\em linearly weighted Laplacian smoothing} (LWLS) method.  The
44: precise relationship between these methods  and traditional Laplacian
45: smoothing is the subject of Section~\ref{sec:iterative}.  The FEMWARP
46: method was not written exactly this way since the diagonal elements
47: in $[A_I,A_B]$ for FEMWARP are not rescaled to be equal to 1.  
48: Usually for FEMWARP
49: it is preferable to preserve the symmetry of $A_I$ and
50: therefore omit the scaling step.  This omission has no effect on the
51: final answer.
52: 
53: One concern with the weights in FEMWARP is that, in general, they
54: are not always nonnegative.  Sometimes it is desirable to have
55: all nonnegative weights.  Geometrically, this means that the
56: interior nodes are expressed as convex (rather than merely affine) combinations
57: of neighbors.  Nonnegative weights are useful if the weight matrix is
58: used to interpolate properties besides nodal coordinates, and it is
59: mandatory that no extrapolation occur (e.g., because a nodal value
60: that strays outside the range of boundary data would violate some
61: kind of physical constraint).
62: 
63: In \cite{ShontzThesis}, the first author experimented with other
64: weighting schemes including a method called LBWARP in which the
65: weights $w_{ij}$ are obtained by solving a log barrier optimization problem
66: for each $i$:
67: $$
68: \begin{array}{rl}
69: \max & \sum_{j\in N(i)} \log w_{ij} \\
70: \mbox{subject to} 
71: &
72: \sum_{j\in N(i)}w_{ij}=1 \\
73: &
74: \sum_{j\in N(i)}w_{ij}x_j= x_i \\
75: &
76: \sum_{j\in N(i)}w_{ij}y_j= y_i. 
77: \end{array}
78: $$
79: The rationale for this optimization formulation is to ensure that
80: each $w_{ij}$ is  positive, and, more strongly,  
81: that it is bounded well away from 0
82: (since the logarithmic term tends to $-\infty$ if any of the $w_{ij}$'s
83: approaches zero).  This problem is convex, and there is an efficient algorithm
84: to find the unique global minimum.
85: It can be proved \cite{ShontzThesis} that the
86: $w_{ij}$'s that solve this optimization
87: problem have a positive lower bound that 
88: depends only on the worst-case aspect ratio of triangles or
89: tetrahedra in the mesh.  
90: 
91: A further important property that a method in the LWLS family ought
92: to satisfy is that $A_I$ should be nonsingular to ensure a unique
93: solution for the new coordinates.  For FEMWARP, the nonsingularity
94: of $A_I$ follows from well-known theory of finite element analysis.
95: For LBWARP, the nonsingularity follows because $A_I$ is 
96: an irreducible and diagonally dominant matrix with strict inequality
97: for at least one row.
98: %a diagonally
99: %dominant matrix with nonpositive diagonal entries.  We have the
100: %following theorem in this regard.
101: %\begin{theorem}
102: %\cite{gunther}
103: %If $A \in \mathbf{R}^{n \times n}$ satisfies $a_{ii} > 0$,
104: %$a_{ij} \leq 0$ for all $i \ne j$, is weakly row diagonally dominant
105: %(i.e., $Ae \geq 0, \neq 0$, where $e$ is the vector of all $1$'s), and is 
106: %irreducible, then $A$ is an $M$-matrix.
107: %\label{thref:mmatrix_theorem}
108: %\end{theorem}
109: 
110: Because the mesh is connected and a positive weight is associated with
111: each edge, we see that $A_I$ is irreducible.  Also, $A_I$ is digonally
112: dominant, as its diagonal entries are $1$, and its off-diagonal entries
113: are nonpositive and sum to a number in $[-1,0]$ in each row.  Since 
114: there is at least one interior node adjacent to a boundary node, $A_I 
115: e_I \neq 0,$ where $e_I$ is a vector of all $1$'s of length $m$. 
116: %Therefore, $A_I$ satisfies the definition of an $M-$matrix by the above
117: %argument~\cite{ortega}.  Thus, $A_I$ is invertible.
118: Therefore, $A_I$ satisfies the definition of an irreducibly diagonally dominant 
119: matrix by the above argument.  Thus, $A_I$ is invertible \cite[Theorem 1.8]{varga63}.
120: 
121: Experiments in \cite{ShontzThesis} indicate that 
122: weights obtained from LBWARP generally do not perform as well as FEMWARP for
123: the mesh warping application in terms of resisting
124: element reversal.  
125: %Therefore, we do not consider LBWARP any further in this paper.
126: 
127: One useful property that holds for any method in the LWLS framework
128: including FEMWARP and LBWARP
129: is that the method is {\em exact} for affine transformations.
130: Let us state this as a theorem.  The theorem is stated for the
131: two-dimensional case, and it extends in the obvious way to three
132: dimensions.
133: \begin{theorem}
134: Let $A_B$ and $A_I$ be generated using a method from the LWLS framework,
135: and assume $A_I$ is nonsingular.  Let $[\hat x_B,\hat y_B]$ be
136: the user-specified deformed coordinates of the boundary.  
137: Suppose there exists a $2\times 2$ nonsingular matrix $L$ and
138: $2$-vector $v$ such that for each $j\in B$, 
139: $$\left(
140: \begin{array}{c}
141: \hat x_j \\
142: \hat y_j
143: \end{array}
144: \right)=
145: L
146: \left(
147: \begin{array}{c}
148:  x_j \\ 
149:  y_j
150: \end{array}
151: \right)+v.$$
152: Let $[\hat x_I,\hat y_I]$ be the deformed
153: interior coordinates computed by the method.  Then for each $i\in I$,
154: $$\left(
155: \begin{array}{c}
156: \hat x_i \\
157: \hat y_i
158: \end{array}
159: \right)=
160: L
161: \left(
162: \begin{array}{c}
163:  x_i \\ 
164:  y_i
165: \end{array}
166: \right)+v.$$
167: \label{thm:affine}
168: \end{theorem}
169: 
170: 
171: \begin{proof}
172: The positions of
173: the interior nodes in the deformed mesh
174: are given by
175: \begin{equation}
176: [\hat x_I, \hat y_I] = -A_I^{-1}A_B([x_B, y_B]L^T+e_B v^{T})
177: \label{eqn:unique}
178: \end{equation}
179: where, as above, $\hat x_I,\hat y_I$ are column vectors composed of the $x$-
180: and $y$-coordinates of the interior nodes respectively and
181: $x_B$, $y_B$ are the corresponding vectors for boundary nodes,
182: and finally $e_{B}$ is vector of all $1$'s of length $b$.
183: 
184: In order to show that affine mappings yield exact results with any
185: algorithm within the framework, we
186: want to show that (\ref{eqn:unique}) is the same as:
187: \begin{equation}
188: [\hat x_I,\hat y_I] = [ x_I, y_I]L^T+e_I v^{T}.
189: \label{eqn:guess}
190: \end{equation}
191: 
192: Observe that the equivalence of (\ref{eqn:unique}) and 
193: (\ref{eqn:guess}) would follow immediately from:
194: \begin{equation}
195: A_I([x_I,y_I]L^T+e_I v^{T}) = -A_B([x_B,y_B]L^T+e_B v^{T}).
196: \label{eqn:truth}
197: \end{equation}
198: 
199: Thus, it remains to check that (\ref{eqn:truth}) holds.
200: 
201: Because the weights for each interior node sum to $1$,
202: $A_I e_I + A_B e_B = \bz$ as noted above.
203: Hence $(A_I e_I + A_B e_B)v^{T} = \bz.$  
204: Also, because $[x_I, y_I]$ and $[x_B, y_B]$
205: denote the original positions of the nodes, we know that $A_I[x_I, 
206: y_I]+A_B[x_B, y_B] = \bz$.  So
207: $(A_I [x_I, y_I]+A_B[x_B, y_B])L^T = \bz$.  
208: 
209: Putting these together, we see that
210: \begin{equation}
211: (A_I [x_I,y_I]+A_B [x_B,y_B])L^T + (A_I e_I + A_B e_I) v^{T} = \bz.
212: \label{eqn:good}
213: \end{equation}
214: 
215: Therefore, (\ref{eqn:truth}) holds, and the lemma is proven.
216: \end{proof}
217: 
218: 
219: 
220: 
221: 
222: 
223: 
224: 
225: 
226: 
227: 
228: 
229: 
230: